Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Dil3mm4/da76beed5ea34a6840f6cf12cbd94948 to your computer and use it in GitHub Desktop.
Save Dil3mm4/da76beed5ea34a6840f6cf12cbd94948 to your computer and use it in GitHub Desktop.
From 1fd7273d943f828b180a8ae0703794bc584fd9ed Mon Sep 17 00:00:00 2001
From: Dil3mm4 <dil3mm4.dev@gmail.com>
Date: Fri, 27 Nov 2020 14:59:46 +0000
Subject: [PATCH] FOD: KeyguardSecurityContainer doesn't need to be shifted if
FOD isn't available
Tests:
-removed enrolled fp, ensured keyguardsecuritycontainer wasn't shifed
-removed enrolled fp, rebooted, ensured keyguardsecuritycontainer (on SIM PIN) wasn't shifted
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
index 3905d5f5df14..482f8c7bdd73 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -517,8 +517,9 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
// Consume bottom insets because we're setting the padding locally (for IME and navbar.)
int inset;
- int minBottomMargin = getResources().getDimensionPixelSize(
- R.dimen.kg_security_container_min_bottom_margin);
+ boolean fodEquipped = mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT);
+ int minBottomMargin = mUpdateMonitor.isFingerprintDetectionRunning() && fodEquipped ? getResources().getDimensionPixelSize(
+ R.dimen.kg_security_container_min_bottom_margin) : 0;
if (sNewInsetsMode == NEW_INSETS_MODE_FULL) {
int bottomInset = insets.getInsetsIgnoringVisibility(systemBars()).bottom;
@@ -982,4 +983,3 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
mSecurityViewFlipper.showUsabilityHint();
}
}
-
--
2.20.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment