Additional SecurityPolicy functionality
* Begin wiring into system DevicePolicyManager requirements
* Semi-real implementations of isSupported() & isActive()
* Added new API (placeholder) updatePolicies()
* Updated existing unit tests as needed
Bug: 2387961
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index b7cb864..caf9592 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -193,6 +193,20 @@
</intent-filter>
</receiver>
+ <!-- Support for DeviceAdmin / DevicePolicyManager. See SecurityPolicy class for impl. -->
+ <receiver
+ android:name=".SecurityPolicy$PolicyAdmin"
+ android:label="@string/device_admin_label"
+ android:description="@string/device_admin_description"
+ android:permission="android.permission.BIND_DEVICE_ADMIN" >
+ <meta-data
+ android:name="android.app.device_admin"
+ android:resource="@xml/device_admin" />
+ <intent-filter>
+ <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
+ </intent-filter>
+ </receiver>
+
<service
android:name=".service.MailService"
android:enabled="false"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 94f0766..7c6b3e2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -577,4 +577,11 @@
<!-- Message that appears if the AccountManager cannot create the system Account -->
<string name="system_account_create_failed">The AccountManager could not create the Account; please try again.</string>
+
+ <!-- Strings that support the DeviceAdmin / DevicePolicyManager API -->
+ <!-- Name of the DeviceAdmin (seen in settings - anywhere else?) -->
+ <string name="device_admin_label">Email Device Administrator</string>
+ <!-- Long-form description of the DeviceAdmin (seen in settings - anywhere else?) -->
+ <string name="device_admin_description">Email Device Administrator - Long Description</string>
+
</resources>