Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d21820a authored by Alex Klyubin's avatar Alex Klyubin Committed by Android Git Automerger
Browse files

am a65fa934: am 8bfb859e: am 8d5aeffa: am 089d1615: am 01dbfbf9: am efd88e2c:...

am a65fa934: am 8bfb859e: am 8d5aeffa: am 089d1615: am 01dbfbf9: am efd88e2c: Merge "Permit deactivation of malformed Device Admins." into jb-dev

* commit 'a65fa934':
  Permit deactivation of malformed Device Admins.
parents 5aa3f878 a65fa934
Loading
Loading
Loading
Loading
+30 −26
Original line number Original line Diff line number Diff line
@@ -116,7 +116,10 @@ public class DeviceAdminAdd extends Activity {
            return;
            return;
        }
        }


        // Make sure the given component name is actually a valid device admin.
        // When activating, make sure the given component name is actually a valid device admin.
        // No need to check this when deactivating, because it is safe to deactivate an active
        // invalid device admin.
        if (!mDPM.isAdminActive(cn)) {
            List<ResolveInfo> avail = getPackageManager().queryBroadcastReceivers(
            List<ResolveInfo> avail = getPackageManager().queryBroadcastReceivers(
                    new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED),
                    new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED),
                    0);
                    0);
@@ -145,6 +148,7 @@ public class DeviceAdminAdd extends Activity {
                finish();
                finish();
                return;
                return;
            }
            }
        }


        ResolveInfo ri = new ResolveInfo();
        ResolveInfo ri = new ResolveInfo();
        ri.activityInfo = ai;
        ri.activityInfo = ai;