Fix fingerprint enrolling bug.

This fixes a bug where rotating the device would call post_enroll()
too early, thus invalidating the current session.

Fixes bug 22708390

Change-Id: Ib4a334b50c16630b4fe4b451f6019d41225b2011
This commit is contained in:
Jim Miller
2015-07-31 14:05:25 -07:00
parent 88832a3d4d
commit efaa19d97d

View File

@@ -451,9 +451,11 @@ public class FingerprintSettings extends SubSettings {
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
int result = mFingerprintManager.postEnroll(); if (getActivity().isFinishing()) {
if (result < 0) { int result = mFingerprintManager.postEnroll();
Log.w(TAG, "postEnroll failed: result = " + result); if (result < 0) {
Log.w(TAG, "postEnroll failed: result = " + result);
}
} }
} }