Fix settings crash due to enrolling error

Test: There's a condition where FP enrollment fails and a fragment
transaction/commit occurs after onSaveInstanceState. We should be
using commitAllowingStateLoss() instead of commit()

I'm not able to repro this issue but from looking at the stack
trace this should fix the problem.


Fixes: 38432354

Change-Id: I56b9c8d2efc45e9d77f29b897280f5378c3a84a0
This commit is contained in:
Kevin Chyn
2017-05-19 12:22:44 -07:00
parent 7d045387e0
commit 468a72aed3

View File

@@ -134,7 +134,7 @@ public class FingerprintEnrollFindSensor extends FingerprintEnrollBase {
return;
}
}
getFragmentManager().beginTransaction().remove(mSidecar).commit();
getFragmentManager().beginTransaction().remove(mSidecar).commitAllowingStateLoss();
mSidecar = null;
startActivityForResult(getEnrollingIntent(), ENROLLING);
}