File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
services/java/com/android/server/net Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -608,17 +608,19 @@ public void advisePersistThreshold(long thresholdBytes) {
608608
609609 // clamp threshold into safe range
610610 mPersistThreshold = MathUtils .constrain (thresholdBytes , 128 * KB_IN_BYTES , 2 * MB_IN_BYTES );
611- updatePersistThresholds ();
612-
613611 if (LOGV ) {
614612 Slog .v (TAG , "advisePersistThreshold() given " + thresholdBytes + ", clamped to "
615613 + mPersistThreshold );
616614 }
617615
618- // persist if beyond new thresholds
616+ // update and persist if beyond new thresholds
619617 final long currentTime = mTime .hasCache () ? mTime .currentTimeMillis ()
620618 : System .currentTimeMillis ();
621619 synchronized (mStatsLock ) {
620+ if (!mSystemReady ) return ;
621+
622+ updatePersistThresholds ();
623+
622624 mDevRecorder .maybePersistLocked (currentTime );
623625 mXtRecorder .maybePersistLocked (currentTime );
624626 mUidRecorder .maybePersistLocked (currentTime );
You can’t perform that action at this time.
0 commit comments