API Council Feedbacks
1) Add Annotation for getCarrirPrivilegeStatus 2) Remove NullProinterException throwing in isDataConnectionAllowed 3) Add SdkConstant for ACTION_UPDATE_EMRGENCY_NUMBER_DB Test: Treehugger Bug: 148218347 Bug: 151455822 Change-Id: I4943491abf70641f9379862a67941295a4cf67f9
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,
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ import android.telecom.PhoneAccountHandle;
|
|||||||
import android.telecom.TelecomManager;
|
import android.telecom.TelecomManager;
|
||||||
import android.telephony.Annotation.ApnType;
|
import android.telephony.Annotation.ApnType;
|
||||||
import android.telephony.Annotation.CallState;
|
import android.telephony.Annotation.CallState;
|
||||||
|
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;
|
||||||
@@ -11162,8 +11163,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;
|
||||||
}
|
}
|
||||||
@@ -12450,7 +12449,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