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

Commit 84c008ce authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5546586 from a36dcf26 to qt-release

Change-Id: Ibb90b8fa695d3ae756086fcaff2ab487ddc3aa9c
parents 0df0de88 a36dcf26
Loading
Loading
Loading
Loading
+22 −21
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    private void doNotifyDataConnection(Phone sender, String apnType,
                                        PhoneConstants.DataState state) {
        int subId = sender.getSubId();
        int phoneId = sender.getPhoneId();
        long dds = SubscriptionManager.getDefaultDataSubscriptionId();
        if (DBG) log("subId = " + subId + ", DDS = " + dds);

@@ -187,7 +188,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier {

        try {
            if (mRegistry != null) {
                mRegistry.notifyDataConnectionForSubscriber(subId,
                mRegistry.notifyDataConnectionForSubscriber(phoneId, subId,
                    PhoneConstantConversions.convertDataState(state),
                        sender.isDataAllowed(ApnSetting.getApnTypesBitmaskFromString(apnType)),
                        sender.getActiveApnHost(apnType),
@@ -204,10 +205,10 @@ public class DefaultPhoneNotifier implements PhoneNotifier {

    @Override
    public void notifyDataConnectionFailed(Phone sender, String apnType) {
        int subId = sender.getSubId();
        try {
            if (mRegistry != null) {
                mRegistry.notifyDataConnectionFailedForSubscriber(subId, apnType);
                mRegistry.notifyDataConnectionFailedForSubscriber(sender.getPhoneId(),
                        sender.getSubId(), apnType);
            }
        } catch (RemoteException ex) {
            // system process is dead
@@ -255,10 +256,10 @@ public class DefaultPhoneNotifier implements PhoneNotifier {

    @Override
    public void notifyOtaspChanged(Phone sender, int otaspMode) {
        // FIXME: subId?
        int subId = sender.getSubId();
        try {
            if (mRegistry != null) {
                mRegistry.notifyOtaspChanged(otaspMode);
                mRegistry.notifyOtaspChanged(subId, otaspMode);
            }
        } catch (RemoteException ex) {
            // system process is dead
@@ -266,27 +267,25 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    }

    public void notifyPreciseCallState(Phone sender) {
        // FIXME: subId?
        Call ringingCall = sender.getRingingCall();
        Call foregroundCall = sender.getForegroundCall();
        Call backgroundCall = sender.getBackgroundCall();
        if (ringingCall != null && foregroundCall != null && backgroundCall != null) {
            try {
                mRegistry.notifyPreciseCallState(
                mRegistry.notifyPreciseCallState(sender.getPhoneId(), sender.getSubId(),
                        convertPreciseCallState(ringingCall.getState()),
                        convertPreciseCallState(foregroundCall.getState()),
                        convertPreciseCallState(backgroundCall.getState()),
                        sender.getPhoneId());
                        convertPreciseCallState(backgroundCall.getState()));
            } catch (RemoteException ex) {
                // system process is dead
            }
        }
    }

    public void notifyDisconnectCause(int cause, int preciseCause) {
        // FIXME: subId?
    public void notifyDisconnectCause(Phone sender, int cause, int preciseCause) {
        try {
            mRegistry.notifyDisconnectCause(cause, preciseCause);
            mRegistry.notifyDisconnectCause(sender.getPhoneId(), sender.getSubId(), cause,
                    preciseCause);
        } catch (RemoteException ex) {
            // system process is dead
        }
@@ -303,9 +302,9 @@ public class DefaultPhoneNotifier implements PhoneNotifier {

    public void notifyPreciseDataConnectionFailed(Phone sender, String apnType,
            String apn, @DataFailCause.FailCause int failCause) {
        // FIXME: subId?
        try {
            mRegistry.notifyPreciseDataConnectionFailed(apnType, apn, failCause);
            mRegistry.notifyPreciseDataConnectionFailed(sender.getPhoneId(), sender.getSubId(),
                    apnType, apn, failCause);
        } catch (RemoteException ex) {
            // system process is dead
        }
@@ -351,9 +350,10 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    }

    @Override
    public void notifyOemHookRawEventForSubscriber(int subId, byte[] rawData) {
    public void notifyOemHookRawEventForSubscriber(Phone sender, byte[] rawData) {
        try {
            mRegistry.notifyOemHookRawEventForSubscriber(subId, rawData);
            mRegistry.notifyOemHookRawEventForSubscriber(sender.getPhoneId(),
                    sender.getSubId(), rawData);
        } catch (RemoteException ex) {
            // system process is dead
        }
@@ -369,19 +369,20 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    }

    @Override
    public void notifyRadioPowerStateChanged(@TelephonyManager.RadioPowerState int state) {
    public void notifyRadioPowerStateChanged(Phone sender,
                                             @TelephonyManager.RadioPowerState int state) {
        try {
            mRegistry.notifyRadioPowerStateChanged(state);
            mRegistry.notifyRadioPowerStateChanged(sender.getPhoneId(), sender.getSubId(), state);
        } catch (RemoteException ex) {
            // system process is dead
        }
    }

    @Override
    public void notifyEmergencyNumberList() {
    public void notifyEmergencyNumberList(Phone sender) {
        try {
            if (mRegistry != null) {
                mRegistry.notifyEmergencyNumberList();
                mRegistry.notifyEmergencyNumberList(sender.getPhoneId(), sender.getSubId());
            }
        } catch (RemoteException ex) {
            // system process is dead
@@ -394,7 +395,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
        try {
            if (mRegistry != null) {
                mRegistry.notifyCallQualityChanged(callQuality, sender.getPhoneId(),
                        callNetworkType);
                        sender.getSubId(), callNetworkType);
            }
        } catch (RemoteException ex) {
            // system process is dead
+3 −2
Original line number Diff line number Diff line
@@ -689,7 +689,8 @@ public class GsmCdmaPhone extends Phone {
    public void notifyDisconnect(Connection cn) {
        mDisconnectRegistrants.notifyResult(cn);

        mNotifier.notifyDisconnectCause(cn.getDisconnectCause(), cn.getPreciseDisconnectCause());
        mNotifier.notifyDisconnectCause(this, cn.getDisconnectCause(),
                cn.getPreciseDisconnectCause());
    }

    public void notifyUnknownConnection(Connection cn) {
@@ -2376,7 +2377,7 @@ public class GsmCdmaPhone extends Phone {

    private void handleRadioPowerStateChange() {
        Rlog.d(LOG_TAG, "handleRadioPowerStateChange, state= " + mCi.getRadioState());
        mNotifier.notifyRadioPowerStateChanged(mCi.getRadioState());
        mNotifier.notifyRadioPowerStateChanged(this, mCi.getRadioState());
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -735,7 +735,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
                ar = (AsyncResult)msg.obj;
                if (ar.exception == null) {
                    byte[] data = (byte[])ar.result;
                    mNotifier.notifyOemHookRawEventForSubscriber(getSubId(), data);
                    mNotifier.notifyOemHookRawEventForSubscriber(this, data);
                } else {
                    Rlog.e(LOG_TAG, "OEM hook raw exception: " + ar.exception);
                }
@@ -2389,7 +2389,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {

    /** Notify the {@link EmergencyNumber} changes. */
    public void notifyEmergencyNumberList() {
        mNotifier.notifyEmergencyNumberList();
        mNotifier.notifyEmergencyNumberList(this);
    }

    /**
+4 −4
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ public interface PhoneNotifier {

    void notifyPreciseCallState(Phone sender);

    void notifyDisconnectCause(int cause, int preciseCause);
    void notifyDisconnectCause(Phone sender, int cause, int preciseCause);

    void notifyImsDisconnectCause(Phone sender, ImsReasonInfo imsReasonInfo);

@@ -79,14 +79,14 @@ public interface PhoneNotifier {

    public void notifyUserMobileDataStateChanged(Phone sender, boolean state);

    public void notifyOemHookRawEventForSubscriber(int subId, byte[] rawData);
    public void notifyOemHookRawEventForSubscriber(Phone sender, byte[] rawData);

    public void notifyPhoneCapabilityChanged(PhoneCapability capability);

    void notifyRadioPowerStateChanged(@TelephonyManager.RadioPowerState int state);
    void notifyRadioPowerStateChanged(Phone sender, @TelephonyManager.RadioPowerState int state);

    /** Notify of change to EmergencyNumberList. */
    void notifyEmergencyNumberList();
    void notifyEmergencyNumberList(Phone sender);

    /** Notify of a change to the call quality of an active foreground call. */
    void notifyCallQualityChanged(Phone sender, CallQuality callQuality, int callNetworkType);
+4 −2
Original line number Diff line number Diff line
@@ -267,7 +267,8 @@ public class CallQualityMetrics {
        // handover from IMS->CS->IMS, but this is currently not possible
        // TODO(b/130302396) this also may be possible when we put a call on hold and continue with
        // another call
        summary.totalDurationWithQualityInformationInSeconds = mLastCallQuality.getCallDuration();
        summary.totalDurationWithQualityInformationInSeconds =
                mLastCallQuality.getCallDuration() / 1000;
        if (mWorstSsWithGoodDlQuality != null) {
            summary.snapshotOfWorstSsWithGoodQuality =
                    toCallQualityProto(mWorstSsWithGoodDlQuality.first);
@@ -304,7 +305,8 @@ public class CallQualityMetrics {
        // handover from IMS->CS->IMS, but this is currently not possible
        // TODO(b/130302396) this also may be possible when we put a call on hold and continue with
        // another call
        summary.totalDurationWithQualityInformationInSeconds = mLastCallQuality.getCallDuration();
        summary.totalDurationWithQualityInformationInSeconds =
                mLastCallQuality.getCallDuration() / 1000;
        if (mWorstSsWithGoodUlQuality != null) {
            summary.snapshotOfWorstSsWithGoodQuality =
                    toCallQualityProto(mWorstSsWithGoodUlQuality.first);
Loading