OSDN Git Service

Fix fingerprint swipe gesture settings for secondary users.
authorDoris Ling <dling@google.com>
Tue, 9 Aug 2016 19:02:28 +0000 (12:02 -0700)
committerDoris Ling <dling@google.com>
Tue, 9 Aug 2016 19:02:28 +0000 (12:02 -0700)
Change to use getIntForUser() when reading the secure settings value for
fingerprint swipe, as PhoneWindowManager always read as user 0 by
default.

Change-Id: I1d08a970b031f7bce4864c982e791678e1ef221b
Fixes: 30709756

services/core/java/com/android/server/policy/PhoneWindowManager.java

index f1ab183..c37819f 100644 (file)
@@ -7316,8 +7316,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     }
 
     private boolean areSystemNavigationKeysEnabled() {
-        return Settings.Secure.getInt(mContext.getContentResolver(),
-                Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0) == 1;
+        return Settings.Secure.getIntForUser(mContext.getContentResolver(),
+                Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0, UserHandle.USER_CURRENT) == 1;
     }
 
     @Override