Merge \"Fix crash in finish from onCreate.\" into nyc-dev
am: 1a1f6b0b1b
Change-Id: Ibd2e867077c2906310dd3b37afe1b9c1ab02de72
This commit is contained in:
@@ -690,7 +690,10 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
|
||||
|
||||
public void finish() {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null && !activity.getFragmentManager().popBackStackImmediate()) {
|
||||
if (activity == null) return;
|
||||
if (getFragmentManager().getBackStackEntryCount() > 0) {
|
||||
getFragmentManager().popBackStack();
|
||||
} else {
|
||||
activity.finish();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user