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

Commit f3c85977 authored by Sebastian Haderecker's avatar Sebastian Haderecker Committed by Michael Bestas
Browse files

Adopt lockscreen shortcut hint from AOSP



In AOSP for icons like Camera, Phone or voice assist it says "Swipe from icon for..."
When adding custom lockscreen shortcuts it currently says "Swipe left/right for..."
It would be better if we have some consistency here.

This patch adopts the AOSP hint for all custom lockscreen shortcuts.

Change-Id: I68222750f07daa64fb0ac42eb903317cfad2bc1c
Signed-off-by: default avatarSebastian Haderecker <sebastian.haderecker@gmail.com>
parent f0772272
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -71,10 +71,8 @@
    <!-- Screen pinning dialog description (for devices without navbar) -->
    <string name="screen_pinning_description_no_navbar">This keeps it in view until you unpin. Touch and hold the Back button to unpin.</string>

    <!-- Strings for lockscreen shortcut hints -->
    <string name="left_shortcut_hint">Swipe right for %1$s</string>
    <string name="right_shortcut_hint">Swipe left for %1$s</string>

    <!-- String for lockscreen shortcut hints -->
    <string name="shortcut_hint">Swipe from icon for %1$s</string>
    <string name="lockscreen_message">Tap an icon on the left or right to reassign a lock screen shortcut.</string>
    <string name="lockscreen_default_target">Default</string>
    <string name="select_application">Select application</string>
+1 −9
Original line number Diff line number Diff line
@@ -859,17 +859,9 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL

    private String getIndexHint(LockscreenShortcutsHelper.Shortcuts shortcut) {
        if (mShortcutHelper.isTargetCustom(shortcut)) {
            boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
            String label = mShortcutHelper.getFriendlyNameForUri(shortcut);
            int resId = 0;
            switch (shortcut) {
                case LEFT_SHORTCUT:
                    resId = isRtl ? R.string.right_shortcut_hint : R.string.left_shortcut_hint;
                    break;
                case RIGHT_SHORTCUT:
                    resId = isRtl ? R.string.left_shortcut_hint : R.string.right_shortcut_hint;
                    break;
            }
            resId = R.string.shortcut_hint;
            return mContext.getString(resId, label);
        } else {
            return null;