OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.init; | 5 package org.chromium.chrome.browser.init; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.view.View; | 9 import android.view.View; |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // For multiwindow mode we do not track keyboard visibility. | 106 // For multiwindow mode we do not track keyboard visibility. |
107 return activity != null | 107 return activity != null |
108 && MultiWindowUtils.getInstance().isLegacyMultiWindow(ac
tivity); | 108 && MultiWindowUtils.getInstance().isLegacyMultiWindow(ac
tivity); |
109 } | 109 } |
110 }); | 110 }); |
111 | 111 |
112 // Initialize the AccountManagerHelper with the correct AccountManagerDe
legate. Must be done | 112 // Initialize the AccountManagerHelper with the correct AccountManagerDe
legate. Must be done |
113 // only once and before AccountMangerHelper.get(...) is called to avoid
using the | 113 // only once and before AccountMangerHelper.get(...) is called to avoid
using the |
114 // default AccountManagerDelegate. | 114 // default AccountManagerDelegate. |
115 AccountManagerHelper.initializeAccountManagerHelper( | 115 AccountManagerHelper.initializeAccountManagerHelper( |
116 application, AppHooks.get().createAccountManagerDelegate()); | 116 AppHooks.get().createAccountManagerDelegate()); |
117 | 117 |
118 // Set the unique identification generator for invalidations. The | 118 // Set the unique identification generator for invalidations. The |
119 // invalidations system can start and attempt to fetch the client ID | 119 // invalidations system can start and attempt to fetch the client ID |
120 // very early. We need this generator to be ready before that happens. | 120 // very early. We need this generator to be ready before that happens. |
121 UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(
application); | 121 UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(
application); |
122 | 122 |
123 // Set minimum Tango log level. This sets an in-memory static field, and
needs to be | 123 // Set minimum Tango log level. This sets an in-memory static field, and
needs to be |
124 // set in the ApplicationContext instead of an activity, since Tango can
be woken up | 124 // set in the ApplicationContext instead of an activity, since Tango can
be woken up |
125 // by the system directly though messages from GCM. | 125 // by the system directly though messages from GCM. |
126 AndroidLogger.setMinimumAndroidLogLevel(Log.WARN); | 126 AndroidLogger.setMinimumAndroidLogLevel(Log.WARN); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 if (ApiCompatibilityUtils.isPrintingSupported()) { | 240 if (ApiCompatibilityUtils.isPrintingSupported()) { |
241 String errorText = application.getResources().getString( | 241 String errorText = application.getResources().getString( |
242 R.string.error_printing_failed); | 242 R.string.error_printing_failed); |
243 PrintingControllerImpl.create(new PrintDocumentAdapterWrappe
r(), errorText); | 243 PrintingControllerImpl.create(new PrintDocumentAdapterWrappe
r(), errorText); |
244 } | 244 } |
245 } | 245 } |
246 }); | 246 }); |
247 } | 247 } |
248 } | 248 } |
OLD | NEW |