Disable Mac randomization setting for Passpoint networks
Mac randomization setting should be greyed out in the network details page for Passpoint networks. Bug: 129279500 Test: atest WifiPrivacyPreferenceControllerTest Change-Id: I4fc89ddbca839c4859f11f8fad212b3e0e4aa7ce
This commit is contained in:
@@ -41,6 +41,7 @@ public class WifiPrivacyPreferenceController extends BasePreferenceController im
|
||||
private WifiConfiguration mWifiConfiguration;
|
||||
private WifiManager mWifiManager;
|
||||
private boolean mIsEphemeral = false;
|
||||
private boolean mIsPasspoint = false;
|
||||
|
||||
public WifiPrivacyPreferenceController(Context context) {
|
||||
super(context, KEY_WIFI_PRIVACY);
|
||||
@@ -56,6 +57,10 @@ public class WifiPrivacyPreferenceController extends BasePreferenceController im
|
||||
mIsEphemeral = isEphemeral;
|
||||
}
|
||||
|
||||
public void setIsPasspoint(boolean isPasspoint) {
|
||||
mIsPasspoint = isPasspoint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getResources().getBoolean(
|
||||
@@ -71,7 +76,7 @@ public class WifiPrivacyPreferenceController extends BasePreferenceController im
|
||||
updateSummary(dropDownPreference, randomizationLevel);
|
||||
|
||||
// Makes preference not selectable, when this is a ephemeral network.
|
||||
if (mIsEphemeral) {
|
||||
if (mIsEphemeral || mIsPasspoint) {
|
||||
preference.setSelectable(false);
|
||||
dropDownPreference.setSummary(R.string.wifi_privacy_settings_ephemeral_summary);
|
||||
}
|
||||
|
Reference in New Issue
Block a user