diff options
| author | 2019-09-04 14:37:12 +0800 | |
|---|---|---|
| committer | 2019-09-05 02:00:23 +0000 | |
| commit | 82bbb6525ea2dc4ea660da4f7cceb30bc0280ed1 (patch) | |
| tree | 483b5d2802f71153e5d5366815b6ba11e06dfb1c | |
| parent | cc9543c7174d2d5c3eb4978d7a6736792e4d9575 (diff) | |
Group final fields together
Address the review comment at
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9313959/2/services/core/java/com/android/server/PackageWatchdog.java#143
Bug: 140358475
Test: atest PackageWatchdogTest
Change-Id: I0aae51cd064531afbb8286c132885ff99f535727
| -rw-r--r-- | services/core/java/com/android/server/PackageWatchdog.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/PackageWatchdog.java b/services/core/java/com/android/server/PackageWatchdog.java index 2ab8e03ab2d3..e194f721b8d2 100644 --- a/services/core/java/com/android/server/PackageWatchdog.java +++ b/services/core/java/com/android/server/PackageWatchdog.java @@ -116,6 +116,10 @@ public class PackageWatchdog { private final AtomicFile mPolicyFile; private final ExplicitHealthCheckController mHealthCheckController; private final ConnectivityModuleConnector mConnectivityModuleConnector; + private final Runnable mSyncRequests = this::syncRequests; + private final Runnable mSyncStateWithScheduledReason = this::syncStateWithScheduledReason; + private final Runnable mSaveToFile = this::saveToFile; + private final SystemClock mSystemClock; @GuardedBy("mLock") private boolean mIsPackagesReady; // Flag to control whether explicit health checks are supported or not @@ -130,18 +134,12 @@ public class PackageWatchdog { @GuardedBy("mLock") private long mUptimeAtLastStateSync; - private final Runnable mSyncRequests = this::syncRequests; - private final Runnable mSyncStateWithScheduledReason = this::syncStateWithScheduledReason; - private final Runnable mSaveToFile = this::saveToFile; - @FunctionalInterface @VisibleForTesting interface SystemClock { long uptimeMillis(); } - private final SystemClock mSystemClock; - private PackageWatchdog(Context context) { // Needs to be constructed inline this(context, new AtomicFile( |