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

Commit 8b539435 authored by Michael Groover's avatar Michael Groover Committed by Automerger Merge Worker
Browse files

Merge "Revert "Explicitly mark receivers as RECEIVER_NOT_EXPORTED"" am: 068b9f43 am: 3d8e9036

parents 686849c5 3d8e9036
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -73,8 +73,7 @@ public class DataConnectionStats extends BroadcastReceiver {


        IntentFilter filter = new IntentFilter();
        IntentFilter filter = new IntentFilter();
        filter.addAction(Intent.ACTION_SIM_STATE_CHANGED);
        filter.addAction(Intent.ACTION_SIM_STATE_CHANGED);
        mContext.registerReceiver(this, filter, null /* broadcastPermission */, mListenerHandler,
        mContext.registerReceiver(this, filter, null /* broadcastPermission */, mListenerHandler);
                Context.RECEIVER_NOT_EXPORTED);
    }
    }


    @Override
    @Override
+1 −1
Original line number Original line Diff line number Diff line
@@ -145,7 +145,7 @@ public class TelephonySubscriptionTracker extends BroadcastReceiver {
        filter.addAction(ACTION_CARRIER_CONFIG_CHANGED);
        filter.addAction(ACTION_CARRIER_CONFIG_CHANGED);
        filter.addAction(ACTION_MULTI_SIM_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(
        mSubscriptionManager.addOnSubscriptionsChangedListener(
                executor, mSubscriptionChangedListener);
                executor, mSubscriptionChangedListener);
        mTelephonyManager.registerTelephonyCallback(executor, mActiveDataSubIdListener);
        mTelephonyManager.registerTelephonyCallback(executor, mActiveDataSubIdListener);
+2 −3
Original line number Original line Diff line number Diff line
@@ -174,7 +174,7 @@ public class TelephonySubscriptionTrackerTest {


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