summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rwxr-xr-xtelephony/java/android/telephony/SubscriptionInfo.aidl (renamed from telephony/java/android/telephony/SubInfoRecord.aidl)2
-rw-r--r--telephony/java/android/telephony/SubscriptionInfo.java (renamed from telephony/java/android/telephony/SubInfoRecord.java)159
-rw-r--r--telephony/java/android/telephony/SubscriptionListener.java125
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java292
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java69
-rw-r--r--telephony/java/com/android/ims/ImsCallProfile.java19
-rw-r--r--telephony/java/com/android/ims/ImsStreamMediaProfile.java16
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSession.aidl7
-rwxr-xr-xtelephony/java/com/android/internal/telephony/ISub.aidl59
-rw-r--r--telephony/java/com/android/internal/telephony/ISubscriptionListener.aidl24
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl18
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl4
-rw-r--r--telephony/java/com/android/internal/telephony/TelephonyIntents.java34
13 files changed, 455 insertions, 373 deletions
diff --git a/telephony/java/android/telephony/SubInfoRecord.aidl b/telephony/java/android/telephony/SubscriptionInfo.aidl
index a2de676..1e13732 100755
--- a/telephony/java/android/telephony/SubInfoRecord.aidl
+++ b/telephony/java/android/telephony/SubscriptionInfo.aidl
@@ -16,4 +16,4 @@
package android.telephony;
-parcelable SubInfoRecord;
+parcelable SubscriptionInfo;
diff --git a/telephony/java/android/telephony/SubInfoRecord.java b/telephony/java/android/telephony/SubscriptionInfo.java
index 8ab69cc..26f17c8 100644
--- a/telephony/java/android/telephony/SubInfoRecord.java
+++ b/telephony/java/android/telephony/SubscriptionInfo.java
@@ -16,14 +16,22 @@
package android.telephony;
-import android.graphics.drawable.BitmapDrawable;
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffColorFilter;
+import android.graphics.Rect;
+import android.graphics.Typeface;
import android.os.Parcel;
import android.os.Parcelable;
/**
* A Parcelable class for Subscription Information.
*/
-public class SubInfoRecord implements Parcelable {
+public class SubscriptionInfo implements Parcelable {
/**
* Subscription Identifier, this is a device unique number
@@ -48,15 +56,20 @@ public class SubInfoRecord implements Parcelable {
private CharSequence mDisplayName;
/**
+ * The string displayed to the user that identifies Subscription Provider Name
+ */
+ private CharSequence mCarrierName;
+
+ /**
* The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
*/
private int mNameSource;
/**
- * The color to be used for when displaying to the user
+ * The color to be used for tinting the icon when displaying to the user
*/
- private int mColor;
+ private int mIconTint;
/**
* A number presented to the user identify this subscription
@@ -69,9 +82,9 @@ public class SubInfoRecord implements Parcelable {
private int mDataRoaming;
/**
- * SIM Icon resource identifiers. FIXME: Check with MTK what it really is
+ * SIM Icon bitmap
*/
- private int[] mSimIconRes;
+ private Bitmap mIconBitmap;
/**
* Mobile Country Code
@@ -85,36 +98,20 @@ public class SubInfoRecord implements Parcelable {
/**
* @hide
- public SubInfoRecord() {
- this.mId = SubscriptionManager.INVALID_SUB_ID;
- this.mIccId = "";
- this.mSimSlotIndex = SubscriptionManager.INVALID_SLOT_ID;
- this.mDisplayName = "";
- this.mNameSource = 0;
- this.mColor = 0;
- this.mNumber = "";
- this.mDataRoaming = 0;
- this.mSimIconRes = new int[2];
- this.mMcc = 0;
- this.mMnc = 0;
- }
*/
-
- /**
- * @hide
- */
- public SubInfoRecord(int id, String iccId, int simSlotIndex, CharSequence displayName,
- int nameSource, int color, String number, int roaming, int[] iconRes, int mcc,
- int mnc) {
+ public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName,
+ CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
+ Bitmap icon, int mcc, int mnc) {
this.mId = id;
this.mIccId = iccId;
this.mSimSlotIndex = simSlotIndex;
this.mDisplayName = displayName;
+ this.mCarrierName = carrierName;
this.mNameSource = nameSource;
- this.mColor = color;
+ this.mIconTint = iconTint;
this.mNumber = number;
this.mDataRoaming = roaming;
- this.mSimIconRes = iconRes;
+ this.mIconBitmap = icon;
this.mMcc = mcc;
this.mMnc = mnc;
}
@@ -156,6 +153,22 @@ public class SubInfoRecord implements Parcelable {
}
/**
+ * Returns the name displayed to the user that identifies Subscription provider name
+ * @hide
+ */
+ public CharSequence getCarrierName() {
+ return this.mCarrierName;
+ }
+
+ /**
+ * Sets the name displayed to the user that identifies Subscription provider name
+ * @hide
+ */
+ public void setCarrierName(CharSequence name) {
+ this.mCarrierName = name;
+ }
+
+ /**
* Return the source of the name, eg NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
*/
@@ -164,21 +177,58 @@ public class SubInfoRecord implements Parcelable {
}
/**
- * Return the color to be used for when displaying to the user. This is the value of the color.
- * ex: 0x00ff00
+ * Creates and returns an icon {@code Bitmap} to represent this {@code SubscriptionInfo} in a user
+ * interface.
+ *
+ * @param context A {@code Context} to get the {@code DisplayMetrics}s from.
+ *
+ * @return A bitmap icon for this {@code SubscriptionInfo}.
*/
- public int getColor() {
- // Note: This color is currently an index into a list of drawables, but this is soon to
- // change.
- return this.mColor;
+ public Bitmap createIconBitmap(Context context) {
+ int width = mIconBitmap.getWidth();
+ int height = mIconBitmap.getHeight();
+
+ // Create a new bitmap of the same size because it will be modified.
+ Bitmap workingBitmap = Bitmap.createBitmap(context.getResources().getDisplayMetrics(),
+ width, height, mIconBitmap.getConfig());
+
+ Canvas canvas = new Canvas(workingBitmap);
+ Paint paint = new Paint();
+
+ // Tint the icon with the color.
+ paint.setColorFilter(new PorterDuffColorFilter(mIconTint, PorterDuff.Mode.SRC_ATOP));
+ canvas.drawBitmap(mIconBitmap, 0, 0, paint);
+ paint.setColorFilter(null);
+
+ // Write the sim slot index.
+ paint.setTypeface(Typeface.create("sans-serif", Typeface.NORMAL));
+ paint.setColor(Color.WHITE);
+ paint.setTextSize(12);
+ final String index = Integer.toString(mSimSlotIndex);
+ final Rect textBound = new Rect();
+ paint.getTextBounds(index, 0, 1, textBound);
+ final float xOffset = (width / 2.f) - textBound.centerX();
+ final float yOffset = (height / 2.f) - textBound.centerY();
+ canvas.drawText(index, xOffset, yOffset, paint);
+
+ return workingBitmap;
+ }
+
+ /**
+ * A highlight color to use in displaying information about this {@code PhoneAccount}.
+ *
+ * @return A hexadecimal color value.
+ */
+ public int getIconTint() {
+ return mIconTint;
}
/**
* Sets the color displayed to the user that identifies this subscription
* @hide
*/
- public void setColor(int color) {
- this.mColor = color;
+ public void setIconTint(int iconTint) {
+ this.mIconTint = iconTint;
}
/**
@@ -196,13 +246,6 @@ public class SubInfoRecord implements Parcelable {
}
/**
- * Return the icon used to identify this subscription.
- */
- public BitmapDrawable getIcon() {
- return new BitmapDrawable();
- }
-
- /**
* Returns the MCC.
*/
public int getMcc() {
@@ -216,29 +259,29 @@ public class SubInfoRecord implements Parcelable {
return this.mMnc;
}
- public static final Parcelable.Creator<SubInfoRecord> CREATOR = new Parcelable.Creator<SubInfoRecord>() {
+ public static final Parcelable.Creator<SubscriptionInfo> CREATOR = new Parcelable.Creator<SubscriptionInfo>() {
@Override
- public SubInfoRecord createFromParcel(Parcel source) {
+ public SubscriptionInfo createFromParcel(Parcel source) {
int id = source.readInt();
String iccId = source.readString();
int simSlotIndex = source.readInt();
CharSequence displayName = source.readCharSequence();
+ CharSequence carrierName = source.readCharSequence();
int nameSource = source.readInt();
- int color = source.readInt();
+ int iconTint = source.readInt();
String number = source.readString();
int dataRoaming = source.readInt();
- int[] iconRes = new int[2];
- source.readIntArray(iconRes);
int mcc = source.readInt();
int mnc = source.readInt();
+ Bitmap iconBitmap = Bitmap.CREATOR.createFromParcel(source);
- return new SubInfoRecord(id, iccId, simSlotIndex, displayName, nameSource, color, number,
- dataRoaming, iconRes, mcc, mnc);
+ return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName, nameSource,
+ iconTint, number, dataRoaming, iconBitmap, mcc, mnc);
}
@Override
- public SubInfoRecord[] newArray(int size) {
- return new SubInfoRecord[size];
+ public SubscriptionInfo[] newArray(int size) {
+ return new SubscriptionInfo[size];
}
};
@@ -248,13 +291,14 @@ public class SubInfoRecord implements Parcelable {
dest.writeString(mIccId);
dest.writeInt(mSimSlotIndex);
dest.writeCharSequence(mDisplayName);
+ dest.writeCharSequence(mCarrierName);
dest.writeInt(mNameSource);
- dest.writeInt(mColor);
+ dest.writeInt(mIconTint);
dest.writeString(mNumber);
dest.writeInt(mDataRoaming);
- dest.writeIntArray(mSimIconRes);
dest.writeInt(mMcc);
dest.writeInt(mMnc);
+ mIconBitmap.writeToParcel(dest, flags);
}
@Override
@@ -265,8 +309,9 @@ public class SubInfoRecord implements Parcelable {
@Override
public String toString() {
return "{id=" + mId + ", iccId=" + mIccId + " simSlotIndex=" + mSimSlotIndex
- + " displayName=" + mDisplayName + " nameSource=" + mNameSource + " color=" + mColor
- + " number=" + mNumber + " dataRoaming=" + mDataRoaming + " simIconRes=" + mSimIconRes
- + " mcc " + mMcc + " mnc " + mMnc + "}";
+ + " displayName=" + mDisplayName + " carrierName=" + mCarrierName
+ + " nameSource=" + mNameSource + " iconTint=" + mIconTint + " number=" + mNumber
+ + " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc
+ + " mnc " + mMnc + "}";
}
}
diff --git a/telephony/java/android/telephony/SubscriptionListener.java b/telephony/java/android/telephony/SubscriptionListener.java
new file mode 100644
index 0000000..5c65333
--- /dev/null
+++ b/telephony/java/android/telephony/SubscriptionListener.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2014 The Android Open Source 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 android.telephony;
+
+import com.android.internal.telephony.ISub;
+import com.android.internal.telephony.ISubscriptionListener;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.telephony.Rlog;
+
+import java.util.List;
+
+/**
+ * A listener class for monitoring changes to Subscription state
+ * changes on the device.
+ * <p>
+ * Override the onXxxx methods in this class and passing to the listen method
+ * bitwise-or of the corresponding LISTEN_Xxxx bit flags below.
+ * <p>
+ * Note that access to some of the information is permission-protected. Your
+ * application won't receive updates for protected information unless it has
+ * the appropriate permissions declared in its manifest file. Where permissions
+ * apply, they are noted in the appropriate LISTEN_ flags.
+ */
+public class SubscriptionListener {
+ private static final String LOG_TAG = "SubscriptionListener";
+ private static final boolean DBG = false; // STOPSHIP if true
+
+ /**
+ * Permission for LISTEN_SUBSCRIPTION_INFO_LIST_CHANGED
+ *
+ * @hide
+ */
+ public static final String PERMISSION_LISTEN_SUBSCRIPTION_INFO_LIST_CHANGED =
+ android.Manifest.permission.READ_PHONE_STATE;
+
+ /**
+ * Listen for changes to the SubscriptionInoList when listening for this event
+ * it is guaranteed that on #onSubscriptionInfoChanged will be invoked. This initial
+ * invocation should be used to call SubscriptionManager.getActiveSubscriptionInfoList()
+ * to get the initial list.
+ *
+ * Permissions: android.Manifest.permission.READ_PHONE_STATE
+ * @see #onSubscriptionInfoChanged
+ */
+ public static final int LISTEN_SUBSCRIPTION_INFO_LIST_CHANGED = 0x00000001;
+
+ private final Handler mHandler;
+
+ /**
+ * Create a SubscriptionLitener for the device.
+ *
+ * This class requires Looper.myLooper() not return null. To supply your
+ * own non-null looper use PhoneStateListener(Looper looper) below.
+ */
+ public SubscriptionListener() {
+ this(Looper.myLooper());
+ }
+
+ /**
+ * Create a PhoneStateListener for the Phone using the specified subscription
+ * and non-null Looper.
+ */
+ public SubscriptionListener(Looper looper) {
+ if (DBG) log("ctor: looper=" + looper);
+
+ ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+ mHandler = new Handler(looper) {
+ @Override
+ public void handleMessage(Message msg) {
+ if (DBG) {
+ log("what=0x" + Integer.toHexString(msg.what) + " msg=" + msg);
+ }
+ switch (msg.what) {
+ case LISTEN_SUBSCRIPTION_INFO_LIST_CHANGED:
+ SubscriptionListener.this.onSubscriptionInfoChanged();
+ break;
+ }
+ }
+ };
+ }
+
+ /**
+ * Callback invoked when there is any change to any SubscriptionInfo.
+ */
+ public void onSubscriptionInfoChanged() {
+ // default implementation empty
+ }
+
+ /**
+ * The callback methods need to be called on the handler thread where
+ * this object was created. If the binder did that for us it'd be nice.
+ */
+ ISubscriptionListener callback = new ISubscriptionListener.Stub() {
+ @Override
+ public void onSubscriptionInfoChanged() {
+ Message msg = Message.obtain(mHandler, LISTEN_SUBSCRIPTION_INFO_LIST_CHANGED);
+ msg.sendToTarget();
+ }
+ };
+
+ private void log(String s) {
+ Rlog.d(LOG_TAG, s);
+ }
+}
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 9cd533d..78ab6870 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -18,6 +18,7 @@ package android.telephony;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.BaseColumns;
@@ -26,6 +27,7 @@ import android.os.ServiceManager;
import android.os.RemoteException;
import com.android.internal.telephony.ISub;
+import com.android.internal.telephony.ITelephonyRegistry;
import com.android.internal.telephony.PhoneConstants;
import java.util.ArrayList;
@@ -43,28 +45,29 @@ public class SubscriptionManager implements BaseColumns {
private static final boolean DBG = true;
private static final boolean VDBG = false;
+ /** An invalid subscription identifier */
+ public static final int INVALID_SUB_ID = -1000;
+
/** An invalid phone identifier */
- public static final int INVALID_PHONE_ID = -1000;
+ /** @hide */
+ public static final int INVALID_PHONE_ID = -1;
+
+ /** An invalid slot identifier */
+ /** @hide */
+ public static final int INVALID_SLOT_ID = -1;
+
+ /** Indicates the caller wants the default sub id. */
+ /** @hide */
+ public static final int DEFAULT_SUB_ID = Integer.MAX_VALUE;
/** Indicates the caller wants the default phone id. */
+ /** @hide */
public static final int DEFAULT_PHONE_ID = Integer.MAX_VALUE;
- /** An invalid slot identifier */
- public static final int INVALID_SLOT_ID = -1000;
-
/** Indicates the caller wants the default slot id. */
/** @hide */
public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE;
- /** Indicates the user should be asked which subscription to use. */
- public static final int ASK_USER_SUB_ID = -1001;
-
- /** An invalid subscription identifier */
- public static final int INVALID_SUB_ID = -1000;
-
- /** Indicates the caller wants the default sub id. */
- public static final int DEFAULT_SUB_ID = Integer.MAX_VALUE;
-
/** Minimum possible subid that represents a subscription */
/** @hide */
public static final int MIN_SUB_ID_VALUE = 0;
@@ -77,31 +80,6 @@ public class SubscriptionManager implements BaseColumns {
/** @hide */
public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");
- /** @hide */
- public static final int DEFAULT_INT_VALUE = -100;
-
- /** @hide */
- public static final String DEFAULT_STRING_VALUE = "N/A";
-
- /** @hide */
- public static final int EXTRA_VALUE_NEW_SIM = 1;
-
- /** @hide */
- public static final int EXTRA_VALUE_REMOVE_SIM = 2;
- /** @hide */
- public static final int EXTRA_VALUE_REPOSITION_SIM = 3;
- /** @hide */
- public static final int EXTRA_VALUE_NOCHANGE = 4;
-
- /** @hide */
- public static final String INTENT_KEY_DETECT_STATUS = "simDetectStatus";
- /** @hide */
- public static final String INTENT_KEY_SIM_COUNT = "simCount";
- /** @hide */
- public static final String INTENT_KEY_NEW_SIM_SLOT = "newSIMSlot";
- /** @hide */
- public static final String INTENT_KEY_NEW_SIM_STATUS = "newSIMStatus";
-
/**
* The ICC ID of a SIM.
* <P>Type: TEXT (String)</P>
@@ -116,6 +94,7 @@ public class SubscriptionManager implements BaseColumns {
public static final String SIM_ID = "sim_id";
/** SIM is not inserted */
+ /** @hide */
public static final int SIM_NOT_INSERTED = -1;
/**
@@ -126,6 +105,13 @@ public class SubscriptionManager implements BaseColumns {
public static final String DISPLAY_NAME = "display_name";
/**
+ * TelephonyProvider column name for the service provider name for the SIM.
+ * <P>Type: TEXT (String)</P>
+ */
+ /** @hide */
+ public static final String CARRIER_NAME = "carrier_name";
+
+ /**
* Default name resource
* @hide
*/
@@ -230,22 +216,17 @@ public class SubscriptionManager implements BaseColumns {
/**
* TelephonyProvider column name for the MCC associated with a SIM.
* <P>Type: INTEGER (int)</P>
+ * @hide
*/
public static final String MCC = "mcc";
/**
* TelephonyProvider column name for the MNC associated with a SIM.
* <P>Type: INTEGER (int)</P>
+ * @hide
*/
public static final String MNC = "mnc";
-
- private static final int RES_TYPE_BACKGROUND_DARK = 0;
-
- private static final int RES_TYPE_BACKGROUND_LIGHT = 1;
-
- private static final int[] sSimBackgroundDarkRes = setSimResource(RES_TYPE_BACKGROUND_DARK);
-
/**
* Broadcast Action: The user has changed one of the default subs related to
* data, phone calls, or sms</p>
@@ -261,17 +242,70 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Get the SubInfoRecord associated with the subId
- * @param subId The unique SubInfoRecord index in database
- * @return SubInfoRecord, maybe null
+ * Register for changes to events defined by SubscriptionListener.LISTEN_Xxx. Some of
+ * the events will fire as registration completes, this could be before or after
+ * this method returns.
+ *
+ * @param listener an instance of SubscriptionListner with overridden methods the
+ * overridden method should match the bits defined in events.
+ * @param events is one or more of the SubscriptionListener.LISTEN_Xxx bits
+ */
+ public static void register(Context context, SubscriptionListener listener, int events) {
+ String pkgForDebug = context != null ? context.getPackageName() : "<unknown>";
+ if (DBG) {
+ logd("SubscriptionManager listen pkgForDebug=" + pkgForDebug
+ + " events=0x" + Integer.toHexString(events) + " listener=" + listener);
+ }
+ try {
+ // We use the TelephonyRegistry as its runs in the system and thus is always
+ // available where as SubscriptionController could crash and not be available
+ ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService(
+ "telephony.registry"));
+ if (tr != null) {
+ tr.registerSubscriptionListener(pkgForDebug, listener.callback, events);
+ }
+ } catch (RemoteException ex) {
+ // Should not happen
+ }
+ }
+
+ /**
+ * Unregister the listener.
+ *
+ * @param context
+ * @param listener
+ */
+ public static void unregister(Context context, SubscriptionListener listener) {
+ String pkgForDebug = context != null ? context.getPackageName() : "<unknown>";
+ if (DBG) {
+ logd("SubscriptionManager unregister pkgForDebug=" + pkgForDebug
+ + " listener=" + listener);
+ }
+ try {
+ // We use the TelephonyRegistry as its runs in the system and thus is always
+ // available where as SubscriptionController could crash and not be available
+ ITelephonyRegistry tr = ITelephonyRegistry.Stub.asInterface(ServiceManager.getService(
+ "telephony.registry"));
+ if (tr != null) {
+ tr.unregisterSubscriptionListener(pkgForDebug, listener.callback);
+ }
+ } catch (RemoteException ex) {
+ // Should not happen
+ }
+ }
+
+ /**
+ * Get the SubscriptionInfo associated with the subId
+ * @param subId The unique SubscriptionInfo index in database
+ * @return SubscriptionInfo, maybe null
*/
- public static SubInfoRecord getSubInfoForSubscriber(int subId) {
+ public static SubscriptionInfo getSubscriptionInfoForSubscriber(int subId) {
if (!isValidSubId(subId)) {
- logd("[getSubInfoForSubscriberx]- invalid subId");
+ logd("[getSubscriptionInfoForSubscriber]- invalid subId");
return null;
}
- SubInfoRecord subInfo = null;
+ SubscriptionInfo subInfo = null;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -287,19 +321,19 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Get the SubInfoRecord according to an IccId
+ * Get the SubscriptionInfo according to an IccId
* @param iccId the IccId of SIM card
- * @return SubInfoRecord List, maybe empty but not null
+ * @return SubscriptionInfo List, maybe empty but not null
* @hide
*/
- public static List<SubInfoRecord> getSubInfoUsingIccId(String iccId) {
- if (VDBG) logd("[getSubInfoUsingIccId]+ iccId=" + iccId);
+ public static List<SubscriptionInfo> getSubscriptionInfoUsingIccId(String iccId) {
+ if (VDBG) logd("[getSubscriptionInfoUsingIccId]+ iccId=" + iccId);
if (iccId == null) {
- logd("[getSubInfoUsingIccId]- null iccid");
+ logd("[getSubscriptionInfoUsingIccId]- null iccid");
return null;
}
- List<SubInfoRecord> result = null;
+ List<SubscriptionInfo> result = null;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -312,24 +346,24 @@ public class SubscriptionManager implements BaseColumns {
if (result == null) {
- result = new ArrayList<SubInfoRecord>();
+ result = new ArrayList<SubscriptionInfo>();
}
return result;
}
/**
- * Get the SubInfoRecord according to slotId
+ * Get the SubscriptionInfo according to slotId
* @param slotId the slot which the SIM is inserted
- * @return SubInfoRecord list, maybe empty but not null
+ * @return SubscriptionInfo list, maybe empty but not null
*/
- public static List<SubInfoRecord> getSubInfoUsingSlotId(int slotId) {
+ public static List<SubscriptionInfo> getSubscriptionInfoUsingSlotId(int slotId) {
// FIXME: Consider never returning null
if (!isValidSlotId(slotId)) {
- logd("[getSubInfoUsingSlotId]- invalid slotId");
+ logd("[getSubscriptionInfoUsingSlotId]- invalid slotId");
return null;
}
- List<SubInfoRecord> result = null;
+ List<SubscriptionInfo> result = null;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -342,21 +376,21 @@ public class SubscriptionManager implements BaseColumns {
if (result == null) {
- result = new ArrayList<SubInfoRecord>();
+ result = new ArrayList<SubscriptionInfo>();
}
return result;
}
/**
- * Get all the SubInfoRecord(s) in subInfo database
- * @return List of all SubInfoRecords in database, include those that were inserted before
+ * Get all the SubscriptionInfo(s) in subInfo database
+ * @return List of all SubscriptionInfos in database, include those that were inserted before
* maybe empty but not null.
* @hide
*/
- public static List<SubInfoRecord> getAllSubInfoList() {
- if (VDBG) logd("[getAllSubInfoList]+");
+ public static List<SubscriptionInfo> getAllSubscriptionInfoList() {
+ if (VDBG) logd("[getAllSubscriptionInfoList]+");
- List<SubInfoRecord> result = null;
+ List<SubscriptionInfo> result = null;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -368,17 +402,17 @@ public class SubscriptionManager implements BaseColumns {
}
if (result == null) {
- result = new ArrayList<SubInfoRecord>();
+ result = new ArrayList<SubscriptionInfo>();
}
return result;
}
/**
- * Get the SubInfoRecord(s) of the currently inserted SIM(s)
- * @return Array list of currently inserted SubInfoRecord(s) maybe empty but not null
+ * Get the SubscriptionInfo(s) of the currently inserted SIM(s)
+ * @return Array list of currently inserted SubscriptionInfo(s) maybe empty but not null
*/
- public static List<SubInfoRecord> getActiveSubInfoList() {
- List<SubInfoRecord> result = null;
+ public static List<SubscriptionInfo> getActiveSubscriptionInfoList() {
+ List<SubscriptionInfo> result = null;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -390,7 +424,7 @@ public class SubscriptionManager implements BaseColumns {
}
if (result == null) {
- result = new ArrayList<SubInfoRecord>();
+ result = new ArrayList<SubscriptionInfo>();
}
return result;
}
@@ -400,8 +434,8 @@ public class SubscriptionManager implements BaseColumns {
* @return all SIM count in database, include what was inserted before
* @hide
*/
- public static int getAllSubInfoCount() {
- if (VDBG) logd("[getAllSubInfoCount]+");
+ public static int getAllSubscriptionInfoCount() {
+ if (VDBG) logd("[getAllSubscriptionInfoCount]+");
int result = 0;
@@ -422,7 +456,7 @@ public class SubscriptionManager implements BaseColumns {
* @return active SIM count
* @hide
*/
- public static int getActiveSubInfoCount() {
+ public static int getActiveSubscriptionInfoCount() {
int result = 0;
try {
@@ -438,19 +472,19 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Add a new SubInfoRecord to subinfo database if needed
+ * Add a new SubscriptionInfo to subinfo database if needed
* @param iccId the IccId of the SIM card
* @param slotId the slot which the SIM is inserted
* @return the URL of the newly created row or the updated row
* @hide
*/
- public static Uri addSubInfoRecord(String iccId, int slotId) {
- if (VDBG) logd("[addSubInfoRecord]+ iccId:" + iccId + " slotId:" + slotId);
+ public static Uri addSubscriptionInfoRecord(String iccId, int slotId) {
+ if (VDBG) logd("[addSubscriptionInfoRecord]+ iccId:" + iccId + " slotId:" + slotId);
if (iccId == null) {
- logd("[addSubInfoRecord]- null iccId");
+ logd("[addSubscriptionInfoRecord]- null iccId");
}
if (!isValidSlotId(slotId)) {
- logd("[addSubInfoRecord]- invalid slotId");
+ logd("[addSubscriptionInfoRecord]- invalid slotId");
}
try {
@@ -469,17 +503,16 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Set SIM color by simInfo index
- * @param color the rgb value of color of the SIM
+ * Set SIM icon tint color by simInfo index
+ * @param tint the rgb value of icon tint color of the SIM
* @param subId the unique SubInfoRecord index in database
* @return the number of records updated
* @hide
*/
- public static int setColor(int color, int subId) {
- if (VDBG) logd("[setColor]+ color:" + color + " subId:" + subId);
- int size = sSimBackgroundDarkRes.length;
+ public static int setIconTint(int tint, int subId) {
+ if (VDBG) logd("[setIconTint]+ tint:" + tint + " subId:" + subId);
if (!isValidSubId(subId)) {
- logd("[setColor]- fail");
+ logd("[setIconTint]- fail");
return -1;
}
@@ -488,7 +521,7 @@ public class SubscriptionManager implements BaseColumns {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
- result = iSub.setColor(color, subId);
+ result = iSub.setIconTint(tint, subId);
}
} catch (RemoteException ex) {
// ignore it
@@ -501,7 +534,7 @@ public class SubscriptionManager implements BaseColumns {
/**
* Set display name by simInfo index
* @param displayName the display name of SIM card
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
* @hide
*/
@@ -512,7 +545,7 @@ public class SubscriptionManager implements BaseColumns {
/**
* Set display name by simInfo index with name source
* @param displayName the display name of SIM card
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @param nameSource 0: NAME_SOURCE_DEFAULT_SOURCE, 1: NAME_SOURCE_SIM_SOURCE,
* 2: NAME_SOURCE_USER_INPUT, -1 NAME_SOURCE_UNDEFINED
* @return the number of records updated or -1 if invalid subId
@@ -546,7 +579,7 @@ public class SubscriptionManager implements BaseColumns {
/**
* Set phone number by subId
* @param number the phone number of the SIM
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
* @hide
*/
@@ -572,38 +605,9 @@ public class SubscriptionManager implements BaseColumns {
}
/**
- * Set number display format. 0: none, 1: the first four digits, 2: the last four digits
- * @param format the display format of phone number
- * @param subId the unique SubInfoRecord index in database
- * @return the number of records updated
- * @hide
- */
- public static int setDisplayNumberFormat(int format, int subId) {
- if (VDBG) logd("[setDisplayNumberFormat]+ format:" + format + " subId:" + subId);
- if (format < 0 || !isValidSubId(subId)) {
- logd("[setDisplayNumberFormat]- fail, return -1");
- return -1;
- }
-
- int result = 0;
-
- try {
- ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- if (iSub != null) {
- result = iSub.setDisplayNumberFormat(format, subId);
- }
- } catch (RemoteException ex) {
- // ignore it
- }
-
- return result;
-
- }
-
- /**
* Set data roaming by simInfo index
* @param roaming 0:Don't allow data when roaming, 1:Allow data when roaming
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
* @hide
*/
@@ -632,6 +636,7 @@ public class SubscriptionManager implements BaseColumns {
* Get slotId associated with the subscription.
* @return slotId as a positive integer or a negative value if an error either
* SIM_NOT_INSERTED or INVALID_SLOT_ID.
+ * @hide
*/
public static int getSlotId(int subId) {
if (!isValidSubId(subId)) {
@@ -697,31 +702,6 @@ public class SubscriptionManager implements BaseColumns {
}
- private static int[] setSimResource(int type) {
- int[] simResource = null;
-
- switch (type) {
- case RES_TYPE_BACKGROUND_DARK:
- simResource = new int[] {
- com.android.internal.R.drawable.sim_dark_blue,
- com.android.internal.R.drawable.sim_dark_orange,
- com.android.internal.R.drawable.sim_dark_green,
- com.android.internal.R.drawable.sim_dark_purple
- };
- break;
- case RES_TYPE_BACKGROUND_LIGHT:
- simResource = new int[] {
- com.android.internal.R.drawable.sim_light_blue,
- com.android.internal.R.drawable.sim_light_orange,
- com.android.internal.R.drawable.sim_light_green,
- com.android.internal.R.drawable.sim_light_purple
- };
- break;
- }
-
- return simResource;
- }
-
private static void logd(String msg) {
Rlog.d(LOG_TAG, "[SubManager] " + msg);
}
@@ -779,8 +759,8 @@ public class SubscriptionManager implements BaseColumns {
}
/** @hide */
- public static SubInfoRecord getDefaultVoiceSubInfo() {
- return getSubInfoForSubscriber(getDefaultVoiceSubId());
+ public static SubscriptionInfo getDefaultVoiceSubscriptionInfo() {
+ return getSubscriptionInfoForSubscriber(getDefaultVoiceSubId());
}
/** @hide */
@@ -790,6 +770,7 @@ public class SubscriptionManager implements BaseColumns {
/**
* @return subId of the DefaultSms subscription or the value INVALID_SUB_ID if an error.
+ * @hide
*/
public static int getDefaultSmsSubId() {
int subId = INVALID_SUB_ID;
@@ -821,8 +802,8 @@ public class SubscriptionManager implements BaseColumns {
}
/** @hide */
- public static SubInfoRecord getDefaultSmsSubInfo() {
- return getSubInfoForSubscriber(getDefaultSmsSubId());
+ public static SubscriptionInfo getDefaultSmsSubscriptionInfo() {
+ return getSubscriptionInfoForSubscriber(getDefaultSmsSubId());
}
/** @hide */
@@ -861,8 +842,8 @@ public class SubscriptionManager implements BaseColumns {
}
/** @hide */
- public static SubInfoRecord getDefaultDataSubInfo() {
- return getSubInfoForSubscriber(getDefaultDataSubId());
+ public static SubscriptionInfo getDefaultDataSubscriptionInfo() {
+ return getSubscriptionInfoForSubscriber(getDefaultDataSubId());
}
/** @hide */
@@ -871,7 +852,7 @@ public class SubscriptionManager implements BaseColumns {
}
/** @hide */
- public static void clearSubInfo() {
+ public static void clearSubscriptionInfo() {
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
if (iSub != null) {
@@ -918,6 +899,7 @@ public class SubscriptionManager implements BaseColumns {
/**
* @return true if a valid subId else false
+ * @hide
*/
public static boolean isValidSubId(int subId) {
return subId > INVALID_SUB_ID ;
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 0246a2d..b06d44c 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3453,75 +3453,6 @@ public class TelephonyManager {
}
/**
- * Set whether Android should display a simplified Mobile Network Settings UI
- * for the current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
- *
- * @param enable true means enabling the simplified UI.
- * @hide
- */
- public void enableSimplifiedNetworkSettings(boolean enable) {
- enableSimplifiedNetworkSettingsForSubscriber(getDefaultSubscription(), enable);
- }
-
- /**
- * Set whether Android should display a simplified Mobile Network Settings UI
- * for the current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @param enable true means enabling the simplified UI.
- * @hide
- */
- public void enableSimplifiedNetworkSettingsForSubscriber(int subId, boolean enable) {
- try {
- getITelephony().enableSimplifiedNetworkSettingsForSubscriber(subId, enable);
- } catch (RemoteException ex) {
- } catch (NullPointerException ex) {
- }
- }
-
- /**
- * Get whether a simplified Mobile Network Settings UI is enabled for the
- * current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- *
- * @return true if the simplified UI is enabled.
- * @hide
- */
- public boolean getSimplifiedNetworkSettingsEnabled() {
- return getSimplifiedNetworkSettingsEnabledForSubscriber(getDefaultSubscription());
- }
-
- /**
- * Get whether a simplified Mobile Network Settings UI is enabled for the
- * current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @return true if the simplified UI is enabled.
- * @hide
- */
- public boolean getSimplifiedNetworkSettingsEnabledForSubscriber(int subId) {
- try {
- return getITelephony().getSimplifiedNetworkSettingsEnabledForSubscriber(subId);
- } catch (RemoteException ex) {
- } catch (NullPointerException ex) {
- }
- return false;
- }
-
- /**
* Returns the result and response from RIL for oem request
*
* @param oemReq the data is sent to ril.
diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java
index 8b7901c..9de938a 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.java
+++ b/telephony/java/com/android/ims/ImsCallProfile.java
@@ -114,6 +114,10 @@ public class ImsCallProfile implements Parcelable {
public static final String EXTRA_CALL_MODE_CHANGEABLE = "call_mode_changeable";
public static final String EXTRA_CONFERENCE_AVAIL = "conference_avail";
+ // Extra string for internal use only. OEMs should not use
+ // this for packing extras.
+ public static final String EXTRA_OEM_EXTRAS = "OemCallExtras";
+
/**
* Integer extra properties
* oir : Rule for originating identity (number) presentation, MO/MT.
@@ -151,6 +155,18 @@ public class ImsCallProfile implements Parcelable {
public static final int DIALSTRING_USSD = 2;
/**
+ * Values for causes that restrict call types
+ */
+ // Default cause not restricted at peer and HD is supported
+ public static final int CALL_RESTRICT_CAUSE_NONE = 0;
+ // Service not supported by RAT at peer
+ public static final int CALL_RESTRICT_CAUSE_RAT = 1;
+ // Service Disabled at peer
+ public static final int CALL_RESTRICT_CAUSE_DISABLED = 2;
+ // HD is not supported
+ public static final int CALL_RESTRICT_CAUSE_HD = 3;
+
+ /**
* String extra properties
* oi : Originating identity (number), MT only
* cna : Calling name
@@ -164,11 +180,10 @@ public class ImsCallProfile implements Parcelable {
public int mServiceType;
public int mCallType;
+ public int mRestrictCause = CALL_RESTRICT_CAUSE_NONE;
public Bundle mCallExtras;
public ImsStreamMediaProfile mMediaProfile;
-
-
public ImsCallProfile(Parcel in) {
readFromParcel(in);
}
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
index 003499c..359b270 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
@@ -41,10 +41,18 @@ public class ImsStreamMediaProfile implements Parcelable {
* Audio information
*/
public static final int AUDIO_QUALITY_NONE = 0;
- public static final int AUDIO_QUALITY_AMR = (1 << 0);
- public static final int AUDIO_QUALITY_AMR_WB = (1 << 1);
-
- /**
+ public static final int AUDIO_QUALITY_AMR = 1;
+ public static final int AUDIO_QUALITY_AMR_WB = 2;
+ public static final int AUDIO_QUALITY_QCELP13K = 3;
+ public static final int AUDIO_QUALITY_EVRC = 4;
+ public static final int AUDIO_QUALITY_EVRC_B = 5;
+ public static final int AUDIO_QUALITY_EVRC_WB = 6;
+ public static final int AUDIO_QUALITY_EVRC_NW = 7;
+ public static final int AUDIO_QUALITY_GSM_EFR = 8;
+ public static final int AUDIO_QUALITY_GSM_FR = 9;
+ public static final int AUDIO_QUALITY_GSM_HR = 10;
+
+ /**
* Video information
*/
public static final int VIDEO_QUALITY_NONE = 0;
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index 16b0cd5..d1946e3 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -55,6 +55,13 @@ interface IImsCallSession {
ImsCallProfile getLocalCallProfile();
/**
+ * Gets the remote call profile that this session is associated with
+ *
+ * @return the remote call profile that this session is associated with
+ */
+ ImsCallProfile getRemoteCallProfile();
+
+ /**
* Gets the value associated with the specified property of this session.
*
* @return the string value associated with the specified property
diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl
index daf850e..d82c492 100755
--- a/telephony/java/com/android/internal/telephony/ISub.aidl
+++ b/telephony/java/com/android/internal/telephony/ISub.aidl
@@ -17,41 +17,42 @@
package com.android.internal.telephony;
import android.app.PendingIntent;
-import android.telephony.SubInfoRecord;
+import android.telephony.SubscriptionInfo;
+import com.android.internal.telephony.ISubscriptionListener;
interface ISub {
/**
- * Get the SubInfoRecord according to an index
- * @param subId The unique SubInfoRecord index in database
- * @return SubInfoRecord, maybe null
+ * Get the SubscriptionInfo according to an index
+ * @param subId The unique SubscriptionInfo index in database
+ * @return SubscriptionInfo, maybe null
*/
- SubInfoRecord getSubInfoForSubscriber(int subId);
+ SubscriptionInfo getSubInfoForSubscriber(int subId);
/**
- * Get the SubInfoRecord according to an IccId
+ * Get the SubscriptionInfo according to an IccId
* @param iccId the IccId of SIM card
- * @return SubInfoRecord, maybe null
+ * @return SubscriptionInfo, maybe null
*/
- List<SubInfoRecord> getSubInfoUsingIccId(String iccId);
+ List<SubscriptionInfo> getSubInfoUsingIccId(String iccId);
/**
- * Get the SubInfoRecord according to slotId
+ * Get the SubscriptionInfo according to slotId
* @param slotId the slot which the SIM is inserted
- * @return SubInfoRecord, maybe null
+ * @return SubscriptionInfo, maybe null
*/
- List<SubInfoRecord> getSubInfoUsingSlotId(int slotId);
+ List<SubscriptionInfo> getSubInfoUsingSlotId(int slotId);
/**
- * Get all the SubInfoRecord(s) in subinfo database
+ * Get all the SubscriptionInfo(s) in subinfo database
* @return Array list of all SubInfoRecords in database, include thsoe that were inserted before
*/
- List<SubInfoRecord> getAllSubInfoList();
+ List<SubscriptionInfo> getAllSubInfoList();
/**
- * Get the SubInfoRecord(s) of the currently inserted SIM(s)
- * @return Array list of currently inserted SubInfoRecord(s)
+ * Get the SubscriptionInfo(s) of the currently inserted SIM(s)
+ * @return Array list of currently inserted SubscriptionInfo(s)
*/
- List<SubInfoRecord> getActiveSubInfoList();
+ List<SubscriptionInfo> getActiveSubInfoList();
/**
* Get the SUB count of all SUB(s) in subinfo database
@@ -66,7 +67,7 @@ interface ISub {
int getActiveSubInfoCount();
/**
- * Add a new SubInfoRecord to subinfo database if needed
+ * Add a new SubscriptionInfo to subinfo database if needed
* @param iccId the IccId of the SIM card
* @param slotId the slot which the SIM is inserted
* @return the URL of the newly created row or the updated row
@@ -74,17 +75,17 @@ interface ISub {
int addSubInfoRecord(String iccId, int slotId);
/**
- * Set SIM color by simInfo index
- * @param color the color of the SIM
- * @param subId the unique SubInfoRecord index in database
+ * Set SIM icon tint color by simInfo index
+ * @param tint the icon tint color of the SIM
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
*/
- int setColor(int color, int subId);
+ int setIconTint(int tint, int subId);
/**
* Set display name by simInfo index
* @param displayName the display name of SIM card
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
*/
int setDisplayName(String displayName, int subId);
@@ -92,7 +93,7 @@ interface ISub {
/**
* Set display name by simInfo index with name source
* @param displayName the display name of SIM card
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @param nameSource, 0: DEFAULT_SOURCE, 1: SIM_SOURCE, 2: USER_INPUT
* @return the number of records updated
*/
@@ -101,23 +102,15 @@ interface ISub {
/**
* Set phone number by subId
* @param number the phone number of the SIM
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
*/
int setDisplayNumber(String number, int subId);
/**
- * Set number display format. 0: none, 1: the first four digits, 2: the last four digits
- * @param format the display format of phone number
- * @param subId the unique SubInfoRecord index in database
- * @return the number of records updated
- */
- int setDisplayNumberFormat(int format, int subId);
-
- /**
* Set data roaming by simInfo index
* @param roaming 0:Don't allow data when roaming, 1:Allow data when roaming
- * @param subId the unique SubInfoRecord index in database
+ * @param subId the unique SubscriptionInfo index in database
* @return the number of records updated
*/
int setDataRoaming(int roaming, int subId);
diff --git a/telephony/java/com/android/internal/telephony/ISubscriptionListener.aidl b/telephony/java/com/android/internal/telephony/ISubscriptionListener.aidl
new file mode 100644
index 0000000..4ccdea5
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/ISubscriptionListener.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2014 The Android Open Source 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 android.telephony.SubscriptionInfo;
+
+oneway interface ISubscriptionListener {
+ void onSubscriptionInfoChanged();
+}
+
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 13f0e3f..c50261d 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -727,24 +727,6 @@ interface ITelephony {
List<String> getCarrierPackageNamesForIntent(in Intent intent);
/**
- * Set whether Android should display a simplified Mobile Network Settings UI
- * for the current ICCID.
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @param enable true means enabling the simplified UI.
- */
- void enableSimplifiedNetworkSettingsForSubscriber(int subId, boolean enable);
-
- /**
- * Get whether a simplified Mobile Network Settings UI is enabled for the
- * current ICCID.
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @return true if the simplified UI is enabled.
- */
- boolean getSimplifiedNetworkSettingsEnabledForSubscriber(int subId);
-
- /**
* Set the line 1 phone number string and its alphatag for the current ICCID
* for display purpose only, for example, displayed in Phone Status. It won't
* change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index ee3f8b0..1a1f8fe 100644
--- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -27,8 +27,11 @@ import android.telephony.SignalStrength;
import android.telephony.CellInfo;
import android.telephony.VoLteServiceState;
import com.android.internal.telephony.IPhoneStateListener;
+import com.android.internal.telephony.ISubscriptionListener;
interface ITelephonyRegistry {
+ void registerSubscriptionListener(String pkg, ISubscriptionListener callback, int events);
+ void unregisterSubscriptionListener(String pkg, ISubscriptionListener callback);
void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow);
void listenForSubscriber(in int subId, String pkg, IPhoneStateListener callback, int events,
boolean notifyNow);
@@ -63,4 +66,5 @@ interface ITelephonyRegistry {
void notifyDataConnectionRealTimeInfo(in DataConnectionRealTimeInfo dcRtInfo);
void notifyVoLteServiceStateChanged(in VoLteServiceState lteState);
void notifyOemHookRawEventForSubscriber(in int subId, in byte[] rawData);
+ void notifySubscriptionInfoChanged();
}
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index d05e7d1..c67e5d7 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -312,27 +312,7 @@ public class TelephonyIntents {
public static final String EXTRA_SPN = "spn";
/**
- * <p>Broadcast Action: It indicates one column of a siminfo record has been changed
- * The intent will have the following extra values:</p>
- * <ul>
- * <li><em>columnName</em> - The siminfo column that is updated.</li>
- * <li><em>stringContent</em> - The string value of the updated column.</li>
- * <li><em>intContent</em> - The int value of the updated column.</li>
- * </ul>
- * <p class="note">This is a protected intent that can only be sent
- * by the system.
- */
- public static final String ACTION_SIMINFO_CONTENT_CHANGE
- = "android.intent.action.ACTION_SIMINFO_CONTENT_CHANGE";
-
- /**
* <p>Broadcast Action: It indicates one column of a subinfo record has been changed
- * The intent will have the following extra values:</p>
- * <ul>
- * <li><em>columnName</em> - The siminfo column that is updated.</li>
- * <li><em>stringContent</em> - The string value of the updated column.</li>
- * <li><em>intContent</em> - The int value of the updated column.</li>
- * </ul>
* <p class="note">This is a protected intent that can only be sent
* by the system.
*/
@@ -340,28 +320,14 @@ public class TelephonyIntents {
= "android.intent.action.ACTION_SUBINFO_CONTENT_CHANGE";
/**
- * <p>Broadcast Action: It indicates siminfo update is completed when SIM inserted state change
- * The intent will have the following extra values:</p>
- * <p class="note">This is a protected intent that can only be sent
- * by the system.
- */
- public static final String ACTION_SIMINFO_UPDATED
- = "android.intent.action.ACTION_SIMINFO_UPDATED";
-
- /**
* <p>Broadcast Action: It indicates subinfo record update is completed
* when SIM inserted state change
- * The intent will have the following extra values:</p>
* <p class="note">This is a protected intent that can only be sent
* by the system.
*/
public static final String ACTION_SUBINFO_RECORD_UPDATED
= "android.intent.action.ACTION_SUBINFO_RECORD_UPDATED";
- public static final String EXTRA_COLUMN_NAME = "columnName";
- public static final String EXTRA_INT_CONTENT = "intContent";
- public static final String EXTRA_STRING_CONTENT = "stringContent";
-
/**
* Broadcast Action: The default subscription has changed. This has the following
* extra values:</p>