Merge "Revert "Explicitly mark receivers as RECEIVER_NOT_EXPORTED""

This commit is contained in:
Michael Groover
2022-03-25 23:13:28 +00:00
committed by Gerrit Code Review
3 changed files with 4 additions and 6 deletions

View File

@@ -73,8 +73,7 @@ public class DataConnectionStats extends BroadcastReceiver {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SIM_STATE_CHANGED);
mContext.registerReceiver(this, filter, null /* broadcastPermission */, mListenerHandler,
Context.RECEIVER_NOT_EXPORTED);
mContext.registerReceiver(this, filter, null /* broadcastPermission */, mListenerHandler);
}
@Override

View File

@@ -145,7 +145,7 @@ public class TelephonySubscriptionTracker extends BroadcastReceiver {
filter.addAction(ACTION_CARRIER_CONFIG_CHANGED);
filter.addAction(ACTION_MULTI_SIM_CONFIG_CHANGED);
mContext.registerReceiver(this, filter, null, mHandler, Context.RECEIVER_NOT_EXPORTED);
mContext.registerReceiver(this, filter, null, mHandler);
mSubscriptionManager.addOnSubscriptionsChangedListener(
executor, mSubscriptionChangedListener);
mTelephonyManager.registerTelephonyCallback(executor, mActiveDataSubIdListener);

View File

@@ -174,7 +174,7 @@ public class TelephonySubscriptionTrackerTest {
private IntentFilter getIntentFilter() {
final ArgumentCaptor<IntentFilter> captor = ArgumentCaptor.forClass(IntentFilter.class);
verify(mContext).registerReceiver(any(), captor.capture(), any(), any(), anyInt());
verify(mContext).registerReceiver(any(), captor.capture(), any(), any());
return captor.getValue();
}
@@ -258,8 +258,7 @@ public class TelephonySubscriptionTrackerTest {
eq(mTelephonySubscriptionTracker),
any(IntentFilter.class),
any(),
eq(mHandler),
eq(Context.RECEIVER_NOT_EXPORTED));
eq(mHandler));
final IntentFilter filter = getIntentFilter();
assertEquals(2, filter.countActions());
assertTrue(filter.hasAction(ACTION_CARRIER_CONFIG_CHANGED));