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

Commit 72fe1d3a authored by Jacob Hobbie's avatar Jacob Hobbie Committed by Android (Google) Code Review
Browse files

Merge "Adding broadcasts receiver flags."

parents 21f5ee74 22669f5b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -147,7 +147,8 @@ final class WifiDisplayAdapter extends DisplayAdapter {
                        getContext(), getHandler(), mWifiDisplayListener);

                getContext().registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL,
                        new IntentFilter(ACTION_DISCONNECT), null, mHandler);
                        new IntentFilter(ACTION_DISCONNECT), null, mHandler,
                        Context.RECEIVER_NOT_EXPORTED);
            }
        });
    }
+2 −1
Original line number Diff line number Diff line
@@ -138,7 +138,8 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn
        // By default CLOSE_SYSTEM_DIALOGS broadcast is sent only for current user, which is user
        // 10 on devices with headless system user enabled.
        // In order to receive the broadcast, register the broadcast receiver with UserHandle.ALL.
        context.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null, null);
        context.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null, null,
                Context.RECEIVER_EXPORTED);

        mHasTelephony =
                context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ public final class ShutdownThread extends Thread {
        CloseDialogReceiver(Context context) {
            mContext = context;
            IntentFilter filter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
            context.registerReceiver(this, filter);
            context.registerReceiver(this, filter, Context.RECEIVER_EXPORTED);
        }

        @Override
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ class Vr2dDisplay {
                        }
                    }
                }
            }, intentFilter);
            }, intentFilter, Context.RECEIVER_NOT_EXPORTED);
        }
    }