Merge "Add action metrics for Wi-Fi provision features" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-23 17:36:54 +00:00
committed by Android (Google) Code Review
3 changed files with 31 additions and 2 deletions

View File

@@ -885,13 +885,19 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
/**
* Show QR code to share the network represented by this preference.
*/
public void launchWifiDppConfiguratorActivity() {
private void launchWifiDppConfiguratorActivity() {
final Intent intent = WifiDppUtils.getConfiguratorQrCodeGeneratorIntentOrNull(mContext,
mWifiManager, mAccessPoint);
if (intent == null) {
Log.e(TAG, "Launch Wi-Fi DPP QR code generator with a wrong Wi-Fi network!");
} else {
mMetricsFeatureProvider.action(SettingsEnums.PAGE_UNKNOWN,
SettingsEnums.ACTION_SETTINGS_SHARE_WIFI_QR_CODE,
SettingsEnums.SETTINGS_WIFI_DPP_CONFIGURATOR,
/* key */ null,
/* value */ Integer.MIN_VALUE);
mContext.startActivity(intent);
}
}