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

Commit 601afac3 authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

Merge branch 'cm-11.0' into stable/cm-11.0

parents 8f12c22a 44f20f98
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -703,10 +703,12 @@ public class CallManager {
            AudioManager audioManager = (AudioManager)
            AudioManager audioManager = (AudioManager)
                    context.getSystemService(Context.AUDIO_SERVICE);
                    context.getSystemService(Context.AUDIO_SERVICE);
            int currMode = audioManager.getMode();
            int currMode = audioManager.getMode();
            if ((currMode != AudioManager.MODE_IN_CALL) && !(ringingPhone instanceof SipPhone)) {
            if (!(ringingPhone instanceof SipPhone)) {
                if (currMode != AudioManager.MODE_IN_CALL) {
                    Rlog.d(LOG_TAG, "setAudioMode Setting audio mode from " +
                    Rlog.d(LOG_TAG, "setAudioMode Setting audio mode from " +
                            currMode + " to " + AudioManager.MODE_IN_CALL);
                            currMode + " to " + AudioManager.MODE_IN_CALL);
                    audioManager.setMode(AudioManager.MODE_IN_CALL);
                    audioManager.setMode(AudioManager.MODE_IN_CALL);
                }
                mSpeedUpAudioForMtCall = true;
                mSpeedUpAudioForMtCall = true;
            }
            }
        }
        }
+2 −1
Original line number Original line Diff line number Diff line
@@ -4629,6 +4629,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
            rr = RILRequest.obtain(RIL_REQUEST_SIM_TRANSMIT_CHANNEL, result);
            rr = RILRequest.obtain(RIL_REQUEST_SIM_TRANSMIT_CHANNEL, result);
        }
        }


        rr.mParcel.writeInt(cla);
        rr.mParcel.writeInt(command);
        rr.mParcel.writeInt(command);
        rr.mParcel.writeInt(channel);
        rr.mParcel.writeInt(channel);
        rr.mParcel.writeString(null);
        rr.mParcel.writeString(null);
@@ -4637,7 +4638,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
        rr.mParcel.writeInt(p3);
        rr.mParcel.writeInt(p3);
        rr.mParcel.writeString(data);
        rr.mParcel.writeString(data);
        rr.mParcel.writeString(null);
        rr.mParcel.writeString(null);
        rr.mParcel.writeInt(cla);
        rr.mParcel.writeString(null);


        if (RILJ_LOGD) riljLog(rr.serialString() + "> iccExchangeAPDU: "
        if (RILJ_LOGD) riljLog(rr.serialString() + "> iccExchangeAPDU: "
                + requestToString(rr.mRequest)
                + requestToString(rr.mRequest)
+59 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2006 The Android Open Source Project
 * Copyright (C) 2011, 2012 The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.internal.telephony;

import com.android.internal.util.BitwiseInputStream;
import com.android.internal.util.BitwiseInputStream.AccessException;

public class VirginMobileDecoder {
    /**
     * If we have VirginMobile MMS, decode it
     * Then, update mUserData & mMessageRef fields
     * If not VirginMobile MMS, do nothing
     */
    public static void decodeMMS(SmsMessageBase sms) {
        BitwiseInputStream inStream;
        byte[] userData = null;
        int ref = 0;
        int i1 = 0;
        int desiredBitLength = 0;
        try {
            inStream = new BitwiseInputStream(sms.getUserData());
            inStream.skip(20);
            final int j = inStream.read(8) << 8;
            final int k = inStream.read(8);
            ref = j | k;
            inStream.skip(12);
            i1 = inStream.read(8) + -2;
            inStream.skip(13);
            byte abyte1[] = new byte[i1];
            for (int j1 = 0; j1 < i1; j1++) {
                abyte1[j1] = 0;
            }
            desiredBitLength = i1 * 8;
            if (inStream.available() < desiredBitLength) {
                 return;
            }
            userData = inStream.readByteArray(desiredBitLength);
        } catch (AccessException e) {
            return;
        }
        sms.mUserData = userData;
        sms.mMessageRef = ref;
    }
}
+0 −21
Original line number Original line Diff line number Diff line
@@ -200,27 +200,6 @@ public class CDMALTEPhone extends CDMAPhone {


    }
    }



    /**
     * Sets the "current" field in the telephony provider according to the
     * build-time operator numeric property
     *
     * @return true for success; false otherwise.
     */
    @Override
    boolean updateCurrentCarrierInProvider(String operatorNumeric) {
        boolean retVal;
        if (mUiccController.getUiccCardApplication(UiccController.APP_FAM_3GPP) == null) {
            if (DBG) log("updateCurrentCarrierInProvider APP_FAM_3GPP == null");
            retVal = super.updateCurrentCarrierInProvider(operatorNumeric);
        } else {
            if (DBG) log("updateCurrentCarrierInProvider not updated");
            retVal = true;
        }
        if (DBG) log("updateCurrentCarrierInProvider X retVal=" + retVal);
        return retVal;
    }

    @Override
    @Override
    public boolean updateCurrentCarrierInProvider() {
    public boolean updateCurrentCarrierInProvider() {
        if (mSimRecords != null) {
        if (mSimRecords != null) {
+4 −5
Original line number Original line Diff line number Diff line
@@ -1126,7 +1126,6 @@ public class CDMAPhone extends PhoneBase {


            case EVENT_RUIM_RECORDS_LOADED:{
            case EVENT_RUIM_RECORDS_LOADED:{
                Rlog.d(LOG_TAG, "Event EVENT_RUIM_RECORDS_LOADED Received");
                Rlog.d(LOG_TAG, "Event EVENT_RUIM_RECORDS_LOADED Received");
                updateCurrentCarrierInProvider();
            }
            }
            break;
            break;


@@ -1573,19 +1572,19 @@ public class CDMAPhone extends PhoneBase {
    }
    }


    /**
    /**
     * Sets the "current" field in the telephony provider according to the
     * Sets the "current" field in the telephony provider to the
     * build-time operator numeric property
     * operator numeric passed.
     *
     *
     * @return true for success; false otherwise.
     * @return true for success; false otherwise.
     */
     */
    boolean updateCurrentCarrierInProvider(String operatorNumeric) {
    public boolean updateCurrentCarrierInProvider(String operatorNumeric) {
        log("CDMAPhone: updateCurrentCarrierInProvider called");
        log("CDMAPhone: updateCurrentCarrierInProvider called");
        if (!TextUtils.isEmpty(operatorNumeric)) {
        if (!TextUtils.isEmpty(operatorNumeric)) {
            try {
            try {
                Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
                Uri uri = Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current");
                ContentValues map = new ContentValues();
                ContentValues map = new ContentValues();
                map.put(Telephony.Carriers.NUMERIC, operatorNumeric);
                map.put(Telephony.Carriers.NUMERIC, operatorNumeric);
                log("updateCurrentCarrierInProvider from system: numeric=" + operatorNumeric);
                log("updateCurrentCarrierInProvider with: numeric=" + operatorNumeric);
                getContext().getContentResolver().insert(uri, map);
                getContext().getContentResolver().insert(uri, map);


                // Updates MCC MNC device configuration information
                // Updates MCC MNC device configuration information
Loading