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