Loading api/current.xml +178 −189 Original line number Diff line number Diff line Loading @@ -4611,7 +4611,7 @@ type="int" transient="false" volatile="false" value="16843448" value="16843447" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -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" Loading Loading @@ -6855,7 +6844,7 @@ type="int" transient="false" volatile="false" value="16843449" value="16843448" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" core/java/android/app/DeviceAdminInfo.java +4 −4 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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); Loading core/java/android/app/DeviceAdmin.java→core/java/android/app/DeviceAdminReceiver.java +12 −5 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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; Loading @@ -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. Loading Loading @@ -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. Loading @@ -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 Loading @@ -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 Loading core/java/android/app/DevicePolicyManager.java +9 −7 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading @@ -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}. Loading Loading @@ -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. */ Loading Loading @@ -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. */ Loading Loading @@ -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 Loading Loading @@ -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. */ Loading core/res/res/values/public.xml +3 −4 Original line number Diff line number Diff line Loading @@ -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" /> Loading Loading
api/current.xml +178 −189 Original line number Diff line number Diff line Loading @@ -4611,7 +4611,7 @@ type="int" transient="false" volatile="false" value="16843448" value="16843447" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -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" Loading Loading @@ -6855,7 +6844,7 @@ type="int" transient="false" volatile="false" value="16843449" value="16843448" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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" Loading @@ -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"
core/java/android/app/DeviceAdminInfo.java +4 −4 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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); Loading
core/java/android/app/DeviceAdmin.java→core/java/android/app/DeviceAdminReceiver.java +12 −5 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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; Loading @@ -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. Loading Loading @@ -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. Loading @@ -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 Loading @@ -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 Loading
core/java/android/app/DevicePolicyManager.java +9 −7 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading @@ -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}. Loading Loading @@ -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. */ Loading Loading @@ -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. */ Loading Loading @@ -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 Loading Loading @@ -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. */ Loading
core/res/res/values/public.xml +3 −4 Original line number Diff line number Diff line Loading @@ -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" /> Loading