diff options
author | digit@chromium.org <digit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-07 16:59:34 +0000 |
---|---|---|
committer | digit@chromium.org <digit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-07 16:59:34 +0000 |
commit | f1bdf1c72a39f47c133f7a45ff441849ec8b496b (patch) | |
tree | db89f58152e350dd2afc52b127f7773e39c6b0f3 /testing | |
parent | cbf03ba141434e753c517370696d93b43d8582d5 (diff) | |
download | chromium_src-f1bdf1c72a39f47c133f7a45ff441849ec8b496b.zip chromium_src-f1bdf1c72a39f47c133f7a45ff441849ec8b496b.tar.gz chromium_src-f1bdf1c72a39f47c133f7a45ff441849ec8b496b.tar.bz2 |
android: Improve ActivityStatus and add ChromiumActivity.
The ActivityStatus class used to track activity state changes is too basic
for some usage scenarios.
This patch does the following:
- Augment ActivityStatus with a new StateListener type that can be
registered to listen to all activity state changes.
Also add getActivity(), getState(), registerStateListener()
and unregisterStateListener() as static method.
- Add a new ChromiumActivity class that all Chromium main activities
should sub-class, to ensure that the ActivityStatus state is updated
appropriately.
- Modify all main activities in the Chromium code base to extend
from ChromiumActivity instead of Activity.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11419287
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing')
-rw-r--r-- | testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java index 77022506..fef3dce 100644 --- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java +++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java @@ -11,6 +11,7 @@ import android.os.Environment; import android.os.Handler; import android.util.Log; +import org.chromium.base.ChromiumActivity; import org.chromium.base.PathUtils; import org.chromium.base.SystemMonitor; @@ -19,7 +20,7 @@ import java.io.File; // Android's NativeActivity is mostly useful for pure-native code. // Our tests need to go up to our own java classes, which is not possible using // the native activity class loader. -public class ChromeNativeTestActivity extends Activity { +public class ChromeNativeTestActivity extends ChromiumActivity { private final String TAG = "ChromeNativeTestActivity"; private final String EXTRA_RUN_IN_SUB_THREAD = "RunInSubThread"; // We post a delayed task to run tests so that we do not block onCreate(). |