summaryrefslogtreecommitdiff
path: root/Tethering/common/TetheringLib/src/android/net/TetheringManager.java
diff options
context:
space:
mode:
authorjunyulai <junyulai@google.com>2020-03-23 10:47:42 +0800
committerjunyulai <junyulai@google.com>2020-03-23 14:14:22 +0800
commita8b377747b8066594345402dd4e4750a5541acc9 (patch)
treeafcc7e6300ecc606fe1a5b0c367139521b6731a0 /Tethering/common/TetheringLib/src/android/net/TetheringManager.java
parent1cd0dcc4a900e7c4cc3f9b112d25726488380735 (diff)
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
Diffstat (limited to 'Tethering/common/TetheringLib/src/android/net/TetheringManager.java')
-rw-r--r--Tethering/common/TetheringLib/src/android/net/TetheringManager.java51
1 files changed, 29 insertions, 22 deletions
diff --git a/Tethering/common/TetheringLib/src/android/net/TetheringManager.java b/Tethering/common/TetheringLib/src/android/net/TetheringManager.java
index cd54c6f14c..b70165ab74 100644
--- a/Tethering/common/TetheringLib/src/android/net/TetheringManager.java
+++ b/Tethering/common/TetheringLib/src/android/net/TetheringManager.java
@@ -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;
}
/**