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

Commit aaf78976 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

MobileSignalController listen to ACTIVE DATA SIM changes

After changing MobileSignalController#updateDataSim to use activeDataSim
instead of defaultDataSim, it should listen to changes in this to
determine whether to updateTelephony.

Test: DSDS QS tile changes when switching data sim
Fixes: 136610544
Change-Id: I91efe837b576e2736058682285723e6487e514e0
parent 3d9cc127
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -163,7 +163,8 @@ public class MobileSignalController extends SignalController<
                        | PhoneStateListener.LISTEN_CALL_STATE
                        | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
                        | PhoneStateListener.LISTEN_DATA_ACTIVITY
                        | PhoneStateListener.LISTEN_CARRIER_NETWORK_CHANGE);
                        | PhoneStateListener.LISTEN_CARRIER_NETWORK_CHANGE
                        | PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE);
        mContext.getContentResolver().registerContentObserver(Global.getUriFor(Global.MOBILE_DATA),
                true, mObserver);
        mContext.getContentResolver().registerContentObserver(Global.getUriFor(
@@ -636,6 +637,13 @@ public class MobileSignalController extends SignalController<

            updateTelephony();
        }

        @Override
        public void onActiveDataSubscriptionIdChanged(int subId) {
            if (DEBUG) Log.d(mTag, "onActiveDataSubscriptionIdChanged: subId=" + subId);
            updateDataSim();
            updateTelephony();
        }
    };

    static class MobileIconGroup extends SignalController.IconGroup {