Merge "Add RECEIVER_EXPORTED flags to screenshots"

This commit is contained in:
Miranda Kephart
2022-01-07 15:17:17 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ public class ScreenshotHelper {
public ScreenshotHelper(Context context) {
mContext = context;
IntentFilter filter = new IntentFilter(ACTION_USER_SWITCHED);
mContext.registerReceiver(mBroadcastReceiver, filter);
mContext.registerReceiver(mBroadcastReceiver, filter, Context.RECEIVER_EXPORTED);
}
/**

View File

@@ -113,7 +113,8 @@ public class TakeScreenshotService extends Service {
@Override
public IBinder onBind(@NonNull Intent intent) {
registerReceiver(mCloseSystemDialogs, new IntentFilter(ACTION_CLOSE_SYSTEM_DIALOGS));
registerReceiver(mCloseSystemDialogs, new IntentFilter(ACTION_CLOSE_SYSTEM_DIALOGS),
Context.RECEIVER_EXPORTED);
final Messenger m = new Messenger(mHandler);
if (DEBUG_SERVICE) {
Log.d(TAG, "onBind: returning connection: " + m);