Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2385543002: Adjust Chrome to normal behavior once user leaves special locale (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.ActivityManager; 9 import android.app.ActivityManager;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 386
387 @Override 387 @Override
388 public void onStopWithNative() { 388 public void onStopWithNative() {
389 super.onStopWithNative(); 389 super.onStopWithNative();
390 390
391 if (getActivityTab() != null) getActivityTab().setIsAllowedToReturnToExt ernalApp(false); 391 if (getActivityTab() != null) getActivityTab().setIsAllowedToReturnToExt ernalApp(false);
392 392
393 mTabModelSelectorImpl.saveState(); 393 mTabModelSelectorImpl.saveState();
394 StartupMetrics.getInstance().recordHistogram(true); 394 StartupMetrics.getInstance().recordHistogram(true);
395 mActivityStopMetrics.onStopWithNative(this); 395 mActivityStopMetrics.onStopWithNative(this);
396
397 mLocaleManager.stopObservePhoneStateChanges();
Maria 2016/10/04 03:48:41 nit: how about calling these two methods startObs
Ian Wen 2016/10/04 18:31:54 Done.
396 } 398 }
397 399
398 @Override 400 @Override
399 public void onStart() { 401 public void onStart() {
400 super.onStart(); 402 super.onStart();
401 StartupMetrics.getInstance().updateIntent(getIntent()); 403 StartupMetrics.getInstance().updateIntent(getIntent());
402 } 404 }
403 405
404 @Override 406 @Override
405 public void onStartWithNative() { 407 public void onStartWithNative() {
406 super.onStartWithNative(); 408 super.onStartWithNative();
407 // If we don't have a current tab, show the overview mode. 409 // If we don't have a current tab, show the overview mode.
408 if (getActivityTab() == null) mLayoutManager.showOverview(false); 410 if (getActivityTab() == null) mLayoutManager.showOverview(false);
409 411
412 mLocaleManager.observePhoneStateChanges();
413
410 resetSavedInstanceState(); 414 resetSavedInstanceState();
411 } 415 }
412 416
413 @Override 417 @Override
414 public void onNewIntentWithNative(Intent intent) { 418 public void onNewIntentWithNative(Intent intent) {
415 try { 419 try {
416 TraceEvent.begin("ChromeTabbedActivity.onNewIntentWithNative"); 420 TraceEvent.begin("ChromeTabbedActivity.onNewIntentWithNative");
417 421
418 super.onNewIntentWithNative(intent); 422 super.onNewIntentWithNative(intent);
419 if (CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_ INTENTS)) { 423 if (CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_ INTENTS)) {
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 // TODO(mthiesse): Toggle toolbar overlay, popups, etc. 1556 // TODO(mthiesse): Toggle toolbar overlay, popups, etc.
1553 public void setUIVisibilityForVR(int visibility) { 1557 public void setUIVisibilityForVR(int visibility) {
1554 mControlContainer.setVisibility(visibility); 1558 mControlContainer.setVisibility(visibility);
1555 getCompositorViewHolder().getSurfaceView().setVisibility(visibility); 1559 getCompositorViewHolder().getSurfaceView().setVisibility(visibility);
1556 getCompositorViewHolder().setVisibility(visibility); 1560 getCompositorViewHolder().setVisibility(visibility);
1557 1561
1558 // Enter HTML5 fullscreen to ensure the texture fills the entire composi ted surface. 1562 // Enter HTML5 fullscreen to ensure the texture fills the entire composi ted surface.
1559 getFullscreenManager().setPersistentFullscreenMode(visibility == View.GO NE); 1563 getFullscreenManager().setPersistentFullscreenMode(visibility == View.GO NE);
1560 } 1564 }
1561 } 1565 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/locale/LocaleManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698