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

Commit 15a530b0 authored by Ying Xu's avatar Ying Xu Committed by Android (Google) Code Review
Browse files

Merge "[Telephony Mainline] Remove usages of IBinder's for classes that do not belong to Telephony"

parents cc364369 51b09fa0
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -8800,16 +8800,13 @@ package android.os {
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getEuiccCardControllerServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getEuiccControllerService();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getIccPhoneBookServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getNetworkPolicyServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getOpportunisticNetworkServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getPackageManagerServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getPermissionManagerServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getPhoneSubServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getSmsServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getSubscriptionServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getTelephonyImsServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getTelephonyRcsMessageServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getTelephonyRegistryServiceRegisterer();
    method @NonNull public android.os.TelephonyServiceManager.ServiceRegisterer getTelephonyServiceRegisterer();
  }
@@ -12321,6 +12318,7 @@ package android.telephony {
  public class TelephonyRegistryManager {
    method public void addOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
    method public void addOnSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
    method public void listenForSubscriber(int, @NonNull String, @NonNull String, @NonNull android.telephony.PhoneStateListener, int, boolean);
    method public void notifyActiveDataSubIdChanged(int);
    method public void notifyBarringInfoChanged(int, int, @NonNull android.telephony.BarringInfo);
    method public void notifyCallForwardingChanged(int, boolean);
@@ -12337,6 +12335,9 @@ package android.telephony {
    method public void notifyEmergencyNumberList(int, int);
    method public void notifyImsDisconnectCause(int, @NonNull android.telephony.ims.ImsReasonInfo);
    method public void notifyMessageWaitingChanged(int, int, boolean);
    method public void notifyOpportunisticSubscriptionInfoChanged();
    method public void notifyOutgoingEmergencyCall(int, int, @NonNull android.telephony.emergency.EmergencyNumber);
    method public void notifyOutgoingEmergencySms(int, int, @NonNull android.telephony.emergency.EmergencyNumber);
    method public void notifyPhoneCapabilityChanged(@NonNull android.telephony.PhoneCapability);
    method public void notifyPreciseCallState(int, int, int, int, int);
    method public void notifyPreciseDataConnectionFailed(int, int, int, @Nullable String, int);
@@ -12345,6 +12346,7 @@ package android.telephony {
    method public void notifyServiceStateChanged(int, int, @NonNull android.telephony.ServiceState);
    method public void notifySignalStrengthChanged(int, int, @NonNull android.telephony.SignalStrength);
    method public void notifySrvccStateChanged(int, int);
    method public void notifySubscriptionInfoChanged();
    method public void notifyUserMobileDataStateChanged(int, int, boolean);
    method public void notifyVoiceActivationStateChanged(int, int, int);
    method public void removeOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener);
+3 −0
Original line number Diff line number Diff line
@@ -3497,6 +3497,7 @@ package android.telephony {
  public class TelephonyRegistryManager {
    method public void addOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
    method public void addOnSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
    method public void listenForSubscriber(int, @NonNull String, @NonNull String, @NonNull android.telephony.PhoneStateListener, int, boolean);
    method public void notifyActiveDataSubIdChanged(int);
    method public void notifyBarringInfoChanged(int, int, @NonNull android.telephony.BarringInfo);
    method public void notifyCallForwardingChanged(int, boolean);
@@ -3513,6 +3514,8 @@ package android.telephony {
    method public void notifyEmergencyNumberList(int, int);
    method public void notifyImsDisconnectCause(int, @NonNull android.telephony.ims.ImsReasonInfo);
    method public void notifyMessageWaitingChanged(int, int, boolean);
    method public void notifyOutgoingEmergencyCall(int, int, @NonNull android.telephony.emergency.EmergencyNumber);
    method public void notifyOutgoingEmergencySms(int, int, @NonNull android.telephony.emergency.EmergencyNumber);
    method public void notifyPhoneCapabilityChanged(@NonNull android.telephony.PhoneCapability);
    method public void notifyPreciseCallState(int, int, int, int, int);
    method public void notifyPreciseDataConnectionFailed(int, int, int, @Nullable String, int);
+3 −24
Original line number Diff line number Diff line
@@ -118,14 +118,6 @@ public class TelephonyServiceManager {
        return new ServiceRegisterer(Context.TELEPHONY_SERVICE);
    }

    /**
     * Returns {@link ServiceRegisterer} for the telephony registry service.
     */
    @NonNull
    public ServiceRegisterer getTelephonyRegistryServiceRegisterer() {
        return new ServiceRegisterer("telephony.registry");
    }

    /**
     * Returns {@link ServiceRegisterer} for the telephony IMS service.
     */
@@ -150,14 +142,6 @@ public class TelephonyServiceManager {
        return new ServiceRegisterer("isub");
    }

    /**
     * Returns {@link ServiceRegisterer} for the network policy service.
     */
    @NonNull
    public ServiceRegisterer getNetworkPolicyServiceRegisterer() {
        return new ServiceRegisterer(Context.NETWORK_POLICY_SERVICE);
    }

    /**
     * Returns {@link ServiceRegisterer} for the phone sub service.
     */
@@ -198,6 +182,9 @@ public class TelephonyServiceManager {
        return new ServiceRegisterer("econtroller");
    }

    /**
     * Returns {@link ServiceRegisterer} for the eUICC card controller service.
     */
    @NonNull
    public ServiceRegisterer getEuiccCardControllerServiceRegisterer() {
        return new ServiceRegisterer("euicc_card_controller");
@@ -211,14 +198,6 @@ public class TelephonyServiceManager {
        return new ServiceRegisterer("package");
    }

    /**
     * Returns {@link ServiceRegisterer} for the permission manager service.
     */
    @NonNull
    public ServiceRegisterer getPermissionManagerServiceRegisterer() {
        return new ServiceRegisterer("permissionmgr");
    }

    /**
     * Returns {@link ServiceRegisterer} for the ICC phone book service.
     */
+76 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.SimActivationState;
import android.telephony.Annotation.SrvccState;
import android.telephony.data.ApnSetting;
import android.telephony.emergency.EmergencyNumber;
import android.telephony.ims.ImsReasonInfo;
import android.util.Log;

@@ -197,6 +198,25 @@ public class TelephonyRegistryManager {
        }
    }

    /**
     * Listen for incoming subscriptions
     * @param subId Subscription ID
     * @param pkg Package name
     * @param featureId Feature ID
     * @param listener Listener providing callback
     * @param events Events
     * @param notifyNow Whether to notify instantly
     */
    public void listenForSubscriber(int subId, @NonNull String pkg, @NonNull String featureId,
            @NonNull PhoneStateListener listener, int events, boolean notifyNow) {
        try {
            sRegistry.listenForSubscriber(
                    subId, pkg, featureId, listener.callback, events, notifyNow);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Informs the system of an intentional upcoming carrier network change by a carrier app.
     * This call only used to allow the system to provide alternative UI while telephony is
@@ -257,6 +277,32 @@ public class TelephonyRegistryManager {
        }
    }

    /**
     * Notify {@link SubscriptionInfo} change.
     * @hide
     */
    @SystemApi
    public void notifySubscriptionInfoChanged() {
        try {
            sRegistry.notifySubscriptionInfoChanged();
        } catch (RemoteException ex) {
            // system server crash
        }
    }

    /**
     * Notify opportunistic {@link SubscriptionInfo} change.
     * @hide
     */
    @SystemApi
    public void notifyOpportunisticSubscriptionInfoChanged() {
        try {
            sRegistry.notifyOpportunisticSubscriptionInfoChanged();
        } catch (RemoteException ex) {
            // system server crash
        }
    }

    /**
     * Notify {@link ServiceState} update on certain subscription.
     *
@@ -393,6 +439,36 @@ public class TelephonyRegistryManager {
        }
    }

    /**
     * Notify outgoing emergency call.
     * @param phoneId Sender phone ID.
     * @param subId Sender subscription ID.
     * @param emergencyNumber Emergency number.
     */
    public void notifyOutgoingEmergencyCall(int phoneId, int subId,
            @NonNull EmergencyNumber emergencyNumber) {
        try {
            sRegistry.notifyOutgoingEmergencyCall(phoneId, subId, emergencyNumber);
        } catch (RemoteException ex) {
            // system process is dead
        }
    }

    /**
     * Notify outgoing emergency SMS.
     * @param phoneId Sender phone ID.
     * @param subId Sender subscription ID.
     * @param emergencyNumber Emergency number.
     */
    public void notifyOutgoingEmergencySms(int phoneId, int subId,
            @NonNull EmergencyNumber emergencyNumber) {
        try {
            sRegistry.notifyOutgoingEmergencySms(phoneId, subId, emergencyNumber);
        } catch (RemoteException ex) {
            // system process is dead
        }
    }

    /**
     * Notify radio power state changed on certain subscription.
     *
+2 −4
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.os.Looper;
import android.os.ParcelUuid;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.provider.Telephony.SimInfo;
import android.telephony.euicc.EuiccManager;
import android.telephony.ims.ImsMmTelManager;
@@ -983,10 +984,7 @@ public class SubscriptionManager {
    private INetworkPolicyManager getINetworkPolicyManager() {
        if (mNetworkPolicy == null) {
            mNetworkPolicy = INetworkPolicyManager.Stub.asInterface(
                    TelephonyFrameworkInitializer
                            .getTelephonyServiceManager()
                            .getNetworkPolicyServiceRegisterer()
                            .get());
                    ServiceManager.getService(Context.NETWORK_POLICY_SERVICE));
        }
        return mNetworkPolicy;
    }
Loading