Adding RECEIVER_EXPORTED flag.

ACTION_CLOSE_SySTEM_DIALOG has been deprecated and will be dropped by the system in non-debug builds S+, so we want to preserve the old behavior and should mark this receiver as exported for T+.

Bug:161145287
Change-Id: I27fa0cbd971d17cb2bf7852e464c1b37d41350a8
Test: no-op
This commit is contained in:
Jacob Hobbie
2021-11-02 21:29:45 +00:00
parent 66cffd469f
commit 928254beec

View File

@@ -129,7 +129,7 @@ public class ContextualCardsFragment extends InstrumentedFragment implements
private void registerKeyEventReceiver() {
getActivity().registerReceiver(mKeyEventReceiver,
new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), Context.RECEIVER_EXPORTED);
}
private void unregisterKeyEventReceiver() {