author | Eugen Sawin <esawin@mozilla.com> |
Thu, 26 Jul 2018 16:50:38 +0200 | |
changeset 428616 | e25320d4cca710fdad18ce3812a319cc904326f3 |
parent 428615 | d05c4d2a0ef86f316eaf027356fa962217f6f103 |
child 428617 | 721e491ecd01e32b82cb817cdd4658475cd97330 |
push id | 34337 |
push user | ncsoregi@mozilla.com |
push date | Thu, 26 Jul 2018 21:58:45 +0000 |
treeherder | mozilla-central@8f2f847b2f9d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | droeh |
bugs | 1437988 |
milestone | 63.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java | file | annotate | diff | comparison | revisions |
--- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java +++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java @@ -109,17 +109,16 @@ public class CustomTabsActivity extends setContentView(R.layout.customtabs_activity); final SafeIntent intent = new SafeIntent(getIntent()); doorhangerOverlay = findViewById(R.id.custom_tabs_doorhanger_overlay); mProgressView = (ProgressBar) findViewById(R.id.page_progress); - updateProgress(10); final Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar); setSupportActionBar(toolbar); final ActionBar actionBar = getSupportActionBar(); bindNavigationCallback(toolbar); actionBarPresenter = new ActionBarPresenter(actionBar, getActionBarTextColor()); actionBarPresenter.displayUrlOnly(intent.getDataString()); actionBarPresenter.setBackgroundColor(IntentUtil.getToolbarColor(intent), getWindow()); @@ -591,17 +590,16 @@ public class CustomTabsActivity extends return null; } /* GeckoSession.NavigationDelegate */ @Override public void onLocationChange(GeckoSession session, String url) { mCurrentUrl = url; updateActionBar(); - updateProgress(60); } @Override public void onCanGoBack(GeckoSession session, boolean canGoBack) { mCanGoBack = canGoBack; } @Override @@ -658,28 +656,31 @@ public class CustomTabsActivity extends /* GeckoSession.ProgressDelegate */ @Override public void onPageStart(GeckoSession session, String url) { mCurrentUrl = url; mCanStop = true; updateActionBar(); updateCanStop(); - updateProgress(20); } @Override public void onPageStop(GeckoSession session, boolean success) { mCanStop = false; updateCanStop(); - updateProgress(100); } @Override public void onProgressChange(GeckoSession session, int progress) { + if (progress == 100) { + mCanStop = false; + updateCanStop(); + } + updateProgress(progress); } @Override public void onSecurityChange(GeckoSession session, SecurityInformation securityInfo) { mSecurityInformation = securityInfo; updateActionBar(); }