diff options
author | Jeff Sharkey <jsharkey@google.com> | 2015-09-10 00:18:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-10 00:18:43 +0000 |
commit | 2ebbf4c899b39e080be1ec9cd5d1178f30c0cd89 (patch) | |
tree | d66431c576e588a737be4902bfa6421f2050092c /services | |
parent | 16093fe3f0d824731a53a264a132504deb08421a (diff) | |
parent | e83d8a993d91ae1c2808008ec688722162157788 (diff) | |
download | frameworks_base-2ebbf4c899b39e080be1ec9cd5d1178f30c0cd89.zip frameworks_base-2ebbf4c899b39e080be1ec9cd5d1178f30c0cd89.tar.gz frameworks_base-2ebbf4c899b39e080be1ec9cd5d1178f30c0cd89.tar.bz2 |
Merge "Special interval value to always run benchmarks." into mnc-dr-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/MountService.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index 0d64540..4e721da 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -368,11 +368,17 @@ class MountService extends IMountService.Stub private boolean shouldBenchmark() { final long benchInterval = Settings.Global.getLong(mContext.getContentResolver(), Settings.Global.STORAGE_BENCHMARK_INTERVAL, DateUtils.WEEK_IN_MILLIS); + if (benchInterval == -1) { + return false; + } else if (benchInterval == 0) { + return true; + } + synchronized (mLock) { for (int i = 0; i < mVolumes.size(); i++) { final VolumeInfo vol = mVolumes.valueAt(i); final VolumeRecord rec = mRecords.get(vol.fsUuid); - if (vol.isMountedReadable() && rec != null) { + if (vol.isMountedWritable() && rec != null) { final long benchAge = System.currentTimeMillis() - rec.lastBenchMillis; if (benchAge >= benchInterval) { return true; |