Methods Summary |
---|
public void | addListener(com.android.systemui.statusbar.phone.UnlockMethodCache$OnUnlockMethodChangedListener listener)
mListeners.add(listener);
|
public static com.android.systemui.statusbar.phone.UnlockMethodCache | getInstance(android.content.Context context)
if (sInstance == null) {
sInstance = new UnlockMethodCache(context);
}
return sInstance;
|
public boolean | isCurrentlyInsecure()
return mCurrentlyInsecure;
|
public boolean | isFaceUnlockRunning()
return mFaceUnlockRunning;
|
public boolean | isMethodSecure()
return mSecure;
|
public boolean | isTrustManaged()
return mTrustManaged;
|
private void | notifyListeners()
for (OnUnlockMethodChangedListener listener : mListeners) {
listener.onUnlockMethodStateChanged();
}
|
public void | removeListener(com.android.systemui.statusbar.phone.UnlockMethodCache$OnUnlockMethodChangedListener listener)
mListeners.remove(listener);
|
private void | update(boolean updateAlways)
int user = mLockPatternUtils.getCurrentUser();
boolean secure = mLockPatternUtils.isSecure();
boolean currentlyInsecure = !secure || mKeyguardUpdateMonitor.getUserHasTrust(user);
boolean trustManaged = mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
boolean faceUnlockRunning = mKeyguardUpdateMonitor.isFaceUnlockRunning(user)
&& trustManaged;
boolean changed = secure != mSecure || currentlyInsecure != mCurrentlyInsecure ||
trustManaged != mTrustManaged || faceUnlockRunning != mFaceUnlockRunning;
if (changed || updateAlways) {
mSecure = secure;
mCurrentlyInsecure = currentlyInsecure;
mTrustManaged = trustManaged;
mFaceUnlockRunning = faceUnlockRunning;
notifyListeners();
}
|