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

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

Issue 1266073002: Remove OmahaClient low-end device check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add detailed documentation. 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java » ('j') | 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; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.SearchManager; 9 import android.app.SearchManager;
10 import android.app.assist.AssistContent; 10 import android.app.assist.AssistContent;
11 import android.content.Context; 11 import android.content.Context;
12 import android.content.Intent; 12 import android.content.Intent;
13 import android.content.SharedPreferences; 13 import android.content.SharedPreferences;
14 import android.content.res.Configuration; 14 import android.content.res.Configuration;
15 import android.graphics.Bitmap; 15 import android.graphics.Bitmap;
16 import android.graphics.Color; 16 import android.graphics.Color;
17 import android.graphics.Rect; 17 import android.graphics.Rect;
18 import android.net.Uri; 18 import android.net.Uri;
19 import android.os.AsyncTask; 19 import android.os.AsyncTask;
20 import android.os.Build; 20 import android.os.Build;
21 import android.os.Bundle; 21 import android.os.Bundle;
22 import android.os.Looper; 22 import android.os.Looper;
23 import android.os.MessageQueue; 23 import android.os.MessageQueue;
24 import android.os.Process; 24 import android.os.Process;
25 import android.os.StrictMode;
26 import android.os.SystemClock; 25 import android.os.SystemClock;
27 import android.preference.PreferenceManager; 26 import android.preference.PreferenceManager;
28 import android.support.v7.app.AlertDialog; 27 import android.support.v7.app.AlertDialog;
29 import android.util.DisplayMetrics; 28 import android.util.DisplayMetrics;
30 import android.view.Menu; 29 import android.view.Menu;
31 import android.view.MenuItem; 30 import android.view.MenuItem;
32 import android.view.View; 31 import android.view.View;
33 import android.view.ViewGroup; 32 import android.view.ViewGroup;
34 import android.view.ViewStub; 33 import android.view.ViewStub;
35 import android.view.ViewTreeObserver; 34 import android.view.ViewTreeObserver;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 import org.chromium.chrome.browser.gsa.GSAServiceClient; 80 import org.chromium.chrome.browser.gsa.GSAServiceClient;
82 import org.chromium.chrome.browser.gsa.GSAState; 81 import org.chromium.chrome.browser.gsa.GSAState;
83 import org.chromium.chrome.browser.help.HelpAndFeedback; 82 import org.chromium.chrome.browser.help.HelpAndFeedback;
84 import org.chromium.chrome.browser.infobar.InfoBarContainer; 83 import org.chromium.chrome.browser.infobar.InfoBarContainer;
85 import org.chromium.chrome.browser.init.AsyncInitializationActivity; 84 import org.chromium.chrome.browser.init.AsyncInitializationActivity;
86 import org.chromium.chrome.browser.metrics.LaunchMetrics; 85 import org.chromium.chrome.browser.metrics.LaunchMetrics;
87 import org.chromium.chrome.browser.metrics.UmaSessionStats; 86 import org.chromium.chrome.browser.metrics.UmaSessionStats;
88 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; 87 import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
89 import org.chromium.chrome.browser.nfc.BeamController; 88 import org.chromium.chrome.browser.nfc.BeamController;
90 import org.chromium.chrome.browser.nfc.BeamProvider; 89 import org.chromium.chrome.browser.nfc.BeamProvider;
91 import org.chromium.chrome.browser.omaha.OmahaClient;
92 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza tions; 90 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza tions;
93 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; 91 import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
94 import org.chromium.chrome.browser.preferences.PrefServiceBridge; 92 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
95 import org.chromium.chrome.browser.preferences.PreferencesLauncher; 93 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
96 import org.chromium.chrome.browser.printing.TabPrinter; 94 import org.chromium.chrome.browser.printing.TabPrinter;
97 import org.chromium.chrome.browser.share.ShareHelper; 95 import org.chromium.chrome.browser.share.ShareHelper;
98 import org.chromium.chrome.browser.snackbar.LoFiBarPopupController; 96 import org.chromium.chrome.browser.snackbar.LoFiBarPopupController;
99 import org.chromium.chrome.browser.snackbar.SnackbarManager; 97 import org.chromium.chrome.browser.snackbar.SnackbarManager;
100 import org.chromium.chrome.browser.snackbar.SnackbarManager.SnackbarManageable; 98 import org.chromium.chrome.browser.snackbar.SnackbarManager.SnackbarManageable;
101 import org.chromium.chrome.browser.sync.ProfileSyncService; 99 import org.chromium.chrome.browser.sync.ProfileSyncService;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 mLoFiBarPopupController = new LoFiBarPopupController(this, getSnackbarMa nager()); 251 mLoFiBarPopupController = new LoFiBarPopupController(this, getSnackbarMa nager());
254 252
255 mAssistStatusHandler = createAssistStatusHandler(); 253 mAssistStatusHandler = createAssistStatusHandler();
256 if (mAssistStatusHandler != null) { 254 if (mAssistStatusHandler != null) {
257 if (mTabModelSelector != null) { 255 if (mTabModelSelector != null) {
258 mAssistStatusHandler.setTabModelSelector(mTabModelSelector); 256 mAssistStatusHandler.setTabModelSelector(mTabModelSelector);
259 } 257 }
260 mAssistStatusHandler.updateAssistState(); 258 mAssistStatusHandler.updateAssistState();
261 } 259 }
262 260
263 // Low end device UI should be allowed only after a fresh install or whe n the data has 261 // If a user had ALLOW_LOW_END_DEVICE_UI explicitly set to false then we manually override
264 // been cleared. This must happen before anyone calls SysUtils.isLowEndD evice() or 262 // SysUtils.isLowEndDevice() with a switch so that they continue to see the normal UI. This
265 // SysUtils.isLowEndDevice() will always return the wrong value. 263 // is only the case for grandfathered-in svelte users. We no longer do s o for newer users.
266 // Temporarily allowing disk access. TODO: Fix. See http://crbug.com/473 352
267 StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
268 try {
269 if (OmahaClient.isFreshInstallOrDataHasBeenCleared(this)) {
270 ChromePreferenceManager.getInstance(this).setAllowLowEndDeviceUi ();
271 }
272 } finally {
273 StrictMode.setThreadPolicy(oldPolicy);
274 }
275
276 if (!ChromePreferenceManager.getInstance(this).getAllowLowEndDeviceUi()) { 264 if (!ChromePreferenceManager.getInstance(this).getAllowLowEndDeviceUi()) {
277 CommandLine.getInstance().appendSwitch( 265 CommandLine.getInstance().appendSwitch(
278 BaseSwitches.DISABLE_LOW_END_DEVICE_MODE); 266 BaseSwitches.DISABLE_LOW_END_DEVICE_MODE);
279 } 267 }
280 268
281 AccessibilityManager manager = (AccessibilityManager) 269 AccessibilityManager manager = (AccessibilityManager)
282 getBaseContext().getSystemService(Context.ACCESSIBILITY_SERVICE) ; 270 getBaseContext().getSystemService(Context.ACCESSIBILITY_SERVICE) ;
283 manager.addAccessibilityStateChangeListener(this); 271 manager.addAccessibilityStateChangeListener(this);
284 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { 272 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
285 mTouchExplorationStateChangeListener = new TouchExplorationStateChan geListener() { 273 mTouchExplorationStateChangeListener = new TouchExplorationStateChan geListener() {
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 1444
1457 @Override 1445 @Override
1458 public void terminateIncognitoSession() {} 1446 public void terminateIncognitoSession() {}
1459 1447
1460 @Override 1448 @Override
1461 public void onTabSelectionHinted(int tabId) { } 1449 public void onTabSelectionHinted(int tabId) { }
1462 1450
1463 @Override 1451 @Override
1464 public void onSceneChange(Layout layout) { } 1452 public void onSceneChange(Layout layout) { }
1465 } 1453 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698