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

Commit 3e1a34f2 authored by Chen Xu's avatar Chen Xu Committed by Android (Google) Code Review
Browse files

Merge "First Unit test for IccPhoneBookInterfManager" into nyc-dev

parents 9c3289e5 ce000ddf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ public class IccPhoneBookInterfaceManager {

    public IccPhoneBookInterfaceManager(Phone phone) {
        this.mPhone = phone;
        IccRecords r = phone.mIccRecords.get();
        IccRecords r = phone.getIccRecords();
        if (r != null) {
            mAdnCache = r.getAdnCache();
        }
+5 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    // to recover from the state. We cache it and notify listeners when they register.
    protected boolean mIsVideoCapable = false;
    protected UiccController mUiccController = null;
    public final AtomicReference<IccRecords> mIccRecords = new AtomicReference<IccRecords>();
    protected final AtomicReference<IccRecords> mIccRecords = new AtomicReference<IccRecords>();
    public SmsStorageMonitor mSmsStorageMonitor;
    public SmsUsageMonitor mSmsUsageMonitor;
    protected AtomicReference<UiccCardApplication> mUiccApplication =
@@ -318,6 +318,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {

    private boolean mUnitTestMode;

    public IccRecords getIccRecords() {
        return mIccRecords.get();
    }

    /**
     * Returns a string identifier for this phone interface for parties
     *  outside the phone app process.
+2 −6
Original line number Diff line number Diff line
@@ -1094,10 +1094,6 @@ public class ImsPhone extends ImsPhoneBase {
        return mDefaultPhone.getPhoneId();
    }

    private IccRecords getIccRecords() {
        return mDefaultPhone.mIccRecords.get();
    }

    private CallForwardInfo getCallForwardInfo(ImsCallForwardInfo info) {
        CallForwardInfo cfInfo = new CallForwardInfo();
        cfInfo.status = info.mStatus;
@@ -1116,7 +1112,7 @@ public class ImsPhone extends ImsPhoneBase {
            cfInfos = new CallForwardInfo[infos.length];
        }

        IccRecords r = getIccRecords();
        IccRecords r = mDefaultPhone.getIccRecords();
        if (infos == null || infos.length == 0) {
            if (r != null) {
                // Assume the default is not active
@@ -1191,7 +1187,7 @@ public class ImsPhone extends ImsPhoneBase {
        if (DBG) Rlog.d(LOG_TAG, "handleMessage what=" + msg.what);
        switch (msg.what) {
            case EVENT_SET_CALL_FORWARD_DONE:
                IccRecords r = getIccRecords();
                IccRecords r = mDefaultPhone.getIccRecords();
                Cf cf = (Cf) ar.userObj;
                if (cf.mIsCfu && ar.exception == null && r != null) {
                    setVoiceCallForwardingFlag(r, 1, msg.arg1 == 1, cf.mSetCfNumber);
+1 −1
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode {
        super(phone.getHandler().getLooper());
        mPhone = phone;
        mContext = phone.getContext();
        mIccRecords = mPhone.mDefaultPhone.mIccRecords.get();
        mIccRecords = mPhone.mDefaultPhone.getIccRecords();
    }

    //***** MmiCode implementation
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import java.util.Iterator;
/**
 * {@hide}
 */
public final class AdnRecordCache extends Handler implements IccConstants {
public class AdnRecordCache extends Handler implements IccConstants {
    //***** Instance Variables

    private IccFileHandler mFh;
Loading