示例#1
0
 private void updateCameraVisibility() {
   ResolveInfo resolved =
       mContext
           .getPackageManager()
           .resolveActivityAsUser(
               getCameraIntent(),
               PackageManager.MATCH_DEFAULT_ONLY,
               mLockPatternUtils.getCurrentUser());
   boolean visible =
       !isCameraDisabledByDpm()
           && resolved != null
           && getResources().getBoolean(R.bool.config_keyguardShowCameraAffordance);
   mCameraImageView.setVisibility(visible ? View.VISIBLE : View.GONE);
 }
示例#2
0
 private void updatePhoneVisibility() {
   boolean visible = isPhoneVisible();
   mPhoneImageView.setVisibility(visible ? View.VISIBLE : View.GONE);
 }