Merge "Revert "Telephony light grey list clean up for Q"" am: a18e095754
am: c16c2f7c8e
Change-Id: I17fee4991fbe3a8987710be55e73898c1abebe82
This commit is contained in:
@@ -676,7 +676,7 @@ public class TelecomManager {
|
|||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public static TelecomManager from(Context context) {
|
public static TelecomManager from(Context context) {
|
||||||
return (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
|
return (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import android.annotation.SystemApi;
|
|||||||
import android.annotation.TestApi;
|
import android.annotation.TestApi;
|
||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@@ -247,7 +246,7 @@ public class ServiceState implements Parcelable {
|
|||||||
private String mDataOperatorAlphaLong;
|
private String mDataOperatorAlphaLong;
|
||||||
private String mDataOperatorAlphaShort;
|
private String mDataOperatorAlphaShort;
|
||||||
private String mDataOperatorNumeric;
|
private String mDataOperatorNumeric;
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
private boolean mIsManualNetworkSelection;
|
private boolean mIsManualNetworkSelection;
|
||||||
|
|
||||||
private boolean mIsEmergencyOnly;
|
private boolean mIsEmergencyOnly;
|
||||||
@@ -257,9 +256,9 @@ public class ServiceState implements Parcelable {
|
|||||||
|
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
private boolean mCssIndicator;
|
private boolean mCssIndicator;
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
private int mNetworkId;
|
private int mNetworkId;
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
private int mSystemId;
|
private int mSystemId;
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
private int mCdmaRoamingIndicator;
|
private int mCdmaRoamingIndicator;
|
||||||
@@ -457,7 +456,7 @@ public class ServiceState implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public int getVoiceRegState() {
|
public int getVoiceRegState() {
|
||||||
return mVoiceRegState;
|
return mVoiceRegState;
|
||||||
}
|
}
|
||||||
@@ -472,7 +471,7 @@ public class ServiceState implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public int getDataRegState() {
|
public int getDataRegState() {
|
||||||
return mDataRegState;
|
return mDataRegState;
|
||||||
}
|
}
|
||||||
@@ -533,7 +532,7 @@ public class ServiceState implements Parcelable {
|
|||||||
* @return roaming status
|
* @return roaming status
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public boolean getVoiceRoaming() {
|
public boolean getVoiceRoaming() {
|
||||||
return getVoiceRoamingType() != ROAMING_TYPE_NOT_ROAMING;
|
return getVoiceRoamingType() != ROAMING_TYPE_NOT_ROAMING;
|
||||||
}
|
}
|
||||||
@@ -557,7 +556,7 @@ public class ServiceState implements Parcelable {
|
|||||||
* @return roaming type
|
* @return roaming type
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public boolean getDataRoaming() {
|
public boolean getDataRoaming() {
|
||||||
return getDataRoamingType() != ROAMING_TYPE_NOT_ROAMING;
|
return getDataRoamingType() != ROAMING_TYPE_NOT_ROAMING;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import android.database.ContentObserver;
|
|||||||
import android.net.INetworkPolicyManager;
|
import android.net.INetworkPolicyManager;
|
||||||
import android.net.NetworkCapabilities;
|
import android.net.NetworkCapabilities;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
@@ -1368,7 +1367,7 @@ public class SubscriptionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public static int getPhoneId(int subId) {
|
public static int getPhoneId(int subId) {
|
||||||
if (!isValidSubscriptionId(subId)) {
|
if (!isValidSubscriptionId(subId)) {
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
@@ -1664,7 +1663,7 @@ public class SubscriptionManager {
|
|||||||
* usable subId means its neither a INVALID_SUBSCRIPTION_ID nor a DEFAULT_SUB_ID.
|
* usable subId means its neither a INVALID_SUBSCRIPTION_ID nor a DEFAULT_SUB_ID.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public static boolean isUsableSubIdValue(int subId) {
|
public static boolean isUsableSubIdValue(int subId) {
|
||||||
return subId >= MIN_SUBSCRIPTION_ID_VALUE && subId <= MAX_SUBSCRIPTION_ID_VALUE;
|
return subId >= MIN_SUBSCRIPTION_ID_VALUE && subId <= MAX_SUBSCRIPTION_ID_VALUE;
|
||||||
}
|
}
|
||||||
@@ -1682,7 +1681,7 @@ public class SubscriptionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
|
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
|
||||||
int[] subIds = SubscriptionManager.getSubId(phoneId);
|
int[] subIds = SubscriptionManager.getSubId(phoneId);
|
||||||
if (subIds != null && subIds.length > 0) {
|
if (subIds != null && subIds.length > 0) {
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ import android.net.NetworkStats;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.BatteryStats;
|
import android.os.BatteryStats;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.PersistableBundle;
|
import android.os.PersistableBundle;
|
||||||
@@ -231,8 +230,7 @@ public class TelephonyManager {
|
|||||||
|
|
||||||
/** @hide
|
/** @hide
|
||||||
/* @deprecated - use getSystemService as described above */
|
/* @deprecated - use getSystemService as described above */
|
||||||
@Deprecated
|
@UnsupportedAppUsage
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
|
||||||
public static TelephonyManager getDefault() {
|
public static TelephonyManager getDefault() {
|
||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
@@ -321,7 +319,7 @@ public class TelephonyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public static TelephonyManager from(Context context) {
|
public static TelephonyManager from(Context context) {
|
||||||
return (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
return (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
}
|
}
|
||||||
@@ -1880,7 +1878,7 @@ public class TelephonyManager {
|
|||||||
* @param subId
|
* @param subId
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getNetworkOperatorName(int subId) {
|
public String getNetworkOperatorName(int subId) {
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, "");
|
return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, "");
|
||||||
@@ -1908,7 +1906,7 @@ public class TelephonyManager {
|
|||||||
* @param subId
|
* @param subId
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getNetworkOperator(int subId) {
|
public String getNetworkOperator(int subId) {
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
return getNetworkOperatorForPhone(phoneId);
|
return getNetworkOperatorForPhone(phoneId);
|
||||||
@@ -2232,7 +2230,7 @@ public class TelephonyManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public int getDataNetworkType(int subId) {
|
public int getDataNetworkType(int subId) {
|
||||||
try{
|
try{
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
@@ -2268,7 +2266,7 @@ public class TelephonyManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public int getVoiceNetworkType(int subId) {
|
public int getVoiceNetworkType(int subId) {
|
||||||
try{
|
try{
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
@@ -2751,7 +2749,7 @@ public class TelephonyManager {
|
|||||||
* @param subId for which SimOperator is returned
|
* @param subId for which SimOperator is returned
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSimOperator(int subId) {
|
public String getSimOperator(int subId) {
|
||||||
return getSimOperatorNumeric(subId);
|
return getSimOperatorNumeric(subId);
|
||||||
}
|
}
|
||||||
@@ -2765,7 +2763,7 @@ public class TelephonyManager {
|
|||||||
* @see #getSimState
|
* @see #getSimState
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSimOperatorNumeric() {
|
public String getSimOperatorNumeric() {
|
||||||
int subId = mSubId;
|
int subId = mSubId;
|
||||||
if (!SubscriptionManager.isUsableSubIdValue(subId)) {
|
if (!SubscriptionManager.isUsableSubIdValue(subId)) {
|
||||||
@@ -2794,7 +2792,7 @@ public class TelephonyManager {
|
|||||||
* @param subId for which SimOperator is returned
|
* @param subId for which SimOperator is returned
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSimOperatorNumeric(int subId) {
|
public String getSimOperatorNumeric(int subId) {
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
return getSimOperatorNumericForPhone(phoneId);
|
return getSimOperatorNumericForPhone(phoneId);
|
||||||
@@ -2808,7 +2806,7 @@ public class TelephonyManager {
|
|||||||
* @param phoneId for which SimOperator is returned
|
* @param phoneId for which SimOperator is returned
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSimOperatorNumericForPhone(int phoneId) {
|
public String getSimOperatorNumericForPhone(int phoneId) {
|
||||||
return getTelephonyProperty(phoneId,
|
return getTelephonyProperty(phoneId,
|
||||||
TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, "");
|
TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, "");
|
||||||
@@ -2835,7 +2833,7 @@ public class TelephonyManager {
|
|||||||
* @param subId for which SimOperatorName is returned
|
* @param subId for which SimOperatorName is returned
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSimOperatorName(int subId) {
|
public String getSimOperatorName(int subId) {
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
return getSimOperatorNameForPhone(phoneId);
|
return getSimOperatorNameForPhone(phoneId);
|
||||||
@@ -2865,7 +2863,7 @@ public class TelephonyManager {
|
|||||||
* @param subId for which SimCountryIso is returned
|
* @param subId for which SimCountryIso is returned
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSimCountryIso(int subId) {
|
public String getSimCountryIso(int subId) {
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
return getSimCountryIsoForPhone(phoneId);
|
return getSimCountryIsoForPhone(phoneId);
|
||||||
@@ -3055,7 +3053,7 @@ public class TelephonyManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getSubscriberId(int subId) {
|
public String getSubscriberId(int subId) {
|
||||||
try {
|
try {
|
||||||
IPhoneSubInfo info = getSubscriberInfo();
|
IPhoneSubInfo info = getSubscriberInfo();
|
||||||
@@ -3440,7 +3438,7 @@ public class TelephonyManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public String getMsisdn(int subId) {
|
public String getMsisdn(int subId) {
|
||||||
try {
|
try {
|
||||||
IPhoneSubInfo info = getSubscriberInfo();
|
IPhoneSubInfo info = getSubscriberInfo();
|
||||||
@@ -4406,7 +4404,7 @@ public class TelephonyManager {
|
|||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
private ITelephony getITelephony() {
|
private ITelephony getITelephony() {
|
||||||
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
|
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
|
||||||
}
|
}
|
||||||
@@ -7787,7 +7785,7 @@ public class TelephonyManager {
|
|||||||
* either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information.
|
* either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
@UnsupportedAppUsage
|
||||||
public ServiceState getServiceStateForSubscriber(int subId) {
|
public ServiceState getServiceStateForSubscriber(int subId) {
|
||||||
try {
|
try {
|
||||||
ITelephony service = getITelephony();
|
ITelephony service = getITelephony();
|
||||||
|
|||||||
Reference in New Issue
Block a user