Merge "API Council Feedbacks"
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
package android.os;
|
package android.os;
|
||||||
|
|
||||||
import android.annotation.RequiresPermission;
|
import android.annotation.RequiresPermission;
|
||||||
|
import android.annotation.SdkConstant;
|
||||||
|
import android.annotation.SdkConstant.SdkConstantType;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -125,6 +127,7 @@ public final class ConfigUpdate {
|
|||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@RequiresPermission(android.Manifest.permission.UPDATE_CONFIG)
|
@RequiresPermission(android.Manifest.permission.UPDATE_CONFIG)
|
||||||
|
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||||
public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB =
|
public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB =
|
||||||
"android.os.action.UPDATE_EMERGENCY_NUMBER_DB";
|
"android.os.action.UPDATE_EMERGENCY_NUMBER_DB";
|
||||||
|
|
||||||
|
|||||||
@@ -571,6 +571,19 @@ public class Annotation {
|
|||||||
public @interface PreciseDisconnectCauses {
|
public @interface PreciseDisconnectCauses {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Carrier Privilege Status.
|
||||||
|
*/
|
||||||
|
@IntDef(prefix = { "CARRIER_PRIVILEGE_STATUS_" }, value = {
|
||||||
|
TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS,
|
||||||
|
TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS,
|
||||||
|
TelephonyManager.CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED,
|
||||||
|
TelephonyManager.CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES,
|
||||||
|
})
|
||||||
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
|
public @interface CarrierPrivilegeStatus {
|
||||||
|
}
|
||||||
|
|
||||||
@IntDef({
|
@IntDef({
|
||||||
Connection.AUDIO_CODEC_NONE,
|
Connection.AUDIO_CODEC_NONE,
|
||||||
Connection.AUDIO_CODEC_AMR,
|
Connection.AUDIO_CODEC_AMR,
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ import android.telephony.Annotation.ApnType;
|
|||||||
import android.telephony.Annotation.CallForwardingReason;
|
import android.telephony.Annotation.CallForwardingReason;
|
||||||
import android.telephony.Annotation.CallState;
|
import android.telephony.Annotation.CallState;
|
||||||
import android.telephony.Annotation.CallWaitingStatus;
|
import android.telephony.Annotation.CallWaitingStatus;
|
||||||
|
import android.telephony.Annotation.CarrierPrivilegeStatus;
|
||||||
import android.telephony.Annotation.NetworkType;
|
import android.telephony.Annotation.NetworkType;
|
||||||
import android.telephony.Annotation.RadioPowerState;
|
import android.telephony.Annotation.RadioPowerState;
|
||||||
import android.telephony.Annotation.SimActivationState;
|
import android.telephony.Annotation.SimActivationState;
|
||||||
@@ -11115,8 +11116,6 @@ public class TelephonyManager {
|
|||||||
retVal = telephony.isDataEnabled(subId);
|
retVal = telephony.isDataEnabled(subId);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Error isDataConnectionAllowed", e);
|
Log.e(TAG, "Error isDataConnectionAllowed", e);
|
||||||
} catch (NullPointerException e) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
@@ -12351,7 +12350,7 @@ public class TelephonyManager {
|
|||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
|
||||||
public int getCarrierPrivilegeStatus(int uid) {
|
public @CarrierPrivilegeStatus int getCarrierPrivilegeStatus(int uid) {
|
||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user