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

Commit 35faff94 authored by Danesh M's avatar Danesh M Committed by Gerrit Code Review
Browse files

SystemUI : Fix Rtl for lockscreen shortcuts

Change-Id: I2c3c72bb6e1b06402b882b4f8b2d8d250d813bcd
parent 9bb408e5
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -453,14 +453,15 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL


    private String getIndexHint(LockscreenShortcutsHelper.Shortcuts shortcut) {
    private String getIndexHint(LockscreenShortcutsHelper.Shortcuts shortcut) {
        if (mShortcutHelper.isTargetCustom(shortcut)) {
        if (mShortcutHelper.isTargetCustom(shortcut)) {
            boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
            String label = mShortcutHelper.getFriendlyNameForUri(shortcut);
            String label = mShortcutHelper.getFriendlyNameForUri(shortcut);
            int resId = 0;
            int resId = 0;
            switch (shortcut) {
            switch (shortcut) {
                case LEFT_SHORTCUT:
                case LEFT_SHORTCUT:
                        resId = R.string.left_shortcut_hint;
                    resId = isRtl ? R.string.right_shortcut_hint : R.string.left_shortcut_hint;
                    break;
                    break;
                case RIGHT_SHORTCUT:
                case RIGHT_SHORTCUT:
                        resId = R.string.right_shortcut_hint;
                    resId = isRtl ? R.string.left_shortcut_hint : R.string.right_shortcut_hint;
                    break;
                    break;
            }
            }
            return mContext.getString(resId, label);
            return mContext.getString(resId, label);
+2 −2
Original line number Original line Diff line number Diff line
@@ -1231,8 +1231,8 @@ public class NotificationPanelView extends PanelView implements


        final float w = getMeasuredWidth();
        final float w = getMeasuredWidth();
        float region = (w * (1.f/3.f)); // TODO overlay region fraction?
        float region = (w * (1.f/3.f)); // TODO overlay region fraction?
        final boolean showQsOverride = isLayoutRtl() ? (x < region) : (w - region < x)
        boolean showQsOverride = isLayoutRtl() ? (x < region) : (w - region < x);
                        && mStatusBarState == StatusBarState.SHADE;
        showQsOverride = showQsOverride && mStatusBarState == StatusBarState.SHADE;


        if (mQsExpanded) {
        if (mQsExpanded) {
            return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0) && isInQsArea(x, y);
            return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0) && isInQsArea(x, y);