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
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user