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

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

Merge "Adds settings item for quick affordances." into tm-qpr-dev

parents 06125115 01df2b4e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
    <uses-permission android:name="android.permission.READ_SAFETY_CENTER_STATUS" />
    <uses-permission android:name="android.permission.SEND_SAFETY_CENTER_UPDATE" />
    <uses-permission android:name="android.permission.START_VIEW_APP_FEATURES" />
    <uses-permission android:name="android.permission.ACCESS_KEYGUARD_QUICK_AFFORDANCES" />

    <application
            android:name=".SettingsApplication"
+8 −0
Original line number Diff line number Diff line
@@ -13744,6 +13744,14 @@
    <string name="lockscreen_double_line_clock_summary">Show double-line clock when available</string>
    <!-- Lockscreen double-line clock toggle [CHAR LIMIT=60] -->
    <string name="lockscreen_double_line_clock_setting_toggle">Double-line clock</string>
    <!-- Lock screen buttons preference [CHAR LIMIT=60] -->
    <string name="lockscreen_quick_affordances_title">Buttons</string>
    <!-- Summary for the lock screen button preference [CHAR LIMIT=60] -->
    <plurals name="lockscreen_quick_affordances_summary">
        <item quantity="zero">None</item>
        <item quantity="one"><xliff:g id="first">%1$s</xliff:g></item>
        <item quantity="other"><xliff:g id="first">%1$s</xliff:g>, <xliff:g id="second">%2$s</xliff:g></item>
    </plurals>
    <!-- Title for RTT setting. [CHAR LIMIT=NONE] -->
    <string name="rtt_settings_title"></string>
+5 −0
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@
            android:summary="@string/lockscreen_trivial_controls_summary"
            settings:controller="com.android.settings.display.ControlsTrivialPrivacyPreferenceController"/>

        <Preference
            android:key="customizable_lock_screen_quick_affordances"
            android:title="@string/lockscreen_quick_affordances_title"
            settings:controller="com.android.settings.display.CustomizableLockScreenQuickAffordancesPreferenceController" />

        <SwitchPreference
            android:key="lockscreen_double_line_clock_switch"
            android:title="@string/lockscreen_double_line_clock_setting_toggle"
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,11 @@ public class ControlsPrivacyPreferenceController extends TogglePreferenceControl

    @Override
    public int getAvailabilityStatus() {
        // hide if we should use customizable lock screen quick affordances
        if (CustomizableLockScreenUtils.isFeatureEnabled(mContext)) {
            return UNSUPPORTED_ON_DEVICE;
        }

        // hide if lockscreen isn't secure for this user
        return isEnabled() && isSecure() ? AVAILABLE : DISABLED_DEPENDENT_SETTING;
    }
+4 −0
Original line number Diff line number Diff line
@@ -70,6 +70,10 @@ public class ControlsTrivialPrivacyPreferenceController extends TogglePreference

    @Override
    public int getAvailabilityStatus() {
        if (CustomizableLockScreenUtils.isFeatureEnabled(mContext)) {
            return UNSUPPORTED_ON_DEVICE;
        }

        return showDeviceControlsSettingsEnabled() ? AVAILABLE : DISABLED_DEPENDENT_SETTING;
    }

Loading