Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -20399,6 +20399,17 @@ deprecated="not deprecated" visibility="public" > <method name="getActiveAdmins" return="java.util.List<android.content.ComponentName>" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getCurrentFailedPasswordAttempts" return="int" abstract="false" core/java/android/app/Activity.java +1 −1 Original line number Diff line number Diff line Loading @@ -2518,7 +2518,7 @@ public class Activity extends ContextThemeWrapper * and restored for you. Note that if the dialog is already created, * {@link #onCreateDialog(int, Bundle)} will not be called with the new * arguments but {@link #onPrepareDialog(int, Dialog, Bundle)} will be. * If you need to rebuild the dialog, call {@link #removeDialog(int)}Êfirst. * If you need to rebuild the dialog, call {@link #removeDialog(int)} first. * @return Returns true if the Dialog was created; false is returned if * it is not created because {@link #onCreateDialog(int, Bundle)} returns false. * Loading core/java/android/app/DevicePolicyManager.java +19 −25 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.ServiceManager; import android.util.Log; import java.io.IOException; import java.util.List; /** * Public interface for managing policies enforced on a device. Most clients Loading Loading @@ -65,10 +66,6 @@ public class DevicePolicyManager { * <p>You can optionally include the {@link #EXTRA_ADD_EXPLANATION} * field to provide the user with additional explanation (in addition * to your component's description) about what is being added. * * <p>Note: the current platform can only have one device administrator * active at a time. If you make this request while there is already * an active administrator, this new request will be canceled automatically. */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_ADD_DEVICE_ADMIN Loading Loading @@ -111,7 +108,7 @@ public class DevicePolicyManager { public boolean isAdminActive(ComponentName who) { if (mService != null) { try { return who.equals(mService.getActiveAdmin()); return mService.isAdminActive(who); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } Loading @@ -119,6 +116,22 @@ public class DevicePolicyManager { return false; } /** * Return a list of all currently active device administrator's component * names. Note that if there are no administrators than null may be * returned. */ public List<ComponentName> getActiveAdmins() { if (mService != null) { try { return mService.getActiveAdmins(); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return null; } /** * Remove a current administration component. This can only be called * by the application that owns the administration component; if you Loading Loading @@ -442,26 +455,7 @@ public class DevicePolicyManager { /** * @hide */ public ComponentName getActiveAdmin() { if (mService != null) { try { return mService.getActiveAdmin(); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return null; } /** * @hide */ public DeviceAdminInfo getActiveAdminInfo() { ComponentName cn = getActiveAdmin(); if (cn == null) { return null; } public DeviceAdminInfo getAdminInfo(ComponentName cn) { ActivityInfo ai; try { ai = mContext.getPackageManager().getReceiverInfo(cn, Loading core/java/android/app/IDevicePolicyManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ interface IDevicePolicyManager { void wipeData(int flags); void setActiveAdmin(in ComponentName policyReceiver); ComponentName getActiveAdmin(); boolean isAdminActive(in ComponentName policyReceiver); List<ComponentName> getActiveAdmins(); void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result); void removeActiveAdmin(in ComponentName policyReceiver); Loading core/java/com/android/internal/widget/LockPatternUtils.java +0 −5 Original line number Diff line number Diff line Loading @@ -121,11 +121,6 @@ public class LockPatternUtils { } public boolean isDevicePolicyActive() { ComponentName admin = mDevicePolicyManager.getActiveAdmin(); return admin != null ? mDevicePolicyManager.isAdminActive(admin) : false; } public int getRequestedMinimumPasswordLength() { return mDevicePolicyManager.getMinimumPasswordLength(); } Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -20399,6 +20399,17 @@ deprecated="not deprecated" visibility="public" > <method name="getActiveAdmins" return="java.util.List<android.content.ComponentName>" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getCurrentFailedPasswordAttempts" return="int" abstract="false"
core/java/android/app/Activity.java +1 −1 Original line number Diff line number Diff line Loading @@ -2518,7 +2518,7 @@ public class Activity extends ContextThemeWrapper * and restored for you. Note that if the dialog is already created, * {@link #onCreateDialog(int, Bundle)} will not be called with the new * arguments but {@link #onPrepareDialog(int, Dialog, Bundle)} will be. * If you need to rebuild the dialog, call {@link #removeDialog(int)}Êfirst. * If you need to rebuild the dialog, call {@link #removeDialog(int)} first. * @return Returns true if the Dialog was created; false is returned if * it is not created because {@link #onCreateDialog(int, Bundle)} returns false. * Loading
core/java/android/app/DevicePolicyManager.java +19 −25 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.ServiceManager; import android.util.Log; import java.io.IOException; import java.util.List; /** * Public interface for managing policies enforced on a device. Most clients Loading Loading @@ -65,10 +66,6 @@ public class DevicePolicyManager { * <p>You can optionally include the {@link #EXTRA_ADD_EXPLANATION} * field to provide the user with additional explanation (in addition * to your component's description) about what is being added. * * <p>Note: the current platform can only have one device administrator * active at a time. If you make this request while there is already * an active administrator, this new request will be canceled automatically. */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_ADD_DEVICE_ADMIN Loading Loading @@ -111,7 +108,7 @@ public class DevicePolicyManager { public boolean isAdminActive(ComponentName who) { if (mService != null) { try { return who.equals(mService.getActiveAdmin()); return mService.isAdminActive(who); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } Loading @@ -119,6 +116,22 @@ public class DevicePolicyManager { return false; } /** * Return a list of all currently active device administrator's component * names. Note that if there are no administrators than null may be * returned. */ public List<ComponentName> getActiveAdmins() { if (mService != null) { try { return mService.getActiveAdmins(); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return null; } /** * Remove a current administration component. This can only be called * by the application that owns the administration component; if you Loading Loading @@ -442,26 +455,7 @@ public class DevicePolicyManager { /** * @hide */ public ComponentName getActiveAdmin() { if (mService != null) { try { return mService.getActiveAdmin(); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return null; } /** * @hide */ public DeviceAdminInfo getActiveAdminInfo() { ComponentName cn = getActiveAdmin(); if (cn == null) { return null; } public DeviceAdminInfo getAdminInfo(ComponentName cn) { ActivityInfo ai; try { ai = mContext.getPackageManager().getReceiverInfo(cn, Loading
core/java/android/app/IDevicePolicyManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ interface IDevicePolicyManager { void wipeData(int flags); void setActiveAdmin(in ComponentName policyReceiver); ComponentName getActiveAdmin(); boolean isAdminActive(in ComponentName policyReceiver); List<ComponentName> getActiveAdmins(); void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result); void removeActiveAdmin(in ComponentName policyReceiver); Loading
core/java/com/android/internal/widget/LockPatternUtils.java +0 −5 Original line number Diff line number Diff line Loading @@ -121,11 +121,6 @@ public class LockPatternUtils { } public boolean isDevicePolicyActive() { ComponentName admin = mDevicePolicyManager.getActiveAdmin(); return admin != null ? mDevicePolicyManager.isAdminActive(admin) : false; } public int getRequestedMinimumPasswordLength() { return mDevicePolicyManager.getMinimumPasswordLength(); } Loading