Fix dialog disappear when screen off and on
Bug: 248514263 Test: by manual Change-Id: Ieac71f57b8672204dd2bc6c1c39e473d0ffa25cf
This commit is contained in:
@@ -149,14 +149,6 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStop() {
|
|
||||||
super.onStop();
|
|
||||||
if (mSuggestionDialog != null) {
|
|
||||||
mSuggestionDialog.dismiss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewStateRestored(Bundle savedInstanceState) {
|
public void onViewStateRestored(Bundle savedInstanceState) {
|
||||||
super.onViewStateRestored(savedInstanceState);
|
super.onViewStateRestored(savedInstanceState);
|
||||||
@@ -246,6 +238,14 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (mSuggestionDialog != null) {
|
||||||
|
mSuggestionDialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static LocaleStore.LocaleInfo mayAppendUnicodeTags(
|
static LocaleStore.LocaleInfo mayAppendUnicodeTags(
|
||||||
LocaleStore.LocaleInfo localeInfo, String recordTags) {
|
LocaleStore.LocaleInfo localeInfo, String recordTags) {
|
||||||
@@ -290,8 +290,8 @@ public class LocaleListEditor extends RestrictedSettingsFragment implements View
|
|||||||
private boolean isAllowedPackage() {
|
private boolean isAllowedPackage() {
|
||||||
List<String> allowList = Arrays.asList(getContext().getResources().getStringArray(
|
List<String> allowList = Arrays.asList(getContext().getResources().getStringArray(
|
||||||
R.array.allowed_packages_for_locale_confirmation_diallog));
|
R.array.allowed_packages_for_locale_confirmation_diallog));
|
||||||
String callingPckage = getActivity().getCallingPackage();
|
String callingPackage = getActivity().getCallingPackage();
|
||||||
return !isNullOrEmpty(callingPckage) && allowList.contains(callingPckage);
|
return !isNullOrEmpty(callingPackage) && allowList.contains(callingPackage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isNullOrEmpty(String str) {
|
private static boolean isNullOrEmpty(String str) {
|
||||||
|
|||||||
Reference in New Issue
Block a user