PreferentialNetworkServiceConfig.Builder


public static final class PreferentialNetworkServiceConfig.Builder
extends Object

java.lang.Object
   ↳ android.app.admin.PreferentialNetworkServiceConfig.Builder


Builder used to create PreferentialNetworkServiceConfig objects. Specify the preferred Network preference

Summary

Public constructors

Builder()

Constructs an empty Builder with preferential network disabled by default.

Public methods

PreferentialNetworkServiceConfig build()

Returns an instance of PreferentialNetworkServiceConfig created from the fields set on this builder.

PreferentialNetworkServiceConfig.Builder setEnabled(boolean isEnabled)

Set the preferential network service enabled state.

PreferentialNetworkServiceConfig.Builder setExcludedUids(int[] uids)

Set the array of uids who are not allowed through this preferential network service.

PreferentialNetworkServiceConfig.Builder setFallbackToDefaultConnectionAllowed(boolean allowFallbackToDefaultConnection)

Set whether fallback to the device-wide default network is allowed.

PreferentialNetworkServiceConfig.Builder setIncludedUids(int[] uids)

Set the array of uids whose network access will go through this preferential network service.

PreferentialNetworkServiceConfig.Builder setNetworkId(int preferenceId)

Set the preferential network identifier.

PreferentialNetworkServiceConfig.Builder setShouldBlockNonMatchingNetworks(boolean blockNonMatchingNetworks)

Set whether to block UIDs from using other networks than the preferential service.

Inherited methods