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

Commit 5f51eefb authored by Susheel nyamala's avatar Susheel nyamala
Browse files

Merge tag 'android-6.0.1_r3' into m

Android 6.0.1 release 3

* tag 'android-6.0.1_r3':
  Fix a crash while printing ICCID because of alphabets in UICC.
  Set WIFI icon for connection based on connection extra.
  Change gid-matching process
  Save call forwarding flag in SharedPreference.
  Ensure connection extras set before connection start are passed through.
  Fix data connection issues introduced in a7228870
  Revert "Revert "Fix HD icon shown for MO VoLTE call when it shouldn't""
  Revert "Fix HD icon shown for MO VoLTE call when it shouldn't"
  DO NOT MERGE Add delay between postdial DTMF tones for CDMA.
  Mask IccId which gets printed in bug reports & radio logs.
  Hide IccId from SubscriptionController logs.
  Fix handling for no default phone.
  IMS: Fix ArrayIndexOutOfBoundsException
  Fix handling of connect req while connected.
  Get display manager state after registering with DisplayManager
  Fix use of memorized phoneId.
  Change to add user_visible field to Carriers table.

Conflicts:
	src/java/com/android/internal/telephony/PhoneBase.java
	src/java/com/android/internal/telephony/dataconnection/DcSwitchAsyncChannel.java
	src/java/com/android/internal/telephony/dataconnection/DctController.java
	src/java/com/android/internal/telephony/gsm/GSMPhone.java
	src/java/com/android/internal/telephony/gsm/GsmMmiCode.java
	src/java/com/android/internal/telephony/imsphone/ImsPhone.java
	src/java/com/android/internal/telephony/imsphone/ImsPhoneMmiCode.java

