diff --git a/Tethering/common/TetheringLib/api/module-lib-current.txt b/Tethering/common/TetheringLib/api/module-lib-current.txt index a6805908fc..e8938940c9 100644 --- a/Tethering/common/TetheringLib/api/module-lib-current.txt +++ b/Tethering/common/TetheringLib/api/module-lib-current.txt @@ -47,8 +47,8 @@ package android.net { } public static final class TetheringManager.TetheringRequest implements android.os.Parcelable { - method @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") @Nullable public String getPackageName(); - method @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") public int getUid(); + method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @Nullable public String getPackageName(); + method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public int getUid(); } } diff --git a/Tethering/common/TetheringLib/api/system-current.txt b/Tethering/common/TetheringLib/api/system-current.txt index 3efaac2089..1728e16aef 100644 --- a/Tethering/common/TetheringLib/api/system-current.txt +++ b/Tethering/common/TetheringLib/api/system-current.txt @@ -97,16 +97,16 @@ package android.net { } public static final class TetheringManager.TetheringRequest implements android.os.Parcelable { - method @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") public int describeContents(); + method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public int describeContents(); method @Nullable public android.net.LinkAddress getClientStaticIpv4Address(); method public int getConnectivityScope(); method @Nullable public android.net.LinkAddress getLocalIpv4Address(); method public boolean getShouldShowEntitlementUi(); - method @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") @Nullable public android.net.wifi.SoftApConfiguration getSoftApConfiguration(); + method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @Nullable public android.net.wifi.SoftApConfiguration getSoftApConfiguration(); method public int getTetheringType(); method public boolean isExemptFromEntitlementCheck(); - method @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") public void writeToParcel(@NonNull android.os.Parcel, int); - field @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") @NonNull public static final android.os.Parcelable.Creator CREATOR; + method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public void writeToParcel(@NonNull android.os.Parcel, int); + field @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @NonNull public static final android.os.Parcelable.Creator CREATOR; } public static class TetheringManager.TetheringRequest.Builder { @@ -115,7 +115,7 @@ package android.net { method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setConnectivityScope(int); method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setExemptFromEntitlementCheck(boolean); method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setShouldShowEntitlementUi(boolean); - method @FlaggedApi("com.android.net.flags.tethering_request_with_soft_ap_config") @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setSoftApConfiguration(@Nullable android.net.wifi.SoftApConfiguration); + method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setSoftApConfiguration(@Nullable android.net.wifi.SoftApConfiguration); method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setStaticIpv4Addresses(@NonNull android.net.LinkAddress, @NonNull android.net.LinkAddress); } diff --git a/Tethering/common/TetheringLib/src/android/net/TetheringManager.java b/Tethering/common/TetheringLib/src/android/net/TetheringManager.java index 7c7a4e0d68..6b963970ca 100644 --- a/Tethering/common/TetheringLib/src/android/net/TetheringManager.java +++ b/Tethering/common/TetheringLib/src/android/net/TetheringManager.java @@ -699,7 +699,7 @@ public class TetheringManager { /** * @hide */ - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) public TetheringRequest(@NonNull final TetheringRequestParcel request) { mRequestParcel = request; } @@ -708,7 +708,7 @@ public class TetheringManager { mRequestParcel = in.readParcelable(TetheringRequestParcel.class.getClassLoader()); } - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @NonNull public static final Creator CREATOR = new Creator<>() { @Override @@ -722,13 +722,13 @@ public class TetheringManager { } }; - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @Override public int describeContents() { return 0; } - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @Override public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeParcelable(mRequestParcel, flags); @@ -820,7 +820,7 @@ public class TetheringManager { * @param softApConfig SoftApConfiguration to use. * @throws IllegalArgumentException if the tethering type isn't TETHERING_WIFI. */ - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) @NonNull public Builder setSoftApConfiguration(@Nullable SoftApConfiguration softApConfig) { @@ -915,7 +915,7 @@ public class TetheringManager { /** * Get the desired SoftApConfiguration of the request, if one was specified. */ - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @Nullable public SoftApConfiguration getSoftApConfiguration() { return mRequestParcel.softApConfig; @@ -944,7 +944,7 @@ public class TetheringManager { * {@link Process#INVALID_UID} if unset. * @hide */ - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @SystemApi(client = MODULE_LIBRARIES) public int getUid() { return mRequestParcel.uid; @@ -955,7 +955,7 @@ public class TetheringManager { * unset. * @hide */ - @FlaggedApi(Flags.FLAG_TETHERING_REQUEST_WITH_SOFT_AP_CONFIG) + @FlaggedApi(Flags.FLAG_TETHERING_WITH_SOFT_AP_CONFIG) @SystemApi(client = MODULE_LIBRARIES) @Nullable public String getPackageName() { diff --git a/common/flags.aconfig b/common/flags.aconfig index 4c6d8ba2bd..3496a3f327 100644 --- a/common/flags.aconfig +++ b/common/flags.aconfig @@ -49,6 +49,15 @@ flag { is_fixed_read_only: true } +flag { + name: "tethering_with_soft_ap_config" + is_exported: true + namespace: "android_core_networking" + description: "The flag controls the access for the parcelable TetheringRequest with getSoftApConfiguration/setSoftApConfiguration API" + bug: "216524590" + is_fixed_read_only: true +} + flag { name: "request_restricted_wifi" is_exported: true