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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/permissions/PermissionDialogController.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.permissions; 5 package org.chromium.chrome.browser.permissions;
6 6
7 import android.annotation.SuppressLint;
7 import android.app.Activity; 8 import android.app.Activity;
8 import android.content.DialogInterface; 9 import android.content.DialogInterface;
9 import android.support.annotation.IntDef; 10 import android.support.annotation.IntDef;
10 import android.support.v7.app.AlertDialog; 11 import android.support.v7.app.AlertDialog;
11 import android.support.v7.widget.SwitchCompat; 12 import android.support.v7.widget.SwitchCompat;
12 import android.text.SpannableStringBuilder; 13 import android.text.SpannableStringBuilder;
13 import android.text.Spanned; 14 import android.text.Spanned;
14 import android.text.TextUtils; 15 import android.text.TextUtils;
15 import android.text.method.LinkMovementMethod; 16 import android.text.method.LinkMovementMethod;
16 import android.text.style.ClickableSpan; 17 import android.text.style.ClickableSpan;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 private AlertDialog mDialog; 49 private AlertDialog mDialog;
49 private SwitchCompat mSwitchView; 50 private SwitchCompat mSwitchView;
50 private PermissionDialogDelegate mDialogDelegate; 51 private PermissionDialogDelegate mDialogDelegate;
51 private List<PermissionDialogDelegate> mRequestQueue; 52 private List<PermissionDialogDelegate> mRequestQueue;
52 53
53 /** Whether a decision has been made for the current dialog. */ 54 /** Whether a decision has been made for the current dialog. */
54 @Decision private int mDecision; 55 @Decision private int mDecision;
55 56
56 // Static holder to ensure safe initialization of the singleton instance. 57 // Static holder to ensure safe initialization of the singleton instance.
57 private static class Holder { 58 private static class Holder {
59 @SuppressLint("StaticFieldLeak")
58 private static final PermissionDialogController sInstance = 60 private static final PermissionDialogController sInstance =
59 new PermissionDialogController(); 61 new PermissionDialogController();
60 } 62 }
61 63
62 public static PermissionDialogController getInstance() { 64 public static PermissionDialogController getInstance() {
63 return Holder.sInstance; 65 return Holder.sInstance;
64 } 66 }
65 67
66 private PermissionDialogController() { 68 private PermissionDialogController() {
67 mRequestQueue = new LinkedList<>(); 69 mRequestQueue = new LinkedList<>();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 251 }
250 252
251 return fullString; 253 return fullString;
252 } 254 }
253 255
254 private void destroyDelegate() { 256 private void destroyDelegate() {
255 mDialogDelegate.destroy(); 257 mDialogDelegate.destroy();
256 mDialogDelegate = null; 258 mDialogDelegate = null;
257 } 259 }
258 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698