Merge "Telephony light grey list clean up for Q"
This commit is contained in:
@@ -676,7 +676,7 @@ public class TelecomManager {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public static TelecomManager from(Context context) {
|
||||
return (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
import android.annotation.UnsupportedAppUsage;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -246,7 +247,7 @@ public class ServiceState implements Parcelable {
|
||||
private String mDataOperatorAlphaLong;
|
||||
private String mDataOperatorAlphaShort;
|
||||
private String mDataOperatorNumeric;
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
private boolean mIsManualNetworkSelection;
|
||||
|
||||
private boolean mIsEmergencyOnly;
|
||||
@@ -256,9 +257,9 @@ public class ServiceState implements Parcelable {
|
||||
|
||||
@UnsupportedAppUsage
|
||||
private boolean mCssIndicator;
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
private int mNetworkId;
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
private int mSystemId;
|
||||
@UnsupportedAppUsage
|
||||
private int mCdmaRoamingIndicator;
|
||||
@@ -456,7 +457,7 @@ public class ServiceState implements Parcelable {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public int getVoiceRegState() {
|
||||
return mVoiceRegState;
|
||||
}
|
||||
@@ -471,7 +472,7 @@ public class ServiceState implements Parcelable {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public int getDataRegState() {
|
||||
return mDataRegState;
|
||||
}
|
||||
@@ -532,7 +533,7 @@ public class ServiceState implements Parcelable {
|
||||
* @return roaming status
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public boolean getVoiceRoaming() {
|
||||
return getVoiceRoamingType() != ROAMING_TYPE_NOT_ROAMING;
|
||||
}
|
||||
@@ -556,7 +557,7 @@ public class ServiceState implements Parcelable {
|
||||
* @return roaming type
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public boolean getDataRoaming() {
|
||||
return getDataRoamingType() != ROAMING_TYPE_NOT_ROAMING;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ import android.database.ContentObserver;
|
||||
import android.net.INetworkPolicyManager;
|
||||
import android.net.NetworkCapabilities;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
@@ -1368,7 +1369,7 @@ public class SubscriptionManager {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public static int getPhoneId(int subId) {
|
||||
if (!isValidSubscriptionId(subId)) {
|
||||
if (DBG) {
|
||||
@@ -1664,7 +1665,7 @@ public class SubscriptionManager {
|
||||
* usable subId means its neither a INVALID_SUBSCRIPTION_ID nor a DEFAULT_SUB_ID.
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public static boolean isUsableSubIdValue(int subId) {
|
||||
return subId >= MIN_SUBSCRIPTION_ID_VALUE && subId <= MAX_SUBSCRIPTION_ID_VALUE;
|
||||
}
|
||||
@@ -1682,7 +1683,7 @@ public class SubscriptionManager {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
|
||||
int[] subIds = SubscriptionManager.getSubId(phoneId);
|
||||
if (subIds != null && subIds.length > 0) {
|
||||
|
||||
@@ -41,6 +41,7 @@ import android.net.NetworkStats;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.BatteryStats;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.PersistableBundle;
|
||||
@@ -230,7 +231,8 @@ public class TelephonyManager {
|
||||
|
||||
/** @hide
|
||||
/* @deprecated - use getSystemService as described above */
|
||||
@UnsupportedAppUsage
|
||||
@Deprecated
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public static TelephonyManager getDefault() {
|
||||
return sInstance;
|
||||
}
|
||||
@@ -319,7 +321,7 @@ public class TelephonyManager {
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public static TelephonyManager from(Context context) {
|
||||
return (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
}
|
||||
@@ -1879,7 +1881,7 @@ public class TelephonyManager {
|
||||
* @param subId
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getNetworkOperatorName(int subId) {
|
||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||
return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ALPHA, "");
|
||||
@@ -1907,7 +1909,7 @@ public class TelephonyManager {
|
||||
* @param subId
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getNetworkOperator(int subId) {
|
||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||
return getNetworkOperatorForPhone(phoneId);
|
||||
@@ -2231,7 +2233,7 @@ public class TelephonyManager {
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public int getDataNetworkType(int subId) {
|
||||
try{
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -2267,7 +2269,7 @@ public class TelephonyManager {
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public int getVoiceNetworkType(int subId) {
|
||||
try{
|
||||
ITelephony telephony = getITelephony();
|
||||
@@ -2750,7 +2752,7 @@ public class TelephonyManager {
|
||||
* @param subId for which SimOperator is returned
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSimOperator(int subId) {
|
||||
return getSimOperatorNumeric(subId);
|
||||
}
|
||||
@@ -2764,7 +2766,7 @@ public class TelephonyManager {
|
||||
* @see #getSimState
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSimOperatorNumeric() {
|
||||
int subId = mSubId;
|
||||
if (!SubscriptionManager.isUsableSubIdValue(subId)) {
|
||||
@@ -2793,7 +2795,7 @@ public class TelephonyManager {
|
||||
* @param subId for which SimOperator is returned
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSimOperatorNumeric(int subId) {
|
||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||
return getSimOperatorNumericForPhone(phoneId);
|
||||
@@ -2807,7 +2809,7 @@ public class TelephonyManager {
|
||||
* @param phoneId for which SimOperator is returned
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSimOperatorNumericForPhone(int phoneId) {
|
||||
return getTelephonyProperty(phoneId,
|
||||
TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC, "");
|
||||
@@ -2834,7 +2836,7 @@ public class TelephonyManager {
|
||||
* @param subId for which SimOperatorName is returned
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSimOperatorName(int subId) {
|
||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||
return getSimOperatorNameForPhone(phoneId);
|
||||
@@ -2864,7 +2866,7 @@ public class TelephonyManager {
|
||||
* @param subId for which SimCountryIso is returned
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSimCountryIso(int subId) {
|
||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||
return getSimCountryIsoForPhone(phoneId);
|
||||
@@ -3054,7 +3056,7 @@ public class TelephonyManager {
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getSubscriberId(int subId) {
|
||||
try {
|
||||
IPhoneSubInfo info = getSubscriberInfo();
|
||||
@@ -3439,7 +3441,7 @@ public class TelephonyManager {
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public String getMsisdn(int subId) {
|
||||
try {
|
||||
IPhoneSubInfo info = getSubscriberInfo();
|
||||
@@ -4405,7 +4407,7 @@ public class TelephonyManager {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
private ITelephony getITelephony() {
|
||||
return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
|
||||
}
|
||||
@@ -7930,7 +7932,7 @@ public class TelephonyManager {
|
||||
* either READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE to retrieve the information.
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
|
||||
public ServiceState getServiceStateForSubscriber(int subId) {
|
||||
try {
|
||||
ITelephony service = getITelephony();
|
||||
|
||||
Reference in New Issue
Block a user