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

Commit 0cacb14c authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge \"HUN: Close RemoteInputView when Home is pressed\" into nyc-dev...

Merge "Merge \"HUN: Close RemoteInputView when Home is pressed\" into nyc-dev am: cdd43d72" into nyc-mr1-dev
parents 5bebba21 86315e78
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -130,6 +130,28 @@ public class RemoteInputController {
        }
    }

    public void closeRemoteInputs() {
        if (mOpen.size() == 0) {
            return;
        }

        // Make a copy because closing the remote inputs will modify mOpen.
        ArrayList<NotificationData.Entry> list = new ArrayList<>(mOpen.size());
        for (int i = mOpen.size() - 1; i >= 0; i--) {
            NotificationData.Entry item = mOpen.get(i).get();
            if (item != null && item.row != null) {
                list.add(item);
            }
        }

        for (int i = list.size() - 1; i >= 0; i--) {
            NotificationData.Entry item = list.get(i);
            if (item.row != null) {
                item.row.closeRemoteInput();
            }
        }
    }

    public interface Callback {
        default void onRemoteInputActive(boolean active) {}

+3 −0
Original line number Diff line number Diff line
@@ -3391,6 +3391,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            String action = intent.getAction();
            if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
                KeyboardShortcuts.dismiss();
                if (mRemoteInputController != null) {
                    mRemoteInputController.closeRemoteInputs();
                }
                if (isCurrentProfile(getSendingUserId())) {
                    int flags = CommandQueue.FLAG_EXCLUDE_NONE;
                    String reason = intent.getStringExtra("reason");