summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/fingerprint
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2015-05-18 13:55:00 -0700
committerJim Miller <jaggies@google.com>2015-05-18 13:55:00 -0700
commitdbe780f293163c478933a1f2ce97189703656c10 (patch)
tree2ad1e83095e9c9592ee71b75c6a868dbb844eaef /services/core/java/com/android/server/fingerprint
parent4f9fd626d32989fe76c29e092d1fc591c6a8e1eb (diff)
downloadframeworks_base-dbe780f293163c478933a1f2ce97189703656c10.zip
frameworks_base-dbe780f293163c478933a1f2ce97189703656c10.tar.gz
frameworks_base-dbe780f293163c478933a1f2ce97189703656c10.tar.bz2
Attempt to fix bug with setActiveGroup() in FingerprintService.
This attempts to fix a crash where setActiveGroup is crashing because there's no fingerprint hardware. Attempt to fix bug 21224390 Change-Id: Iff1c6ebb68deb6662fcb4a58248b5a562d9da2c2
Diffstat (limited to 'services/core/java/com/android/server/fingerprint')
-rw-r--r--services/core/java/com/android/server/fingerprint/FingerprintService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java
index f16fcb0..d725d94 100644
--- a/services/core/java/com/android/server/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java
@@ -626,16 +626,16 @@ public class FingerprintService extends SystemService {
public void onStart() {
publishBinderService(Context.FINGERPRINT_SERVICE, new FingerprintServiceWrapper());
mHalDeviceId = nativeOpenHal();
- if (mHalDeviceId != 0) {
- updateActiveGroup(ActivityManager.getCurrentUser());
- }
+ updateActiveGroup(ActivityManager.getCurrentUser());
if (DEBUG) Slog.v(TAG, "Fingerprint HAL id: " + mHalDeviceId);
listenForUserSwitches();
}
private void updateActiveGroup(int userId) {
- File path = Environment.getUserSystemDirectory(userId);
- nativeSetActiveGroup(userId, path.getAbsolutePath().getBytes());
+ if (mHalDeviceId != 0) {
+ File path = Environment.getUserSystemDirectory(userId);
+ nativeSetActiveGroup(userId, path.getAbsolutePath().getBytes());
+ }
}
private void listenForUserSwitches() {