Merge "Add FLAG_RECEIVER_FOREGROUND to run redirect intent at foreground priority"

This commit is contained in:
tim peng
2020-11-27 07:24:54 +00:00
committed by Android (Google) Code Review

View File

@@ -75,6 +75,7 @@ public class MediaOutputPanel implements PanelContent, LocalMediaManager.DeviceC
public static MediaOutputPanel create(Context context, String packageName) {
// Redirect to new media output dialog
context.sendBroadcast(new Intent()
.addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
.setPackage(MediaOutputSliceConstants.SYSTEMUI_PACKAGE_NAME)
.setAction(MediaOutputSliceConstants.ACTION_LAUNCH_MEDIA_OUTPUT_DIALOG)
.putExtra(MediaOutputSliceConstants.EXTRA_PACKAGE_NAME, packageName));