Merge "Rename APIs in NetworkAgentConfig.Builder" am: f212a922e9 am: 3786083176
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669047 Change-Id: Ia16a26e64e65687faf6303c392c4a85de52129e3
This commit is contained in:
@@ -259,15 +259,15 @@ package android.net {
|
|||||||
public static final class NetworkAgentConfig.Builder {
|
public static final class NetworkAgentConfig.Builder {
|
||||||
ctor public NetworkAgentConfig.Builder();
|
ctor public NetworkAgentConfig.Builder();
|
||||||
method @NonNull public android.net.NetworkAgentConfig build();
|
method @NonNull public android.net.NetworkAgentConfig build();
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder disableNat64Detection();
|
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder disableProvisioningNotification();
|
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setExplicitlySelected(boolean);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setExplicitlySelected(boolean);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyExtraInfo(@NonNull String);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyExtraInfo(@NonNull String);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacySubType(int);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacySubType(int);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacySubTypeName(@NonNull String);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacySubTypeName(@NonNull String);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyType(int);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyType(int);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyTypeName(@NonNull String);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyTypeName(@NonNull String);
|
||||||
|
method @NonNull public android.net.NetworkAgentConfig.Builder setNat64DetectionEnabled(boolean);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setPartialConnectivityAcceptable(boolean);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setPartialConnectivityAcceptable(boolean);
|
||||||
|
method @NonNull public android.net.NetworkAgentConfig.Builder setProvisioningNotificationEnabled(boolean);
|
||||||
method @NonNull public android.net.NetworkAgentConfig.Builder setUnvalidatedConnectivityAcceptable(boolean);
|
method @NonNull public android.net.NetworkAgentConfig.Builder setUnvalidatedConnectivityAcceptable(boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -311,26 +311,28 @@ public final class NetworkAgentConfig implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables active detection of NAT64 (e.g., via RFC 7050 DNS lookups). Used to save power
|
* Enables or disables active detection of NAT64 (e.g., via RFC 7050 DNS lookups). Used to
|
||||||
* and reduce idle traffic on networks that are known to be IPv6-only without a NAT64.
|
* save power and reduce idle traffic on networks that are known to be IPv6-only without a
|
||||||
|
* NAT64. By default, NAT64 detection is enabled.
|
||||||
*
|
*
|
||||||
* @return this builder, to facilitate chaining.
|
* @return this builder, to facilitate chaining.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public Builder disableNat64Detection() {
|
public Builder setNat64DetectionEnabled(boolean enabled) {
|
||||||
mConfig.skip464xlat = true;
|
mConfig.skip464xlat = !enabled;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables the "Sign in to network" notification. Used if the network transport will
|
* Enables or disables the "Sign in to network" notification. Used if the network transport
|
||||||
* perform its own carrier-specific provisioning procedure.
|
* will perform its own carrier-specific provisioning procedure. By default, the
|
||||||
|
* notification is enabled.
|
||||||
*
|
*
|
||||||
* @return this builder, to facilitate chaining.
|
* @return this builder, to facilitate chaining.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public Builder disableProvisioningNotification() {
|
public Builder setProvisioningNotificationEnabled(boolean enabled) {
|
||||||
mConfig.provisioningNotificationDisabled = true;
|
mConfig.provisioningNotificationDisabled = !enabled;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user