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

Commit 30e1d6bd authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Android (Google) Code Review
Browse files

Merge "Mainline: remove usage of hidden DEFAULT_PHONE_INDEX"

parents 87c6af9c cf5a2d0f
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -60,15 +60,10 @@ interface ITelephonyRegistry {
    @UnsupportedAppUsage(maxTargetSdk = 28)
    @UnsupportedAppUsage(maxTargetSdk = 28)
    void notifyDataActivity(int state);
    void notifyDataActivity(int state);
    void notifyDataActivityForSubscriber(in int subId, 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,
    void notifyDataConnectionForSubscriber(int phoneId, int subId, int state,
            boolean isDataConnectivityPossible,
            boolean isDataConnectivityPossible,
            String apn, String apnType, in LinkProperties linkProperties,
            String apn, String apnType, in LinkProperties linkProperties,
            in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
            in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
    @UnsupportedAppUsage
    void notifyDataConnectionFailed(String apnType);
    void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType);
    void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType);
    @UnsupportedAppUsage(maxTargetSdk = 28)
    @UnsupportedAppUsage(maxTargetSdk = 28)
    void notifyCellLocation(in Bundle cellLocation);
    void notifyCellLocation(in Bundle cellLocation);
+0 −16
Original line number Original line Diff line number Diff line
@@ -1496,16 +1496,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,
    public void notifyDataConnectionForSubscriber(int phoneId, int subId, int state,
                                                  boolean isDataAllowed,
                                                  boolean isDataAllowed,
                                                  String apn, String apnType,
                                                  String apn, String apnType,
@@ -1574,12 +1564,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                networkCapabilities, roaming, subId);
                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) {
    public void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType) {
        if (!checkNotifyPermission("notifyDataConnectionFailed()")) {
        if (!checkNotifyPermission("notifyDataConnectionFailed()")) {
            return;
            return;