diff --git a/core/java/android/content/res/ResourcesKey.java b/core/java/android/content/res/ResourcesKey.java
index e0f1b3a3f079b..4ae3825a2c3a2 100644
--- a/core/java/android/content/res/ResourcesKey.java
+++ b/core/java/android/content/res/ResourcesKey.java
@@ -62,10 +62,15 @@ public final class ResourcesKey {
return false;
}
ResourcesKey peer = (ResourcesKey) obj;
- if (mResDir != peer.mResDir) {
- if (mResDir == null || peer.mResDir == null) {
- return false;
- } else if (!mResDir.equals(peer.mResDir)) {
+
+ if ((mResDir == null) && (peer.mResDir != null)) {
+ return false;
+ }
+ if ((mResDir != null) && (peer.mResDir == null)) {
+ return false;
+ }
+ if ((mResDir != null) && (peer.mResDir != null)) {
+ if (!mResDir.equals(peer.mResDir)) {
return false;
}
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index bf2d09bf84e9f..a87744c3829ad 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -271,6 +271,8 @@
+
+
@@ -291,6 +293,12 @@
+
+
+
+
+
+
diff --git a/core/res/res/layout/subscription_item_layout.xml b/core/res/res/layout/subscription_item_layout.xml
index 9f8f2b34def84..aa835f4abf691 100755
--- a/core/res/res/layout/subscription_item_layout.xml
+++ b/core/res/res/layout/subscription_item_layout.xml
@@ -36,7 +36,7 @@
android:id="@+id/sub_short_number"
android:layout_marginBottom="2dip"
android:layout_marginEnd="4dip"
- android:layout_alignParentEnd="true"
+ android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:textSize="12sp"
android:singleLine="true"
@@ -54,8 +54,6 @@
android:id="@+id/sub_name"
android:singleLine="true"
android:ellipsize="none"
- android:requiresFadingEdge="horizontal"
- android:scrollHorizontally="true"
android:textAppearance="?android:attr/textAppearanceMedium"/>
-
+
\ No newline at end of file
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index a355e8c7d45d7..8269c00f43485 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1010,6 +1010,9 @@
device is data-only. -->
true
+
+ true
+
+ access FM radio
+
+ Allows the app to access FM radio to listen to programs.
+
directly call phone numbers
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index dfd3071550e7d..23cb04edbe677 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -267,6 +267,7 @@
+
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index 30799f88bc9ba..27e9baf1bbec4 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -976,6 +976,8 @@ public class PhoneNumberUtils
return 0xc;
} else if (c == WILD) {
return 0xd;
+ } else if (c == WAIT) {
+ return 0xe;
} else {
throw new RuntimeException ("invalid char for BCD " + c);
}
@@ -1813,23 +1815,31 @@ public class PhoneNumberUtils
// to the list.
number = extractNetworkPortionAlt(number);
- String numbers = "";
+ Rlog.d(LOG_TAG, "subId:" + subId + ", number: " + number + ", defaultCountryIso:" +
+ ((defaultCountryIso == null) ? "NULL" : defaultCountryIso));
+
+ String emergencyNumbers = "";
int slotId = SubscriptionManager.getSlotId(subId);
- // retrieve the list of emergency numbers
- // check read-write ecclist property first
- String ecclist = (slotId <= 0) ? "ril.ecclist" : ("ril.ecclist" + slotId);
- numbers = SystemProperties.get(ecclist);
+ if (slotId >= 0) {
+ // retrieve the list of emergency numbers
+ // check read-write ecclist property first
+ String ecclist = (slotId == 0) ? "ril.ecclist" : ("ril.ecclist" + slotId);
- if (TextUtils.isEmpty(numbers)) {
- // then read-only ecclist property since old RIL only uses this
- numbers = SystemProperties.get("ro.ril.ecclist");
+ emergencyNumbers = SystemProperties.get(ecclist, "");
}
- if (!TextUtils.isEmpty(numbers)) {
+ Rlog.d(LOG_TAG, "slotId:" + slotId + ", emergencyNumbers: " + emergencyNumbers);
+
+ if (TextUtils.isEmpty(emergencyNumbers)) {
+ // then read-only ecclist property since old RIL only uses this
+ emergencyNumbers = SystemProperties.get("ro.ril.ecclist");
+ }
+
+ if (!TextUtils.isEmpty(emergencyNumbers)) {
// searches through the comma-separated list for a match,
// return true if one is found.
- for (String emergencyNum : numbers.split(",")) {
+ for (String emergencyNum : emergencyNumbers.split(",")) {
// It is not possible to append additional digits to an emergency number to dial
// the number in Brazil - it won't connect.
if (useExactMatch || "BR".equalsIgnoreCase(defaultCountryIso)) {
@@ -1849,6 +1859,23 @@ public class PhoneNumberUtils
Rlog.d(LOG_TAG, "System property doesn't provide any emergency numbers."
+ " Use embedded logic for determining ones.");
+ // If slot id is invalid, means that there is no sim card.
+ // According spec 3GPP TS22.101, the following numbers should be
+ // ECC numbers when SIM/USIM is not present.
+ emergencyNumbers = ((slotId < 0) ? "112,911,000,08,110,118,119,999" : "112,911");
+
+ for (String emergencyNum : emergencyNumbers.split(",")) {
+ if (useExactMatch) {
+ if (number.equals(emergencyNum)) {
+ return true;
+ }
+ } else {
+ if (number.startsWith(emergencyNum)) {
+ return true;
+ }
+ }
+ }
+
// No ecclist system property, so use our own list.
if (defaultCountryIso != null) {
ShortNumberUtil util = new ShortNumberUtil();
@@ -1857,13 +1884,9 @@ public class PhoneNumberUtils
} else {
return util.connectsToEmergencyNumber(number, defaultCountryIso);
}
- } else {
- if (useExactMatch) {
- return (number.equals("112") || number.equals("911"));
- } else {
- return (number.startsWith("112") || number.startsWith("911"));
- }
}
+
+ return false;
}
/**
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 34da1c9a442b4..b1b63df7f1f14 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -20,6 +20,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.telephony.SubscriptionManager;
import android.telephony.CellLocation;
import android.telephony.CellInfo;
import android.telephony.VoLteServiceState;
@@ -31,6 +32,7 @@ import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import com.android.internal.telephony.IPhoneStateListener;
+import com.android.internal.telephony.PhoneConstants;
import java.util.List;
@@ -217,7 +219,7 @@ public class PhoneStateListener {
* @hide
*/
/** @hide */
- protected long mSubId = 0;
+ protected long mSubId = SubscriptionManager.INVALID_SUB_ID;
private final Handler mHandler;
@@ -227,7 +229,7 @@ public class PhoneStateListener {
* own non-null looper use PhoneStateListener(Looper looper) below.
*/
public PhoneStateListener() {
- this(SubscriptionManager.DEFAULT_SUB_ID, Looper.myLooper());
+ this(SubscriptionManager.getDefaultSubId(), Looper.myLooper());
}
/**
diff --git a/telephony/java/com/android/internal/telephony/DcParamObject.java b/telephony/java/com/android/internal/telephony/DcParamObject.java
new file mode 100644
index 0000000000000..2736e6f2dcdf2
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/DcParamObject.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2014 MediaTek Inc.
+ *
+ * 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 android.os.Parcelable;
+import android.os.Parcel;
+
+public class DcParamObject implements Parcelable {
+
+ private long mSubId;
+
+ public DcParamObject(long subId) {
+ mSubId = subId;
+ }
+
+ public DcParamObject(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeLong(mSubId);
+ }
+
+ private void readFromParcel(Parcel in) {
+ mSubId = in.readLong();
+ }
+
+ public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
+ public DcParamObject createFromParcel(Parcel in) {
+ return new DcParamObject(in);
+ }
+ public DcParamObject[] newArray(int size) {
+ return new DcParamObject[size];
+ }
+ };
+
+ public long getSubId() {
+ return mSubId;
+ }
+}
diff --git a/telephony/java/com/android/internal/telephony/DctConstants.java b/telephony/java/com/android/internal/telephony/DctConstants.java
index 7eef89a8068c7..defb43ba7ffc0 100644
--- a/telephony/java/com/android/internal/telephony/DctConstants.java
+++ b/telephony/java/com/android/internal/telephony/DctConstants.java
@@ -115,6 +115,7 @@ public class DctConstants {
public static final int APN_EMERGENCY_ID = 9;
public static final int APN_NUM_TYPES = 10;
+ public static final int INVALID = -1;
public static final int DISABLED = 0;
public static final int ENABLED = 1;
diff --git a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
index c2034422a19e6..d7062034c6c69 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
@@ -44,6 +44,12 @@ interface IPhoneSubInfo {
*/
String getDeviceSvn();
+ /**
+ * Retrieves the software version number of a subId for the device, e.g., IMEI/SV
+ * for GSM phones.
+ */
+ String getDeviceSvnUsingSubId(long subId);
+
/**
* Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.
*/
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 0868f41855f9a..f4dff139416d7 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -78,6 +78,23 @@ interface ITelephony {
*/
void answerRingingCall();
+ /**
+ * Answer the currently-ringing call on particular subId .
+ *
+ * If there's already a current active call, that call will be
+ * automatically put on hold. If both lines are currently in use, the
+ * current active call will be ended.
+ *
+ * TODO: provide a flag to let the caller specify what policy to use
+ * if both lines are in use. (The current behavior is hardwired to
+ * "answer incoming, end ongoing", which is how the CALL button
+ * is specced to behave.)
+ *
+ * TODO: this should be a oneway call (especially since it's called
+ * directly from the key queue thread).
+ */
+ void answerRingingCallUsingSubId(long subId);
+
/**
* Silence the ringer if an incoming call is currently ringing.
* (If vibrating, stop the vibrator also.)
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index 62b55969d7437..b8e8064980a01 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -160,9 +160,6 @@ public class PhoneConstants {
public static final int SUB2 = 1;
public static final int SUB3 = 2;
- public static final int EVENT_SUBSCRIPTION_ACTIVATED = 500;
- public static final int EVENT_SUBSCRIPTION_DEACTIVATED = 501;
-
// TODO: Remove these constants and use an int instead.
public static final int SIM_ID_1 = 0;
public static final int SIM_ID_2 = 1;
@@ -186,4 +183,7 @@ public class PhoneConstants {
// Initial MTU value.
public static final int UNSET_MTU = 0;
+
+ //FIXME maybe this shouldn't be here - sprout only
+ public static final int CAPABILITY_3G = 1;
}
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index e730bde2f9175..4aaf99b9943b4 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -291,6 +291,8 @@ cat include/telephony/ril.h | \
int RIL_REQUEST_SET_DC_RT_INFO_RATE = 127;
int RIL_REQUEST_SET_DATA_PROFILE = 128;
int RIL_REQUEST_SHUTDOWN = 129;
+ int RIL_REQUEST_GET_3G_CAPABILITY = 130;
+ int RIL_REQUEST_SET_3G_CAPABILITY = 131;
int RIL_UNSOL_RESPONSE_BASE = 1000;
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;