Make the user switcher into a separate activity

This allows the activity to be opened from other apps (i.e. the
Launcher)

This is helpful for home screen prototyping and doesn't affect the
current functionality.

Bug: 139195033
Test: manual
Change-Id: Ib93b144de531b96b66518f4853eb4d754ba15175
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6fd64ba..2b3afcf 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -336,6 +336,12 @@
             </intent-filter>
         </activity>
 
+        <activity android:name=".users.UserSwitcherActivity"
+                  android:configChanges="orientation|keyboardHidden|screenSize"
+                  android:windowSoftInputMode="adjustResize"
+                  android:exported="true">
+        </activity>
+
         <activity android:name=".security.AddTrustedDeviceActivity"
                   android:configChanges="orientation|keyboardHidden|screenSize"
                   android:windowSoftInputMode="adjustResize">
diff --git a/src/com/android/car/settings/users/UserSwitcherActivity.java b/src/com/android/car/settings/users/UserSwitcherActivity.java
new file mode 100644
index 0000000..02143ed
--- /dev/null
+++ b/src/com/android/car/settings/users/UserSwitcherActivity.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.car.settings.users;
+
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import com.android.car.settings.common.BaseCarSettingsActivity;
+
+/** Entry into user switcher activity. */
+public class UserSwitcherActivity extends BaseCarSettingsActivity {
+
+    @Nullable
+    @Override
+    protected Fragment getInitialFragment() {
+        return new UserSwitcherFragment();
+    }
+}