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

Commit b323696e authored by Yunke Zhou's avatar Yunke Zhou Committed by Android (Google) Code Review
Browse files

Merge "Move userSwitchingMustGoThroughLogin to frameworks/base" into main

parents 509d1523 f7fff019
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -6194,6 +6194,11 @@
    <!-- If true, multiuser switcher would be automatically enabled when second user is created on the device. -->
    <bool name="config_enableUserSwitcherUponUserCreation">true</bool>

    <!--
    Whether the user switching can only happen by logging out and going through the system user (login screen).
    -->
    <bool name="config_userSwitchingMustGoThroughLoginScreen">false</bool>

    <!-- Set to true to make assistant show in front of the dream/screensaver. -->
    <bool name="config_assistantOnTopOfDream">false</bool>

+1 −0
Original line number Diff line number Diff line
@@ -4828,6 +4828,7 @@
  <java-symbol type="bool" name="config_showUserSwitcherByDefault" />
  <java-symbol type="bool" name="config_allowChangeUserSwitcherEnabled" />
  <java-symbol type="bool" name="config_enableUserSwitcherUponUserCreation" />
  <java-symbol type="bool" name="config_userSwitchingMustGoThroughLoginScreen" />

  <!-- Set to true to make assistant show in front of the dream/screensaver. -->
  <java-symbol type="bool" name="config_assistantOnTopOfDream"/>
+1 −1
Original line number Diff line number Diff line
@@ -476,7 +476,7 @@ class UserRepositoryImplTest : SysuiTestCase() {

    private fun setUserSwitchingMustGoThroughLoginScreen(enabled: Boolean) {
        context.orCreateTestableResources.addOverride(
            R.bool.config_userSwitchingMustGoThroughLoginScreen,
            com.android.internal.R.bool.config_userSwitchingMustGoThroughLoginScreen,
            enabled,
        )
    }
+0 −5
Original line number Diff line number Diff line
@@ -1112,11 +1112,6 @@
    -->
    <bool name="config_enableDesktopFeatureSet">false</bool>

    <!--
    Whether the user switching can only happen by logging out and going through the system user (login screen).
    -->
    <bool name="config_userSwitchingMustGoThroughLoginScreen">false</bool>

    <!-- The dream component used when the device is low light environment. -->
    <string translatable="false" name="config_lowLightDreamComponent"/>

+6 −2
Original line number Diff line number Diff line
@@ -308,7 +308,9 @@ constructor(
            .flatMapLatestConflated { selectedUser ->
                if (selectedUser.isEligibleForLogout()) {
                    flowOf(
                        resources.getBoolean(R.bool.config_userSwitchingMustGoThroughLoginScreen)
                        resources.getBoolean(
                            com.android.internal.R.bool.config_userSwitchingMustGoThroughLoginScreen
                        )
                    )
                } else {
                    flowOf(false)
@@ -376,7 +378,9 @@ constructor(
            if (
                // TODO(b/378068979): remove once login screen-specific logic
                // is implemented at framework level.
                appContext.resources.getBoolean(R.bool.config_userSwitchingMustGoThroughLoginScreen)
                appContext.resources.getBoolean(
                    com.android.internal.R.bool.config_userSwitchingMustGoThroughLoginScreen
                )
            ) {
                UserSwitcherSettingsModel(
                    isSimpleUserSwitcher = false,
Loading