diff options
| -rw-r--r-- | api/current.xml | 367 | ||||
| -rw-r--r-- | core/java/android/app/DeviceAdminInfo.java | 8 | ||||
| -rw-r--r-- | core/java/android/app/DeviceAdminReceiver.java (renamed from core/java/android/app/DeviceAdmin.java) | 17 | ||||
| -rw-r--r-- | core/java/android/app/DevicePolicyManager.java | 16 | ||||
| -rw-r--r-- | core/res/res/values/attrs_manifest.xml | 2 | ||||
| -rw-r--r-- | core/res/res/values/public.xml | 7 | ||||
| -rw-r--r-- | packages/SettingsProvider/AndroidManifest.xml | 5 | ||||
| -rw-r--r-- | services/java/com/android/server/DevicePolicyManagerService.java | 14 |
8 files changed, 217 insertions, 219 deletions
diff --git a/api/current.xml b/api/current.xml index e5177ef..f2f59e7d 100644 --- a/api/current.xml +++ b/api/current.xml @@ -4611,7 +4611,7 @@ type="int" transient="false" volatile="false" - value="16843448" + value="16843447" static="true" final="true" deprecated="not deprecated" @@ -5773,17 +5773,6 @@ visibility="public" > </field> -<field name="neverEncrypt" - type="int" - transient="false" - volatile="false" - value="16843447" - static="true" - final="true" - deprecated="not deprecated" - visibility="public" -> -</field> <field name="nextFocusDown" type="int" transient="false" @@ -6855,7 +6844,7 @@ type="int" transient="false" volatile="false" - value="16843449" + value="16843448" static="true" final="true" deprecated="not deprecated" @@ -20067,24 +20056,34 @@ </parameter> </method> </interface> -<class name="DeviceAdmin" - extends="android.content.BroadcastReceiver" +<class name="DeviceAdminInfo" + extends="java.lang.Object" abstract="false" static="false" - final="false" + final="true" deprecated="not deprecated" visibility="public" > -<constructor name="DeviceAdmin" - type="android.app.DeviceAdmin" +<implements name="android.os.Parcelable"> +</implements> +<constructor name="DeviceAdminInfo" + type="android.app.DeviceAdminInfo" static="false" final="false" deprecated="not deprecated" visibility="public" > +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="receiver" type="android.content.pm.ResolveInfo"> +</parameter> +<exception name="IOException" type="java.io.IOException"> +</exception> +<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException"> +</exception> </constructor> -<method name="getManager" - return="android.app.DevicePolicyManager" +<method name="describeContents" + return="int" abstract="false" native="false" synchronized="false" @@ -20093,11 +20092,9 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> </method> -<method name="getWho" - return="android.content.ComponentName" +<method name="dump" + return="void" abstract="false" native="false" synchronized="false" @@ -20106,11 +20103,13 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> +<parameter name="pw" type="android.util.Printer"> +</parameter> +<parameter name="prefix" type="java.lang.String"> </parameter> </method> -<method name="onDisableRequested" - return="java.lang.CharSequence" +<method name="getActivityInfo" + return="android.content.pm.ActivityInfo" abstract="false" native="false" synchronized="false" @@ -20119,13 +20118,9 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> -</parameter> </method> -<method name="onDisabled" - return="void" +<method name="getComponent" + return="android.content.ComponentName" abstract="false" native="false" synchronized="false" @@ -20134,13 +20129,9 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> -</parameter> </method> -<method name="onEnabled" - return="void" +<method name="getPackageName" + return="java.lang.String" abstract="false" native="false" synchronized="false" @@ -20149,13 +20140,9 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> -</parameter> </method> -<method name="onPasswordChanged" - return="void" +<method name="getReceiverName" + return="java.lang.String" abstract="false" native="false" synchronized="false" @@ -20164,13 +20151,9 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> -</parameter> </method> -<method name="onPasswordFailed" - return="void" +<method name="getTagForPolicy" + return="java.lang.String" abstract="false" native="false" synchronized="false" @@ -20179,13 +20162,11 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> +<parameter name="policyIdent" type="int"> </parameter> </method> -<method name="onPasswordSucceeded" - return="void" +<method name="loadDescription" + return="java.lang.CharSequence" abstract="false" native="false" synchronized="false" @@ -20194,13 +20175,13 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="intent" type="android.content.Intent"> +<parameter name="pm" type="android.content.pm.PackageManager"> </parameter> +<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException"> +</exception> </method> -<method name="onReceive" - return="void" +<method name="loadIcon" + return="android.graphics.drawable.Drawable" abstract="false" native="false" synchronized="false" @@ -20209,93 +20190,109 @@ deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> +<parameter name="pm" type="android.content.pm.PackageManager"> </parameter> -<parameter name="intent" type="android.content.Intent"> +</method> +<method name="loadLabel" + return="java.lang.CharSequence" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" + deprecated="not deprecated" + visibility="public" +> +<parameter name="pm" type="android.content.pm.PackageManager"> </parameter> </method> -<field name="ACTION_DEVICE_ADMIN_DISABLED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.app.action.DEVICE_ADMIN_DISABLED"" - static="true" - final="true" +<method name="usesPolicy" + return="boolean" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" deprecated="not deprecated" visibility="public" > -</field> -<field name="ACTION_DEVICE_ADMIN_DISABLE_REQUESTED" - type="java.lang.String" - transient="false" - volatile="false" - value=""android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED"" - static="true" - final="true" +<parameter name="policyIdent" type="int"> +</parameter> +</method> +<method name="writeToParcel" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="false" deprecated="not deprecated" visibility="public" > -</field> -<field name="ACTION_DEVICE_ADMIN_ENABLED" - type="java.lang.String" +<parameter name="dest" type="android.os.Parcel"> +</parameter> +<parameter name="flags" type="int"> +</parameter> +</method> +<field name="CREATOR" + type="android.os.Parcelable.Creator" transient="false" volatile="false" - value=""android.app.action.DEVICE_ADMIN_ENABLED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="ACTION_PASSWORD_CHANGED" - type="java.lang.String" +<field name="USES_POLICY_FORCE_LOCK" + type="int" transient="false" volatile="false" - value=""android.app.action.ACTION_PASSWORD_CHANGED"" + value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="ACTION_PASSWORD_FAILED" - type="java.lang.String" +<field name="USES_POLICY_LIMIT_PASSWORD" + type="int" transient="false" volatile="false" - value=""android.app.action.ACTION_PASSWORD_FAILED"" + value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="ACTION_PASSWORD_SUCCEEDED" - type="java.lang.String" +<field name="USES_POLICY_RESET_PASSWORD" + type="int" transient="false" volatile="false" - value=""android.app.action.ACTION_PASSWORD_SUCCEEDED"" + value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="DEVICE_ADMIN_META_DATA" - type="java.lang.String" +<field name="USES_POLICY_WATCH_LOGIN" + type="int" transient="false" volatile="false" - value=""android.app.device_admin"" + value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="EXTRA_DISABLE_WARNING" - type="java.lang.String" +<field name="USES_POLICY_WIPE_DATA" + type="int" transient="false" volatile="false" - value=""android.app.extra.DISABLE_WARNING"" + value="4" static="true" final="true" deprecated="not deprecated" @@ -20303,45 +20300,24 @@ > </field> </class> -<class name="DeviceAdminInfo" - extends="java.lang.Object" +<class name="DeviceAdminReceiver" + extends="android.content.BroadcastReceiver" abstract="false" static="false" - final="true" - deprecated="not deprecated" - visibility="public" -> -<implements name="android.os.Parcelable"> -</implements> -<constructor name="DeviceAdminInfo" - type="android.app.DeviceAdminInfo" - static="false" final="false" deprecated="not deprecated" visibility="public" > -<parameter name="context" type="android.content.Context"> -</parameter> -<parameter name="receiver" type="android.content.pm.ResolveInfo"> -</parameter> -<exception name="IOException" type="java.io.IOException"> -</exception> -<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException"> -</exception> -</constructor> -<method name="describeContents" - return="int" - abstract="false" - native="false" - synchronized="false" +<constructor name="DeviceAdminReceiver" + type="android.app.DeviceAdminReceiver" static="false" final="false" deprecated="not deprecated" visibility="public" > -</method> -<method name="dump" - return="void" +</constructor> +<method name="getManager" + return="android.app.DevicePolicyManager" abstract="false" native="false" synchronized="false" @@ -20350,13 +20326,11 @@ deprecated="not deprecated" visibility="public" > -<parameter name="pw" type="android.util.Printer"> -</parameter> -<parameter name="prefix" type="java.lang.String"> +<parameter name="context" type="android.content.Context"> </parameter> </method> -<method name="getActivityInfo" - return="android.content.pm.ActivityInfo" +<method name="getWho" + return="android.content.ComponentName" abstract="false" native="false" synchronized="false" @@ -20365,9 +20339,11 @@ deprecated="not deprecated" visibility="public" > +<parameter name="context" type="android.content.Context"> +</parameter> </method> -<method name="getComponent" - return="android.content.ComponentName" +<method name="onDisableRequested" + return="java.lang.CharSequence" abstract="false" native="false" synchronized="false" @@ -20376,9 +20352,13 @@ deprecated="not deprecated" visibility="public" > +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> +</parameter> </method> -<method name="getPackageName" - return="java.lang.String" +<method name="onDisabled" + return="void" abstract="false" native="false" synchronized="false" @@ -20387,9 +20367,13 @@ deprecated="not deprecated" visibility="public" > +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> +</parameter> </method> -<method name="getReceiverName" - return="java.lang.String" +<method name="onEnabled" + return="void" abstract="false" native="false" synchronized="false" @@ -20398,9 +20382,13 @@ deprecated="not deprecated" visibility="public" > +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> +</parameter> </method> -<method name="getTagForPolicy" - return="java.lang.String" +<method name="onPasswordChanged" + return="void" abstract="false" native="false" synchronized="false" @@ -20409,11 +20397,13 @@ deprecated="not deprecated" visibility="public" > -<parameter name="policyIdent" type="int"> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> </parameter> </method> -<method name="loadDescription" - return="java.lang.CharSequence" +<method name="onPasswordFailed" + return="void" abstract="false" native="false" synchronized="false" @@ -20422,13 +20412,13 @@ deprecated="not deprecated" visibility="public" > -<parameter name="pm" type="android.content.pm.PackageManager"> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> </parameter> -<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException"> -</exception> </method> -<method name="loadIcon" - return="android.graphics.drawable.Drawable" +<method name="onPasswordSucceeded" + return="void" abstract="false" native="false" synchronized="false" @@ -20437,11 +20427,13 @@ deprecated="not deprecated" visibility="public" > -<parameter name="pm" type="android.content.pm.PackageManager"> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> </parameter> </method> -<method name="loadLabel" - return="java.lang.CharSequence" +<method name="onReceive" + return="void" abstract="false" native="false" synchronized="false" @@ -20450,96 +20442,93 @@ deprecated="not deprecated" visibility="public" > -<parameter name="pm" type="android.content.pm.PackageManager"> +<parameter name="context" type="android.content.Context"> +</parameter> +<parameter name="intent" type="android.content.Intent"> </parameter> </method> -<method name="usesPolicy" - return="boolean" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" +<field name="ACTION_DEVICE_ADMIN_DISABLED" + type="java.lang.String" + transient="false" + volatile="false" + value=""android.app.action.DEVICE_ADMIN_DISABLED"" + static="true" + final="true" deprecated="not deprecated" visibility="public" > -<parameter name="policyIdent" type="int"> -</parameter> -</method> -<method name="writeToParcel" - return="void" - abstract="false" - native="false" - synchronized="false" - static="false" - final="false" +</field> +<field name="ACTION_DEVICE_ADMIN_DISABLE_REQUESTED" + type="java.lang.String" + transient="false" + volatile="false" + value=""android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED"" + static="true" + final="true" deprecated="not deprecated" visibility="public" > -<parameter name="dest" type="android.os.Parcel"> -</parameter> -<parameter name="flags" type="int"> -</parameter> -</method> -<field name="CREATOR" - type="android.os.Parcelable.Creator" +</field> +<field name="ACTION_DEVICE_ADMIN_ENABLED" + type="java.lang.String" transient="false" volatile="false" + value=""android.app.action.DEVICE_ADMIN_ENABLED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="USES_POLICY_FORCE_LOCK" - type="int" +<field name="ACTION_PASSWORD_CHANGED" + type="java.lang.String" transient="false" volatile="false" - value="3" + value=""android.app.action.ACTION_PASSWORD_CHANGED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="USES_POLICY_LIMIT_PASSWORD" - type="int" +<field name="ACTION_PASSWORD_FAILED" + type="java.lang.String" transient="false" volatile="false" - value="0" + value=""android.app.action.ACTION_PASSWORD_FAILED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="USES_POLICY_RESET_PASSWORD" - type="int" +<field name="ACTION_PASSWORD_SUCCEEDED" + type="java.lang.String" transient="false" volatile="false" - value="2" + value=""android.app.action.ACTION_PASSWORD_SUCCEEDED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="USES_POLICY_WATCH_LOGIN" - type="int" +<field name="DEVICE_ADMIN_META_DATA" + type="java.lang.String" transient="false" volatile="false" - value="1" + value=""android.app.device_admin"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> -<field name="USES_POLICY_WIPE_DATA" - type="int" +<field name="EXTRA_DISABLE_WARNING" + type="java.lang.String" transient="false" volatile="false" - value="4" + value=""android.app.extra.DISABLE_WARNING"" static="true" final="true" deprecated="not deprecated" diff --git a/core/java/android/app/DeviceAdminInfo.java b/core/java/android/app/DeviceAdminInfo.java index 159fa75..bedf4b4 100644 --- a/core/java/android/app/DeviceAdminInfo.java +++ b/core/java/android/app/DeviceAdminInfo.java @@ -60,8 +60,8 @@ public final class DeviceAdminInfo implements Parcelable { /** * A type of policy that this device admin can use: able to watch login - * attempts from the user, via {@link DeviceAdmin#ACTION_PASSWORD_FAILED}, - * {@link DeviceAdmin#ACTION_PASSWORD_SUCCEEDED}, and + * attempts from the user, via {@link DeviceAdminReceiver#ACTION_PASSWORD_FAILED}, + * {@link DeviceAdminReceiver#ACTION_PASSWORD_SUCCEEDED}, and * {@link DevicePolicyManager#getCurrentFailedPasswordAttempts}. * * <p>To control this policy, the device admin must have a "watch-login" @@ -169,10 +169,10 @@ public final class DeviceAdminInfo implements Parcelable { XmlResourceParser parser = null; try { - parser = ai.loadXmlMetaData(pm, DeviceAdmin.DEVICE_ADMIN_META_DATA); + parser = ai.loadXmlMetaData(pm, DeviceAdminReceiver.DEVICE_ADMIN_META_DATA); if (parser == null) { throw new XmlPullParserException("No " - + DeviceAdmin.DEVICE_ADMIN_META_DATA + " meta-data"); + + DeviceAdminReceiver.DEVICE_ADMIN_META_DATA + " meta-data"); } AttributeSet attrs = Xml.asAttributeSet(parser); diff --git a/core/java/android/app/DeviceAdmin.java b/core/java/android/app/DeviceAdminReceiver.java index af9c379..453e0bf 100644 --- a/core/java/android/app/DeviceAdmin.java +++ b/core/java/android/app/DeviceAdminReceiver.java @@ -29,6 +29,13 @@ import android.os.Bundle; * class provides a convenience for interpreting the raw intent actions * that are sent by the system. * + * <p>The callback methods, like the base + * {@link BroadcastReceiver#onReceive(Context, Intent) BroadcastReceiver.onReceive()} + * method, happen on the main thread of the process. Thus long running + * operations must be done on another thread. Note that because a receiver + * is done once returning from its receive function, such long-running operations + * should probably be done in a {@link Service}. + * * <p>When publishing your DeviceAdmin subclass as a receiver, it must * handle {@link #ACTION_DEVICE_ADMIN_ENABLED} and require the * {@link android.Manifest.permission#BIND_DEVICE_ADMIN} permission. A typical @@ -42,7 +49,7 @@ import android.os.Bundle; * * {@sample development/samples/ApiDemos/res/xml/device_admin_sample.xml meta_data} */ -public class DeviceAdmin extends BroadcastReceiver { +public class DeviceAdminReceiver extends BroadcastReceiver { private static String TAG = "DevicePolicy"; private static boolean DEBUG = false; private static boolean localLOGV = DEBUG || android.util.Config.LOGV; @@ -51,7 +58,7 @@ public class DeviceAdmin extends BroadcastReceiver { * This is the primary action that a device administrator must implement to be * allowed to manage a device. This will be set to the receiver * when the user enables it for administration. You will generally - * handle this in {@link DeviceAdmin#onEnabled(Context, Intent)}. To be + * handle this in {@link DeviceAdminReceiver#onEnabled(Context, Intent)}. To be * supported, the receiver must also require the * {@link android.Manifest.permission#BIND_DEVICE_ADMIN} permission so * that other applications can not abuse it. @@ -85,7 +92,7 @@ public class DeviceAdmin extends BroadcastReceiver { * Action sent to a device administrator when the user has disabled * it. Upon return, the application no longer has access to the * protected device policy manager APIs. You will generally - * handle this in {@link DeviceAdmin#onDisabled(Context, Intent)}. Note + * handle this in {@link DeviceAdminReceiver#onDisabled(Context, Intent)}. Note * that this action will be * sent the receiver regardless of whether it is explicitly listed in * its intent filter. @@ -100,7 +107,7 @@ public class DeviceAdmin extends BroadcastReceiver { * of the new password with {@link DevicePolicyManager#isActivePasswordSufficient() * DevicePolicyManager.isActivePasswordSufficient()}. * You will generally - * handle this in {@link DeviceAdmin#onPasswordChanged}. + * handle this in {@link DeviceAdminReceiver#onPasswordChanged}. * * <p>The calling device admin must have requested * {@link DeviceAdminInfo#USES_POLICY_LIMIT_PASSWORD} to receive @@ -116,7 +123,7 @@ public class DeviceAdmin extends BroadcastReceiver { * number of failed password attempts there have been with * {@link DevicePolicyManager#getCurrentFailedPasswordAttempts * DevicePolicyManager.getCurrentFailedPasswordAttempts()}. You will generally - * handle this in {@link DeviceAdmin#onPasswordFailed}. + * handle this in {@link DeviceAdminReceiver#onPasswordFailed}. * * <p>The calling device admin must have requested * {@link DeviceAdminInfo#USES_POLICY_WATCH_LOGIN} to receive diff --git a/core/java/android/app/DevicePolicyManager.java b/core/java/android/app/DevicePolicyManager.java index 82c43dc..d611807 100644 --- a/core/java/android/app/DevicePolicyManager.java +++ b/core/java/android/app/DevicePolicyManager.java @@ -36,7 +36,7 @@ import java.util.List; /** * Public interface for managing policies enforced on a device. Most clients - * of this class must have published a {@link DeviceAdmin} that the user + * of this class must have published a {@link DeviceAdminReceiver} that the user * has currently enabled. */ public class DevicePolicyManager { @@ -195,7 +195,7 @@ public class DevicePolicyManager { * {@link DeviceAdminInfo#USES_POLICY_LIMIT_PASSWORD} to be able to call * this method; if it has not, a security exception will be thrown. * - * @param admin Which {@link DeviceAdmin} this request is associated with. + * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param quality The new desired quality. One of * {@link #PASSWORD_QUALITY_UNSPECIFIED}, {@link #PASSWORD_QUALITY_SOMETHING}, * {@link #PASSWORD_QUALITY_NUMERIC}, or {@link #PASSWORD_QUALITY_ALPHANUMERIC}. @@ -243,7 +243,7 @@ public class DevicePolicyManager { * {@link DeviceAdminInfo#USES_POLICY_LIMIT_PASSWORD} to be able to call * this method; if it has not, a security exception will be thrown. * - * @param admin Which {@link DeviceAdmin} this request is associated with. + * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param length The new desired minimum password length. A value of 0 * means there is no restriction. */ @@ -338,11 +338,11 @@ public class DevicePolicyManager { * <p>To implement any other policy (e.g. wiping data for a particular * application only, erasing or revoking credentials, or reporting the * failure to a server), you should implement - * {@link DeviceAdmin#onPasswordFailed(Context, android.content.Intent)} + * {@link DeviceAdminReceiver#onPasswordFailed(Context, android.content.Intent)} * instead. Do not use this API, because if the maximum count is reached, * the device will be wiped immediately, and your callback will not be invoked. * - * @param admin Which {@link DeviceAdmin} this request is associated with. + * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param num The number of failed password attempts at which point the * device will wipe its data. */ @@ -375,7 +375,9 @@ public class DevicePolicyManager { } /** - * Force a new password on the user. This takes effect immediately. + * Force a new device unlock password (the password needed to access the + * entire device, not for individual accounts) on the user. This takes + * effect immediately. * The given password must be sufficient for the * current password quality and length constraints as returned by * {@link #getPasswordQuality(ComponentName)} and @@ -413,7 +415,7 @@ public class DevicePolicyManager { * {@link DeviceAdminInfo#USES_POLICY_FORCE_LOCK} to be able to call * this method; if it has not, a security exception will be thrown. * - * @param admin Which {@link DeviceAdmin} this request is associated with. + * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param timeMs The new desired maximum time to lock in milliseconds. * A value of 0 means there is no restriction. */ diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index 70bc000..33b509b 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -83,7 +83,7 @@ never be encrypted if an Encrypted File System solution is enabled. Specifically, this is an "opt-out" feature, meaning that, by default, user data will be encrypted if the EFS feature - is enabled.--> + is enabled. --> <attr name="neverEncrypt" format="boolean" /> <!-- Option to indicate this application is only for testing purposes. diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index aca220f..82c02eb 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1227,10 +1227,9 @@ Resources proposed for Froyo. =============================================================== --> <eat-comment /> - <public type="attr" name="neverEncrypt" id="0x010102b7" /> - <public type="attr" name="installLocation" id="0x010102b8" /> - <public type="attr" name="safeMode" id="0x010102b9" /> - <public type="attr" name="webTextViewStyle" id="0x010102ba" /> + <public type="attr" name="installLocation" id="0x010102b7" /> + <public type="attr" name="safeMode" id="0x010102b8" /> + <public type="attr" name="webTextViewStyle" id="0x010102b9" /> <public type="anim" name="cycle_interpolator" id="0x010a000c" /> diff --git a/packages/SettingsProvider/AndroidManifest.xml b/packages/SettingsProvider/AndroidManifest.xml index c92b9d7..dd0d064 100644 --- a/packages/SettingsProvider/AndroidManifest.xml +++ b/packages/SettingsProvider/AndroidManifest.xml @@ -7,8 +7,9 @@ android:process="system" android:backupAgent="SettingsBackupAgent" android:killAfterRestore="false" - android:icon="@drawable/ic_launcher_settings" - android:neverEncrypt="true"> + android:icon="@drawable/ic_launcher_settings"> + + <!-- todo add: android:neverEncrypt="true" --> <provider android:name="SettingsProvider" android:authorities="settings" android:multiprocess="false" diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java index 0a6c72e..a267e0f 100644 --- a/services/java/com/android/server/DevicePolicyManagerService.java +++ b/services/java/com/android/server/DevicePolicyManagerService.java @@ -24,7 +24,7 @@ import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; import android.app.Activity; -import android.app.DeviceAdmin; +import android.app.DeviceAdminReceiver; import android.app.DeviceAdminInfo; import android.app.DevicePolicyManager; import android.app.IDevicePolicyManager; @@ -216,7 +216,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { ActiveAdmin admin = getActiveAdminUncheckedLocked(adminReceiver); if (admin != null) { sendAdminCommandLocked(admin, - DeviceAdmin.ACTION_DEVICE_ADMIN_DISABLED); + DeviceAdminReceiver.ACTION_DEVICE_ADMIN_DISABLED); // XXX need to wait for it to complete. mAdminList.remove(admin); mAdminMap.remove(adminReceiver); @@ -393,7 +393,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { mAdminList.add(admin); saveSettingsLocked(); sendAdminCommandLocked(admin, - DeviceAdmin.ACTION_DEVICE_ADMIN_ENABLED); + DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED); } finally { Binder.restoreCallingIdentity(ident); } @@ -709,7 +709,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } return; } - Intent intent = new Intent(DeviceAdmin.ACTION_DEVICE_ADMIN_DISABLE_REQUESTED); + Intent intent = new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_DISABLE_REQUESTED); intent.setComponent(admin.info.getComponent()); mContext.sendOrderedBroadcast(intent, null, new BroadcastReceiver() { @Override @@ -738,7 +738,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { mFailedPasswordAttempts = 0; saveSettingsLocked(); } - sendAdminCommandLocked(DeviceAdmin.ACTION_PASSWORD_CHANGED, + sendAdminCommandLocked(DeviceAdminReceiver.ACTION_PASSWORD_CHANGED, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD); } finally { Binder.restoreCallingIdentity(ident); @@ -760,7 +760,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { if (max > 0 && mFailedPasswordAttempts >= max) { wipeDataLocked(0); } - sendAdminCommandLocked(DeviceAdmin.ACTION_PASSWORD_FAILED, + sendAdminCommandLocked(DeviceAdminReceiver.ACTION_PASSWORD_FAILED, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN); } finally { Binder.restoreCallingIdentity(ident); @@ -778,7 +778,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { try { mFailedPasswordAttempts = 0; saveSettingsLocked(); - sendAdminCommandLocked(DeviceAdmin.ACTION_PASSWORD_SUCCEEDED, + sendAdminCommandLocked(DeviceAdminReceiver.ACTION_PASSWORD_SUCCEEDED, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN); } finally { Binder.restoreCallingIdentity(ident); |
