Bug 1065004 - Provide an option to always open tabs in Private Browsing, amendment.r=liuche

This commit is contained in:
Allison Naaktgeboren 2015-06-02 14:37:20 -07:00
parent 724180c48c
commit 472a3add3f
2 changed files with 5 additions and 4 deletions

View File

@ -22,6 +22,7 @@ import org.mozilla.gecko.mozglue.ContextUtils.SafeIntent;
import org.mozilla.gecko.mozglue.JNITarget;
import org.mozilla.gecko.mozglue.RobocopTarget;
import org.mozilla.gecko.sync.setup.SyncAccounts;
import org.mozilla.gecko.preferences.GeckoPreferences;
import org.mozilla.gecko.util.GeckoEventListener;
import org.mozilla.gecko.util.ThreadUtils;
@ -853,7 +854,7 @@ public class Tabs implements GeckoEventListener {
boolean external = (flags & LOADURL_EXTERNAL) != 0;
final SharedPreferences sharedPrefs = GeckoSharedPrefs.forApp(mAppContext);
final boolean isPrivatePref = sharedPrefs.getBoolean("android.not_a_preference.openExternalURLsPrivately", false);
final boolean isPrivatePref = sharedPrefs.getBoolean(GeckoPreferences.PREFS_OPEN_URLS_IN_PRIVATE, false);
if (isPrivatePref && external) {
isPrivate = true;
}

View File

@ -127,7 +127,7 @@ OnSharedPreferenceChangeListener
private static final String PREFS_SYNC = NON_PREF_PREFIX + "sync";
private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.enabled";
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
private static final String PREFS_OPEN_URLS_IN_PRIVATE = NON_PREF_PREFIX + "openExternalURLsPrivately";
public static final String PREFS_OPEN_URLS_IN_PRIVATE = NON_PREF_PREFIX + "openExternalURLsPrivately";
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
@ -703,9 +703,9 @@ OnSharedPreferenceChangeListener
preferences.removePreference(pref);
i--;
continue;
} else if (AppConstants.RELEASE_BUILD &&
} else if (!AppConstants.NIGHTLY_BUILD &&
PREFS_OPEN_URLS_IN_PRIVATE.equals(key)) {
// Remove UI for opening external links in private borwsing onrelease builds.
// Remove UI for opening external links in private browsing on non-Nightly builds.
preferences.removePreference(pref);
i--;
continue;