diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2012-09-26 22:03:49 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2012-09-27 16:22:53 -0700 |
| commit | 625239a05401bbf18b04d9874cea3f82da7c29a1 (patch) | |
| tree | b7d6cdc6c51342262763ad251870350759800ed3 /services/java/com/android/server/DeviceStorageMonitorService.java | |
| parent | e00d33cf05a111c9be605d3d59db911cd983fcb9 (diff) | |
Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.
Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
Diffstat (limited to 'services/java/com/android/server/DeviceStorageMonitorService.java')
| -rw-r--r-- | services/java/com/android/server/DeviceStorageMonitorService.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/services/java/com/android/server/DeviceStorageMonitorService.java b/services/java/com/android/server/DeviceStorageMonitorService.java index 750a2fb2b255..a4c376d29ed9 100644 --- a/services/java/com/android/server/DeviceStorageMonitorService.java +++ b/services/java/com/android/server/DeviceStorageMonitorService.java @@ -163,8 +163,8 @@ public class DeviceStorageMonitorService extends Binder { mFreeMem = Long.parseLong(debugFreeMem); } // Read the log interval from secure settings - long freeMemLogInterval = Settings.Secure.getLong(mContentResolver, - Settings.Secure.SYS_FREE_STORAGE_LOG_INTERVAL, + long freeMemLogInterval = Settings.Global.getLong(mContentResolver, + Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL, DEFAULT_FREE_STORAGE_LOG_INTERVAL_IN_MINUTES)*60*1000; //log the amount of free memory in event log long currTime = SystemClock.elapsedRealtime(); @@ -190,8 +190,8 @@ public class DeviceStorageMonitorService extends Binder { mFreeMem, mFreeSystem, mFreeCache); } // Read the reporting threshold from secure settings - long threshold = Settings.Secure.getLong(mContentResolver, - Settings.Secure.DISK_FREE_CHANGE_REPORTING_THRESHOLD, + long threshold = Settings.Global.getLong(mContentResolver, + Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD, DEFAULT_DISK_FREE_CHANGE_REPORTING_THRESHOLD); // If mFree changed significantly log the new value long delta = mFreeMem - mLastReportedFreeMem; @@ -309,15 +309,15 @@ public class DeviceStorageMonitorService extends Binder { * any way */ private long getMemThreshold() { - long value = Settings.Secure.getInt( + long value = Settings.Global.getInt( mContentResolver, - Settings.Secure.SYS_STORAGE_THRESHOLD_PERCENTAGE, + Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE, DEFAULT_THRESHOLD_PERCENTAGE); if(localLOGV) Slog.v(TAG, "Threshold Percentage="+value); value = (value*mTotalMemory)/100; - long maxValue = Settings.Secure.getInt( + long maxValue = Settings.Global.getInt( mContentResolver, - Settings.Secure.SYS_STORAGE_THRESHOLD_MAX_BYTES, + Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES, DEFAULT_THRESHOLD_MAX_BYTES); //evaluate threshold value return value < maxValue ? value : maxValue; @@ -329,9 +329,9 @@ public class DeviceStorageMonitorService extends Binder { * any way */ private int getMemFullThreshold() { - int value = Settings.Secure.getInt( + int value = Settings.Global.getInt( mContentResolver, - Settings.Secure.SYS_STORAGE_FULL_THRESHOLD_BYTES, + Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES, DEFAULT_FULL_THRESHOLD_BYTES); if(localLOGV) Slog.v(TAG, "Full Threshold Bytes="+value); return value; |
