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

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

Issue 2830843004: Update to newer Android Lint and suppress new Lint errors (Closed)
Patch Set: rebase Created 3 years, 7 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
OLDNEW
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; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint;
7 import android.app.Activity; 8 import android.app.Activity;
8 import android.app.Application; 9 import android.app.Application;
9 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
10 import android.provider.Settings; 11 import android.provider.Settings;
11 import android.support.annotation.Nullable; 12 import android.support.annotation.Nullable;
12 import android.text.TextUtils; 13 import android.text.TextUtils;
13 14
14 import org.chromium.base.ApplicationState; 15 import org.chromium.base.ApplicationState;
15 import org.chromium.base.ApplicationStatus; 16 import org.chromium.base.ApplicationStatus;
16 import org.chromium.base.ApplicationStatus.ApplicationStateListener; 17 import org.chromium.base.ApplicationStatus.ApplicationStateListener;
(...skipping 19 matching lines...) Expand all
36 37
37 import java.lang.ref.WeakReference; 38 import java.lang.ref.WeakReference;
38 39
39 /** 40 /**
40 * Tracks the foreground session state for the Chrome activities. 41 * Tracks the foreground session state for the Chrome activities.
41 */ 42 */
42 public class ChromeActivitySessionTracker { 43 public class ChromeActivitySessionTracker {
43 44
44 private static final String PREF_LOCALE = "locale"; 45 private static final String PREF_LOCALE = "locale";
45 46
47 @SuppressLint("StaticFieldLeak")
46 private static ChromeActivitySessionTracker sInstance; 48 private static ChromeActivitySessionTracker sInstance;
47 49
48 private final PowerBroadcastReceiver mPowerBroadcastReceiver = new PowerBroa dcastReceiver(); 50 private final PowerBroadcastReceiver mPowerBroadcastReceiver = new PowerBroa dcastReceiver();
49 51
50 // Used to trigger variation changes (such as seed fetches) upon application foregrounding. 52 // Used to trigger variation changes (such as seed fetches) upon application foregrounding.
51 private VariationsSession mVariationsSession; 53 private VariationsSession mVariationsSession;
52 54
53 private Application mApplication; 55 private Application mApplication;
54 private boolean mIsInitialized; 56 private boolean mIsInitialized;
55 private boolean mIsStarted; 57 private boolean mIsStarted;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 256 }
255 257
256 /** 258 /**
257 * @return The PowerBroadcastReceiver for the browser process. 259 * @return The PowerBroadcastReceiver for the browser process.
258 */ 260 */
259 @VisibleForTesting 261 @VisibleForTesting
260 public PowerBroadcastReceiver getPowerBroadcastReceiverForTesting() { 262 public PowerBroadcastReceiver getPowerBroadcastReceiverForTesting() {
261 return mPowerBroadcastReceiver; 263 return mPowerBroadcastReceiver;
262 } 264 }
263 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698