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

Commit 2a5483ff authored by chen xu's avatar chen xu Committed by Nathan Harold
Browse files

PhoneStateListener msim improvement

1. Docuemnt the scope of each callback event either apply to specific
subscriptions or not.
2. TelephonyRegistry store separate state e.g, precisecallstate, callAttribute
for each slot to support msim.
3. Add missing subscription match check when notify callbacks.

Bug: 130423985
Bug: 132181378
Test:  atest CtsTelephonyTestCases:PhoneStateListenerTest
Merged-In: I4b014e00528a1f05e0b5f237229c561f8260e2bd
Change-Id: I4b014e00528a1f05e0b5f237229c561f8260e2bd
(cherry picked from commit d5deeb15)
parent d274cc61
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,5 +71,5 @@ Lcom/android/internal/telephony/IPhoneSubInfo$Stub;-><init>()V
Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCallForwardingChanged(Z)V
Lcom/android/internal/telephony/ITelephonyRegistry;->notifyCellLocation(Landroid/os/Bundle;)V
Lcom/android/internal/telephony/ITelephonyRegistry;->notifyDataActivity(I)V
Lcom/android/internal/telephony/ITelephonyRegistry;->notifyOtaspChanged(I)V
Lcom/android/internal/telephony/ITelephonyRegistry;->notifyOtaspChanged(II)V
Lcom/android/internal/view/BaseIWindow;-><init>()V
+235 −173

File changed.

Preview size limit exceeded, changes collapsed.

+213 −38

File changed.

Preview size limit exceeded, changes collapsed.

+14 −11
Original line number Diff line number Diff line
@@ -56,38 +56,41 @@ interface ITelephonyRegistry {
    void notifyDataConnection(int state, boolean isDataConnectivityPossible,
            String apn, String apnType, in LinkProperties linkProperties,
            in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
    void notifyDataConnectionForSubscriber(int subId, int state, boolean isDataConnectivityPossible,
    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 subId, String apnType);
    void notifyDataConnectionFailedForSubscriber(int phoneId, int subId, String apnType);
    void notifyCellLocation(in Bundle cellLocation);
    void notifyCellLocationForSubscriber(in int subId, in Bundle cellLocation);
    void notifyOtaspChanged(in int otaspMode);
    void notifyOtaspChanged(in int subId, in int otaspMode);
    @UnsupportedAppUsage
    void notifyCellInfo(in List<CellInfo> cellInfo);
    void notifyPhysicalChannelConfiguration(in List<PhysicalChannelConfig> configs);
    void notifyPhysicalChannelConfigurationForSubscriber(in int subId,
            in List<PhysicalChannelConfig> configs);
    void notifyPreciseCallState(int ringingCallState, int foregroundCallState,
            int backgroundCallState, int phoneId);
    void notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause);
    void notifyPreciseDataConnectionFailed(String apnType, String apn,
    void notifyPreciseCallState(int phoneId, int subId, int ringingCallState,
            int foregroundCallState, int backgroundCallState);
    void notifyDisconnectCause(int phoneId, int subId, int disconnectCause,
            int preciseDisconnectCause);
    void notifyPreciseDataConnectionFailed(int phoneId, int subId, String apnType, String apn,
            int failCause);
    void notifyCellInfoForSubscriber(in int subId, in List<CellInfo> cellInfo);
    void notifySrvccStateChanged(in int subId, in int lteState);
    void notifySimActivationStateChangedForPhoneId(in int phoneId, in int subId,
            int activationState, int activationType);
    void notifyOemHookRawEventForSubscriber(in int subId, in byte[] rawData);
    void notifyOemHookRawEventForSubscriber(in int phoneId, in int subId, in byte[] rawData);
    void notifySubscriptionInfoChanged();
    void notifyOpportunisticSubscriptionInfoChanged();
    void notifyCarrierNetworkChange(in boolean active);
    void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
    void notifyPhoneCapabilityChanged(in PhoneCapability capability);
    void notifyActiveDataSubIdChanged(int activeDataSubId);
    void notifyRadioPowerStateChanged(in int state);
    void notifyEmergencyNumberList();
    void notifyCallQualityChanged(in CallQuality callQuality, int phoneId, int callNetworkType);
    void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state);
    void notifyEmergencyNumberList(in int phoneId, in int subId);
    void notifyCallQualityChanged(in CallQuality callQuality, int phoneId, int subId,
            int callNetworkType);
    void notifyImsDisconnectCause(int subId, in ImsReasonInfo imsReasonInfo);
}