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

Commit 09ac2aaa authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Expand call forwarding logging."

parents fec5f08b 7d97ddc2
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -16,12 +16,16 @@

package com.android.internal.telephony;

import android.telecom.Log;

/**
 * See also RIL_CallForwardInfo in include/telephony/ril.h
 *
 * {@hide}
 */
public class CallForwardInfo {
    private static final String TAG = "CallForwardInfo";

    public int             status;      /*1 = active, 0 = not active */
    public int             reason;      /* from TS 27.007 7.11 "reason" */
    public int             serviceClass; /* Saum of CommandsInterface.SERVICE_CLASS */
@@ -31,9 +35,9 @@ public class CallForwardInfo {

    @Override
    public String toString() {
        return super.toString() + (status == 0 ? " not active " : " active ")
            + " reason: " + reason
            + " serviceClass: " + serviceClass + " " + timeSeconds + " seconds";

        return "[CallForwardInfo: status=" + (status == 0 ? " not active " : " active ")
                + ", reason= " + reason
                + ", serviceClass= " + serviceClass + ", timeSec= " + timeSeconds + " seconds"
                + ", number=" + Log.pii(number) + "]";
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -125,6 +125,9 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
        int subId = sender.getSubId();
        try {
            if (mRegistry != null) {
                Rlog.d(LOG_TAG, "notifyCallForwardingChanged: subId=" + subId + ", isCFActive="
                        + sender.getCallForwardingIndicator());

                mRegistry.notifyCallForwardingChangedForSubscriber(subId,
                        sender.getCallForwardingIndicator());
            }
+1 −0
Original line number Diff line number Diff line
@@ -2548,6 +2548,7 @@ public class GsmCdmaPhone extends Phone {
    private void processIccRecordEvents(int eventCode) {
        switch (eventCode) {
            case IccRecords.EVENT_CFI:
                logi("processIccRecordEvents: EVENT_CFI");
                notifyCallForwardingIndicator();
                break;
        }
+5 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import android.telephony.SignalStrength;
import android.telephony.SubscriptionManager;
import android.telephony.VoLteServiceState;
import android.text.TextUtils;
import android.util.Log;

import com.android.ims.ImsCall;
import com.android.ims.ImsConfig;
@@ -1796,7 +1797,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        int status = enable ? IccRecords.CALL_FORWARDING_STATUS_ENABLED :
                IccRecords.CALL_FORWARDING_STATUS_DISABLED;
        int subId = getSubId();
        Rlog.d(LOG_TAG, "setCallForwardingIndicatorInSharedPref: Storing status = " + status +
        Rlog.i(LOG_TAG, "setCallForwardingIndicatorInSharedPref: Storing status = " + status +
                " in pref " + CF_STATUS + subId);

        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
@@ -1838,6 +1839,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        if (callForwardingIndicator == IccRecords.CALL_FORWARDING_STATUS_UNKNOWN) {
            callForwardingIndicator = getCallForwardingIndicatorFromSharedPref();
        }
        Rlog.v(LOG_TAG, "getCallForwardingIndicator: iccForwardingFlag=" + (r != null
                    ? r.getVoiceCallForwardingFlag() : "null") + ", sharedPrefFlag="
                    + getCallForwardingIndicatorFromSharedPref());
        return (callForwardingIndicator == IccRecords.CALL_FORWARDING_STATUS_ENABLED);
    }