Change-Id: If877ad3a8c812f987cad38e65f94047fb14a9629
parents b9b7f7ba edb3e722
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2752,6 +2752,13 @@ public final class Telephony {
         */
        public static final String EDITED = "edited";

        /**
         * Is this APN visible to the user?
         * <p>Type: INTEGER (boolean) </p>
         * @hide
         */
        public static final String USER_VISIBLE = "user_visible";

        /**
         * Following are possible values for the EDITED field
         * @hide
+10 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ public abstract class Connection {
    private int mCallSubstate;
    private android.telecom.Connection.VideoProvider mVideoProvider;
    public Call.State mPreHandoverState = Call.State.IDLE;
    private Bundle mExtras;

    /* Instance Methods */

@@ -642,11 +643,20 @@ public abstract class Connection {
     * @param extras New connection extras.
     */
    public void setConnectionExtras(Bundle extras) {
        mExtras = extras;
        for (Listener l : mListeners) {
            l.onExtrasChanged(extras);
        }
    }

    /**
     * Retrieves the current connection extras.
     * @return the connection extras.
     */
    public Bundle getConnectionExtras() {
        return mExtras;
    }

    /**
     * Sets the call substate for the current connection and reports the changes to all listeners.
     * Valid call substates are defined in {@link android.telecom.Connection}.
+69 −3
Original line number Diff line number Diff line
@@ -205,6 +205,11 @@ public abstract class PhoneBase extends Handler implements Phone {
    // Key used to read/write if Call Forwarding is enabled
    public static final String CF_ENABLED = "cf_enabled_key";

    // Key used for storing call forwarding status
    public static final String CF_STATUS = "cf_status_key";
    // Key used to read/write the ID for storing the call forwarding status
    public static final String CF_ID = "cf_id_key";

    // Key used to read/write "disable DNS server check" pref (used for testing)
    public static final String DNS_SERVER_CHECK_DISABLED_KEY = "dns_server_check_disabled_key";

@@ -1483,10 +1488,62 @@ public abstract class PhoneBase extends Handler implements Phone {
        return mVmCount != 0;
    }

    private int getCallForwardingIndicatorFromSharedPref() {
        int status = IccRecords.CALL_FORWARDING_STATUS_DISABLED;
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        String subscriberId = sp.getString(CF_ID, null);
        String currentSubscriberId = getSubscriberId();

        if (currentSubscriberId != null && currentSubscriberId.equals(subscriberId)) {
            // get call forwarding status from preferences
            status = sp.getInt(CF_STATUS, IccRecords.CALL_FORWARDING_STATUS_DISABLED);
            Rlog.d(LOG_TAG, "Call forwarding status from preference = " + status);
        } else {
            Rlog.d(LOG_TAG, "Call forwarding status retrieval returning DISABLED as status for " +
                    "matching subscriberId not found");

        }
        return status;
    }

    private void setCallForwardingIndicatorInSharedPref(boolean enable) {
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        SharedPreferences.Editor editor = sp.edit();

        String imsi = getSubscriberId();

        editor.putInt(CF_STATUS, enable ? IccRecords.CALL_FORWARDING_STATUS_ENABLED :
                IccRecords.CALL_FORWARDING_STATUS_DISABLED);
        editor.putString(CF_ID, imsi);
        editor.apply();
    }

    public void setVoiceCallForwardingFlag(int line, boolean enable, String number) {
        setCallForwardingIndicatorInSharedPref(enable);
        mIccRecords.get().setVoiceCallForwardingFlag(line, enable, number);
    }

    protected void setVoiceCallForwardingFlag(IccRecords r, int line, boolean enable,
                                              String number) {
        setCallForwardingIndicatorInSharedPref(enable);
        r.setVoiceCallForwardingFlag(line, enable, number);
    }

    public int getVoiceCallForwardingFlag() {
        return getCallForwardingIndicatorFromSharedPref();
    }

    @Override
    public boolean getCallForwardingIndicator() {
        IccRecords r = mIccRecords.get();
        return (r != null) ? r.getVoiceCallForwardingFlag() : false;
        int callForwardingIndicator = IccRecords.CALL_FORWARDING_STATUS_UNKNOWN;
        if (r != null) {
            callForwardingIndicator = r.getVoiceCallForwardingFlag();
        }
        if (callForwardingIndicator == IccRecords.CALL_FORWARDING_STATUS_UNKNOWN) {
            callForwardingIndicator = getCallForwardingIndicatorFromSharedPref();
        }
        return (callForwardingIndicator == IccRecords.CALL_FORWARDING_STATUS_ENABLED);
    }

    /**
@@ -1847,8 +1904,7 @@ public abstract class PhoneBase extends Handler implements Phone {
        String subscriberId = sp.getString(VM_ID, null);
        String currentSubscriberId = getSubscriberId();

        if ((subscriberId != null) && (currentSubscriberId != null)
                && (currentSubscriberId.equals(subscriberId))) {
        if (currentSubscriberId != null && currentSubscriberId.equals(subscriberId)) {
            // get voice mail count from preferences
            countVoiceMessages = sp.getInt(VM_COUNT, 0);
            Rlog.d(LOG_TAG, "Voice Mail Count from preference = " + countVoiceMessages);
@@ -2674,6 +2730,16 @@ public abstract class PhoneBase extends Handler implements Phone {
                    QtiVideoCallConstants.DOMAIN_AUTOMATIC) == QtiVideoCallConstants.DOMAIN_CS);
    }

    protected boolean isMatchGid(String gid) {
        String gid1 = getGroupIdLevel1();
        int gidLength = gid.length();
        if (!TextUtils.isEmpty(gid1) && (gid1.length() >= gidLength)
                && gid1.substring(0, gidLength).equalsIgnoreCase(gid)) {
            return true;
        }
        return false;
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("PhoneBase: subId=" + getSubId());
        pw.println(" mPhoneId=" + mPhoneId);
+1 −0
Original line number Diff line number Diff line
@@ -691,6 +691,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                    Context.DISPLAY_SERVICE);
            mDefaultDisplay = dm.getDisplay(Display.DEFAULT_DISPLAY);
            dm.registerDisplayListener(mDisplayListener, null);
            mDefaultDisplayState = mDefaultDisplay.getState();

            IntentFilter filter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
            Intent batteryStatus = context.registerReceiver(mBatteryStateListener, filter);
+2 −1
Original line number Diff line number Diff line
@@ -290,7 +290,8 @@ public class SubscriptionController extends ISub.Stub {
        String countryIso = getSubscriptionCountryIso(id);

        if (DBG) {
            logd("[getSubInfoRecord] id:" + id + " iccid:" + iccId + " simSlotIndex:" + simSlotIndex
            String iccIdToPrint = SubscriptionInfo.givePrintableIccid(iccId);
            logd("[getSubInfoRecord] id:" + id + " iccid:" + iccIdToPrint + " simSlotIndex:" + simSlotIndex
                + " displayName:" + displayName + " nameSource:" + nameSource
                + " iconTint:" + iconTint + " dataRoaming:" + dataRoaming
                + " mcc:" + mcc + " mnc:" + mnc + " countIso:" + countryIso);
Loading