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

Commit cf5a2d0f authored by Malcolm Chen's avatar Malcolm Chen
Browse files

Mainline: remove usage of hidden DEFAULT_PHONE_INDEX

Bug: 140908357
Test: build
Change-Id: Iccee59265dee12da46e3cb09e84e9fcf0f30ead4
parent 06fa0d40
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -60,15 +60,10 @@ interface ITelephonyRegistry {
    @UnsupportedAppUsage(maxTargetSdk = 28)
    void notifyDataActivity(int state);
    void notifyDataActivityForSubscriber(in int subId, int state);
    void notifyDataConnection(int state, boolean isDataConnectivityPossible,
            String apn, String apnType, in LinkProperties linkProperties,
            in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
    void notifyDataConnectionForSubscriber(int phoneId, int subId, int state,
            boolean isDataConnectivityPossible,
            String apn, String apnType, in LinkProperties linkProperties,
            in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
    @UnsupportedAppUsage
    void notifyDataConnectionFailed(String apnType);
    void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType);
    @UnsupportedAppUsage(maxTargetSdk = 28)
    void notifyCellLocation(in Bundle cellLocation);
+0 −16
Original line number Diff line number Diff line
@@ -1498,16 +1498,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
        }
    }

    public void notifyDataConnection(int state, boolean isDataAllowed, String apn, String apnType,
                                     LinkProperties linkProperties,
                                     NetworkCapabilities networkCapabilities, int networkType,
                                     boolean roaming) {
        notifyDataConnectionForSubscriber(SubscriptionManager.DEFAULT_PHONE_INDEX,
                SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,  state,
                isDataAllowed, apn, apnType, linkProperties,
                networkCapabilities, networkType, roaming);
    }

    public void notifyDataConnectionForSubscriber(int phoneId, int subId, int state,
                                                  boolean isDataAllowed,
                                                  String apn, String apnType,
@@ -1576,12 +1566,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                networkCapabilities, roaming, subId);
    }

    public void notifyDataConnectionFailed(String apnType) {
         notifyDataConnectionFailedForSubscriber(SubscriptionManager.DEFAULT_PHONE_INDEX,
                 SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
                 apnType);
    }

    public void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType) {
        if (!checkNotifyPermission("notifyDataConnectionFailed()")) {
            return;