diff options
author | Jim Miller <jaggies@google.com> | 2015-07-31 14:05:25 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2015-07-31 23:17:24 +0000 |
commit | efaa19d97d4aba1897357971af4c0991af71dbbd (patch) | |
tree | a56d8f27b25b4fe3cacc456ab34466ea97b6e902 | |
parent | 88832a3d4d48b94a3c43a6240dff75b5d486681b (diff) | |
download | packages_apps_Settings-efaa19d97d4aba1897357971af4c0991af71dbbd.zip packages_apps_Settings-efaa19d97d4aba1897357971af4c0991af71dbbd.tar.gz packages_apps_Settings-efaa19d97d4aba1897357971af4c0991af71dbbd.tar.bz2 |
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
-rw-r--r-- | src/com/android/settings/fingerprint/FingerprintSettings.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/settings/fingerprint/FingerprintSettings.java b/src/com/android/settings/fingerprint/FingerprintSettings.java index d40dc50..a5c9963 100644 --- a/src/com/android/settings/fingerprint/FingerprintSettings.java +++ b/src/com/android/settings/fingerprint/FingerprintSettings.java @@ -451,9 +451,11 @@ public class FingerprintSettings extends SubSettings { @Override public void onDestroy() { super.onDestroy(); - int result = mFingerprintManager.postEnroll(); - if (result < 0) { - Log.w(TAG, "postEnroll failed: result = " + result); + if (getActivity().isFinishing()) { + int result = mFingerprintManager.postEnroll(); + if (result < 0) { + Log.w(TAG, "postEnroll failed: result = " + result); + } } } |