Loading services/core/java/com/android/server/trust/TrustManagerService.java +14 −9 Original line number Diff line number Diff line Loading @@ -366,17 +366,22 @@ public class TrustManagerService extends SystemService { } catch (RemoteException e) { } boolean changed; synchronized (mUserIsTrusted) { if (mSettingsObserver.getTrustAgentsExtendUnlock()) { trusted = trusted && (!showingKeyguard || isFromUnlock) && userId == mCurrentUser; // In extend unlock trust agents can only set the device to trusted if it already // trusted or the device is unlocked. Attempting to set the device as trusted // when the device is locked will be ignored. changed = mUserIsTrusted.get(userId) != trusted; trusted = trusted && (!showingKeyguard || isFromUnlock || !changed) && userId == mCurrentUser; if (DEBUG) { Slog.d(TAG, "Extend unlock setting trusted as " + Boolean.toString(trusted) + " && " + Boolean.toString(!showingKeyguard) + " && " + Boolean.toString(userId == mCurrentUser)); } } boolean changed; synchronized (mUserIsTrusted) { changed = mUserIsTrusted.get(userId) != trusted; mUserIsTrusted.put(userId, trusted); } Loading Loading
services/core/java/com/android/server/trust/TrustManagerService.java +14 −9 Original line number Diff line number Diff line Loading @@ -366,17 +366,22 @@ public class TrustManagerService extends SystemService { } catch (RemoteException e) { } boolean changed; synchronized (mUserIsTrusted) { if (mSettingsObserver.getTrustAgentsExtendUnlock()) { trusted = trusted && (!showingKeyguard || isFromUnlock) && userId == mCurrentUser; // In extend unlock trust agents can only set the device to trusted if it already // trusted or the device is unlocked. Attempting to set the device as trusted // when the device is locked will be ignored. changed = mUserIsTrusted.get(userId) != trusted; trusted = trusted && (!showingKeyguard || isFromUnlock || !changed) && userId == mCurrentUser; if (DEBUG) { Slog.d(TAG, "Extend unlock setting trusted as " + Boolean.toString(trusted) + " && " + Boolean.toString(!showingKeyguard) + " && " + Boolean.toString(userId == mCurrentUser)); } } boolean changed; synchronized (mUserIsTrusted) { changed = mUserIsTrusted.get(userId) != trusted; mUserIsTrusted.put(userId, trusted); } Loading