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

Commit 90d36406 authored by Pavel Zhamaitsiak's avatar Pavel Zhamaitsiak Committed by Android (Google) Code Review
Browse files

Merge "Add an API to access the CDMAPhone/GSMPhone call tracker state for...

Merge "Add an API to access the CDMAPhone/GSMPhone call tracker state for DCTracker to check" into lmp-mr1-dev
parents 875357f8 b79f845a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ public abstract class CallTracker extends Handler {
    public abstract void unregisterForVoiceCallStarted(Handler h);
    public abstract void registerForVoiceCallEnded(Handler h, int what, Object obj);
    public abstract void unregisterForVoiceCallEnded(Handler h);

    public abstract PhoneConstants.State getState();
    protected abstract void log(String msg);

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+4 −0
Original line number Diff line number Diff line
@@ -1205,4 +1205,8 @@ public final class CdmaCallTracker extends CallTracker {
        pw.println(" mState=" + mState);
        pw.println(" mIsEcmTimerCanceled=" + mIsEcmTimerCanceled);
    }
    @Override
    public PhoneConstants.State getState() {
        return mState;
    }
}
+7 −4
Original line number Diff line number Diff line
@@ -718,11 +718,14 @@ public final class DcTracker extends DcTrackerBase {
        }
        int dataSub = SubscriptionManager.getDefaultDataSubId();
        boolean defaultDataSelected = SubscriptionManager.isValidSubscriptionId(dataSub);

        PhoneConstants.State state = PhoneConstants.State.IDLE;
        if (mPhone.getCallTracker() != null) {
            state = mPhone.getCallTracker().getState();
        }
        boolean allowed =
                    (attachedState || mAutoAttachOnCreation) &&
                    recordsLoaded &&
                    (mPhone.getState() == PhoneConstants.State.IDLE ||
                    (state == PhoneConstants.State.IDLE ||
                     mPhone.getServiceStateTracker().isConcurrentVoiceAndDataAllowed()) &&
                    internalDataEnabled &&
                    defaultDataSelected &&
@@ -736,9 +739,9 @@ public final class DcTracker extends DcTrackerBase {
                reason += " - Attached= " + attachedState;
            }
            if (!recordsLoaded) reason += " - SIM not loaded";
            if (mPhone.getState() != PhoneConstants.State.IDLE &&
            if (state != PhoneConstants.State.IDLE &&
                    !mPhone.getServiceStateTracker().isConcurrentVoiceAndDataAllowed()) {
                reason += " - PhoneState= " + mPhone.getState();
                reason += " - PhoneState= " + state;
                reason += " - Concurrent voice and data not allowed";
            }
            if (!internalDataEnabled) reason += " - mInternalDataEnabled= false";
+4 −0
Original line number Diff line number Diff line
@@ -987,4 +987,8 @@ public final class GsmCallTracker extends CallTracker {
        pw.println(" mDesiredMute=" + mDesiredMute);
        pw.println(" mState=" + mState);
    }
    @Override
    public PhoneConstants.State getState() {
        return mState;
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -1442,4 +1442,8 @@ public final class ImsPhoneCallTracker extends CallTracker {
    public boolean isVtEnabled() {
        return mIsVtEnabled;
    }
    @Override
    public PhoneConstants.State getState() {
        return mState;
    }
}