Remove NOT_EXPORTED flag for receivers in VibrationSettings

Android T adds support to allow a runtime receiver to be registered as
not exported by specifying the RECEIVER_NOT_EXPORTED flag during
registration; however, this flag is not required when registering for
system broadcasts. To remain consistent with manifest receivers, if
a runtime receiver is registered with this flag then only the root
and system UIDs will be able to send a broadcast to this receiver.
This commit removes the RECEIVER_NOT_EXPORTED flag from the receivers
in VibrationSettings that are registering for system broadcasts since
this flag is not required and these broadcasts won't be received as
sticky broadcasts.

Bug: 228082755
Test: atest VibrationSettingsTest
Change-Id: I1ba6a7f53fd454ff1748676dfd887480fe21eb68
This commit is contained in:
Michael Groover
2022-04-05 13:17:15 -07:00
parent 641107b271
commit 11269c36e0

View File

@@ -604,8 +604,7 @@ final class VibrationSettings {
}
private void registerSettingsChangeReceiver(IntentFilter intentFilter) {
mContext.registerReceiver(mSettingChangeReceiver, intentFilter,
Context.RECEIVER_NOT_EXPORTED);
mContext.registerReceiver(mSettingChangeReceiver, intentFilter);
}
@Nullable