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

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

Issue 1266073002: Remove OmahaClient low-end device check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java ('k') | no next file » | 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.preferences; 5 package org.chromium.chrome.browser.preferences;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 import android.preference.PreferenceManager; 9 import android.preference.PreferenceManager;
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 public void setAllowLowEndDeviceUi() { 171 public void setAllowLowEndDeviceUi() {
172 SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.ed it(); 172 SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.ed it();
173 sharedPreferencesEditor.putBoolean(ALLOW_LOW_END_DEVICE_UI, true); 173 sharedPreferencesEditor.putBoolean(ALLOW_LOW_END_DEVICE_UI, true);
174 sharedPreferencesEditor.apply(); 174 sharedPreferencesEditor.apply();
175 } 175 }
176 176
177 /** 177 /**
178 * @return Whether low end device ui is allowed. 178 * @return Whether low end device ui is allowed.
179 */ 179 */
180 public boolean getAllowLowEndDeviceUi() { 180 public boolean getAllowLowEndDeviceUi() {
181 return mSharedPreferences.getBoolean(ALLOW_LOW_END_DEVICE_UI, false); 181 return mSharedPreferences.getBoolean(ALLOW_LOW_END_DEVICE_UI, true);
gone 2015/07/30 19:18:08 Man, this flip to true was confusing. Can you cha
Peter Wen 2015/07/30 19:42:11 Heh, agreed. Added detailed comments, removed the
182 } 182 }
183 183
184 /** 184 /**
185 * Signin promo could be shown at most once every 12 weeks. This method chec ks 185 * Signin promo could be shown at most once every 12 weeks. This method chec ks
186 * wheter the signin promo has already been shown in the current cycle. 186 * wheter the signin promo has already been shown in the current cycle.
187 * @return Whether the signin promo has been shown in the current cycle. 187 * @return Whether the signin promo has been shown in the current cycle.
188 */ 188 */
189 public boolean getSigninPromoShown() { 189 public boolean getSigninPromoShown() {
190 long signinPromoLastShown = mSharedPreferences.getLong(SIGNIN_PROMO_LAST _SHOWN, 0); 190 long signinPromoLastShown = mSharedPreferences.getLong(SIGNIN_PROMO_LAST _SHOWN, 0);
191 long numDaysElapsed = 191 long numDaysElapsed =
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 * 273 *
274 * @param key The name of the preference to modify. 274 * @param key The name of the preference to modify.
275 * @param value The new value for the preference. 275 * @param value The new value for the preference.
276 */ 276 */
277 private void writeInt(String key, int value) { 277 private void writeInt(String key, int value) {
278 SharedPreferences.Editor ed = mSharedPreferences.edit(); 278 SharedPreferences.Editor ed = mSharedPreferences.edit();
279 ed.putInt(key, value); 279 ed.putInt(key, value);
280 ed.apply(); 280 ed.apply();
281 } 281 }
282 } 282 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698