Merge "Make PreciseDataConnectionState constructor System API"

This commit is contained in:
Treehugger Robot
2020-01-16 12:38:38 +00:00
committed by Gerrit Code Review
3 changed files with 8 additions and 5 deletions

View File

@@ -8878,6 +8878,7 @@ package android.telephony {
} }
public final class PreciseDataConnectionState implements android.os.Parcelable { public final class PreciseDataConnectionState implements android.os.Parcelable {
ctor public PreciseDataConnectionState(int, int, int, @NonNull String, @Nullable android.net.LinkProperties, int, @Nullable android.telephony.data.ApnSetting);
method @Deprecated @NonNull public String getDataConnectionApn(); method @Deprecated @NonNull public String getDataConnectionApn();
method @Deprecated public int getDataConnectionApnTypeBitMask(); method @Deprecated public int getDataConnectionApnTypeBitMask();
method @Deprecated public int getDataConnectionFailCause(); method @Deprecated public int getDataConnectionFailCause();

View File

@@ -1596,7 +1596,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
TelephonyManager.DATA_UNKNOWN, TelephonyManager.DATA_UNKNOWN,
TelephonyManager.NETWORK_TYPE_UNKNOWN, TelephonyManager.NETWORK_TYPE_UNKNOWN,
ApnSetting.getApnTypesBitmaskFromString(apnType), null, null, ApnSetting.getApnTypesBitmaskFromString(apnType), null, null,
DataFailCause.NONE)); DataFailCause.NONE, null));
for (Record r : mRecords) { for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent( if (r.matchPhoneStateListenerEvent(
PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE) PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE)
@@ -1781,7 +1781,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
TelephonyManager.DATA_UNKNOWN, TelephonyManager.DATA_UNKNOWN,
TelephonyManager.NETWORK_TYPE_UNKNOWN, TelephonyManager.NETWORK_TYPE_UNKNOWN,
ApnSetting.getApnTypesBitmaskFromString(apnType), null, null, ApnSetting.getApnTypesBitmaskFromString(apnType), null, null,
failCause)); failCause, null));
for (Record r : mRecords) { for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent( if (r.matchPhoneStateListenerEvent(
PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE) PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE)

View File

@@ -81,18 +81,20 @@ public final class PreciseDataConnectionState implements Parcelable {
/** /**
* Constructor * Constructor of PreciseDataConnectionState
* *
* @param state the state of the data connection * @param state the state of the data connection
* @param networkType the access network that is/would carry this data connection * @param networkType the access network that is/would carry this data connection
* @param apnTypes the APN types that this data connection carries * @param apnTypes the APN types that this data connection carries
* @param apnSetting if there is a valid APN for this Data Connection, then the APN Settings; * @param apn the APN of this data connection
* if there is no valid APN setting for the specific type, then this will be null
* @param linkProperties if the data connection is connected, the properties of the connection * @param linkProperties if the data connection is connected, the properties of the connection
* @param failCause in case a procedure related to this data connection fails, a non-zero error * @param failCause in case a procedure related to this data connection fails, a non-zero error
* code indicating the cause of the failure. * code indicating the cause of the failure.
* @param apnSetting if there is a valid APN for this Data Connection, then the APN Settings;
* if there is no valid APN setting for the specific type, then this will be null
* @hide * @hide
*/ */
@SystemApi
public PreciseDataConnectionState(@DataState int state, public PreciseDataConnectionState(@DataState int state,
@NetworkType int networkType, @NetworkType int networkType,
@ApnType int apnTypes, @NonNull String apn, @ApnType int apnTypes, @NonNull String apn,