Fix NPE if FPE service does not exist.

Bug: 19846662
Change-Id: I44e014c66a524b282cce0cfc9b7513fc0f553576
This commit is contained in:
Paul Crowley
2015-03-25 11:43:42 +00:00
parent d62163055f
commit a23995c233

View File

@@ -3031,7 +3031,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
PersistentDataBlockManager manager = (PersistentDataBlockManager)
mContext.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
manager.wipe();
if (manager != null) {
manager.wipe();
}
}
boolean wipeExtRequested = (flags & WIPE_EXTERNAL_STORAGE) != 0;
wipeDeviceOrUserLocked(wipeExtRequested, userHandle,