summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorBenjamin Franz <bfranz@google.com>2015-05-06 12:14:31 +0100
committerBenjamin Franz <bfranz@google.com>2015-05-06 13:19:22 +0100
commitbece80645e2b2d84ea65aabfa7fc01d5ad633708 (patch)
tree896aa05b1399aca5528974b75dac23a8b8e4b18d /core/java/android
parentd4474cb9454c7a8b907c0be07236ffed4ecf3fd8 (diff)
downloadframeworks_base-bece80645e2b2d84ea65aabfa7fc01d5ad633708.zip
frameworks_base-bece80645e2b2d84ea65aabfa7fc01d5ad633708.tar.gz
frameworks_base-bece80645e2b2d84ea65aabfa7fc01d5ad633708.tar.bz2
Rename functions that disable status bar and keyguard
Rename the DevicePolicyManager functions setKeyguardEnabledState and setStatusBarEnabledState to setKeyguardDisabled and setStatusBarDisabled respectively. Bug: 20820039 Change-Id: I06f6a19ac55b24e66e9f2cb340ead5d940cb2235
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java22
-rw-r--r--core/java/android/app/admin/IDevicePolicyManager.aidl4
2 files changed, 15 insertions, 11 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 9f71ea5..655d3bc 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -4294,14 +4294,14 @@ public class DevicePolicyManager {
* being disabled.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
- * @param enabled New state of the keyguard.
+ * @param disabled {@code true} disables the keyguard, {@code false} reenables it.
*
* @return {@code false} if attempting to disable the keyguard while a lock password was in
- * place. {@code true} otherwise."
+ * place. {@code true} otherwise.
*/
- public boolean setKeyguardEnabledState(ComponentName admin, boolean enabled) {
+ public boolean setKeyguardDisabled(ComponentName admin, boolean disabled) {
try {
- return mService.setKeyguardEnabledState(admin, enabled);
+ return mService.setKeyguardDisabled(admin, disabled);
} catch (RemoteException re) {
Log.w(TAG, "Failed talking with device policy service", re);
return false;
@@ -4309,18 +4309,22 @@ public class DevicePolicyManager {
}
/**
- * Called by device owner to set the enabled state of the status bar. Disabling the status
- * bar blocks notifications, quick settings and other screen overlays that allow escaping from
+ * Called by device owner to disable the status bar. Disabling the status bar blocks
+ * notifications, quick settings and other screen overlays that allow escaping from
* a single use device.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
- * @param enabled New state of the status bar.
+ * @param disabled {@code true} disables the status bar, {@code false} reenables it.
+ *
+ * @return {@code false} if attempting to disable the status bar failed.
+ * {@code true} otherwise.
*/
- public void setStatusBarEnabledState(ComponentName admin, boolean enabled) {
+ public boolean setStatusBarDisabled(ComponentName admin, boolean disabled) {
try {
- mService.setStatusBarEnabledState(admin, enabled);
+ return mService.setStatusBarDisabled(admin, disabled);
} catch (RemoteException re) {
Log.w(TAG, "Failed talking with device policy service", re);
+ return false;
}
}
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 833bc00..e81e7c1 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -224,8 +224,8 @@ interface IDevicePolicyManager {
void setSystemUpdatePolicy(in ComponentName who, in PersistableBundle policy);
PersistableBundle getSystemUpdatePolicy();
- boolean setKeyguardEnabledState(in ComponentName admin, boolean enabled);
- void setStatusBarEnabledState(in ComponentName who, boolean enabled);
+ boolean setKeyguardDisabled(in ComponentName admin, boolean disabled);
+ boolean setStatusBarDisabled(in ComponentName who, boolean disabled);
boolean getDoNotAskCredentialsOnBoot();
void notifyPendingSystemUpdate(in long updateReceivedTime);