From 29de9d5153075b33717ba18a0c13c84ea4ba34f3 Mon Sep 17 00:00:00 2001 From: Alex Klyubin Date: Thu, 6 Jun 2013 14:56:24 -0700 Subject: [PATCH] Permit deactivation of malformed Device Admins. Bug: 9074296 Change-Id: I4a3b2f972cb297b9f985a762219c8d67d8e3a425 --- src/com/android/settings/DeviceAdminAdd.java | 56 +++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/com/android/settings/DeviceAdminAdd.java b/src/com/android/settings/DeviceAdminAdd.java index c0d615c029a..f668a63bcd4 100644 --- a/src/com/android/settings/DeviceAdminAdd.java +++ b/src/com/android/settings/DeviceAdminAdd.java @@ -116,34 +116,38 @@ public class DeviceAdminAdd extends Activity { return; } - // Make sure the given component name is actually a valid device admin. - List avail = getPackageManager().queryBroadcastReceivers( - new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED), - 0); - int count = avail == null ? 0 : avail.size(); - boolean found = false; - for (int i=0; i avail = getPackageManager().queryBroadcastReceivers( + new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED), + 0); + int count = avail == null ? 0 : avail.size(); + boolean found = false; + for (int i=0; i