Remove feature flags of WiFi Sharing feature

Bug: 120744414
Test: Manual
Change-Id: I655ebb8d149d0976063845478bc667cc4d72d96d
This commit is contained in:
Johnson Lu
2019-02-13 11:50:11 +08:00
committed by Arc Wang
parent 72ba39cdf4
commit 3a5d9020e8
6 changed files with 27 additions and 43 deletions

View File

@@ -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);