Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -41759,8 +41759,10 @@ package android.telephony { field public static final int DATA_DISCONNECTED = 0; // 0x0 field public static final int DATA_DISCONNECTING = 4; // 0x4 field public static final int DATA_ENABLED_REASON_CARRIER = 2; // 0x2 field public static final int DATA_ENABLED_REASON_OVERRIDE = 4; // 0x4 field public static final int DATA_ENABLED_REASON_POLICY = 1; // 0x1 field public static final int DATA_ENABLED_REASON_THERMAL = 3; // 0x3 field public static final int DATA_ENABLED_REASON_UNKNOWN = -1; // 0xffffffff field public static final int DATA_ENABLED_REASON_USER = 0; // 0x0 field public static final int DATA_HANDOVER_IN_PROGRESS = 5; // 0x5 field public static final int DATA_SUSPENDED = 3; // 0x3 core/java/android/telephony/TelephonyCallback.java +3 −2 Original line number Diff line number Diff line Loading @@ -1409,10 +1409,11 @@ public class TelephonyCallback { * * @param enabled {@code true} if data is enabled, otherwise disabled. * @param reason Reason for data enabled/disabled. * See {@link TelephonyManager.DataEnabledReason}. * See {@link TelephonyManager.DataEnabledChangedReason}. */ @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) void onDataEnabledChanged(boolean enabled, @TelephonyManager.DataEnabledReason int reason); void onDataEnabledChanged(boolean enabled, @TelephonyManager.DataEnabledChangedReason int reason); } /** Loading telephony/java/android/telephony/TelephonyManager.java +26 −0 Original line number Diff line number Diff line Loading @@ -12542,6 +12542,25 @@ public class TelephonyManager { @Retention(RetentionPolicy.SOURCE) public @interface DataEnabledReason{} /** @hide */ @IntDef({ DATA_ENABLED_REASON_UNKNOWN, DATA_ENABLED_REASON_USER, DATA_ENABLED_REASON_POLICY, DATA_ENABLED_REASON_CARRIER, DATA_ENABLED_REASON_THERMAL, DATA_ENABLED_REASON_OVERRIDE }) @Retention(RetentionPolicy.SOURCE) public @interface DataEnabledChangedReason{} /** * To indicate that data was enabled or disabled due to an unknown reason. * Note that this is not a valid reason for {@link #setDataEnabledForReason(int, boolean)} and * is only used to indicate that data enabled was changed. */ public static final int DATA_ENABLED_REASON_UNKNOWN = -1; /** * To indicate that user enabled or disabled data. */ Loading @@ -12568,6 +12587,13 @@ public class TelephonyManager { */ public static final int DATA_ENABLED_REASON_THERMAL = 3; /** * To indicate data was enabled or disabled due to {@link MobileDataPolicy} overrides. * Note that this is not a valid reason for {@link #setDataEnabledForReason(int, boolean)} and * is only used to indicate that data enabled was changed due to an override. */ public static final int DATA_ENABLED_REASON_OVERRIDE = 4; /** * Control of data connection and provide the reason triggering the data connection control. * This can be called for following reasons Loading Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -41759,8 +41759,10 @@ package android.telephony { field public static final int DATA_DISCONNECTED = 0; // 0x0 field public static final int DATA_DISCONNECTING = 4; // 0x4 field public static final int DATA_ENABLED_REASON_CARRIER = 2; // 0x2 field public static final int DATA_ENABLED_REASON_OVERRIDE = 4; // 0x4 field public static final int DATA_ENABLED_REASON_POLICY = 1; // 0x1 field public static final int DATA_ENABLED_REASON_THERMAL = 3; // 0x3 field public static final int DATA_ENABLED_REASON_UNKNOWN = -1; // 0xffffffff field public static final int DATA_ENABLED_REASON_USER = 0; // 0x0 field public static final int DATA_HANDOVER_IN_PROGRESS = 5; // 0x5 field public static final int DATA_SUSPENDED = 3; // 0x3
core/java/android/telephony/TelephonyCallback.java +3 −2 Original line number Diff line number Diff line Loading @@ -1409,10 +1409,11 @@ public class TelephonyCallback { * * @param enabled {@code true} if data is enabled, otherwise disabled. * @param reason Reason for data enabled/disabled. * See {@link TelephonyManager.DataEnabledReason}. * See {@link TelephonyManager.DataEnabledChangedReason}. */ @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) void onDataEnabledChanged(boolean enabled, @TelephonyManager.DataEnabledReason int reason); void onDataEnabledChanged(boolean enabled, @TelephonyManager.DataEnabledChangedReason int reason); } /** Loading
telephony/java/android/telephony/TelephonyManager.java +26 −0 Original line number Diff line number Diff line Loading @@ -12542,6 +12542,25 @@ public class TelephonyManager { @Retention(RetentionPolicy.SOURCE) public @interface DataEnabledReason{} /** @hide */ @IntDef({ DATA_ENABLED_REASON_UNKNOWN, DATA_ENABLED_REASON_USER, DATA_ENABLED_REASON_POLICY, DATA_ENABLED_REASON_CARRIER, DATA_ENABLED_REASON_THERMAL, DATA_ENABLED_REASON_OVERRIDE }) @Retention(RetentionPolicy.SOURCE) public @interface DataEnabledChangedReason{} /** * To indicate that data was enabled or disabled due to an unknown reason. * Note that this is not a valid reason for {@link #setDataEnabledForReason(int, boolean)} and * is only used to indicate that data enabled was changed. */ public static final int DATA_ENABLED_REASON_UNKNOWN = -1; /** * To indicate that user enabled or disabled data. */ Loading @@ -12568,6 +12587,13 @@ public class TelephonyManager { */ public static final int DATA_ENABLED_REASON_THERMAL = 3; /** * To indicate data was enabled or disabled due to {@link MobileDataPolicy} overrides. * Note that this is not a valid reason for {@link #setDataEnabledForReason(int, boolean)} and * is only used to indicate that data enabled was changed due to an override. */ public static final int DATA_ENABLED_REASON_OVERRIDE = 4; /** * Control of data connection and provide the reason triggering the data connection control. * This can be called for following reasons Loading