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

Commit bc5a4122 authored by PETER LIANG's avatar PETER LIANG Committed by Android (Google) Code Review
Browse files

Merge "Add the intent extra for accessibility long press event."

parents 4e659f42 994fb3a0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -352,6 +352,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
            try {
                Intent intent = new Intent(AccessibilityManager.ACTION_CHOOSE_ACCESSIBILITY_BUTTON);
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                intent.putExtra(AccessibilityManager.EXTRA_SHORTCUT_TYPE,
                        AccessibilityManager.ACCESSIBILITY_BUTTON);
                mContext.startActivityAsUser(intent, UserHandle.CURRENT);
            } finally {
                Binder.restoreCallingIdentity(token);
+2 −0
Original line number Diff line number Diff line
@@ -956,6 +956,8 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
    private boolean onAccessibilityLongClick(View v) {
        Intent intent = new Intent(AccessibilityManager.ACTION_CHOOSE_ACCESSIBILITY_BUTTON);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
        intent.putExtra(AccessibilityManager.EXTRA_SHORTCUT_TYPE,
                AccessibilityManager.ACCESSIBILITY_BUTTON);
        v.getContext().startActivityAsUser(intent, UserHandle.CURRENT);
        return true;
    }