Return empty set instead of null when user is not set.

- Avoid iterating over null set when checking components for user
  that isn't currently active.  This can happen if the user is changed,
  and the enabled component set is queried before the set has been
  rebuilt to include components for the new current user.

Bug: 30165350
Change-Id: I4dadad84e6bd2728bea5711b936cba91f6791c99
diff --git a/services/core/java/com/android/server/vr/EnabledComponentsObserver.java b/services/core/java/com/android/server/vr/EnabledComponentsObserver.java
index 40ee5d8..7126cb5 100644
--- a/services/core/java/com/android/server/vr/EnabledComponentsObserver.java
+++ b/services/core/java/com/android/server/vr/EnabledComponentsObserver.java
@@ -215,7 +215,11 @@
      */
     public ArraySet<ComponentName> getInstalled(int userId) {
         synchronized (mLock) {
-            return mInstalledSet.get(userId);
+            ArraySet<ComponentName> ret = mInstalledSet.get(userId);
+            if (ret == null) {
+                return new ArraySet<ComponentName>();
+            }
+            return ret;
         }
     }
 
@@ -227,7 +231,12 @@
      */
     public ArraySet<ComponentName> getEnabled(int userId) {
         synchronized (mLock) {
-            return mEnabledSet.get(userId);
+            ArraySet<ComponentName> ret = mEnabledSet.get(userId);
+            if (ret == null) {
+                return new ArraySet<ComponentName>();
+            }
+            return ret;
+
         }
     }