Low disk space string change, surface state.
Surface current low disk state through IPackageManager for use in Settings app. Bug: 6576409 Change-Id: I9ae9ce99a2faa3015a237036c03567d1ae11628f
This commit is contained in:
@@ -376,4 +376,7 @@ interface IPackageManager {
|
|||||||
|
|
||||||
void setPermissionEnforced(String permission, boolean enforced);
|
void setPermissionEnforced(String permission, boolean enforced);
|
||||||
boolean isPermissionEnforced(String permission);
|
boolean isPermissionEnforced(String permission);
|
||||||
|
|
||||||
|
/** Reflects current DeviceStorageMonitorService state */
|
||||||
|
boolean isStorageLow();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2705,11 +2705,9 @@
|
|||||||
<string name="editTextMenuTitle">Text actions</string>
|
<string name="editTextMenuTitle">Text actions</string>
|
||||||
|
|
||||||
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the title of that notification. -->
|
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the title of that notification. -->
|
||||||
<string name="low_internal_storage_view_title">Low on space</string>
|
<string name="low_internal_storage_view_title">Storage space running out</string>
|
||||||
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the message of that notification. -->
|
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the message of that notification. -->
|
||||||
<string name="low_internal_storage_view_text" product="tablet">Tablet storage space is getting low.</string>
|
<string name="low_internal_storage_view_text">Some system functions may not work</string>
|
||||||
<!-- If the device is getting low on internal storage, a notification is shown to the user. This is the message of that notification. -->
|
|
||||||
<string name="low_internal_storage_view_text" product="default">Phone storage space is getting low.</string>
|
|
||||||
|
|
||||||
<!-- Preference framework strings. -->
|
<!-- Preference framework strings. -->
|
||||||
<string name="ok">OK</string>
|
<string name="ok">OK</string>
|
||||||
|
|||||||
@@ -9397,4 +9397,15 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStorageLow() {
|
||||||
|
final long token = Binder.clearCallingIdentity();
|
||||||
|
try {
|
||||||
|
final DeviceStorageMonitorService dsm = (DeviceStorageMonitorService) ServiceManager
|
||||||
|
.getService(DeviceStorageMonitorService.SERVICE);
|
||||||
|
return dsm.isMemoryLow();
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(token);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user