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

Commit 2c45688a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Introduce concept of DockUser"

parents 87e404cc 81e5f373
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1305,15 +1305,15 @@
        <item>1</item>
    </string-array>

    <!-- Setting entries for timing out to user 0 when docked. -->
    <string-array name="switch_to_user_zero_when_docked_timeout_entries">
    <!-- Setting entries for timing out to the Dock User when docked. -->
    <string-array name="switch_to_dock_user_when_docked_timeout_entries">
        <item>Never</item>
        <item>After 1 minute</item>
        <item>After 5 minutes</item>
    </string-array>

    <!-- Setting values for timing out to user 0 when docked. [DO NOT TRANSLATE] -->
    <string-array name="switch_to_user_zero_when_docked_timeout_values" translatable="false">
    <!-- Setting values for timing out to the Dock User when docked. [DO NOT TRANSLATE] -->
    <string-array name="switch_to_dock_user_when_docked_timeout_values" translatable="false">
        <!-- Never -->
        <item>0</item>
        <!-- 1 minute -->
+3 −2
Original line number Diff line number Diff line
@@ -5818,9 +5818,10 @@
    <string name="user_lockscreen_settings">Lock screen settings</string>
    <!-- User settings item to allow creating new users from locks screen [CHAR LIMIT=50] -->
    <string name="user_add_on_lockscreen_menu">Add users from lock screen</string>
    <!-- User settings item to allow the system to automatically switch back to the admin user when
    <!-- TODO(b/257333623): HSUM has no 1:1 admin:dream relationship. There can even be >1 admin -->
    <!-- User settings item to allow the system to automatically switch back to the Dock User when
         the device is docked. [CHAR LIMIT=50] -->
    <string name="switch_to_user_zero_when_docked">Switch to admin user when docked</string>
    <string name="switch_to_dock_user_when_docked">Switch to admin user when docked</string>
    <!-- User (self) removal confirmation title [CHAR LIMIT=30] -->
    <string name="user_confirm_remove_self_title">Delete yourself?</string>
+4 −4
Original line number Diff line number Diff line
@@ -94,10 +94,10 @@
        settings:allowDividerAbove="true"/>

    <com.android.settingslib.RestrictedPreference
        android:key="timeout_to_user_zero_preference"
        android:title="@string/switch_to_user_zero_when_docked"
        android:key="timeout_to_dock_user_preference"
        android:title="@string/switch_to_dock_user_when_docked"
        android:order="106"
        android:fragment="com.android.settings.users.TimeoutToUserZeroSettings"
        settings:controller="com.android.settings.users.TimeoutToUserZeroPreferenceController"/>
        android:fragment="com.android.settings.users.TimeoutToDockUserSettings"
        settings:controller="com.android.settings.users.TimeoutToDockUserPreferenceController"/>

</PreferenceScreen>
+1 −1
Original line number Diff line number Diff line
@@ -17,4 +17,4 @@

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/switch_to_user_zero_when_docked"/>
    android:title="@string/switch_to_dock_user_when_docked"/>
+4 −3
Original line number Diff line number Diff line
@@ -39,9 +39,10 @@ public class ScreenSaverPreferenceController extends AbstractPreferenceControlle
    public boolean isAvailable() {
        final boolean dreamsSupported = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_dreamsSupported);
        final boolean dreamsOnlyEnabledForSystemUser = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_dreamsOnlyEnabledForSystemUser);
        return dreamsSupported && (!dreamsOnlyEnabledForSystemUser || isSystemUser());
        final boolean dreamsOnlyEnabledForDockUser = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_dreamsOnlyEnabledForDockUser);
        // TODO(b/257333623): Allow the Dock User to be non-SystemUser user in HSUM.
        return dreamsSupported && (!dreamsOnlyEnabledForDockUser || isSystemUser());
    }

    @Override
Loading