Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11269c36 authored by Michael Groover's avatar Michael Groover
Browse files

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
parent 641107b2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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