LEFT | RIGHT |
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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
1118 // Mozilla changed the preference name, thus the first run is being
showed again after updating. We don't wanna that | 1118 // Mozilla changed the preference name, thus the first run is being
shown again after updating. We don't want that |
1119 // See https://issues.adblockplus.org/ticket/7387 | 1119 // See https://issues.adblockplus.org/ticket/7387 |
1120 final String prefFirstRunEnabledBefore57 = GeckoPreferences.NON_PREF
_PREFIX + "startpane_enabled"; | 1120 final String prefFirstRunEnabledBefore57 = GeckoPreferences.NON_PREF
_PREFIX + "startpane_enabled"; |
1121 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) && | 1122 prefs.getBoolean(prefFirstRunEnabledBefore57, true) && |
1123 prefs.getBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLE
D, true)) { | 1123 prefs.getBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLE
D, true)) { |
1124 showSplashScreen = false; | 1124 showSplashScreen = false; |
1125 if (!Intent.ACTION_VIEW.equals(intent.getAction())) { | 1125 if (!Intent.ACTION_VIEW.equals(intent.getAction())) { |
1126 // 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. |
1127 final Distribution distribution = Distribution.getInstance(B
rowserApp.this); | 1127 final Distribution distribution = Distribution.getInstance(B
rowserApp.this); |
1128 if (!distribution.shouldWaitForSystemDistribution()) { | 1128 if (!distribution.shouldWaitForSystemDistribution()) { |
(...skipping 3480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4609 @Override | 4609 @Override |
4610 public void onLightweightThemeReset() { | 4610 public void onLightweightThemeReset() { |
4611 refreshStatusBarColor(); | 4611 refreshStatusBarColor(); |
4612 } | 4612 } |
4613 | 4613 |
4614 private void refreshStatusBarColor() { | 4614 private void refreshStatusBarColor() { |
4615 final boolean isPrivate = mBrowserToolbar.isPrivateMode(); | 4615 final boolean isPrivate = mBrowserToolbar.isPrivateMode(); |
4616 WindowUtil.setStatusBarColor(BrowserApp.this, isPrivate); | 4616 WindowUtil.setStatusBarColor(BrowserApp.this, isPrivate); |
4617 } | 4617 } |
4618 } | 4618 } |
LEFT | RIGHT |