Add admin check before trying a remote wipe
* The code assumed that if we asked for a remote wipe, that it would be executed. This isn't the case, however, if we're not a device admin at that time * Test for Email app as device administrator before trying remote wipe Bug: 2603931 Change-Id: I09dcff00e77bcf1e40c742c9dee923e6e07eecae
This commit is contained in:
parent
a90bb03c25
commit
075d34947f
@ -1180,6 +1180,8 @@ public class EasSyncService extends AbstractSyncService {
|
||||
}
|
||||
if (pp.getRemoteWipe()) {
|
||||
// We've gotten a remote wipe command
|
||||
// If we're not the admin, we can't do the wipe, so just return
|
||||
if (!sp.isActiveAdmin()) return false;
|
||||
// First, we've got to acknowledge it, but wrap the wipe in try/catch so that
|
||||
// we wipe the device regardless of any errors in acknowledgment
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user