Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests Bug: 152055812 Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8 Merged-In: I0158d88e364772f9ac258bd18955edcdad266ad8 (this is a clean cherry-pick from ag/10796412) Change-Id: I64f1527d79085cc5dfd78c01a6c49c4df87c82e7
This commit is contained in:
@@ -110,16 +110,16 @@ package android.net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class TetheringManager.TetheringRequest {
|
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 getClientStaticIpv4Address();
|
||||||
method @Nullable public android.net.LinkAddress getLocalIpv4Address();
|
method @Nullable public android.net.LinkAddress getLocalIpv4Address();
|
||||||
method public boolean getShouldShowEntitlementUi();
|
method public boolean getShouldShowEntitlementUi();
|
||||||
method public int getTetheringType();
|
method public int getTetheringType();
|
||||||
method public boolean isExemptFromEntitlementCheck();
|
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 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 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);
|
method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setStaticIpv4Addresses(@NonNull android.net.LinkAddress, @NonNull android.net.LinkAddress);
|
||||||
|
|||||||
@@ -81,16 +81,16 @@ package android.net {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class TetheringManager.TetheringRequest {
|
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 getClientStaticIpv4Address();
|
||||||
method @Nullable public android.net.LinkAddress getLocalIpv4Address();
|
method @Nullable public android.net.LinkAddress getLocalIpv4Address();
|
||||||
method public boolean getShouldShowEntitlementUi();
|
method public boolean getShouldShowEntitlementUi();
|
||||||
method public int getTetheringType();
|
method public int getTetheringType();
|
||||||
method public boolean isExemptFromEntitlementCheck();
|
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 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 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);
|
method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setStaticIpv4Addresses(@NonNull android.net.LinkAddress, @NonNull android.net.LinkAddress);
|
||||||
|
|||||||
@@ -620,33 +620,40 @@ public class TetheringManager {
|
|||||||
public TetheringRequest build() {
|
public TetheringRequest build() {
|
||||||
return new TetheringRequest(mBuilderParcel);
|
return new TetheringRequest(mBuilderParcel);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
/**
|
||||||
public LinkAddress getLocalIpv4Address() {
|
* Get the local IPv4 address, if one was configured with
|
||||||
return mBuilderParcel.localIPv4Address;
|
* {@link Builder#setStaticIpv4Addresses}.
|
||||||
}
|
*/
|
||||||
|
@Nullable
|
||||||
|
public LinkAddress getLocalIpv4Address() {
|
||||||
|
return mRequestParcel.localIPv4Address;
|
||||||
|
}
|
||||||
|
|
||||||
/** Get static client address. */
|
/**
|
||||||
@Nullable
|
* Get the static IPv4 address of the client, if one was configured with
|
||||||
public LinkAddress getClientStaticIpv4Address() {
|
* {@link Builder#setStaticIpv4Addresses}.
|
||||||
return mBuilderParcel.staticClientAddress;
|
*/
|
||||||
}
|
@Nullable
|
||||||
|
public LinkAddress getClientStaticIpv4Address() {
|
||||||
|
return mRequestParcel.staticClientAddress;
|
||||||
|
}
|
||||||
|
|
||||||
/** Get tethering type. */
|
/** Get tethering type. */
|
||||||
@TetheringType
|
@TetheringType
|
||||||
public int getTetheringType() {
|
public int getTetheringType() {
|
||||||
return mBuilderParcel.tetheringType;
|
return mRequestParcel.tetheringType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check if exempt from entitlement check. */
|
/** Check if exempt from entitlement check. */
|
||||||
public boolean isExemptFromEntitlementCheck() {
|
public boolean isExemptFromEntitlementCheck() {
|
||||||
return mBuilderParcel.exemptFromEntitlementCheck;
|
return mRequestParcel.exemptFromEntitlementCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Check if show entitlement ui. */
|
/** Check if show entitlement ui. */
|
||||||
public boolean getShouldShowEntitlementUi() {
|
public boolean getShouldShowEntitlementUi() {
|
||||||
return mBuilderParcel.showProvisioningUi;
|
return mRequestParcel.showProvisioningUi;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user