Merge "Address API council review comment about TetheringRequest" am: 0d8b1cfa6d

Change-Id: I7c674dcf0ed946b049784a02126cb2f6436bd4cb
This commit is contained in:
Junyu Lai
2020-03-23 09:58:02 +00:00
committed by Automerger Merge Worker
3 changed files with 39 additions and 32 deletions

View File

@@ -110,16 +110,16 @@ package android.net {
}
public static class TetheringManager.TetheringRequest {
}
public static class TetheringManager.TetheringRequest.Builder {
ctor public TetheringManager.TetheringRequest.Builder(int);
method @NonNull public android.net.TetheringManager.TetheringRequest build();
method @Nullable public android.net.LinkAddress getClientStaticIpv4Address();
method @Nullable public android.net.LinkAddress getLocalIpv4Address();
method public boolean getShouldShowEntitlementUi();
method public int getTetheringType();
method public boolean isExemptFromEntitlementCheck();
}
public static class TetheringManager.TetheringRequest.Builder {
ctor public TetheringManager.TetheringRequest.Builder(int);
method @NonNull public android.net.TetheringManager.TetheringRequest build();
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 @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setStaticIpv4Addresses(@NonNull android.net.LinkAddress, @NonNull android.net.LinkAddress);

View File

@@ -81,16 +81,16 @@ package android.net {
}
public static class TetheringManager.TetheringRequest {
}
public static class TetheringManager.TetheringRequest.Builder {
ctor public TetheringManager.TetheringRequest.Builder(int);
method @NonNull public android.net.TetheringManager.TetheringRequest build();
method @Nullable public android.net.LinkAddress getClientStaticIpv4Address();
method @Nullable public android.net.LinkAddress getLocalIpv4Address();
method public boolean getShouldShowEntitlementUi();
method public int getTetheringType();
method public boolean isExemptFromEntitlementCheck();
}
public static class TetheringManager.TetheringRequest.Builder {
ctor public TetheringManager.TetheringRequest.Builder(int);
method @NonNull public android.net.TetheringManager.TetheringRequest build();
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 @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setStaticIpv4Addresses(@NonNull android.net.LinkAddress, @NonNull android.net.LinkAddress);

View File

@@ -620,33 +620,40 @@ public class TetheringManager {
public TetheringRequest build() {
return new TetheringRequest(mBuilderParcel);
}
}
@Nullable
public LinkAddress getLocalIpv4Address() {
return mBuilderParcel.localIPv4Address;
}
/**
* Get the local IPv4 address, if one was configured with
* {@link Builder#setStaticIpv4Addresses}.
*/
@Nullable
public LinkAddress getLocalIpv4Address() {
return mRequestParcel.localIPv4Address;
}
/** Get static client address. */
@Nullable
public LinkAddress getClientStaticIpv4Address() {
return mBuilderParcel.staticClientAddress;
}
/**
* Get the static IPv4 address of the client, if one was configured with
* {@link Builder#setStaticIpv4Addresses}.
*/
@Nullable
public LinkAddress getClientStaticIpv4Address() {
return mRequestParcel.staticClientAddress;
}
/** Get tethering type. */
@TetheringType
public int getTetheringType() {
return mBuilderParcel.tetheringType;
}
/** Get tethering type. */
@TetheringType
public int getTetheringType() {
return mRequestParcel.tetheringType;
}
/** Check if exempt from entitlement check. */
public boolean isExemptFromEntitlementCheck() {
return mBuilderParcel.exemptFromEntitlementCheck;
}
/** Check if exempt from entitlement check. */
public boolean isExemptFromEntitlementCheck() {
return mRequestParcel.exemptFromEntitlementCheck;
}
/** Check if show entitlement ui. */
public boolean getShouldShowEntitlementUi() {
return mBuilderParcel.showProvisioningUi;
}
/** Check if show entitlement ui. */
public boolean getShouldShowEntitlementUi() {
return mRequestParcel.showProvisioningUi;
}
/**