Exemplo n.º 1
0
 @Override
 public void onStateChanged(boolean accessibilityEnabled, boolean touchExplorationEnabled) {
   mCameraImageView.setClickable(touchExplorationEnabled);
   mPhoneImageView.setClickable(touchExplorationEnabled);
   mCameraImageView.setFocusable(accessibilityEnabled);
   mPhoneImageView.setFocusable(accessibilityEnabled);
   updateLockIconClickability();
 }
Exemplo n.º 2
0
 private void updateLockIconClickability() {
   if (mAccessibilityController == null) {
     return;
   }
   boolean clickToUnlock = mAccessibilityController.isTouchExplorationEnabled();
   boolean clickToForceLock =
       mUnlockMethodCache.isTrustManaged() && !mAccessibilityController.isAccessibilityEnabled();
   boolean longClickToForceLock = mUnlockMethodCache.isTrustManaged() && !clickToForceLock;
   mLockIcon.setClickable(clickToForceLock || clickToUnlock);
   mLockIcon.setLongClickable(longClickToForceLock);
   mLockIcon.setFocusable(mAccessibilityController.isAccessibilityEnabled());
 }