diff options
author | John Reck <jreck@google.com> | 2010-12-01 19:29:32 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2010-12-03 10:28:16 -0800 |
commit | 63bb687da46c285f6a71ff47c9f00e46111ffec2 (patch) | |
tree | 900c9b592664af561b12290500e7fc77253bb96c /src/com/android/browser/BrowserActivity.java | |
parent | eff89529627530aef9f7760d8793934ee862470a (diff) | |
download | packages_apps_browser-63bb687da46c285f6a71ff47c9f00e46111ffec2.zip packages_apps_browser-63bb687da46c285f6a71ff47c9f00e46111ffec2.tar.gz packages_apps_browser-63bb687da46c285f6a71ff47c9f00e46111ffec2.tar.bz2 |
Debug settings changes
Bug: 3250498
Makes OpenGL rendering and user agent normally visible in settings->debug
Changing the OpenGL setting now automatically restarts the browser
Change-Id: I04036b580f2463f77376edb4bee2dfefe3d123ed
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index a8c393a..1c15153 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -39,6 +39,9 @@ import android.view.accessibility.AccessibilityManager; public class BrowserActivity extends Activity { + public static final String ACTION_RESTART = "--restart--"; + private static final String EXTRA_STATE = "state"; + private final static String LOGTAG = "browser"; private final static boolean LOGV_ENABLED = @@ -94,6 +97,10 @@ public class BrowserActivity extends Activity { mController.setUi(mUi); mController.setWebViewFactory((BaseUi) mUi); + Bundle state = getIntent().getBundleExtra(EXTRA_STATE); + if (state != null && icicle == null) { + icicle = state; + } mController.start(icicle, getIntent()); } @@ -104,6 +111,16 @@ public class BrowserActivity extends Activity { @Override protected void onNewIntent(Intent intent) { + if (ACTION_RESTART.equals(intent.getAction())) { + Bundle outState = new Bundle(); + mController.onSaveInstanceState(outState); + finish(); + getApplicationContext().startActivity( + new Intent(getApplicationContext(), BrowserActivity.class) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + .putExtra(EXTRA_STATE, outState)); + return; + } mController.handleNewIntent(intent); } |