Merge \\"Fix crash in finish from onCreate.\\" into nyc-dev am: 1a1f6b0b1b
am: 0fa8dc1b55
Change-Id: I3b89d3ea39ea415645aaff57471aa4e0fd439ff3
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