Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35c3b460 authored by Shuo Qian's avatar Shuo Qian Committed by Meng Wang
Browse files

Make PreciseDataConnectionState constructor System API

TelephonyRegistry is using the deprecated constructor of
 PreciseDataConnectionState; it should use the other constructor of
PreciseDataConnectionState, which is not deprecated; Also need to make
that constructor System API for Mainline.

Test: make update-api (no functional change in this CL).
Test: atest FrameworksTelephonyTests

Bug: 146793835
Merged-In: I83f98aa8b818f654d497867cd16e8afa987114fc
Change-Id: I83f98aa8b818f654d497867cd16e8afa987114fc
parent ab9527a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8804,6 +8804,7 @@ package android.telephony {
  }
  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 public int getDataConnectionApnTypeBitMask();
    method @Deprecated public int getDataConnectionFailCause();
+2 −2
Original line number Diff line number Diff line
@@ -1593,7 +1593,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                                TelephonyManager.DATA_UNKNOWN,
                                TelephonyManager.NETWORK_TYPE_UNKNOWN,
                                ApnSetting.getApnTypesBitmaskFromString(apnType), null, null,
                                DataFailCause.NONE));
                                DataFailCause.NONE, null));
                for (Record r : mRecords) {
                    if (r.matchPhoneStateListenerEvent(
                            PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE)
@@ -1778,7 +1778,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                                TelephonyManager.DATA_UNKNOWN,
                                TelephonyManager.NETWORK_TYPE_UNKNOWN,
                                ApnSetting.getApnTypesBitmaskFromString(apnType), null, null,
                                failCause));
                                failCause, null));
                for (Record r : mRecords) {
                    if (r.matchPhoneStateListenerEvent(
                            PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE)
+5 −3
Original line number Diff line number Diff line
@@ -81,18 +81,20 @@ public final class PreciseDataConnectionState implements Parcelable {


    /**
     * Constructor
     * Constructor of PreciseDataConnectionState
     *
     * @param state the state of the 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 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
     * @param apn the APN of this data 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
     *        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
     */
    @SystemApi
    public PreciseDataConnectionState(@DataState int state,
                                      @NetworkType int networkType,
                                      @ApnType int apnTypes, @NonNull String apn,