diff options
| author | 2016-08-02 23:01:24 +0000 | |
|---|---|---|
| committer | 2016-08-02 23:01:26 +0000 | |
| commit | 964d6914ff65ebb7b0c5e6e3fd5a0fbb1d6c9d25 (patch) | |
| tree | 80141fc3c6e2658dc5d9308ac60567dff0d36a33 | |
| parent | 7841042a83322b3200f63cf67a441b92e2fd845a (diff) | |
| parent | 1f4f26b1d5dd461b786e6113bc466fb639ace327 (diff) | |
Merge "Fix component management in VrManagerService." into nyc-mr1-dev
| -rw-r--r-- | services/core/java/com/android/server/vr/VrManagerService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java index 7d209318c086..bba8667e0c0e 100644 --- a/services/core/java/com/android/server/vr/VrManagerService.java +++ b/services/core/java/com/android/server/vr/VrManagerService.java @@ -46,6 +46,7 @@ import android.service.vr.IVrListener; import android.service.vr.IVrManager; import android.service.vr.IVrStateCallbacks; import android.service.vr.VrListenerService; +import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; import android.util.Slog; @@ -643,7 +644,7 @@ public class VrManagerService extends SystemService implements EnabledComponentC for (String c : current) { ComponentName component = ComponentName.unflattenFromString(c); - if (component.getPackageName().equals(pkg)) { + if (component != null && component.getPackageName().equals(pkg)) { toRemove.add(c); } } @@ -671,7 +672,9 @@ public class VrManagerService extends SystemService implements EnabledComponentC if (flat != null) { String[] allowed = flat.split(":"); for (String s : allowed) { - current.add(s); + if (!TextUtils.isEmpty(s)) { + current.add(s); + } } } return current; |