Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- | 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- |
2 * This Source Code Form is subject to the terms of the Mozilla Public | 2 * This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 package org.mozilla.gecko; | 6 package org.mozilla.gecko; |
7 | 7 |
8 import android.Manifest; | 8 import android.Manifest; |
9 import android.annotation.TargetApi; | 9 import android.annotation.TargetApi; |
10 import android.app.Activity; | 10 import android.app.Activity; |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1107 | 1107 |
1108 if (intent.getBooleanExtra(EXTRA_SKIP_STARTPANE, false)) { | 1108 if (intent.getBooleanExtra(EXTRA_SKIP_STARTPANE, false)) { |
1109 // Note that we don't set the pref, so subsequent launches can resul t | 1109 // Note that we don't set the pref, so subsequent launches can resul t |
1110 // in the firstrun pane being shown. | 1110 // in the firstrun pane being shown. |
1111 return; | 1111 return; |
1112 } | 1112 } |
1113 final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskRe ads(); | 1113 final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskRe ads(); |
1114 | 1114 |
1115 try { | 1115 try { |
1116 final SharedPreferences prefs = GeckoSharedPrefs.forProfile(this); | 1116 final SharedPreferences prefs = GeckoSharedPrefs.forProfile(this); |
1117 | 1117 |
jens
2019/03/28 16:05:28
Not important at all, but there is a little typo i
diegocarloslima
2019/03/28 20:02:13
Acknowledged.
| |
1118 // Mozilla changed the preference name, thus the first run is being showed again after updating. We don't wanna that | |
anton
2019/03/29 04:32:13
'showed' -> 'shown' ?
| |
1119 // See https://issues.adblockplus.org/ticket/7387 | |
1120 final String prefFirstRunEnabledBefore57 = GeckoPreferences.NON_PREF _PREFIX + "startpane_enabled"; | |
1118 if (prefs.getBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLE D_OLD, true) && | 1121 if (prefs.getBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLE D_OLD, true) && |
1122 prefs.getBoolean(prefFirstRunEnabledBefore57, true) && | |
1119 prefs.getBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLE D, true)) { | 1123 prefs.getBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLE D, true)) { |
1120 showSplashScreen = false; | 1124 showSplashScreen = false; |
1121 if (!Intent.ACTION_VIEW.equals(intent.getAction())) { | 1125 if (!Intent.ACTION_VIEW.equals(intent.getAction())) { |
1122 // Check to see if a distribution has turned off the first r un pager. | 1126 // Check to see if a distribution has turned off the first r un pager. |
1123 final Distribution distribution = Distribution.getInstance(B rowserApp.this); | 1127 final Distribution distribution = Distribution.getInstance(B rowserApp.this); |
1124 if (!distribution.shouldWaitForSystemDistribution()) { | 1128 if (!distribution.shouldWaitForSystemDistribution()) { |
1125 checkFirstrunInternal(); | 1129 checkFirstrunInternal(); |
1126 } else { | 1130 } else { |
1127 distribution.addOnDistributionReadyCallback(new Distribu tion.ReadyCallback() { | 1131 distribution.addOnDistributionReadyCallback(new Distribu tion.ReadyCallback() { |
1128 @Override | 1132 @Override |
(...skipping 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4605 @Override | 4609 @Override |
4606 public void onLightweightThemeReset() { | 4610 public void onLightweightThemeReset() { |
4607 refreshStatusBarColor(); | 4611 refreshStatusBarColor(); |
4608 } | 4612 } |
4609 | 4613 |
4610 private void refreshStatusBarColor() { | 4614 private void refreshStatusBarColor() { |
4611 final boolean isPrivate = mBrowserToolbar.isPrivateMode(); | 4615 final boolean isPrivate = mBrowserToolbar.isPrivateMode(); |
4612 WindowUtil.setStatusBarColor(BrowserApp.this, isPrivate); | 4616 WindowUtil.setStatusBarColor(BrowserApp.this, isPrivate); |
4613 } | 4617 } |
4614 } | 4618 } |
OLD | NEW |