Specifies RECEIVER_EXPORTED for FlashNotificationsController broadcast receiver.
As of Android U broadcast receivers for non-system broadcasts must specify RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED. See go/receiver-flag-enforcement-design. RECEIVER_EXPORTED is the default (pre-U) behavior. b/266775677 is evaluating whether this can be changed to RECEIVER_NOT_EXPORTED. Bug: 268113696 Bug: 266775677 Change-Id: Ib0334262c1f58596eaba2581a20b7595e982df0c Test: Use go/abtd to run com.google.android.projection.gearhead.test.functional#CarAppTest-searchTemplate
This commit is contained in:
@@ -253,7 +253,8 @@ class FlashNotificationsController {
|
||||
broadcastFilter.addAction(ACTION_FLASH_NOTIFICATION_START_PREVIEW);
|
||||
broadcastFilter.addAction(ACTION_FLASH_NOTIFICATION_STOP_PREVIEW);
|
||||
mFlashBroadcastReceiver = new FlashBroadcastReceiver();
|
||||
mContext.registerReceiver(mFlashBroadcastReceiver, broadcastFilter);
|
||||
mContext.registerReceiver(
|
||||
mFlashBroadcastReceiver, broadcastFilter, Context.RECEIVER_EXPORTED);
|
||||
|
||||
final PowerManager powerManager = mContext.getSystemService(PowerManager.class);
|
||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, WAKE_LOCK_TAG);
|
||||
|
||||
Reference in New Issue
Block a user