Implement receiver flow of WiFi sharing feature II
Bug: 120630683 Test: atest RunSettingsRoboTests Change-Id: Iabe56205ff9274382adbe5bba59a60d833a57214
This commit is contained in:
@@ -35,7 +35,7 @@ import com.android.settings.R;
|
||||
* To provision "this" device with specified Wi-Fi network.
|
||||
*
|
||||
* To use intent action {@code ACTION_ENROLLEE_QR_CODE_SCANNER}, specify the SSID string of the
|
||||
* Wi-Fi network to be provisioned in {@code WifiDppUtils.EXTRA_QR_CODE}.
|
||||
* Wi-Fi network to be provisioned in {@code WifiDppUtils.EXTRA_WIFI_SSID}.
|
||||
*/
|
||||
public class WifiDppEnrolleeActivity extends InstrumentedActivity {
|
||||
private static final String TAG = "WifiDppEnrolleeActivity";
|
||||
|
@@ -34,7 +34,7 @@ import com.android.settings.wifi.qrcode.QrDecorateView;
|
||||
import com.android.settings.R;
|
||||
|
||||
/**
|
||||
* TODO: Should refine code to only initiate UI component in each child fragment.
|
||||
* TODO: b/120645817 should refine code to only initiate UI component in each child fragment.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@@ -23,6 +23,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Size;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
@@ -87,7 +88,14 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
|
||||
setDescription(getString(R.string.wifi_dpp_center_qr_code, wifiNetworkConfig.getSsid()));
|
||||
} else {
|
||||
setTitle(getString(R.string.wifi_dpp_scan_qr_code));
|
||||
setDescription(getString(R.string.wifi_dpp_scan_qr_code_join_network, mSsid));
|
||||
|
||||
String description;
|
||||
if (TextUtils.isEmpty(mSsid)) {
|
||||
description = getString(R.string.wifi_dpp_scan_qr_code_join_unknown_network, mSsid);
|
||||
} else {
|
||||
description = getString(R.string.wifi_dpp_scan_qr_code_join_network, mSsid);
|
||||
}
|
||||
setDescription(description);
|
||||
}
|
||||
|
||||
ActionBar actionBar = getActivity().getActionBar();
|
||||
|
@@ -88,14 +88,14 @@ public class WifiDppUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an intent to launch QR code scanner.
|
||||
* Returns an intent to launch QR code scanner for Wi-Fi DPP enrollee.
|
||||
*
|
||||
* @param ssid The data corresponding to {@code WifiConfiguration} SSID
|
||||
* @return Intent for launching QR code scanner
|
||||
*/
|
||||
public static Intent getConfiguratorQRCodeScannerIntent(String ssid) {
|
||||
public static Intent getEnrolleeQrCodeScannerIntent(String ssid) {
|
||||
final Intent intent = new Intent(
|
||||
WifiDppConfiguratorActivity.ACTION_CONFIGURATOR_QR_CODE_SCANNER);
|
||||
WifiDppEnrolleeActivity.ACTION_ENROLLEE_QR_CODE_SCANNER);
|
||||
if (!TextUtils.isEmpty(ssid)) {
|
||||
intent.putExtra(EXTRA_WIFI_SSID, ssid);
|
||||
}
|
||||
@@ -109,7 +109,8 @@ public class WifiDppUtils {
|
||||
* @param Security The data is from {@code AccessPoint.securityToString}
|
||||
* @return Intent for launching QR code generator
|
||||
*/
|
||||
public static Intent getConfiguratorQRCodeGeneratorIntent(String ssid, String Security) {
|
||||
public static Intent getConfiguratorQrCodeGeneratorIntent(String ssid, String Security) {
|
||||
//TODO: b/118794858#comment6 should put password & hideSsid in intent extra
|
||||
final Intent intent = new Intent(
|
||||
WifiDppConfiguratorActivity.ACTION_CONFIGURATOR_QR_CODE_GENERATOR);
|
||||
if (!TextUtils.isEmpty(ssid)) {
|
||||
|
Reference in New Issue
Block a user