Update references to migrated global settings.
Fixed one setting that was migrated but not marked deprecated.
Removed a hidden setting that is no longer used by the new
power manager service.
Bug: 7231172
Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index 0b1c524..6cf4dd0 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -1098,8 +1098,8 @@
*/
public static Long getMaxBytesOverMobile(Context context) {
try {
- return Settings.Secure.getLong(context.getContentResolver(),
- Settings.Secure.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
+ return Settings.Global.getLong(context.getContentResolver(),
+ Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
} catch (SettingNotFoundException exc) {
return null;
}
@@ -1116,8 +1116,8 @@
*/
public static Long getRecommendedMaxBytesOverMobile(Context context) {
try {
- return Settings.Secure.getLong(context.getContentResolver(),
- Settings.Secure.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
+ return Settings.Global.getLong(context.getContentResolver(),
+ Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
} catch (SettingNotFoundException exc) {
return null;
}