diff options
author | Paul Crowley <paulcrowley@google.com> | 2015-03-25 11:43:42 +0000 |
---|---|---|
committer | Paul Crowley <paulcrowley@google.com> | 2015-03-25 11:43:42 +0000 |
commit | a23995c233b3c336d0f405523902606f2583caea (patch) | |
tree | 499d822205d3c5fe3a16d84d1dac8435f7e83b1b /services/devicepolicy | |
parent | d62163055f983b95a954f1a6c2cbc8e0085a7ab5 (diff) | |
download | frameworks_base-a23995c233b3c336d0f405523902606f2583caea.zip frameworks_base-a23995c233b3c336d0f405523902606f2583caea.tar.gz frameworks_base-a23995c233b3c336d0f405523902606f2583caea.tar.bz2 |
Fix NPE if FPE service does not exist.
Bug: 19846662
Change-Id: I44e014c66a524b282cce0cfc9b7513fc0f553576
Diffstat (limited to 'services/devicepolicy')
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 40e2056..ec1258c 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -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, |