Fix component management in VrManagerService. am: 1f4f26b1d5

am: 6bddc28000

Change-Id: I675a257623d9765b71c3080485666adade43aee4
This commit is contained in:
Ruben Brunk
2016-08-02 23:15:33 +00:00
committed by android-build-merger

View File

@@ -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;