Exemplo n.º 1
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());
 }
Exemplo n.º 2
0
 @Override
 public void onClick(View v) {
   if (v == mCameraImageView) {
     launchCamera();
   } else if (v == mPhoneImageView) {
     launchPhone();
   }
   if (v == mLockIcon) {
     if (!mAccessibilityController.isAccessibilityEnabled()) {
       handleTrustCircleClick();
     } else {
       mPhoneStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
     }
   }
 }
Exemplo n.º 3
0
 public void setAccessibilityController(AccessibilityController accessibilityController) {
   mAccessibilityController = accessibilityController;
   accessibilityController.addStateChangedCallback(this);
 }