Merge "NetworkManagementService.java: fix error-prone warnings"

This commit is contained in:
Treehugger Robot
2017-05-23 10:31:57 +00:00
committed by Gerrit Code Review

View File

@@ -149,7 +149,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
*/ */
public static final String PERMISSION_SYSTEM = "SYSTEM"; public static final String PERMISSION_SYSTEM = "SYSTEM";
class NetdResponseCode { static class NetdResponseCode {
/* Keep in sync with system/netd/server/ResponseCode.h */ /* Keep in sync with system/netd/server/ResponseCode.h */
public static final int InterfaceListResult = 110; public static final int InterfaceListResult = 110;
public static final int TetherInterfaceListResult = 111; public static final int TetherInterfaceListResult = 111;
@@ -220,7 +220,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
private final NetworkStatsFactory mStatsFactory = new NetworkStatsFactory(); private final NetworkStatsFactory mStatsFactory = new NetworkStatsFactory();
private Object mQuotaLock = new Object(); private final Object mQuotaLock = new Object();
/** Set of interfaces with active quotas. */ /** Set of interfaces with active quotas. */
@GuardedBy("mQuotaLock") @GuardedBy("mQuotaLock")
@@ -265,7 +265,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
@GuardedBy("mQuotaLock") @GuardedBy("mQuotaLock")
private boolean mDataSaverMode; private boolean mDataSaverMode;
private Object mIdleTimerLock = new Object(); private final Object mIdleTimerLock = new Object();
/** Set of interfaces with active idle timers. */ /** Set of interfaces with active idle timers. */
private static class IdleTimerParams { private static class IdleTimerParams {
public final int timeout; public final int timeout;