Remove feature flags of WiFi Sharing feature
Bug: 120744414 Test: Manual Change-Id: I655ebb8d149d0976063845478bc667cc4d72d96d
This commit is contained in:
@@ -26,7 +26,6 @@ public class FeatureFlags {
|
||||
public static final String MOBILE_NETWORK_V2 = "settings_mobile_network_v2";
|
||||
public static final String WIFI_MAC_RANDOMIZATION = "settings_wifi_mac_randomization";
|
||||
public static final String NETWORK_INTERNET_V2 = "settings_network_and_internet_v2";
|
||||
public static final String WIFI_SHARING = "settings_wifi_sharing";
|
||||
public static final String SLICE_INJECTION = "settings_slice_injection";
|
||||
public static final String MAINLINE_MODULE = "settings_mainline_module";
|
||||
}
|
||||
|
@@ -66,16 +66,14 @@ public class AddNetworkFragment extends InstrumentedFragment implements WifiConf
|
||||
mCancelBtn.setOnClickListener(this);
|
||||
mUIController = new WifiConfigController(this, rootView, null, getMode());
|
||||
|
||||
if (WifiDppUtils.isSharingNetworkEnabled(getContext())) {
|
||||
final ImageButton scannerButton = rootView.findViewById(R.id.ssid_scanner_button);
|
||||
if (scannerButton != null) {
|
||||
scannerButton.setVisibility(View.VISIBLE);
|
||||
scannerButton.setOnClickListener((View v) -> {
|
||||
// Launch QR code scanner to join a network.
|
||||
getContext().startActivity(
|
||||
WifiDppUtils.getEnrolleeQrCodeScannerIntent(/* ssid */ null));
|
||||
});
|
||||
}
|
||||
final ImageButton scannerButton = rootView.findViewById(R.id.ssid_scanner_button);
|
||||
if (scannerButton != null) {
|
||||
scannerButton.setVisibility(View.VISIBLE);
|
||||
scannerButton.setOnClickListener((View v) -> {
|
||||
// Launch QR code scanner to join a network.
|
||||
getContext().startActivity(
|
||||
WifiDppUtils.getEnrolleeQrCodeScannerIntent(/* ssid */ null));
|
||||
});
|
||||
}
|
||||
|
||||
return rootView;
|
||||
|
@@ -80,20 +80,18 @@ public class WifiDialog extends AlertDialog implements WifiConfigUiBase,
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
mView = getLayoutInflater().inflate(R.layout.wifi_dialog, /* root */ null);
|
||||
if (WifiDppUtils.isSharingNetworkEnabled(getContext())) {
|
||||
final ImageButton scannerButton = mView.findViewById(R.id.password_scanner_button);
|
||||
if (scannerButton != null) {
|
||||
scannerButton.setVisibility(View.VISIBLE);
|
||||
scannerButton.setOnClickListener((View v) -> {
|
||||
String ssid = null;
|
||||
if (mAccessPoint != null) {
|
||||
ssid = mAccessPoint.getSsidStr();
|
||||
}
|
||||
// Launch QR code scanner to join a network.
|
||||
getContext().startActivity(
|
||||
WifiDppUtils.getEnrolleeQrCodeScannerIntent(ssid));
|
||||
});
|
||||
}
|
||||
final ImageButton scannerButton = mView.findViewById(R.id.password_scanner_button);
|
||||
if (scannerButton != null) {
|
||||
scannerButton.setVisibility(View.VISIBLE);
|
||||
scannerButton.setOnClickListener((View v) -> {
|
||||
String ssid = null;
|
||||
if (mAccessPoint != null) {
|
||||
ssid = mAccessPoint.getSsidStr();
|
||||
}
|
||||
// Launch QR code scanner to join a network.
|
||||
getContext().startActivity(
|
||||
WifiDppUtils.getEnrolleeQrCodeScannerIntent(ssid));
|
||||
});
|
||||
}
|
||||
setView(mView);
|
||||
mController = new WifiConfigController(this, mView, mAccessPoint, mMode);
|
||||
|
@@ -239,14 +239,12 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
mAddPreference = new ButtonPreference(prefContext);
|
||||
mAddPreference.setIcon(R.drawable.ic_menu_add);
|
||||
mAddPreference.setTitle(R.string.wifi_add_network);
|
||||
if (WifiDppUtils.isSharingNetworkEnabled(getContext())) {
|
||||
mAddPreference.setButtonIcon(R.drawable.ic_scan_24dp);
|
||||
mAddPreference.setButtonOnClickListener((View v) -> {
|
||||
// Launch QR code scanner to join a network.
|
||||
getContext().startActivity(
|
||||
WifiDppUtils.getEnrolleeQrCodeScannerIntent(/* ssid */ null));
|
||||
});
|
||||
}
|
||||
mAddPreference.setButtonIcon(R.drawable.ic_scan_24dp);
|
||||
mAddPreference.setButtonOnClickListener((View v) -> {
|
||||
// Launch QR code scanner to join a network.
|
||||
getContext().startActivity(
|
||||
WifiDppUtils.getEnrolleeQrCodeScannerIntent(/* ssid */ null));
|
||||
});
|
||||
mStatusMessagePreference = (LinkablePreference) findPreference(PREF_KEY_STATUS_MESSAGE);
|
||||
|
||||
mUserBadgeCache = new AccessPointPreference.UserBadgeCache(getPackageManager());
|
||||
|
@@ -534,8 +534,7 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
|
||||
* Returns whether the user can share the network represented by this preference with QR code.
|
||||
*/
|
||||
private boolean canShareNetwork() {
|
||||
return mAccessPoint.getConfig() != null && FeatureFlagUtils.isEnabled(mContext,
|
||||
FeatureFlags.WIFI_SHARING);
|
||||
return mAccessPoint.getConfig() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -74,14 +74,6 @@ public class WifiDppUtils {
|
||||
* indicate test mode UI should be shown. Test UI does not make API calls. Value is a boolean.*/
|
||||
public static final String EXTRA_TEST = "test";
|
||||
|
||||
/**
|
||||
* Returns whether the user can share the network represented by this preference with QR code.
|
||||
*/
|
||||
public static boolean isSharingNetworkEnabled(Context context) {
|
||||
return FeatureFlagUtils.isEnabled(context,
|
||||
com.android.settings.core.FeatureFlags.WIFI_SHARING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the device support WiFi DPP.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user