Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a429c46 authored by Brad Hinegardner's avatar Brad Hinegardner Committed by Android (Google) Code Review
Browse files

Merge "Change Fullscreen UserSwitcher into a dialog" into tm-qpr-dev

parents 7ab4fb2c 7f687ebf
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -893,18 +893,6 @@
                  android:visibleToInstantApps="true">
        </activity>

        <activity android:name=".user.UserSwitcherActivity"
                  android:label="@string/accessibility_multi_user_switch_switcher"
                  android:theme="@style/Theme.UserSwitcherActivity"
                  android:excludeFromRecents="true"
                  android:showWhenLocked="true"
                  android:showForAllUsers="true"
                  android:finishOnTaskLaunch="true"
                  android:lockTaskMode="always"
                  android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden"
                  android:visibleToInstantApps="true">
        </activity>

        <receiver android:name=".controls.management.ControlsRequestReceiver"
            android:exported="true">
            <intent-filter>
+3 −3
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ Multiple users and the ability to switch between them is controlled by Settings

### Quick Settings

In the QS footer, an icon becomes available for users to tap on. The view and its onClick actions are handled by [MultiUserSwitchController][2]. Multiple visual implementations are currently in use; one for phones/foldables ([UserSwitchDialogController][6]) and one for tablets ([UserSwitcherActivity][5]).
In the QS footer, an icon becomes available for users to tap on. The view and its onClick actions are handled by [MultiUserSwitchController][2]. Multiple visual implementations are currently in use; one for phones/foldables ([UserSwitchDialogController][6]) and one for tablets ([UserSwitcherFullscreenDialog][5]).

### Bouncer

@@ -29,7 +29,7 @@ All visual implementations should derive their logic and use the adapter specifi

## Visual Components

### [UserSwitcherActivity][5]
### [UserSwitcherFullscreenDialog][5]

A fullscreen user switching activity, supporting add guest/user actions if configured.

@@ -41,5 +41,5 @@ Renders user switching as a dialog over the current surface, and supports add gu
[2]: /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserController.java
[3]: /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
[4]: /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardQsUserSwitchController.java
[5]: /frameworks/base/packages/SystemUI/src/com/android/systemui/user/UserSwitcherActivity.kt
[5]: /frameworks/base/packages/SystemUI/src/com/android/systemui/user/UserSwitcherFullscreenDialog.kt
[6]: /frameworks/base/packages/SystemUI/src/com/android/systemui/qs/user/UserSwitchDialogController.kt
+1 −3
Original line number Diff line number Diff line
@@ -836,12 +836,10 @@
        <item name="wallpaperTextColor">@*android:color/primary_text_material_dark</item>
    </style>

    <style name="Theme.UserSwitcherActivity" parent="@android:style/Theme.DeviceDefault.NoActionBar">
    <style name="Theme.UserSwitcherFullscreenDialog" parent="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen">
        <item name="android:statusBarColor">@color/user_switcher_fullscreen_bg</item>
        <item name="android:windowBackground">@color/user_switcher_fullscreen_bg</item>
        <item name="android:navigationBarColor">@color/user_switcher_fullscreen_bg</item>
        <!-- Setting a placeholder will avoid using the SystemUI icon on the splash screen -->
        <item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_blank</item>
    </style>

    <style name="Theme.CreateUser" parent="@android:style/Theme.DeviceDefault.NoActionBar">
+3 −3
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ interface FooterActionsInteractor {
    fun showSettings(expandable: Expandable)

    /** Show the user switcher. */
    fun showUserSwitcher(context: Context, expandable: Expandable)
    fun showUserSwitcher(expandable: Expandable)
}

@SysUISingleton
@@ -177,7 +177,7 @@ constructor(
        )
    }

    override fun showUserSwitcher(context: Context, expandable: Expandable) {
        userInteractor.showUserSwitcher(context, expandable)
    override fun showUserSwitcher(expandable: Expandable) {
        userInteractor.showUserSwitcher(expandable)
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ class FooterActionsViewModel(
            return
        }

        footerActionsInteractor.showUserSwitcher(context, expandable)
        footerActionsInteractor.showUserSwitcher(expandable)
    }

    private fun onSettingsButtonClicked(expandable: Expandable) {
Loading