Set explicit package name on Intent for showing TV PiP
We broadcast an intent when opening the TV PiP menu, which is received by SystemUI. This causes a warning since sending non-protected broadcasts is dangerous. Setting the package name explicitly lets ActivityManagerService determine that the broadcast is safe since it is only sent within SystemUI. Bug: 222250868 Fix: 222250868 Test: Open PiP, `adb shell input keyevent WINDOW`, observe logcat Change-Id: I833752a52774ca933724f64a02edc45c898b080b
This commit is contained in:
@@ -73,6 +73,8 @@ public class TvStatusBar extends CoreStartable implements CommandQueue.Callbacks
|
||||
|
||||
@Override
|
||||
public void showPictureInPictureMenu() {
|
||||
mContext.sendBroadcast(new Intent(ACTION_SHOW_PIP_MENU), SYSTEMUI_PERMISSION);
|
||||
mContext.sendBroadcast(
|
||||
new Intent(ACTION_SHOW_PIP_MENU).setPackage(mContext.getPackageName()),
|
||||
SYSTEMUI_PERMISSION);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user