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

Commit 28348ed7 authored by Nicholas Sauer's avatar Nicholas Sauer
Browse files

Send Keyboard Shortcut broadcasts to current user.

bug: 124526105
Test: After switching to a secondary user: cts-tradefed run cts-dev -m CtsAppTestCases -t android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts
Change-Id: I033a3bd0f6df7ca939b3aa7c081a6dbf45f1d63f
parent e5ecf06d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ import android.os.IBinder;
import android.os.Looper;
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager.ServiceNotFoundException;
import android.os.StrictMode;
@@ -2297,7 +2298,7 @@ public class Activity extends ContextThemeWrapper
    public final void requestShowKeyboardShortcuts() {
        Intent intent = new Intent(Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS);
        intent.setPackage(KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME);
        sendBroadcastAsUser(intent, UserHandle.SYSTEM);
        sendBroadcastAsUser(intent, Process.myUserHandle());
    }

    /**
@@ -2306,7 +2307,7 @@ public class Activity extends ContextThemeWrapper
    public final void dismissKeyboardShortcutsHelper() {
        Intent intent = new Intent(Intent.ACTION_DISMISS_KEYBOARD_SHORTCUTS);
        intent.setPackage(KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME);
        sendBroadcastAsUser(intent, UserHandle.SYSTEM);
        sendBroadcastAsUser(intent, Process.myUserHandle());
    }

    @Override