Merge "[Metrics] Remove locale string from Metrics because it should be reviewed" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4939a4bda
@@ -168,15 +168,12 @@ public class LocaleDialogFragment extends InstrumentedDialogFragment {
|
|||||||
if (mResultReceiver != null && mDialogType == DIALOG_CONFIRM_SYSTEM_DEFAULT) {
|
if (mResultReceiver != null && mDialogType == DIALOG_CONFIRM_SYSTEM_DEFAULT) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putInt(ARG_DIALOG_TYPE, DIALOG_CONFIRM_SYSTEM_DEFAULT);
|
bundle.putInt(ARG_DIALOG_TYPE, DIALOG_CONFIRM_SYSTEM_DEFAULT);
|
||||||
boolean changed = false;
|
|
||||||
if (which == DialogInterface.BUTTON_POSITIVE) {
|
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||||
changed = true;
|
|
||||||
mResultReceiver.send(Activity.RESULT_OK, bundle);
|
mResultReceiver.send(Activity.RESULT_OK, bundle);
|
||||||
} else if (which == DialogInterface.BUTTON_NEGATIVE) {
|
} else if (which == DialogInterface.BUTTON_NEGATIVE) {
|
||||||
mResultReceiver.send(Activity.RESULT_CANCELED, bundle);
|
mResultReceiver.send(Activity.RESULT_CANCELED, bundle);
|
||||||
}
|
}
|
||||||
mMetricsFeatureProvider.action(mContext,
|
mMetricsFeatureProvider.action(mContext, SettingsEnums.ACTION_CHANGE_LANGUAGE);
|
||||||
SettingsEnums.ACTION_CHANGE_LANGUAGE, changed);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -153,7 +153,7 @@ public class NumberingSystemItemController extends BasePreferenceController {
|
|||||||
private void handleLanguageSelect(Preference preference) {
|
private void handleLanguageSelect(Preference preference) {
|
||||||
String selectedLanguage = preference.getKey();
|
String selectedLanguage = preference.getKey();
|
||||||
mMetricsFeatureProvider.action(mContext,
|
mMetricsFeatureProvider.action(mContext,
|
||||||
SettingsEnums.ACTION_CHOOSE_LANGUAGE_FOR_NUMBERS_PREFERENCES, selectedLanguage);
|
SettingsEnums.ACTION_CHOOSE_LANGUAGE_FOR_NUMBERS_PREFERENCES);
|
||||||
final Bundle extra = new Bundle();
|
final Bundle extra = new Bundle();
|
||||||
extra.putString(RegionalPreferencesEntriesFragment.ARG_KEY_REGIONAL_PREFERENCE,
|
extra.putString(RegionalPreferencesEntriesFragment.ARG_KEY_REGIONAL_PREFERENCE,
|
||||||
ARG_VALUE_NUMBERING_SYSTEM_SELECT);
|
ARG_VALUE_NUMBERING_SYSTEM_SELECT);
|
||||||
@@ -177,7 +177,7 @@ public class NumberingSystemItemController extends BasePreferenceController {
|
|||||||
saveNumberingSystemToLocale(Locale.forLanguageTag(mSelectedLanguage),
|
saveNumberingSystemToLocale(Locale.forLanguageTag(mSelectedLanguage),
|
||||||
numberingSystem);
|
numberingSystem);
|
||||||
mMetricsFeatureProvider.action(mContext,
|
mMetricsFeatureProvider.action(mContext,
|
||||||
SettingsEnums.ACTION_SET_NUMBERS_PREFERENCES, numberingSystem);
|
SettingsEnums.ACTION_SET_NUMBERS_PREFERENCES);
|
||||||
// After updated locale to framework, this fragment will recreate,
|
// After updated locale to framework, this fragment will recreate,
|
||||||
// so it needs to update the argument of selected language.
|
// so it needs to update the argument of selected language.
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
@@ -64,7 +64,7 @@ public abstract class RegionalPreferenceListBasePreferenceController extends
|
|||||||
pref.setOnPreferenceClickListener(clickedPref -> {
|
pref.setOnPreferenceClickListener(clickedPref -> {
|
||||||
setSelected(pref);
|
setSelected(pref);
|
||||||
RegionalPreferencesDataUtils.savePreference(mContext, getExtensionTypes(), item);
|
RegionalPreferencesDataUtils.savePreference(mContext, getExtensionTypes(), item);
|
||||||
mMetricsFeatureProvider.action(mContext, getMetricsActionKey(), item);
|
mMetricsFeatureProvider.action(mContext, getMetricsActionKey());
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
String value = RegionalPreferencesDataUtils.getDefaultUnicodeExtensionData(mContext,
|
String value = RegionalPreferencesDataUtils.getDefaultUnicodeExtensionData(mContext,
|
||||||
|
Reference in New Issue
Block a user