From 78c05f97426e941b1a398e0d00b53603603f292b Mon Sep 17 00:00:00 2001 From: Benjamin Franz Date: Tue, 21 Apr 2015 09:45:19 +0100 Subject: Check for null packages in setLockTaskPackages Bug: 20416611 Change-Id: Ibbadc952da29a34de0cf02408093b7bfc01f8779 --- .../com/android/server/devicepolicy/DevicePolicyManagerService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index e22a2cc..8dacf6c 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -5626,7 +5626,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { if (packages != null) { for (int j = 0; j < packages.length; j++) { String pkg = packages[j]; - policy.mLockTaskPackages.add(pkg); + if (pkg != null) { + policy.mLockTaskPackages.add(pkg); + } } } -- cgit v1.1