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

Unified Diff: net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java

Issue 2830843004: Update to newer Android Lint and suppress new Lint errors (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java
diff --git a/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java b/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java
index e1da29a3e4bd92b10d7961087935ecc9840afe0f..6603ad2da91013f98439ce4b38ec65758331e933 100644
--- a/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java
+++ b/net/android/java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java
@@ -350,6 +350,7 @@ public class NetworkChangeNotifierAutoDetect extends BroadcastReceiver {
// Lazily determine if app has ACCESS_WIFI_STATE permission.
@GuardedBy("mLock")
+ @SuppressLint("WifiManagerPotentialLeak")
private boolean hasPermissionLocked() {
if (mHasWifiPermissionComputed) {
return mHasWifiPermission;
@@ -357,6 +358,7 @@ public class NetworkChangeNotifierAutoDetect extends BroadcastReceiver {
mHasWifiPermission = mContext.getPackageManager().checkPermission(
permission.ACCESS_WIFI_STATE, mContext.getPackageName())
== PackageManager.PERMISSION_GRANTED;
+ // TODO(crbug.com/635567): Fix lint properly.
mWifiManager = mHasWifiPermission
? (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE)
: null;

Powered by Google App Engine
This is Rietveld 408576698