Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6246,6 +6246,7 @@ package android.net.wifi { method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveSoftApBackupData(); method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void save(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener); method @RequiresPermission(android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE) public void setDeviceMobilityState(int); method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String, boolean); method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean setSoftApConfiguration(@NonNull android.net.wifi.SoftApConfiguration); method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsConfiguratorInitiator(@NonNull String, int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback); Loading Loading @@ -6595,6 +6596,7 @@ package android.net.wifi.hotspot2 { public final class PasspointConfiguration implements android.os.Parcelable { method public boolean isAutoJoinEnabled(); method public boolean isMacRandomizationEnabled(); } public abstract class ProvisioningCallback { Loading wifi/java/android/net/wifi/IWifiManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,8 @@ interface IWifiManager void allowAutojoinPasspoint(String fqdn, boolean enableAutoJoin); void setMacRandomizationSettingPasspointEnabled(String fqdn, boolean enable); boolean startScan(String packageName, String featureId); List<ScanResult> getScanResults(String callingPackage, String callingFeatureId); Loading wifi/java/android/net/wifi/WifiManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -4242,6 +4242,24 @@ public class WifiManager { } } /** * Configure MAC randomization setting for a Passpoint profile. * MAC randomization is enabled by default. * * @param fqdn the FQDN (fully qualified domain name) of the passpoint profile. * @param enable true to enable MAC randomization, false to disable MAC randomization. * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String fqdn, boolean enable) { try { mService.setMacRandomizationSettingPasspointEnabled(fqdn, enable); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Disable an ephemeral network. * Loading wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java +38 −1 Original line number Diff line number Diff line Loading @@ -430,6 +430,13 @@ public final class PasspointConfiguration implements Parcelable { */ private boolean mIsAutoJoinEnabled = true; /** * The mac randomization setting specifies whether a randomized or device MAC address will * be used to connect to the passpoint network. If true, a randomized MAC will be used. * Otherwise, the device MAC address will be used. */ private boolean mIsMacRandomizationEnabled = true; /** * Configures the auto-association status of this Passpoint configuration. A value of true * indicates that the configuration will be considered for auto-connection, a value of false Loading @@ -443,6 +450,18 @@ public final class PasspointConfiguration implements Parcelable { mIsAutoJoinEnabled = autoJoinEnabled; } /** * Configures the MAC randomization setting for this Passpoint configuration. * If set to true, the framework will use a randomized MAC address to connect to this Passpoint * network. Otherwise, the framework will use the device MAC address. * * @param enabled true to use randomized MAC address, false to use device MAC address. * @hide */ public void setMacRandomizationEnabled(boolean enabled) { mIsMacRandomizationEnabled = enabled; } /** * Indicates whether the Passpoint configuration may be auto-connected to by the framework. A * value of true indicates that auto-connection can happen, a value of false indicates that it Loading @@ -458,6 +477,19 @@ public final class PasspointConfiguration implements Parcelable { return mIsAutoJoinEnabled; } /** * Indicates whether a randomized MAC address or device MAC address will be used for * connections to this Passpoint network. If true, a randomized MAC address will be used. * Otherwise, the device MAC address will be used. * * @return true for MAC randomization enabled. False for disabled. * @hide */ @SystemApi public boolean isMacRandomizationEnabled() { return mIsMacRandomizationEnabled; } /** * Constructor for creating PasspointConfiguration with default values. */ Loading Loading @@ -501,6 +533,7 @@ public final class PasspointConfiguration implements Parcelable { mAaaServerTrustedNames = source.mAaaServerTrustedNames; mCarrierId = source.mCarrierId; mIsAutoJoinEnabled = source.mIsAutoJoinEnabled; mIsMacRandomizationEnabled = source.mIsMacRandomizationEnabled; } @Override Loading Loading @@ -531,6 +564,7 @@ public final class PasspointConfiguration implements Parcelable { dest.writeBundle(bundle); dest.writeInt(mCarrierId); dest.writeBoolean(mIsAutoJoinEnabled); dest.writeBoolean(mIsMacRandomizationEnabled); } @Override Loading Loading @@ -562,6 +596,7 @@ public final class PasspointConfiguration implements Parcelable { && mUsageLimitTimeLimitInMinutes == that.mUsageLimitTimeLimitInMinutes && mCarrierId == that.mCarrierId && mIsAutoJoinEnabled == that.mIsAutoJoinEnabled && mIsMacRandomizationEnabled == that.mIsMacRandomizationEnabled && (mServiceFriendlyNames == null ? that.mServiceFriendlyNames == null : mServiceFriendlyNames.equals(that.mServiceFriendlyNames)); } Loading @@ -572,7 +607,7 @@ public final class PasspointConfiguration implements Parcelable { mUpdateIdentifier, mCredentialPriority, mSubscriptionCreationTimeInMillis, mSubscriptionExpirationTimeInMillis, mUsageLimitUsageTimePeriodInMinutes, mUsageLimitStartTimeInMillis, mUsageLimitDataLimit, mUsageLimitTimeLimitInMinutes, mServiceFriendlyNames, mCarrierId, mIsAutoJoinEnabled); mServiceFriendlyNames, mCarrierId, mIsAutoJoinEnabled, mIsMacRandomizationEnabled); } @Override Loading Loading @@ -627,6 +662,7 @@ public final class PasspointConfiguration implements Parcelable { } builder.append("CarrierId:" + mCarrierId); builder.append("IsAutoJoinEnabled:" + mIsAutoJoinEnabled); builder.append("mIsMacRandomizationEnabled:" + mIsMacRandomizationEnabled); return builder.toString(); } Loading Loading @@ -733,6 +769,7 @@ public final class PasspointConfiguration implements Parcelable { config.setServiceFriendlyNames(friendlyNamesMap); config.mCarrierId = in.readInt(); config.mIsAutoJoinEnabled = in.readBoolean(); config.mIsMacRandomizationEnabled = in.readBoolean(); return config; } Loading wifi/java/com/android/server/wifi/BaseWifiService.java +5 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,11 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override public void setMacRandomizationSettingPasspointEnabled(String fqdn, boolean enable) { throw new UnsupportedOperationException(); } @Override public boolean startScan(String packageName, String featureId) { throw new UnsupportedOperationException(); Loading Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6246,6 +6246,7 @@ package android.net.wifi { method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveSoftApBackupData(); method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void save(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener); method @RequiresPermission(android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE) public void setDeviceMobilityState(int); method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String, boolean); method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean setSoftApConfiguration(@NonNull android.net.wifi.SoftApConfiguration); method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsConfiguratorInitiator(@NonNull String, int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback); Loading Loading @@ -6595,6 +6596,7 @@ package android.net.wifi.hotspot2 { public final class PasspointConfiguration implements android.os.Parcelable { method public boolean isAutoJoinEnabled(); method public boolean isMacRandomizationEnabled(); } public abstract class ProvisioningCallback { Loading
wifi/java/android/net/wifi/IWifiManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,8 @@ interface IWifiManager void allowAutojoinPasspoint(String fqdn, boolean enableAutoJoin); void setMacRandomizationSettingPasspointEnabled(String fqdn, boolean enable); boolean startScan(String packageName, String featureId); List<ScanResult> getScanResults(String callingPackage, String callingFeatureId); Loading
wifi/java/android/net/wifi/WifiManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -4242,6 +4242,24 @@ public class WifiManager { } } /** * Configure MAC randomization setting for a Passpoint profile. * MAC randomization is enabled by default. * * @param fqdn the FQDN (fully qualified domain name) of the passpoint profile. * @param enable true to enable MAC randomization, false to disable MAC randomization. * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String fqdn, boolean enable) { try { mService.setMacRandomizationSettingPasspointEnabled(fqdn, enable); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Disable an ephemeral network. * Loading
wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java +38 −1 Original line number Diff line number Diff line Loading @@ -430,6 +430,13 @@ public final class PasspointConfiguration implements Parcelable { */ private boolean mIsAutoJoinEnabled = true; /** * The mac randomization setting specifies whether a randomized or device MAC address will * be used to connect to the passpoint network. If true, a randomized MAC will be used. * Otherwise, the device MAC address will be used. */ private boolean mIsMacRandomizationEnabled = true; /** * Configures the auto-association status of this Passpoint configuration. A value of true * indicates that the configuration will be considered for auto-connection, a value of false Loading @@ -443,6 +450,18 @@ public final class PasspointConfiguration implements Parcelable { mIsAutoJoinEnabled = autoJoinEnabled; } /** * Configures the MAC randomization setting for this Passpoint configuration. * If set to true, the framework will use a randomized MAC address to connect to this Passpoint * network. Otherwise, the framework will use the device MAC address. * * @param enabled true to use randomized MAC address, false to use device MAC address. * @hide */ public void setMacRandomizationEnabled(boolean enabled) { mIsMacRandomizationEnabled = enabled; } /** * Indicates whether the Passpoint configuration may be auto-connected to by the framework. A * value of true indicates that auto-connection can happen, a value of false indicates that it Loading @@ -458,6 +477,19 @@ public final class PasspointConfiguration implements Parcelable { return mIsAutoJoinEnabled; } /** * Indicates whether a randomized MAC address or device MAC address will be used for * connections to this Passpoint network. If true, a randomized MAC address will be used. * Otherwise, the device MAC address will be used. * * @return true for MAC randomization enabled. False for disabled. * @hide */ @SystemApi public boolean isMacRandomizationEnabled() { return mIsMacRandomizationEnabled; } /** * Constructor for creating PasspointConfiguration with default values. */ Loading Loading @@ -501,6 +533,7 @@ public final class PasspointConfiguration implements Parcelable { mAaaServerTrustedNames = source.mAaaServerTrustedNames; mCarrierId = source.mCarrierId; mIsAutoJoinEnabled = source.mIsAutoJoinEnabled; mIsMacRandomizationEnabled = source.mIsMacRandomizationEnabled; } @Override Loading Loading @@ -531,6 +564,7 @@ public final class PasspointConfiguration implements Parcelable { dest.writeBundle(bundle); dest.writeInt(mCarrierId); dest.writeBoolean(mIsAutoJoinEnabled); dest.writeBoolean(mIsMacRandomizationEnabled); } @Override Loading Loading @@ -562,6 +596,7 @@ public final class PasspointConfiguration implements Parcelable { && mUsageLimitTimeLimitInMinutes == that.mUsageLimitTimeLimitInMinutes && mCarrierId == that.mCarrierId && mIsAutoJoinEnabled == that.mIsAutoJoinEnabled && mIsMacRandomizationEnabled == that.mIsMacRandomizationEnabled && (mServiceFriendlyNames == null ? that.mServiceFriendlyNames == null : mServiceFriendlyNames.equals(that.mServiceFriendlyNames)); } Loading @@ -572,7 +607,7 @@ public final class PasspointConfiguration implements Parcelable { mUpdateIdentifier, mCredentialPriority, mSubscriptionCreationTimeInMillis, mSubscriptionExpirationTimeInMillis, mUsageLimitUsageTimePeriodInMinutes, mUsageLimitStartTimeInMillis, mUsageLimitDataLimit, mUsageLimitTimeLimitInMinutes, mServiceFriendlyNames, mCarrierId, mIsAutoJoinEnabled); mServiceFriendlyNames, mCarrierId, mIsAutoJoinEnabled, mIsMacRandomizationEnabled); } @Override Loading Loading @@ -627,6 +662,7 @@ public final class PasspointConfiguration implements Parcelable { } builder.append("CarrierId:" + mCarrierId); builder.append("IsAutoJoinEnabled:" + mIsAutoJoinEnabled); builder.append("mIsMacRandomizationEnabled:" + mIsMacRandomizationEnabled); return builder.toString(); } Loading Loading @@ -733,6 +769,7 @@ public final class PasspointConfiguration implements Parcelable { config.setServiceFriendlyNames(friendlyNamesMap); config.mCarrierId = in.readInt(); config.mIsAutoJoinEnabled = in.readBoolean(); config.mIsMacRandomizationEnabled = in.readBoolean(); return config; } Loading
wifi/java/com/android/server/wifi/BaseWifiService.java +5 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,11 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override public void setMacRandomizationSettingPasspointEnabled(String fqdn, boolean enable) { throw new UnsupportedOperationException(); } @Override public boolean startScan(String packageName, String featureId) { throw new UnsupportedOperationException(); Loading