[Panlingual] Fix the back button press
Bug: 226894999 Test: local Change-Id: I81e6408ebf2587bd023a13dbbdfa97e38efd8c31
This commit is contained in:
@@ -89,26 +89,12 @@ public class AppLocalePickerActivity extends SettingsBaseActivity
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
handleBackPressed();
|
super.onBackPressed();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
|
||||||
handleBackPressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleBackPressed() {
|
|
||||||
if (getFragmentManager().getBackStackEntryCount() > 1) {
|
|
||||||
super.onBackPressed();
|
|
||||||
} else {
|
|
||||||
setResult(RESULT_CANCELED);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLocaleSelected(LocaleStore.LocaleInfo localeInfo) {
|
public void onLocaleSelected(LocaleStore.LocaleInfo localeInfo) {
|
||||||
if (localeInfo == null || localeInfo.getLocale() == null || localeInfo.isSystemLocale()) {
|
if (localeInfo == null || localeInfo.getLocale() == null || localeInfo.isSystemLocale()) {
|
||||||
|
Reference in New Issue
Block a user