merge from master

Change-Id: Ic03669db3f4595336a7dbc13ffc77d055d11acf9
This commit is contained in:
Jack Yu
2015-12-10 12:27:58 -08:00
parent 8366fdd6a8
commit 6714030083
32 changed files with 355 additions and 39 deletions

View File

@@ -282,6 +282,13 @@ public class CarrierConfigManager {
public static final String KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL =
"carrier_instant_lettering_available_bool";
/*
* Flag specifying whether IMS should be the first phone attempted for E911 even if the
* phone is not in service.
*/
public static final String KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL
= "carrier_use_ims_first_for_emergency_bool";
/**
* When IMS instant lettering is available for a carrier (see
* {@link #KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL}), determines the list of characters
@@ -514,6 +521,7 @@ public class CarrierConfigManager {
sDefaults.putBoolean(KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL, false);
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING, "");
sDefaults.putString(KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING, "");
sDefaults.putBoolean(KEY_CARRIER_USE_IMS_FIRST_FOR_EMERGENCY_BOOL, true);
sDefaults.putBoolean(KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL, false);
sDefaults.putBoolean(KEY_DTMF_TYPE_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL, true);

View File

@@ -80,6 +80,12 @@ public abstract class CellLocation {
*/
public abstract boolean isEmpty();
/**
* Invalidate this object. The location area code and the cell id are set to -1.
* @hide
*/
public abstract void setStateInvalid();
/**
* Return a new CellLocation object representing an unknown
* location, or null for unknown/none phone radio types.

View File

@@ -2354,7 +2354,7 @@ public class PhoneNumberUtils
tempDialStr = postDialStr.substring(dialableIndex);
} else {
// Non-dialable character such as P/W should not be at the end of
// the dial string after P/W processing in CdmaConnection.java
// the dial string after P/W processing in GsmCdmaConnection.java
// Set the postDialStr to "" to break out of the loop
if (dialableIndex < 0) {
postDialStr = "";

View File

@@ -906,7 +906,7 @@ public class ServiceState implements Parcelable {
/**
* In CDMA, mOperatorAlphaLong can be set from the ERI text.
* This is done from the CDMAPhone and not from the CdmaServiceStateTracker.
* This is done from the GsmCdmaPhone and not from the ServiceStateTracker.
*
* @hide
*/

View File

@@ -75,7 +75,7 @@ public class SubscriptionManager {
/**
* Indicates the caller wants the default phone id.
* Used in SubscriptionController and PhoneBase but do we really need it???
* Used in SubscriptionController and Phone but do we really need it???
* @hide
*/
public static final int DEFAULT_PHONE_INDEX = Integer.MAX_VALUE;

View File

@@ -4848,4 +4848,21 @@ public class TelephonyManager {
}
return null;
}
}
/**
* Returns the service state information on specified subscription. Callers require
* either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information.
* @hide
*/
public ServiceState getServiceStateForSubscriber(int subId) {
try {
ITelephony service = getITelephony();
if (service != null) {
return service.getServiceStateForSubscriber(subId, getOpPackageName());
}
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#getServiceStateForSubscriber", e);
}
return null;
}
}

View File

@@ -123,6 +123,7 @@ public class CdmaCellLocation extends CellLocation {
/**
* Invalidate this object. The cell location data is set to invalid values.
*/
@Override
public void setStateInvalid() {
this.mBaseStationId = -1;
this.mBaseStationLatitude = INVALID_LAT_LONG;
@@ -134,7 +135,7 @@ public class CdmaCellLocation extends CellLocation {
/**
* Set the cell location data.
*/
public void setCellLocationData(int baseStationId, int baseStationLatitude,
public void setCellLocationData(int baseStationId, int baseStationLatitude,
int baseStationLongitude) {
// The following values have to be written in the correct sequence
this.mBaseStationId = baseStationId;

View File

@@ -72,6 +72,7 @@ public class GsmCellLocation extends CellLocation {
/**
* Invalidate this object. The location area code and the cell id are set to -1.
*/
@Override
public void setStateInvalid() {
mLac = -1;
mCid = -1;

View File

@@ -1012,7 +1012,7 @@ public class GsmAlphabet {
*
* @param tables the new list of enabled single shift tables
*/
static synchronized void setEnabledSingleShiftTables(int[] tables) {
public static synchronized void setEnabledSingleShiftTables(int[] tables) {
sEnabledSingleShiftTables = tables;
sDisableCountryEncodingCheck = true;
@@ -1030,7 +1030,7 @@ public class GsmAlphabet {
*
* @param tables the new list of enabled locking shift tables
*/
static synchronized void setEnabledLockingShiftTables(int[] tables) {
public static synchronized void setEnabledLockingShiftTables(int[] tables) {
sEnabledLockingShiftTables = tables;
sDisableCountryEncodingCheck = true;
}
@@ -1042,7 +1042,7 @@ public class GsmAlphabet {
*
* @return the list of enabled single shift tables
*/
static synchronized int[] getEnabledSingleShiftTables() {
public static synchronized int[] getEnabledSingleShiftTables() {
return sEnabledSingleShiftTables;
}
@@ -1053,7 +1053,7 @@ public class GsmAlphabet {
*
* @return the list of enabled locking shift tables
*/
static synchronized int[] getEnabledLockingShiftTables() {
public static synchronized int[] getEnabledLockingShiftTables() {
return sEnabledLockingShiftTables;
}

View File

@@ -21,9 +21,10 @@ import android.os.Bundle;
import android.telecom.PhoneAccount;
import android.telephony.CellInfo;
import android.telephony.IccOpenLogicalChannelResponse;
import android.telephony.ModemActivityInfo;
import android.telephony.NeighboringCellInfo;
import android.telephony.RadioAccessFamily;
import android.telephony.ModemActivityInfo;
import android.telephony.ServiceState;
import com.android.internal.telephony.CellNetworkScanResult;
import com.android.internal.telephony.OperatorInfo;
import java.util.List;
@@ -1005,4 +1006,12 @@ interface ITelephony {
* Return the modem activity info.
*/
ModemActivityInfo getModemActivityInfo();
/**
* Get the service state on specified subscription
* @param subId Subscription id
* @param callingPackage The package making the call
* @return Service state on specified subscription.
*/
ServiceState getServiceStateForSubscriber(int subId, String callingPackage);
}

View File

@@ -59,6 +59,9 @@ public class PhoneConstants {
public static final int PHONE_TYPE_SIP = RILConstants.SIP_PHONE;
public static final int PHONE_TYPE_THIRD_PARTY = RILConstants.THIRD_PARTY_PHONE;
public static final int PHONE_TYPE_IMS = RILConstants.IMS_PHONE;
// Currently this is used only to differentiate CDMA and CDMALTE Phone in GsmCdma* files. For
// anything outside of that, a cdma + lte phone is still CDMA_PHONE
public static final int PHONE_TYPE_CDMA_LTE = RILConstants.CDMA_LTE_PHONE;
// Modes for LTE_ON_CDMA
public static final int LTE_ON_CDMA_UNKNOWN = RILConstants.LTE_ON_CDMA_UNKNOWN;

View File

@@ -118,6 +118,7 @@ public interface RILConstants {
int SIP_PHONE = 3;
int THIRD_PARTY_PHONE = 4;
int IMS_PHONE = 5;
int CDMA_LTE_PHONE = 6;
int LTE_ON_CDMA_UNKNOWN = -1;
int LTE_ON_CDMA_FALSE = 0;