2012 lines
88 KiB
Diff
2012 lines
88 KiB
Diff
From cfc6cf10b64ef3ecba6586ed87dcf90d32918b4e Mon Sep 17 00:00:00 2001
|
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
Date: Tue, 13 Jul 2021 16:01:31 +0000
|
|
Subject: [PATCH] Squashed revert of LOS FOD implementation
|
|
|
|
Better than having an ever-growing string of revert commands?
|
|
---
|
|
.../internal/statusbar/IStatusBar.aidl | 6 -
|
|
.../internal/statusbar/IStatusBarService.aidl | 6 -
|
|
data/etc/com.android.systemui.xml | 1 -
|
|
.../car/statusbar/UnusedStatusBar.java | 7 +-
|
|
.../car/statusbar/UnusedStatusBarModule.java | 7 +-
|
|
packages/SystemUI/Android.bp | 2 -
|
|
packages/SystemUI/AndroidManifest.xml | 1 -
|
|
.../res-keyguard/values/lineage_dimens.xml | 20 -
|
|
.../res/drawable-nodpi/fod_icon_pressed.png | Bin 108 -> 0 bytes
|
|
.../res/drawable/fod_icon_default.xml | 25 -
|
|
packages/SystemUI/res/values/config.xml | 1 -
|
|
.../SystemUI/res/values/lineage_config.xml | 4 -
|
|
.../keyguard/KeyguardSecurityContainer.java | 15 +-
|
|
.../keyguard/KeyguardUpdateMonitor.java | 9 +-
|
|
.../AuthBiometricFingerprintView.java | 13 -
|
|
.../biometrics/AuthBiometricView.java | 30 +-
|
|
.../systemui/biometrics/FODCircleView.java | 555 ------------------
|
|
.../biometrics/FODCircleViewImpl.java | 132 -----
|
|
.../biometrics/FODCircleViewImplCallback.java | 25 -
|
|
.../systemui/dagger/SystemUIBinder.java | 7 -
|
|
.../keyguard/KeyguardViewMediator.java | 10 +-
|
|
.../systemui/statusbar/CommandQueue.java | 28 -
|
|
.../notification/ActivityLaunchAnimator.java | 21 +-
|
|
.../systemui/statusbar/phone/StatusBar.java | 74 +--
|
|
.../phone/StatusBarKeyguardViewManager.java | 11 +-
|
|
.../phone/dagger/StatusBarPhoneModule.java | 7 +-
|
|
.../ActivityLaunchAnimatorTest.java | 6 +-
|
|
.../statusbar/phone/StatusBarTest.java | 5 +-
|
|
services/core/Android.bp | 1 -
|
|
.../biometrics/BiometricServiceBase.java | 2 +-
|
|
.../fingerprint/FingerprintService.java | 112 ----
|
|
.../statusbar/StatusBarManagerService.java | 22 -
|
|
32 files changed, 20 insertions(+), 1145 deletions(-)
|
|
delete mode 100644 packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
|
delete mode 100644 packages/SystemUI/res/drawable-nodpi/fod_icon_pressed.png
|
|
delete mode 100644 packages/SystemUI/res/drawable/fod_icon_default.xml
|
|
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
|
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
|
delete mode 100644 packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java
|
|
|
|
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
|
|
index 44607f7f5fb..83b672e06b0 100644
|
|
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
|
|
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
|
|
@@ -228,12 +228,6 @@ oneway interface IStatusBar
|
|
*/
|
|
void suppressAmbientDisplay(boolean suppress);
|
|
|
|
- /**
|
|
- * Used to show or hide in display fingerprint view.
|
|
- */
|
|
- void showInDisplayFingerprintView();
|
|
- void hideInDisplayFingerprintView();
|
|
-
|
|
/**
|
|
* Used to block or unblock usage of gestural navigation
|
|
*/
|
|
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
|
|
index e9b0683db89..ca0eccdbc6e 100644
|
|
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
|
|
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
|
|
@@ -148,12 +148,6 @@ interface IStatusBarService
|
|
*/
|
|
void suppressAmbientDisplay(boolean suppress);
|
|
|
|
- /**
|
|
- * Used to show or hide in display fingerprint view.
|
|
- */
|
|
- void showInDisplayFingerprintView();
|
|
- void hideInDisplayFingerprintView();
|
|
-
|
|
/**
|
|
* Starts the default assistant app.
|
|
*/
|
|
diff --git a/data/etc/com.android.systemui.xml b/data/etc/com.android.systemui.xml
|
|
index 7af1de6a6ca..06f1dae30cd 100644
|
|
--- a/data/etc/com.android.systemui.xml
|
|
+++ b/data/etc/com.android.systemui.xml
|
|
@@ -30,7 +30,6 @@
|
|
<permission name="android.permission.GET_APP_OPS_STATS"/>
|
|
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
|
|
<permission name="android.permission.MANAGE_DEBUGGING"/>
|
|
- <permission name="android.permission.MANAGE_FINGERPRINT" />
|
|
<permission name="android.permission.MANAGE_SENSOR_PRIVACY"/>
|
|
<permission name="android.permission.MANAGE_USB"/>
|
|
<permission name="android.permission.MANAGE_USERS"/>
|
|
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java
|
|
index 6095928c4cf..b7b9431d69d 100644
|
|
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java
|
|
+++ b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBar.java
|
|
@@ -26,7 +26,6 @@ import com.android.keyguard.KeyguardUpdateMonitor;
|
|
import com.android.keyguard.ViewMediatorCallback;
|
|
import com.android.systemui.InitController;
|
|
import com.android.systemui.assist.AssistManager;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
|
import com.android.systemui.bubbles.BubbleController;
|
|
import com.android.systemui.colorextraction.SysuiColorExtractor;
|
|
@@ -185,8 +184,7 @@ public class UnusedStatusBar extends StatusBar {
|
|
DismissCallbackRegistry dismissCallbackRegistry,
|
|
Lazy<NotificationShadeDepthController> notificationShadeDepthControllerLazy,
|
|
StatusBarTouchableRegionManager statusBarTouchableRegionManager,
|
|
- TunerService tunerService,
|
|
- FODCircleViewImpl fodCircleViewImpl) {
|
|
+ TunerService tunerService) {
|
|
super(context, notificationsController, lightBarController, autoHideController,
|
|
keyguardUpdateMonitor, statusBarIconController, pulseExpansionHandler,
|
|
notificationWakeUpCoordinator, keyguardBypassController, keyguardStateController,
|
|
@@ -213,8 +211,7 @@ public class UnusedStatusBar extends StatusBar {
|
|
userInfoControllerImpl, phoneStatusBarPolicy, keyguardIndicationController,
|
|
dismissCallbackRegistry, notificationShadeDepthControllerLazy,
|
|
statusBarTouchableRegionManager,
|
|
- tunerService,
|
|
- fodCircleViewImpl);
|
|
+ tunerService);
|
|
}
|
|
|
|
@Override
|
|
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java
|
|
index 28bcaf6c144..f2cef14b558 100644
|
|
--- a/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java
|
|
+++ b/packages/CarSystemUI/src/com/android/systemui/car/statusbar/UnusedStatusBarModule.java
|
|
@@ -30,7 +30,6 @@ import com.android.keyguard.KeyguardUpdateMonitor;
|
|
import com.android.keyguard.ViewMediatorCallback;
|
|
import com.android.systemui.InitController;
|
|
import com.android.systemui.assist.AssistManager;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
|
import com.android.systemui.bubbles.BubbleController;
|
|
import com.android.systemui.colorextraction.SysuiColorExtractor;
|
|
@@ -205,8 +204,7 @@ public interface UnusedStatusBarModule {
|
|
Lazy<NotificationShadeDepthController> notificationShadeDepthController,
|
|
DismissCallbackRegistry dismissCallbackRegistry,
|
|
StatusBarTouchableRegionManager statusBarTouchableRegionManager,
|
|
- TunerService tunerService,
|
|
- FODCircleViewImpl fodCircleViewImpl) {
|
|
+ TunerService tunerService) {
|
|
return new UnusedStatusBar(
|
|
context,
|
|
notificationsController,
|
|
@@ -285,7 +283,6 @@ public interface UnusedStatusBarModule {
|
|
dismissCallbackRegistry,
|
|
notificationShadeDepthController,
|
|
statusBarTouchableRegionManager,
|
|
- tunerService,
|
|
- fodCircleViewImpl);
|
|
+ tunerService);
|
|
}
|
|
}
|
|
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
|
|
index c78630c05f0..84870f83ad2 100644
|
|
--- a/packages/SystemUI/Android.bp
|
|
+++ b/packages/SystemUI/Android.bp
|
|
@@ -71,7 +71,6 @@ android_library {
|
|
"dagger2-2.19",
|
|
"jsr330",
|
|
"org.lineageos.platform.internal",
|
|
- "vendor.lineage.biometrics.fingerprint.inscreen-V1.0-java",
|
|
"vendor.lineage.powershare-V1.0-java",
|
|
],
|
|
manifest: "AndroidManifest.xml",
|
|
@@ -146,7 +145,6 @@ android_library {
|
|
"dagger2-2.19",
|
|
"jsr330",
|
|
"org.lineageos.platform.internal",
|
|
- "vendor.lineage.biometrics.fingerprint.inscreen-V1.0-java",
|
|
"vendor.lineage.powershare-V1.0-java",
|
|
],
|
|
libs: [
|
|
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
|
|
index 6bee19745c8..541a9cf7722 100644
|
|
--- a/packages/SystemUI/AndroidManifest.xml
|
|
+++ b/packages/SystemUI/AndroidManifest.xml
|
|
@@ -137,7 +137,6 @@
|
|
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
|
<uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" />
|
|
<uses-permission android:name="android.permission.MANAGE_BIOMETRIC" />
|
|
- <uses-permission android:name="android.permission.MANAGE_FINGERPRINT" />
|
|
<uses-permission android:name="android.permission.MANAGE_SLICE_PERMISSIONS" />
|
|
<uses-permission android:name="android.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS" />
|
|
<uses-permission android:name="android.permission.GET_RUNTIME_PERMISSIONS" />
|
|
diff --git a/packages/SystemUI/res-keyguard/values/lineage_dimens.xml b/packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
|
deleted file mode 100644
|
|
index bb6070c7199..00000000000
|
|
--- a/packages/SystemUI/res-keyguard/values/lineage_dimens.xml
|
|
+++ /dev/null
|
|
@@ -1,20 +0,0 @@
|
|
-<?xml version="1.0" encoding="utf-8"?>
|
|
-<!--
|
|
- Copyright (C) 2020 The LineageOS Project
|
|
-
|
|
- Licensed under the Apache License, Version 2.0 (the "License");
|
|
- you may not use this file except in compliance with the License.
|
|
- You may obtain a copy of the License at
|
|
-
|
|
- http://www.apache.org/licenses/LICENSE-2.0
|
|
-
|
|
- Unless required by applicable law or agreed to in writing, software
|
|
- distributed under the License is distributed on an "AS IS" BASIS,
|
|
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
- See the License for the specific language governing permissions and
|
|
- limitations under the License.
|
|
--->
|
|
-<resources>
|
|
- <!-- The minimum bottom margin of the keyguard security container -->
|
|
- <dimen name="kg_security_container_min_bottom_margin">0dp</dimen>
|
|
-</resources>
|
|
diff --git a/packages/SystemUI/res/drawable-nodpi/fod_icon_pressed.png b/packages/SystemUI/res/drawable-nodpi/fod_icon_pressed.png
|
|
deleted file mode 100644
|
|
index 4102e28c1300b49323b50625d8cfaa73b006561f..0000000000000000000000000000000000000000
|
|
GIT binary patch
|
|
literal 0
|
|
HcmV?d00001
|
|
|
|
literal 108
|
|
zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}bl$r9IylHmNblJdl&R0hYC{G?O`
|
|
z&)mfH)S%SFl*+=BsWw1Ge4Z|jAr-fh5*U~o7?>FtSQ!{^cTT<plwt66^>bP0l+XkK
|
|
D@OB!I
|
|
|
|
diff --git a/packages/SystemUI/res/drawable/fod_icon_default.xml b/packages/SystemUI/res/drawable/fod_icon_default.xml
|
|
deleted file mode 100644
|
|
index 38e9d311128..00000000000
|
|
--- a/packages/SystemUI/res/drawable/fod_icon_default.xml
|
|
+++ /dev/null
|
|
@@ -1,25 +0,0 @@
|
|
-<?xml version="1.0" encoding="utf-8"?>
|
|
-<!--
|
|
- Copyright (C) 2019 The LineageOS Project
|
|
-
|
|
- Licensed under the Apache License, Version 2.0 (the "License");
|
|
- you may not use this file except in compliance with the License.
|
|
- You may obtain a copy of the License at
|
|
-
|
|
- http://www.apache.org/licenses/LICENSE-2.0
|
|
-
|
|
- Unless required by applicable law or agreed to in writing, software
|
|
- distributed under the License is distributed on an "AS IS" BASIS,
|
|
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
- See the License for the specific language governing permissions and
|
|
- limitations under the License.
|
|
--->
|
|
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
- android:width="48dp"
|
|
- android:height="48dp"
|
|
- android:viewportWidth="24.0"
|
|
- android:viewportHeight="24.0">
|
|
- <path
|
|
- android:fillColor="#ffffff"
|
|
- android:pathData="M17.81,4.47c-0.08,0 -0.16,-0.02 -0.23,-0.06C15.66,3.42 14,3 12.01,3c-1.98,0 -3.86,0.47 -5.57,1.41 -0.24,0.13 -0.54,0.04 -0.68,-0.2 -0.13,-0.24 -0.04,-0.55 0.2,-0.68C7.82,2.52 9.86,2 12.01,2c2.13,0 3.99,0.47 6.03,1.52 0.25,0.13 0.34,0.43 0.21,0.67 -0.09,0.18 -0.26,0.28 -0.44,0.28zM3.5,9.72c-0.1,0 -0.2,-0.03 -0.29,-0.09 -0.23,-0.16 -0.28,-0.47 -0.12,-0.7 0.99,-1.4 2.25,-2.5 3.75,-3.27C9.98,4.04 14,4.03 17.15,5.65c1.5,0.77 2.76,1.86 3.75,3.25 0.16,0.22 0.11,0.54 -0.12,0.7 -0.23,0.16 -0.54,0.11 -0.7,-0.12 -0.9,-1.26 -2.04,-2.25 -3.39,-2.94 -2.87,-1.47 -6.54,-1.47 -9.4,0.01 -1.36,0.7 -2.5,1.7 -3.4,2.96 -0.08,0.14 -0.23,0.21 -0.39,0.21zM9.75,21.79c-0.13,0 -0.26,-0.05 -0.35,-0.15 -0.87,-0.87 -1.34,-1.43 -2.01,-2.64 -0.69,-1.23 -1.05,-2.73 -1.05,-4.34 0,-2.97 2.54,-5.39 5.66,-5.39s5.66,2.42 5.66,5.39c0,0.28 -0.22,0.5 -0.5,0.5s-0.5,-0.22 -0.5,-0.5c0,-2.42 -2.09,-4.39 -4.66,-4.39 -2.57,0 -4.66,1.97 -4.66,4.39 0,1.44 0.32,2.77 0.93,3.85 0.64,1.15 1.08,1.64 1.85,2.42 0.19,0.2 0.19,0.51 0,0.71 -0.11,0.1 -0.24,0.15 -0.37,0.15zM16.92,19.94c-1.19,0 -2.24,-0.3 -3.1,-0.89 -1.49,-1.01 -2.38,-2.65 -2.38,-4.39 0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5c0,1.41 0.72,2.74 1.94,3.56 0.71,0.48 1.54,0.71 2.54,0.71 0.24,0 0.64,-0.03 1.04,-0.1 0.27,-0.05 0.53,0.13 0.58,0.41 0.05,0.27 -0.13,0.53 -0.41,0.58 -0.57,0.11 -1.07,0.12 -1.21,0.12zM14.91,22c-0.04,0 -0.09,-0.01 -0.13,-0.02 -1.59,-0.44 -2.63,-1.03 -3.72,-2.1 -1.4,-1.39 -2.17,-3.24 -2.17,-5.22 0,-1.62 1.38,-2.94 3.08,-2.94 1.7,0 3.08,1.32 3.08,2.94 0,1.07 0.93,1.94 2.08,1.94s2.08,-0.87 2.08,-1.94c0,-3.77 -3.25,-6.83 -7.25,-6.83 -2.84,0 -5.44,1.58 -6.61,4.03 -0.39,0.81 -0.59,1.76 -0.59,2.8 0,0.78 0.07,2.01 0.67,3.61 0.1,0.26 -0.03,0.55 -0.29,0.64 -0.26,0.1 -0.55,-0.04 -0.64,-0.29 -0.49,-1.31 -0.73,-2.61 -0.73,-3.96 0,-1.2 0.23,-2.29 0.68,-3.24 1.33,-2.79 4.28,-4.6 7.51,-4.6 4.55,0 8.25,3.51 8.25,7.83 0,1.62 -1.38,2.94 -3.08,2.94s-3.08,-1.32 -3.08,-2.94c0,-1.07 -0.93,-1.94 -2.08,-1.94s-2.08,0.87 -2.08,1.94c0,1.71 0.66,3.31 1.87,4.51 0.95,0.94 1.86,1.46 3.27,1.85 0.27,0.07 0.42,0.35 0.35,0.61 -0.05,0.23 -0.26,0.38 -0.47,0.38z" />
|
|
-</vector>
|
|
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
|
index 367fe72d4da..d86f3fa277f 100644
|
|
--- a/packages/SystemUI/res/values/config.xml
|
|
+++ b/packages/SystemUI/res/values/config.xml
|
|
@@ -319,7 +319,6 @@
|
|
<item>com.android.systemui.globalactions.GlobalActionsComponent</item>
|
|
<item>com.android.systemui.ScreenDecorations</item>
|
|
<item>com.android.systemui.biometrics.AuthController</item>
|
|
- <item>com.android.systemui.biometrics.FODCircleViewImpl</item>
|
|
<item>com.android.systemui.SliceBroadcastRelayHandler</item>
|
|
<item>com.android.systemui.SizeCompatModeActivityController</item>
|
|
<item>com.android.systemui.statusbar.notification.InstantAppNotifier</item>
|
|
diff --git a/packages/SystemUI/res/values/lineage_config.xml b/packages/SystemUI/res/values/lineage_config.xml
|
|
index b17044b1bcc..6554fd54f11 100644
|
|
--- a/packages/SystemUI/res/values/lineage_config.xml
|
|
+++ b/packages/SystemUI/res/values/lineage_config.xml
|
|
@@ -15,10 +15,6 @@
|
|
limitations under the License.
|
|
-->
|
|
<resources>
|
|
- <!-- Color of the FOD view -->
|
|
- <color name="config_fodColor">#00ff00</color>
|
|
- <color name="config_fodColorBackground">#20000000</color>
|
|
-
|
|
<!-- Max visible notification icons -->
|
|
<integer name="config_maxVisibleNotificationIcons">4</integer>
|
|
<integer name="config_maxVisibleNotificationIconsOnLock">5</integer>
|
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
|
|
index bace9324ac9..1db2e32b8cd 100644
|
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
|
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
|
|
@@ -33,7 +33,6 @@ import android.app.AlertDialog;
|
|
import android.app.admin.DevicePolicyManager;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
-import android.content.pm.PackageManager;
|
|
import android.content.res.ColorStateList;
|
|
import android.graphics.Insets;
|
|
import android.graphics.Rect;
|
|
@@ -80,8 +79,6 @@ import com.android.systemui.shared.system.SysUiStatsLog;
|
|
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
|
import com.android.systemui.util.InjectionInflationController;
|
|
|
|
-import lineageos.app.LineageContextConstants;
|
|
-
|
|
import java.util.List;
|
|
|
|
public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSecurityView {
|
|
@@ -127,7 +124,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
|
private InjectionInflationController mInjectionInflationController;
|
|
private boolean mSwipeUpToRetry;
|
|
private AdminSecondaryLockScreenController mSecondaryLockScreenController;
|
|
- private boolean mHasFod;
|
|
|
|
private final ViewConfiguration mViewConfiguration;
|
|
private final SpringAnimation mSpringAnimation;
|
|
@@ -268,10 +268,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
|
mSecondaryLockScreenController = new AdminSecondaryLockScreenController(context, this,
|
|
mUpdateMonitor, mCallback, new Handler(Looper.myLooper()));
|
|
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
|
|
-
|
|
- PackageManager packageManager = mContext.getPackageManager();
|
|
- mHasFod = packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT) &&
|
|
- packageManager.hasSystemFeature(LineageContextConstants.Features.FOD);
|
|
}
|
|
|
|
public void setSecurityCallback(SecurityCallback callback) {
|
|
@@ -525,10 +517,6 @@ 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 = mHasFod && mUpdateMonitor.isFingerprintDetectionRunning() ?
|
|
- getResources().getDimensionPixelSize(
|
|
- R.dimen.kg_security_container_min_bottom_margin) : 0;
|
|
-
|
|
if (sNewInsetsMode == NEW_INSETS_MODE_FULL) {
|
|
int bottomInset = insets.getInsetsIgnoringVisibility(systemBars()).bottom;
|
|
int imeInset = insets.getInsets(ime()).bottom;
|
|
@@ -536,8 +524,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
|
} else {
|
|
inset = insets.getSystemWindowInsetBottom();
|
|
}
|
|
- setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(),
|
|
- minBottomMargin > inset ? minBottomMargin : inset);
|
|
+ setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), inset);
|
|
return insets.inset(0, 0, 0, inset);
|
|
}
|
|
|
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
|
index 4f644784974..8e5f128143d 100644
|
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
|
@@ -106,8 +106,6 @@ import com.android.systemui.util.RingerModeTracker;
|
|
|
|
import com.google.android.collect.Lists;
|
|
|
|
-import lineageos.app.LineageContextConstants;
|
|
-
|
|
import java.io.FileDescriptor;
|
|
import java.io.PrintWriter;
|
|
import java.lang.ref.WeakReference;
|
|
@@ -312,7 +310,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|
};
|
|
|
|
private final Handler mHandler;
|
|
- private final boolean mHasFod;
|
|
|
|
private final Observer<Integer> mRingerModeObserver = new Observer<Integer>() {
|
|
@Override
|
|
@@ -1696,9 +1693,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|
}
|
|
};
|
|
|
|
- mHasFod = mContext.getPackageManager().hasSystemFeature(
|
|
- LineageContextConstants.Features.FOD);
|
|
-
|
|
// Since device can't be un-provisioned, we only need to register a content observer
|
|
// to update mDeviceProvisioned when we are...
|
|
if (!mDeviceProvisioned) {
|
|
@@ -1862,8 +1856,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|
return;
|
|
}
|
|
mHandler.removeCallbacks(mRetryFingerprintAuthentication);
|
|
- boolean hideFodForStrongAuth = mHasFod && userNeedsStrongAuth();
|
|
- boolean shouldListenForFingerprint = !hideFodForStrongAuth && shouldListenForFingerprint();
|
|
+ boolean shouldListenForFingerprint = shouldListenForFingerprint();
|
|
boolean runningOrRestarting = mFingerprintRunningState == BIOMETRIC_STATE_RUNNING
|
|
|| mFingerprintRunningState == BIOMETRIC_STATE_CANCELLING_RESTARTING;
|
|
if (runningOrRestarting && !shouldListenForFingerprint) {
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.java
|
|
index c2671733ba0..45ee4ad9ae5 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.java
|
|
@@ -22,7 +22,6 @@ import android.graphics.drawable.AnimatedVectorDrawable;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.util.AttributeSet;
|
|
import android.util.Log;
|
|
-import android.view.View;
|
|
|
|
import com.android.systemui.R;
|
|
|
|
@@ -77,18 +76,6 @@ public class AuthBiometricFingerprintView extends AuthBiometricView {
|
|
showTouchSensorString();
|
|
}
|
|
|
|
- @Override
|
|
- void onFinishInflateInternal() {
|
|
- super.onFinishInflateInternal();
|
|
- if (mHasFod) {
|
|
- mIconView.setVisibility(View.INVISIBLE);
|
|
- mIconView.setPadding(0, 0, 0, 0);
|
|
- // Add IndicatorView above the biometric icon
|
|
- removeView(mIndicatorView);
|
|
- addView(mIndicatorView, indexOfChild(mIconView));
|
|
- }
|
|
- }
|
|
-
|
|
private void showTouchSensorString() {
|
|
mIndicatorView.setText(R.string.fingerprint_dialog_touch_sensor);
|
|
mIndicatorView.setTextColor(mTextColorHint);
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
|
|
index dfcf59decc0..f9c6d32d1d1 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
|
|
@@ -24,7 +24,6 @@ import android.annotation.IntDef;
|
|
import android.annotation.NonNull;
|
|
import android.annotation.Nullable;
|
|
import android.content.Context;
|
|
-import android.content.pm.PackageManager;
|
|
import android.hardware.biometrics.BiometricPrompt;
|
|
import android.os.Bundle;
|
|
import android.os.Handler;
|
|
@@ -41,12 +40,8 @@ import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
|
|
import com.android.internal.annotations.VisibleForTesting;
|
|
-import com.android.systemui.statusbar.phone.StatusBar;
|
|
-import com.android.systemui.Dependency;
|
|
import com.android.systemui.R;
|
|
|
|
-import lineageos.app.LineageContextConstants;
|
|
-
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.util.ArrayList;
|
|
@@ -191,8 +186,6 @@ public abstract class AuthBiometricView extends LinearLayout {
|
|
protected boolean mDialogSizeAnimating;
|
|
protected Bundle mSavedState;
|
|
|
|
- protected boolean mHasFod;
|
|
-
|
|
/**
|
|
* Delay after authentication is confirmed, before the dialog should be animated away.
|
|
*/
|
|
@@ -255,10 +248,6 @@ public abstract class AuthBiometricView extends LinearLayout {
|
|
|
|
mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
|
|
|
|
- PackageManager packageManager = context.getPackageManager();
|
|
- mHasFod = packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT) &&
|
|
- packageManager.hasSystemFeature(LineageContextConstants.Features.FOD);
|
|
-
|
|
mResetErrorRunnable = () -> {
|
|
updateState(getStateForAfterError());
|
|
handleResetAfterError();
|
|
@@ -714,22 +703,9 @@ public abstract class AuthBiometricView extends LinearLayout {
|
|
final View child = getChildAt(i);
|
|
|
|
if (child.getId() == R.id.biometric_icon) {
|
|
- if (this instanceof AuthBiometricFingerprintView && mHasFod) {
|
|
- final int buttonBarHeight =
|
|
- findViewById(R.id.button_bar).getLayoutParams().height;
|
|
- // The view is invisible, so it still takes space and
|
|
- // we use that to adjust for the FOD icon
|
|
- final int fodHeight = Dependency.get(StatusBar.class).getFodHeight(true) -
|
|
- buttonBarHeight - findViewById(R.id.button_bar).getPaddingTop();
|
|
-
|
|
- child.measure(
|
|
- MeasureSpec.makeMeasureSpec(newWidth, MeasureSpec.AT_MOST),
|
|
- MeasureSpec.makeMeasureSpec(fodHeight, MeasureSpec.EXACTLY));
|
|
- } else {
|
|
- child.measure(
|
|
- MeasureSpec.makeMeasureSpec(newWidth, MeasureSpec.AT_MOST),
|
|
- MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
|
|
- }
|
|
+ child.measure(
|
|
+ MeasureSpec.makeMeasureSpec(newWidth, MeasureSpec.AT_MOST),
|
|
+ MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
|
|
} else if (child.getId() == R.id.button_bar) {
|
|
child.measure(
|
|
MeasureSpec.makeMeasureSpec(newWidth, MeasureSpec.EXACTLY),
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
|
deleted file mode 100644
|
|
index 10b304bb843..00000000000
|
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleView.java
|
|
+++ /dev/null
|
|
@@ -1,555 +0,0 @@
|
|
-/**
|
|
- * Copyright (C) 2019-2020 The LineageOS Project
|
|
- *
|
|
- * Licensed under the Apache License, Version 2.0 (the "License");
|
|
- * you may not use this file except in compliance with the License.
|
|
- * You may obtain a copy of the License at
|
|
- *
|
|
- * http://www.apache.org/licenses/LICENSE-2.0
|
|
- *
|
|
- * Unless required by applicable law or agreed to in writing, software
|
|
- * distributed under the License is distributed on an "AS IS" BASIS,
|
|
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
- * See the License for the specific language governing permissions and
|
|
- * limitations under the License.
|
|
- */
|
|
-
|
|
-package com.android.systemui.biometrics;
|
|
-
|
|
-import android.app.admin.DevicePolicyManager;
|
|
-import android.content.Context;
|
|
-import android.content.res.Configuration;
|
|
-import android.content.res.Resources;
|
|
-import android.graphics.Canvas;
|
|
-import android.graphics.Color;
|
|
-import android.graphics.Paint;
|
|
-import android.graphics.PixelFormat;
|
|
-import android.graphics.Point;
|
|
-import android.hardware.biometrics.BiometricSourceType;
|
|
-import android.os.Handler;
|
|
-import android.os.Looper;
|
|
-import android.os.RemoteException;
|
|
-import android.provider.Settings;
|
|
-import android.util.DisplayMetrics;
|
|
-import android.view.Display;
|
|
-import android.view.Gravity;
|
|
-import android.view.MotionEvent;
|
|
-import android.view.Surface;
|
|
-import android.view.View;
|
|
-import android.view.WindowManager;
|
|
-import android.widget.ImageView;
|
|
-
|
|
-import com.android.internal.widget.LockPatternUtils;
|
|
-import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
|
|
-import com.android.keyguard.KeyguardUpdateMonitor;
|
|
-import com.android.keyguard.KeyguardUpdateMonitorCallback;
|
|
-import com.android.systemui.Dependency;
|
|
-import com.android.systemui.R;
|
|
-
|
|
-import vendor.lineage.biometrics.fingerprint.inscreen.V1_0.IFingerprintInscreen;
|
|
-import vendor.lineage.biometrics.fingerprint.inscreen.V1_0.IFingerprintInscreenCallback;
|
|
-
|
|
-import java.util.NoSuchElementException;
|
|
-import java.util.Timer;
|
|
-import java.util.TimerTask;
|
|
-
|
|
-public class FODCircleView extends ImageView {
|
|
- private static final int FADE_ANIM_DURATION = 125;
|
|
-
|
|
- private final int mPositionX;
|
|
- private final int mPositionY;
|
|
- private final int mSize;
|
|
- private final int mDreamingMaxOffset;
|
|
- private final int mNavigationBarSize;
|
|
- private final boolean mShouldBoostBrightness;
|
|
- private final Paint mPaintFingerprintBackground = new Paint();
|
|
- private final Paint mPaintFingerprint = new Paint();
|
|
- private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
|
|
- private final WindowManager.LayoutParams mPressedParams = new WindowManager.LayoutParams();
|
|
- private final WindowManager mWindowManager;
|
|
-
|
|
- private IFingerprintInscreen mFingerprintInscreenDaemon;
|
|
-
|
|
- private int mDreamingOffsetX;
|
|
- private int mDreamingOffsetY;
|
|
-
|
|
- private boolean mFading;
|
|
- private boolean mIsBouncer;
|
|
- private boolean mIsBiometricRunning;
|
|
- private boolean mIsCircleShowing;
|
|
- private boolean mIsDreaming;
|
|
- private boolean mIsKeyguard;
|
|
- private boolean mTouchedOutside;
|
|
-
|
|
- private Handler mHandler;
|
|
-
|
|
- private final ImageView mPressedView;
|
|
-
|
|
- private LockPatternUtils mLockPatternUtils;
|
|
-
|
|
- private Timer mBurnInProtectionTimer;
|
|
-
|
|
- private IFingerprintInscreenCallback mFingerprintInscreenCallback =
|
|
- new IFingerprintInscreenCallback.Stub() {
|
|
- @Override
|
|
- public void onFingerDown() {
|
|
- mHandler.post(() -> showCircle());
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onFingerUp() {
|
|
- mHandler.post(() -> hideCircle());
|
|
- }
|
|
- };
|
|
-
|
|
- private KeyguardUpdateMonitor mUpdateMonitor;
|
|
-
|
|
- private KeyguardUpdateMonitorCallback mMonitorCallback = new KeyguardUpdateMonitorCallback() {
|
|
- @Override
|
|
- public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType,
|
|
- boolean isStrongBiometric) {
|
|
- // We assume that if biometricSourceType matches Fingerprint it will be
|
|
- // handled here, so we hide only when other biometric types authenticate
|
|
- if (biometricSourceType != BiometricSourceType.FINGERPRINT) {
|
|
- hide();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onBiometricRunningStateChanged(boolean running,
|
|
- BiometricSourceType biometricSourceType) {
|
|
- if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
|
|
- mIsBiometricRunning = running;
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onDreamingStateChanged(boolean dreaming) {
|
|
- mIsDreaming = dreaming;
|
|
- updateAlpha();
|
|
-
|
|
- if (mIsKeyguard && mUpdateMonitor.isFingerprintDetectionRunning()) {
|
|
- show();
|
|
- updateAlpha();
|
|
- } else {
|
|
- hide();
|
|
- }
|
|
-
|
|
- if (dreaming) {
|
|
- mBurnInProtectionTimer = new Timer();
|
|
- mBurnInProtectionTimer.schedule(new BurnInProtectionTask(), 0, 60 * 1000);
|
|
- } else if (mBurnInProtectionTimer != null) {
|
|
- mBurnInProtectionTimer.cancel();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onKeyguardVisibilityChanged(boolean showing) {
|
|
- mIsKeyguard = showing;
|
|
- if (!showing) {
|
|
- hide();
|
|
- } else {
|
|
- updateAlpha();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onKeyguardBouncerChanged(boolean isBouncer) {
|
|
- mIsBouncer = isBouncer;
|
|
- if (mUpdateMonitor.isFingerprintDetectionRunning()) {
|
|
- if (isPinOrPattern(mUpdateMonitor.getCurrentUser()) || !isBouncer) {
|
|
- show();
|
|
- } else {
|
|
- hide();
|
|
- }
|
|
- } else {
|
|
- hide();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onScreenTurnedOff() {
|
|
- hide();
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onStartedWakingUp() {
|
|
- if (mUpdateMonitor.isFingerprintDetectionRunning()) {
|
|
- show();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onScreenTurnedOn() {
|
|
- if (mUpdateMonitor.isFingerprintDetectionRunning()) {
|
|
- show();
|
|
- }
|
|
- }
|
|
- };
|
|
-
|
|
- public FODCircleView(Context context) {
|
|
- super(context);
|
|
-
|
|
- setScaleType(ScaleType.CENTER);
|
|
-
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- if (daemon == null) {
|
|
- throw new RuntimeException("Unable to get IFingerprintInscreen");
|
|
- }
|
|
-
|
|
- try {
|
|
- mShouldBoostBrightness = daemon.shouldBoostBrightness();
|
|
- mPositionX = daemon.getPositionX();
|
|
- mPositionY = daemon.getPositionY();
|
|
- mSize = daemon.getSize();
|
|
- } catch (RemoteException e) {
|
|
- throw new RuntimeException("Failed to retrieve FOD circle position or size");
|
|
- }
|
|
-
|
|
- Resources res = context.getResources();
|
|
-
|
|
- mPaintFingerprint.setColor(res.getColor(R.color.config_fodColor));
|
|
- mPaintFingerprint.setAntiAlias(true);
|
|
-
|
|
- mPaintFingerprintBackground.setColor(res.getColor(R.color.config_fodColorBackground));
|
|
- mPaintFingerprintBackground.setAntiAlias(true);
|
|
-
|
|
- mWindowManager = context.getSystemService(WindowManager.class);
|
|
-
|
|
- mNavigationBarSize = res.getDimensionPixelSize(R.dimen.navigation_bar_size);
|
|
-
|
|
- mDreamingMaxOffset = (int) (mSize * 0.1f);
|
|
-
|
|
- mHandler = new Handler(Looper.getMainLooper());
|
|
-
|
|
- mParams.height = mSize;
|
|
- mParams.width = mSize;
|
|
- mParams.format = PixelFormat.TRANSLUCENT;
|
|
-
|
|
- mParams.packageName = "android";
|
|
- mParams.type = WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY;
|
|
- mParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
|
- WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
|
|
- WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
|
|
- mParams.gravity = Gravity.TOP | Gravity.LEFT;
|
|
-
|
|
- mPressedParams.copyFrom(mParams);
|
|
- mPressedParams.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND |
|
|
- WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
|
|
-
|
|
- mParams.setTitle("Fingerprint on display");
|
|
- mPressedParams.setTitle("Fingerprint on display.touched");
|
|
-
|
|
- mPressedView = new ImageView(context) {
|
|
- @Override
|
|
- protected void onDraw(Canvas canvas) {
|
|
- if (mIsCircleShowing) {
|
|
- canvas.drawCircle(mSize / 2, mSize / 2, mSize / 2.0f, mPaintFingerprint);
|
|
- }
|
|
- super.onDraw(canvas);
|
|
- }
|
|
- };
|
|
- mPressedView.setImageResource(R.drawable.fod_icon_pressed);
|
|
-
|
|
- mWindowManager.addView(this, mParams);
|
|
-
|
|
- updatePosition();
|
|
- hide();
|
|
-
|
|
- mLockPatternUtils = new LockPatternUtils(mContext);
|
|
-
|
|
- mUpdateMonitor = Dependency.get(KeyguardUpdateMonitor.class);
|
|
- mUpdateMonitor.registerCallback(mMonitorCallback);
|
|
- }
|
|
-
|
|
- @Override
|
|
- protected void onDraw(Canvas canvas) {
|
|
- if (!mIsCircleShowing) {
|
|
- canvas.drawCircle(mSize / 2, mSize / 2, mSize / 2.0f, mPaintFingerprintBackground);
|
|
- }
|
|
- super.onDraw(canvas);
|
|
- }
|
|
-
|
|
- @Override
|
|
- public boolean onTouchEvent(MotionEvent event) {
|
|
- float x = event.getAxisValue(MotionEvent.AXIS_X);
|
|
- float y = event.getAxisValue(MotionEvent.AXIS_Y);
|
|
-
|
|
- boolean newIsInside = (x > 0 && x < mSize) && (y > 0 && y < mSize);
|
|
- mTouchedOutside = false;
|
|
-
|
|
- if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
|
|
- mTouchedOutside = true;
|
|
- return true;
|
|
- }
|
|
-
|
|
- if (event.getAction() == MotionEvent.ACTION_DOWN && newIsInside) {
|
|
- showCircle();
|
|
- return true;
|
|
- } else if (event.getAction() == MotionEvent.ACTION_UP) {
|
|
- hideCircle();
|
|
- return true;
|
|
- } else if (event.getAction() == MotionEvent.ACTION_MOVE) {
|
|
- return true;
|
|
- }
|
|
-
|
|
- return false;
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void onConfigurationChanged(Configuration newConfig) {
|
|
- updatePosition();
|
|
- }
|
|
-
|
|
- public IFingerprintInscreen getFingerprintInScreenDaemon() {
|
|
- if (mFingerprintInscreenDaemon == null) {
|
|
- try {
|
|
- mFingerprintInscreenDaemon = IFingerprintInscreen.getService();
|
|
- if (mFingerprintInscreenDaemon != null) {
|
|
- mFingerprintInscreenDaemon.setCallback(mFingerprintInscreenCallback);
|
|
- mFingerprintInscreenDaemon.asBinder().linkToDeath((cookie) -> {
|
|
- mFingerprintInscreenDaemon = null;
|
|
- }, 0);
|
|
- }
|
|
- } catch (NoSuchElementException | RemoteException e) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
- return mFingerprintInscreenDaemon;
|
|
- }
|
|
-
|
|
- public void dispatchPress() {
|
|
- if (mFading) return;
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- try {
|
|
- daemon.onPress();
|
|
- } catch (RemoteException e) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
-
|
|
- public void dispatchRelease() {
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- try {
|
|
- daemon.onRelease();
|
|
- } catch (RemoteException e) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
-
|
|
- public void dispatchShow() {
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- try {
|
|
- daemon.onShowFODView();
|
|
- } catch (RemoteException e) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
-
|
|
- public void dispatchHide() {
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- try {
|
|
- daemon.onHideFODView();
|
|
- } catch (RemoteException e) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
-
|
|
- public void showCircle() {
|
|
- if (mFading || mTouchedOutside) return;
|
|
- mIsCircleShowing = true;
|
|
-
|
|
- setKeepScreenOn(true);
|
|
-
|
|
- setDim(true);
|
|
- dispatchPress();
|
|
-
|
|
- setImageDrawable(null);
|
|
- invalidate();
|
|
- }
|
|
-
|
|
- public void hideCircle() {
|
|
- mIsCircleShowing = false;
|
|
-
|
|
- setImageResource(R.drawable.fod_icon_default);
|
|
- invalidate();
|
|
-
|
|
- dispatchRelease();
|
|
- setDim(false);
|
|
-
|
|
- setKeepScreenOn(false);
|
|
- }
|
|
-
|
|
- public void show() {
|
|
- if (!mUpdateMonitor.isScreenOn()) {
|
|
- // Keyguard is shown just after screen turning off
|
|
- return;
|
|
- }
|
|
-
|
|
- if (mIsBouncer && !isPinOrPattern(mUpdateMonitor.getCurrentUser())) {
|
|
- // Ignore show calls when Keyguard password screen is being shown
|
|
- return;
|
|
- }
|
|
-
|
|
- if (mIsKeyguard && mUpdateMonitor.getUserCanSkipBouncer(mUpdateMonitor.getCurrentUser())) {
|
|
- // Ignore show calls if user can skip bouncer
|
|
- return;
|
|
- }
|
|
-
|
|
- if (mIsKeyguard && !mIsBiometricRunning) {
|
|
- return;
|
|
- }
|
|
-
|
|
- updatePosition();
|
|
-
|
|
- setVisibility(View.VISIBLE);
|
|
- animate().withStartAction(() -> mFading = true)
|
|
- .alpha(mIsDreaming ? 0.5f : 1.0f)
|
|
- .setDuration(FADE_ANIM_DURATION)
|
|
- .withEndAction(() -> mFading = false)
|
|
- .start();
|
|
- dispatchShow();
|
|
- }
|
|
-
|
|
- public void hide() {
|
|
- animate().withStartAction(() -> mFading = true)
|
|
- .alpha(0)
|
|
- .setDuration(FADE_ANIM_DURATION)
|
|
- .withEndAction(() -> {
|
|
- setVisibility(View.GONE);
|
|
- mFading = false;
|
|
- })
|
|
- .start();
|
|
- hideCircle();
|
|
- dispatchHide();
|
|
- }
|
|
-
|
|
- public int getHeight(boolean includeDecor) {
|
|
- DisplayMetrics dm = new DisplayMetrics();
|
|
- if (includeDecor) {
|
|
- mWindowManager.getDefaultDisplay().getMetrics(dm);
|
|
- } else {
|
|
- mWindowManager.getDefaultDisplay().getRealMetrics(dm);
|
|
- }
|
|
- return dm.heightPixels - mPositionY + mSize / 2;
|
|
- }
|
|
-
|
|
- private void updateAlpha() {
|
|
- setAlpha(mIsDreaming ? 0.5f : 1.0f);
|
|
- }
|
|
-
|
|
- private void updatePosition() {
|
|
- Display defaultDisplay = mWindowManager.getDefaultDisplay();
|
|
-
|
|
- Point size = new Point();
|
|
- defaultDisplay.getRealSize(size);
|
|
-
|
|
- int rotation = defaultDisplay.getRotation();
|
|
- int x, y;
|
|
- switch (rotation) {
|
|
- case Surface.ROTATION_0:
|
|
- x = mPositionX;
|
|
- y = mPositionY;
|
|
- break;
|
|
- case Surface.ROTATION_90:
|
|
- x = mPositionY;
|
|
- y = mPositionX;
|
|
- break;
|
|
- case Surface.ROTATION_180:
|
|
- x = mPositionX;
|
|
- y = size.y - mPositionY - mSize;
|
|
- break;
|
|
- case Surface.ROTATION_270:
|
|
- x = size.x - mPositionY - mSize - mNavigationBarSize;
|
|
- y = mPositionX;
|
|
- break;
|
|
- default:
|
|
- throw new IllegalArgumentException("Unknown rotation: " + rotation);
|
|
- }
|
|
-
|
|
- mPressedParams.x = mParams.x = x;
|
|
- mPressedParams.y = mParams.y = y;
|
|
-
|
|
- if (mIsDreaming) {
|
|
- mParams.x += mDreamingOffsetX;
|
|
- mParams.y += mDreamingOffsetY;
|
|
- }
|
|
-
|
|
- mWindowManager.updateViewLayout(this, mParams);
|
|
-
|
|
- if (mPressedView.getParent() != null) {
|
|
- mWindowManager.updateViewLayout(mPressedView, mPressedParams);
|
|
- }
|
|
- }
|
|
-
|
|
- private void setDim(boolean dim) {
|
|
- if (dim) {
|
|
- int curBrightness = Settings.System.getInt(getContext().getContentResolver(),
|
|
- Settings.System.SCREEN_BRIGHTNESS, 100);
|
|
- int dimAmount = 0;
|
|
-
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- try {
|
|
- dimAmount = daemon.getDimAmount(curBrightness);
|
|
- } catch (RemoteException e) {
|
|
- // do nothing
|
|
- }
|
|
-
|
|
- if (mShouldBoostBrightness) {
|
|
- mPressedParams.screenBrightness = 1.0f;
|
|
- }
|
|
-
|
|
- mPressedParams.dimAmount = dimAmount / 255.0f;
|
|
- if (mPressedView.getParent() == null) {
|
|
- mWindowManager.addView(mPressedView, mPressedParams);
|
|
- } else {
|
|
- mWindowManager.updateViewLayout(mPressedView, mPressedParams);
|
|
- }
|
|
- } else {
|
|
- if (mShouldBoostBrightness) {
|
|
- mPressedParams.screenBrightness = 0.0f;
|
|
- }
|
|
- mPressedParams.dimAmount = 0.0f;
|
|
- if (mPressedView.getParent() != null) {
|
|
- mWindowManager.removeView(mPressedView);
|
|
- }
|
|
- }
|
|
- }
|
|
-
|
|
- private boolean isPinOrPattern(int userId) {
|
|
- int passwordQuality = mLockPatternUtils.getActivePasswordQuality(userId);
|
|
- switch (passwordQuality) {
|
|
- // PIN
|
|
- case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
|
|
- case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX:
|
|
- // Pattern
|
|
- case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
|
|
- return true;
|
|
- }
|
|
-
|
|
- return false;
|
|
- }
|
|
-
|
|
- private class BurnInProtectionTask extends TimerTask {
|
|
- @Override
|
|
- public void run() {
|
|
- long now = System.currentTimeMillis() / 1000 / 60;
|
|
-
|
|
- mDreamingOffsetX = (int) (now % (mDreamingMaxOffset * 4));
|
|
- if (mDreamingOffsetX > mDreamingMaxOffset * 2) {
|
|
- mDreamingOffsetX = mDreamingMaxOffset * 4 - mDreamingOffsetX;
|
|
- }
|
|
-
|
|
- // Let y to be not synchronized with x, so that we get maximum movement
|
|
- mDreamingOffsetY = (int) ((now + mDreamingMaxOffset / 3) % (mDreamingMaxOffset * 2));
|
|
- if (mDreamingOffsetY > mDreamingMaxOffset * 2) {
|
|
- mDreamingOffsetY = mDreamingMaxOffset * 4 - mDreamingOffsetY;
|
|
- }
|
|
-
|
|
- mDreamingOffsetX -= mDreamingMaxOffset;
|
|
- mDreamingOffsetY -= mDreamingMaxOffset;
|
|
-
|
|
- mHandler.post(() -> updatePosition());
|
|
- }
|
|
- };
|
|
-}
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
|
deleted file mode 100644
|
|
index 8f8f255d370..00000000000
|
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImpl.java
|
|
+++ /dev/null
|
|
@@ -1,132 +0,0 @@
|
|
-/**
|
|
- * Copyright (C) 2019 The Android Open Source Project
|
|
- *
|
|
- * Licensed under the Apache License, Version 2.0 (the "License");
|
|
- * you may not use this file except in compliance with the License.
|
|
- * You may obtain a copy of the License at
|
|
- *
|
|
- * http://www.apache.org/licenses/LICENSE-2.0
|
|
- *
|
|
- * Unless required by applicable law or agreed to in writing, software
|
|
- * distributed under the License is distributed on an "AS IS" BASIS,
|
|
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
- * See the License for the specific language governing permissions and
|
|
- * limitations under the License.
|
|
- */
|
|
-
|
|
-package com.android.systemui.biometrics;
|
|
-
|
|
-import android.content.Context;
|
|
-import android.content.pm.PackageManager;
|
|
-import android.util.Slog;
|
|
-import android.view.View;
|
|
-
|
|
-import com.android.systemui.SystemUI;
|
|
-import com.android.systemui.biometrics.FODCircleViewImplCallback;
|
|
-import com.android.systemui.statusbar.CommandQueue;
|
|
-import com.android.systemui.util.Assert;
|
|
-
|
|
-import lineageos.app.LineageContextConstants;
|
|
-
|
|
-import java.lang.ref.WeakReference;
|
|
-import java.util.ArrayList;
|
|
-import javax.inject.Inject;
|
|
-import javax.inject.Singleton;
|
|
-
|
|
-@Singleton
|
|
-public class FODCircleViewImpl extends SystemUI implements CommandQueue.Callbacks {
|
|
- private static final String TAG = "FODCircleViewImpl";
|
|
-
|
|
- private FODCircleView mFodCircleView;
|
|
-
|
|
- private final ArrayList<WeakReference<FODCircleViewImplCallback>>
|
|
- mCallbacks = new ArrayList<>();
|
|
- private final CommandQueue mCommandQueue;
|
|
-
|
|
- private boolean mIsFODVisible;
|
|
-
|
|
- @Inject
|
|
- public FODCircleViewImpl(Context context, CommandQueue commandQueue) {
|
|
- super(context);
|
|
- mCommandQueue = commandQueue;
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void start() {
|
|
- PackageManager packageManager = mContext.getPackageManager();
|
|
- if (!packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT) ||
|
|
- !packageManager.hasSystemFeature(LineageContextConstants.Features.FOD)) {
|
|
- return;
|
|
- }
|
|
- mCommandQueue.addCallback(this);
|
|
- try {
|
|
- mFodCircleView = new FODCircleView(mContext);
|
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
|
- FODCircleViewImplCallback cb = mCallbacks.get(i).get();
|
|
- if (cb != null) {
|
|
- cb.onFODStart();
|
|
- }
|
|
- }
|
|
- } catch (RuntimeException e) {
|
|
- Slog.e(TAG, "Failed to initialize FODCircleView", e);
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void showInDisplayFingerprintView() {
|
|
- if (mFodCircleView != null) {
|
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
|
- FODCircleViewImplCallback cb = mCallbacks.get(i).get();
|
|
- if (cb != null) {
|
|
- cb.onFODStatusChange(true);
|
|
- }
|
|
- }
|
|
- mIsFODVisible = true;
|
|
- mFodCircleView.show();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void hideInDisplayFingerprintView() {
|
|
- if (mFodCircleView != null) {
|
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
|
- FODCircleViewImplCallback cb = mCallbacks.get(i).get();
|
|
- if (cb != null) {
|
|
- cb.onFODStatusChange(false);
|
|
- }
|
|
- }
|
|
- mIsFODVisible = false;
|
|
- mFodCircleView.hide();
|
|
- }
|
|
- }
|
|
-
|
|
- public int getHeight(boolean includeDecor) {
|
|
- return mFodCircleView.getHeight(includeDecor);
|
|
- }
|
|
-
|
|
- public void registerCallback(FODCircleViewImplCallback callback) {
|
|
- Assert.isMainThread();
|
|
- Slog.v(TAG, "*** register callback for " + callback);
|
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
|
- if (mCallbacks.get(i).get() == callback) {
|
|
- Slog.e(TAG, "Object tried to add another callback",
|
|
- new Exception("Called by"));
|
|
- return;
|
|
- }
|
|
- }
|
|
- mCallbacks.add(new WeakReference<>(callback));
|
|
- removeCallback(null);
|
|
- sendUpdates(callback);
|
|
- }
|
|
-
|
|
- public void removeCallback(FODCircleViewImplCallback callback) {
|
|
- Assert.isMainThread();
|
|
- Slog.v(TAG, "*** unregister callback for " + callback);
|
|
- mCallbacks.removeIf(el -> el.get() == callback);
|
|
- }
|
|
-
|
|
- private void sendUpdates(FODCircleViewImplCallback callback) {
|
|
- callback.onFODStart();
|
|
- callback.onFODStatusChange(mIsFODVisible);
|
|
- }
|
|
-}
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java b/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java
|
|
deleted file mode 100644
|
|
index 5c11fb9061e..00000000000
|
|
--- a/packages/SystemUI/src/com/android/systemui/biometrics/FODCircleViewImplCallback.java
|
|
+++ /dev/null
|
|
@@ -1,25 +0,0 @@
|
|
-/**
|
|
- * Copyright (C) 2021 The LineageOS Project
|
|
- *
|
|
- * Licensed under the Apache License, Version 2.0 (the "License");
|
|
- * you may not use this file except in compliance with the License.
|
|
- * You may obtain a copy of the License at
|
|
- *
|
|
- * http://www.apache.org/licenses/LICENSE-2.0
|
|
- *
|
|
- * Unless required by applicable law or agreed to in writing, software
|
|
- * distributed under the License is distributed on an "AS IS" BASIS,
|
|
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
- * See the License for the specific language governing permissions and
|
|
- * limitations under the License.
|
|
- */
|
|
-
|
|
-package com.android.systemui.biometrics;
|
|
-
|
|
-public class FODCircleViewImplCallback {
|
|
-
|
|
- public void onFODStart() {}
|
|
-
|
|
- public void onFODStatusChange(boolean isVisible) {}
|
|
-
|
|
-}
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
|
|
index a0a2e6f0dd6..413a522bccd 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
|
|
@@ -24,7 +24,6 @@ import com.android.systemui.SystemUI;
|
|
import com.android.systemui.accessibility.SystemActions;
|
|
import com.android.systemui.accessibility.WindowMagnification;
|
|
import com.android.systemui.biometrics.AuthController;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.bubbles.dagger.BubbleModule;
|
|
import com.android.systemui.globalactions.GlobalActionsComponent;
|
|
import com.android.systemui.keyguard.KeyguardViewMediator;
|
|
@@ -67,12 +66,6 @@ public abstract class SystemUIBinder {
|
|
@ClassKey(Divider.class)
|
|
public abstract SystemUI bindDivider(Divider sysui);
|
|
|
|
- /** Inject into FODCircleViewImpl. */
|
|
- @Binds
|
|
- @IntoMap
|
|
- @ClassKey(FODCircleViewImpl.class)
|
|
- public abstract SystemUI FODCircleViewImpl(FODCircleViewImpl sysui);
|
|
-
|
|
/** Inject into GarbageMonitor.Service. */
|
|
@Binds
|
|
@IntoMap
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
|
index 3eb5de9289e..0c939020780 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
|
@@ -38,7 +38,6 @@ import android.content.ContentResolver;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
-import android.content.pm.PackageManager;
|
|
import android.content.pm.UserInfo;
|
|
import android.hardware.biometrics.BiometricSourceType;
|
|
import android.media.AudioAttributes;
|
|
@@ -102,7 +101,6 @@ import com.android.systemui.statusbar.phone.StatusBar;
|
|
import com.android.systemui.util.DeviceConfigProxy;
|
|
import com.android.systemui.util.InjectionInflationController;
|
|
|
|
-import lineageos.app.LineageContextConstants;
|
|
import lineageos.app.Profile;
|
|
import lineageos.app.ProfileManager;
|
|
|
|
@@ -387,8 +385,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
|
|
private IKeyguardDrawnCallback mDrawnCallback;
|
|
private CharSequence mCustomMessage;
|
|
|
|
- private boolean mHasFod;
|
|
-
|
|
private final DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener =
|
|
new DeviceConfig.OnPropertiesChangedListener() {
|
|
@Override
|
|
@@ -757,8 +753,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
|
|
QuickStepContract.isGesturalMode(navigationModeController.addListener(mode -> {
|
|
mInGestureNavigationMode = QuickStepContract.isGesturalMode(mode);
|
|
}));
|
|
- PackageManager packageManager = context.getPackageManager();
|
|
- mHasFod = packageManager.hasSystemFeature(LineageContextConstants.Features.FOD);
|
|
}
|
|
|
|
public void userActivity() {
|
|
@@ -891,9 +885,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
|
|
// explicitly DO NOT want to call
|
|
// mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(false)
|
|
// here, since that will mess with the device lock state.
|
|
- if (!mHasFod) {
|
|
- mUpdateMonitor.dispatchKeyguardGoingAway(false);
|
|
- }
|
|
+ mUpdateMonitor.dispatchKeyguardGoingAway(false);
|
|
|
|
// Lock immediately based on setting if secure (user has a pin/pattern/password).
|
|
// This also "locks" the device when not secure to provide easy access to the
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
|
|
index 5f3875701e4..39b6aa1a360 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
|
|
@@ -126,8 +126,6 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
|
|
private static final int MSG_HIDE_TOAST = 54 << MSG_SHIFT;
|
|
private static final int MSG_TRACING_STATE_CHANGED = 55 << MSG_SHIFT;
|
|
private static final int MSG_SUPPRESS_AMBIENT_DISPLAY = 56 << MSG_SHIFT;
|
|
- private static final int MSG_SHOW_IN_DISPLAY_FINGERPRINT_VIEW = 57 << MSG_SHIFT;
|
|
- private static final int MSG_HIDE_IN_DISPLAY_FINGERPRINT_VIEW = 58 << MSG_SHIFT;
|
|
private static final int MSG_SET_BLOCKED_GESTURAL_NAVIGATION = 59 << MSG_SHIFT;
|
|
|
|
public static final int FLAG_EXCLUDE_NONE = 0;
|
|
@@ -271,8 +269,6 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
|
|
default void onBiometricHelp(String message) { }
|
|
default void onBiometricError(int modality, int error, int vendorCode) { }
|
|
default void hideAuthenticationDialog() { }
|
|
- default void showInDisplayFingerprintView() { }
|
|
- default void hideInDisplayFingerprintView() { }
|
|
default void setBlockedGesturalNavigation(boolean blocked) {}
|
|
|
|
/**
|
|
@@ -862,20 +858,6 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
|
|
}
|
|
}
|
|
|
|
- @Override
|
|
- public void showInDisplayFingerprintView() {
|
|
- synchronized (mLock) {
|
|
- mHandler.obtainMessage(MSG_SHOW_IN_DISPLAY_FINGERPRINT_VIEW).sendToTarget();
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void hideInDisplayFingerprintView() {
|
|
- synchronized (mLock) {
|
|
- mHandler.obtainMessage(MSG_HIDE_IN_DISPLAY_FINGERPRINT_VIEW).sendToTarget();
|
|
- }
|
|
- }
|
|
-
|
|
@Override
|
|
public void setBlockedGesturalNavigation(boolean blocked) {
|
|
synchronized (mLock) {
|
|
@@ -1335,16 +1317,6 @@ public class CommandQueue extends IStatusBar.Stub implements CallbackController<
|
|
callbacks.suppressAmbientDisplay((boolean) msg.obj);
|
|
}
|
|
break;
|
|
- case MSG_SHOW_IN_DISPLAY_FINGERPRINT_VIEW:
|
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
|
- mCallbacks.get(i).showInDisplayFingerprintView();
|
|
- }
|
|
- break;
|
|
- case MSG_HIDE_IN_DISPLAY_FINGERPRINT_VIEW:
|
|
- for (int i = 0; i < mCallbacks.size(); i++) {
|
|
- mCallbacks.get(i).hideInDisplayFingerprintView();
|
|
- }
|
|
- break;
|
|
case MSG_SET_BLOCKED_GESTURAL_NAVIGATION:
|
|
for (int i = 0; i < mCallbacks.size(); i++) {
|
|
mCallbacks.get(i).setBlockedGesturalNavigation((Boolean) msg.obj);
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
|
|
index 1e1655256b1..382715a3fb7 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
|
|
@@ -20,12 +20,9 @@ import android.animation.Animator;
|
|
import android.animation.AnimatorListenerAdapter;
|
|
import android.animation.ValueAnimator;
|
|
import android.app.ActivityManager;
|
|
-import android.content.Context;
|
|
import android.graphics.Matrix;
|
|
import android.graphics.Rect;
|
|
-import android.hardware.fingerprint.IFingerprintService;
|
|
import android.os.RemoteException;
|
|
-import android.os.ServiceManager;
|
|
import android.util.MathUtils;
|
|
import android.view.IRemoteAnimationFinishedCallback;
|
|
import android.view.IRemoteAnimationRunner;
|
|
@@ -37,7 +34,6 @@ import android.view.View;
|
|
|
|
import com.android.internal.policy.ScreenDecorationsUtils;
|
|
import com.android.systemui.Interpolators;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
|
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
|
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
|
|
@@ -74,8 +70,6 @@ public class ActivityLaunchAnimator {
|
|
private boolean mAnimationPending;
|
|
private boolean mAnimationRunning;
|
|
private boolean mIsLaunchForActivity;
|
|
- private IFingerprintService mFingerprintService;
|
|
- private FODCircleViewImpl mFODCircleViewImpl;
|
|
|
|
public ActivityLaunchAnimator(
|
|
NotificationShadeWindowViewController notificationShadeWindowViewController,
|
|
@@ -83,8 +77,7 @@ public class ActivityLaunchAnimator {
|
|
NotificationPanelViewController notificationPanel,
|
|
NotificationShadeDepthController depthController,
|
|
NotificationListContainer container,
|
|
- Executor mainExecutor,
|
|
- FODCircleViewImpl fodCircleViewImpl) {
|
|
+ Executor mainExecutor) {
|
|
mNotificationPanel = notificationPanel;
|
|
mNotificationContainer = container;
|
|
mDepthController = depthController;
|
|
@@ -94,9 +87,6 @@ public class ActivityLaunchAnimator {
|
|
mWindowCornerRadius = ScreenDecorationsUtils
|
|
.getWindowCornerRadius(mNotificationShadeWindowViewController.getView()
|
|
.getResources());
|
|
- mFODCircleViewImpl = fodCircleViewImpl;
|
|
- mFingerprintService = IFingerprintService.Stub.asInterface(
|
|
- ServiceManager.getService(Context.FINGERPRINT_SERVICE));
|
|
}
|
|
|
|
public RemoteAnimationAdapter getLaunchAnimation(
|
|
@@ -273,15 +263,6 @@ public class ActivityLaunchAnimator {
|
|
mNotificationShadeWindowViewController.setExpandAnimationRunning(running);
|
|
mNotificationContainer.setExpandingNotification(running ? mSourceNotification : null);
|
|
mAnimationRunning = running;
|
|
- boolean isFPClientActive = false;
|
|
- try {
|
|
- isFPClientActive = mFingerprintService.isClientActive();
|
|
- } catch (Exception e) {
|
|
- // do nothing.
|
|
- }
|
|
- if (!isFPClientActive) {
|
|
- mFODCircleViewImpl.hideInDisplayFingerprintView();
|
|
- }
|
|
if (!running) {
|
|
mCallback.onExpandAnimationFinished(mIsFullScreenLaunch);
|
|
applyParamsToNotification(null);
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
|
index 8aca0846a67..b55d6a55bca 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
|
@@ -76,7 +76,6 @@ import android.content.res.Configuration;
|
|
import android.graphics.Point;
|
|
import android.graphics.PointF;
|
|
import android.hardware.display.DisplayManager;
|
|
-import android.hardware.fingerprint.IFingerprintService;
|
|
import android.media.AudioAttributes;
|
|
import android.metrics.LogMaker;
|
|
import android.net.Uri;
|
|
@@ -151,8 +150,6 @@ import com.android.systemui.R;
|
|
import com.android.systemui.SystemUI;
|
|
import com.android.systemui.SystemUIFactory;
|
|
import com.android.systemui.assist.AssistManager;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
-import com.android.systemui.biometrics.FODCircleViewImplCallback;
|
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
|
import com.android.systemui.bubbles.BubbleController;
|
|
import com.android.systemui.charging.WirelessChargingAnimation;
|
|
@@ -241,7 +238,6 @@ import lineageos.providers.LineageSettings;
|
|
import java.io.FileDescriptor;
|
|
import java.io.PrintWriter;
|
|
import java.io.StringWriter;
|
|
-import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Optional;
|
|
import java.util.concurrent.Executor;
|
|
@@ -637,33 +633,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
}
|
|
};
|
|
|
|
- private ActivityManager mActivityManager;
|
|
- private boolean mFodVisibility;
|
|
- private boolean mIsDreaming;
|
|
- private FODCircleViewImpl mFODCircleViewImpl;
|
|
- private String mTopPkgClass;
|
|
- private FODCircleViewImplCallback mFODCircleViewImplCallback =
|
|
- new FODCircleViewImplCallback() {
|
|
- @Override
|
|
- public void onFODStatusChange(boolean isVisible) {
|
|
- boolean isFPClientActive = false;
|
|
- try {
|
|
- isFPClientActive = mFingerprintService.isClientActive();
|
|
- } catch (Exception e) {
|
|
- // do nothing.
|
|
- }
|
|
- mFodVisibility = isVisible;
|
|
- if (!isFPClientActive) {
|
|
- // if the client is not active, we have to nullify mTopPkgClass before
|
|
- // checking it against current foreground activity
|
|
- mTopPkgClass = null;
|
|
- return;
|
|
- } else if (isVisible && !mIsKeyguard && !mIsDreaming) {
|
|
- mTopPkgClass = getForegroundPackageNameAndClass();
|
|
- }
|
|
- }
|
|
- };
|
|
-
|
|
private KeyguardUserSwitcher mKeyguardUserSwitcher;
|
|
private final UserSwitcherController mUserSwitcherController;
|
|
private final NetworkController mNetworkController;
|
|
@@ -692,7 +661,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
new KeyguardUpdateMonitorCallback() {
|
|
@Override
|
|
public void onDreamingStateChanged(boolean dreaming) {
|
|
- mIsDreaming = dreaming;
|
|
if (dreaming) {
|
|
maybeEscalateHeadsUp();
|
|
}
|
|
@@ -717,7 +685,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
private Lazy<NotificationShadeDepthController> mNotificationShadeDepthControllerLazy;
|
|
private final BubbleController mBubbleController;
|
|
private final BubbleController.BubbleExpandListener mBubbleExpandListener;
|
|
- private final IFingerprintService mFingerprintService;
|
|
|
|
private ActivityIntentHelper mActivityIntentHelper;
|
|
|
|
@@ -807,8 +774,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
DismissCallbackRegistry dismissCallbackRegistry,
|
|
Lazy<NotificationShadeDepthController> notificationShadeDepthControllerLazy,
|
|
StatusBarTouchableRegionManager statusBarTouchableRegionManager,
|
|
- TunerService tunerService,
|
|
- FODCircleViewImpl fodCircleViewImpl) {
|
|
+ TunerService tunerService) {
|
|
super(context);
|
|
mNotificationsController = notificationsController;
|
|
mLightBarController = lightBarController;
|
|
@@ -886,7 +852,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
mIconPolicy = phoneStatusBarPolicy;
|
|
mDismissCallbackRegistry = dismissCallbackRegistry;
|
|
mTunerService = tunerService;
|
|
- mFODCircleViewImpl = fodCircleViewImpl;
|
|
|
|
mBubbleExpandListener =
|
|
(isExpanding, key) -> {
|
|
@@ -896,9 +861,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
|
|
|
|
DateTimeView.setReceiverHandler(timeTickHandler);
|
|
-
|
|
- mFingerprintService = IFingerprintService.Stub.asInterface(
|
|
- ServiceManager.getService(Context.FINGERPRINT_SERVICE));
|
|
}
|
|
|
|
@Override
|
|
@@ -1097,8 +1059,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
}
|
|
}
|
|
}, OverlayPlugin.class, true /* Allow multiple plugins */);
|
|
- mActivityManager = mContext.getSystemService(ActivityManager.class);
|
|
- mFODCircleViewImpl.registerCallback(mFODCircleViewImplCallback);
|
|
}
|
|
|
|
// ================================================================================
|
|
@@ -1407,8 +1367,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
mActivityLaunchAnimator = new ActivityLaunchAnimator(
|
|
mNotificationShadeWindowViewController, this, mNotificationPanelViewController,
|
|
mNotificationShadeDepthControllerLazy.get(),
|
|
- (NotificationListContainer) mStackScroller, mContext.getMainExecutor(),
|
|
- mFODCircleViewImpl);
|
|
+ (NotificationListContainer) mStackScroller, mContext.getMainExecutor());
|
|
|
|
// TODO: inject this.
|
|
mPresenter = new StatusBarNotificationPresenter(mContext, mNotificationPanelViewController,
|
|
@@ -1923,12 +1882,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
clearNotificationEffects();
|
|
}
|
|
|
|
- if (isExpanded && mFodVisibility) {
|
|
- mFODCircleViewImpl.hideInDisplayFingerprintView();
|
|
- } else if (!isExpanded && getForegroundPackageNameAndClass().equals(mTopPkgClass)) {
|
|
- mFODCircleViewImpl.showInDisplayFingerprintView();
|
|
- }
|
|
-
|
|
if (!isExpanded) {
|
|
mRemoteInputManager.onPanelCollapsed();
|
|
}
|
|
@@ -2650,11 +2603,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
@Override
|
|
public void onRecentsAnimationStateChanged(boolean running) {
|
|
setInteracting(StatusBarManager.WINDOW_NAVIGATION_BAR, running);
|
|
- if (!running && getForegroundPackageNameAndClass().equals(mTopPkgClass)) {
|
|
- mFODCircleViewImpl.showInDisplayFingerprintView();
|
|
- } else {
|
|
- mFODCircleViewImpl.hideInDisplayFingerprintView();
|
|
- }
|
|
}
|
|
|
|
protected BarTransitions getStatusBarTransitions() {
|
|
@@ -4680,22 +4628,4 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|
public void suppressAmbientDisplay(boolean suppressed) {
|
|
mDozeServiceHost.setDozeSuppressed(suppressed);
|
|
}
|
|
-
|
|
- private String getForegroundPackageNameAndClass() {
|
|
- List<ActivityManager.RunningTaskInfo> tasks = mActivityManager.getRunningTasks(1);
|
|
- if (tasks.isEmpty()) {
|
|
- return null;
|
|
- }
|
|
- ActivityManager.RunningTaskInfo currentTask = tasks.get(0);
|
|
- ComponentName currentActivity = currentTask.topActivity;
|
|
- if (currentActivity.getPackageName() != null) {
|
|
- return currentActivity.getPackageName().trim() +
|
|
- currentActivity.getShortClassName().trim();
|
|
- }
|
|
- return null;
|
|
- }
|
|
-
|
|
- public int getFodHeight(boolean includeDecor) {
|
|
- return mFODCircleViewImpl.getHeight(includeDecor);
|
|
- }
|
|
}
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
|
index 68b83fb68d5..b354e45bfde 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
|
@@ -115,7 +115,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|
|
|
@Override
|
|
public void onStartingToShow() {
|
|
- updateStates();
|
|
updateLockIcon();
|
|
}
|
|
|
|
@@ -163,7 +162,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|
protected boolean mLastShowing;
|
|
protected boolean mLastOccluded;
|
|
private boolean mLastBouncerShowing;
|
|
- private boolean mLastBouncerInTransit;
|
|
private boolean mLastBouncerDismissible;
|
|
protected boolean mLastRemoteInputActive;
|
|
private boolean mLastDozing;
|
|
@@ -810,7 +808,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|
boolean showing = mShowing;
|
|
boolean occluded = mOccluded;
|
|
boolean bouncerShowing = mBouncer.isShowing();
|
|
- boolean bouncerInTransit = mBouncer.inTransit();
|
|
boolean bouncerDismissible = !mBouncer.isFullscreenBouncer();
|
|
boolean remoteInputActive = mRemoteInputActive;
|
|
|
|
@@ -839,11 +836,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|
if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) {
|
|
mKeyguardUpdateManager.onKeyguardVisibilityChanged(showing && !occluded);
|
|
}
|
|
-
|
|
- boolean bouncerVisible = bouncerShowing || bouncerInTransit;
|
|
- boolean lastBouncerVisible = mLastBouncerShowing || mLastBouncerInTransit;
|
|
- if (bouncerVisible != lastBouncerVisible || mFirstUpdate) {
|
|
- mKeyguardUpdateManager.sendKeyguardBouncerChanged(bouncerVisible);
|
|
+ if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) {
|
|
+ mKeyguardUpdateManager.sendKeyguardBouncerChanged(bouncerShowing);
|
|
}
|
|
|
|
mFirstUpdate = false;
|
|
@@ -851,7 +845,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|
mLastGlobalActionsVisible = mGlobalActionsVisible;
|
|
mLastOccluded = occluded;
|
|
mLastBouncerShowing = bouncerShowing;
|
|
- mLastBouncerInTransit = bouncerInTransit;
|
|
mLastBouncerDismissible = bouncerDismissible;
|
|
mLastRemoteInputActive = remoteInputActive;
|
|
mLastDozing = mDozing;
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
|
|
index dfd4c6b5d46..8c0dd002eb0 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
|
|
@@ -30,7 +30,6 @@ import com.android.keyguard.KeyguardUpdateMonitor;
|
|
import com.android.keyguard.ViewMediatorCallback;
|
|
import com.android.systemui.InitController;
|
|
import com.android.systemui.assist.AssistManager;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
|
import com.android.systemui.bubbles.BubbleController;
|
|
import com.android.systemui.colorextraction.SysuiColorExtractor;
|
|
@@ -201,8 +200,7 @@ public interface StatusBarPhoneModule {
|
|
Lazy<NotificationShadeDepthController> notificationShadeDepthController,
|
|
DismissCallbackRegistry dismissCallbackRegistry,
|
|
StatusBarTouchableRegionManager statusBarTouchableRegionManager,
|
|
- TunerService tunerService,
|
|
- FODCircleViewImpl fodCircleViewImpl) {
|
|
+ TunerService tunerService) {
|
|
return new StatusBar(
|
|
context,
|
|
notificationsController,
|
|
@@ -281,7 +279,6 @@ public interface StatusBarPhoneModule {
|
|
dismissCallbackRegistry,
|
|
notificationShadeDepthController,
|
|
statusBarTouchableRegionManager,
|
|
- tunerService,
|
|
- fodCircleViewImpl);
|
|
+ tunerService);
|
|
}
|
|
}
|
|
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
|
|
index 3e5454d84d0..2fa6cf02d8b 100644
|
|
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
|
|
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
|
|
@@ -30,7 +30,6 @@ import android.view.RemoteAnimationAdapter;
|
|
import android.view.View;
|
|
|
|
import com.android.systemui.SysuiTestCase;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
|
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
|
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
|
|
@@ -70,8 +69,6 @@ public class ActivityLaunchAnimatorTest extends SysuiTestCase {
|
|
private NotificationShadeDepthController mNotificationShadeDepthController;
|
|
@Mock
|
|
private NotificationPanelViewController mNotificationPanelViewController;
|
|
- @Mock
|
|
- private FODCircleViewImpl mFODCircleViewImpl;
|
|
@Rule
|
|
public MockitoRule rule = MockitoJUnit.rule();
|
|
|
|
@@ -87,8 +84,7 @@ public class ActivityLaunchAnimatorTest extends SysuiTestCase {
|
|
mNotificationPanelViewController,
|
|
mNotificationShadeDepthController,
|
|
mNotificationContainer,
|
|
- mExecutor,
|
|
- mFODCircleViewImpl);
|
|
+ mExecutor);
|
|
}
|
|
|
|
@Test
|
|
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
|
|
index c6dba6b8b80..474e9d7446f 100644
|
|
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
|
|
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
|
|
@@ -79,7 +79,6 @@ import com.android.systemui.InitController;
|
|
import com.android.systemui.R;
|
|
import com.android.systemui.SysuiTestCase;
|
|
import com.android.systemui.assist.AssistManager;
|
|
-import com.android.systemui.biometrics.FODCircleViewImpl;
|
|
import com.android.systemui.broadcast.BroadcastDispatcher;
|
|
import com.android.systemui.bubbles.BubbleController;
|
|
import com.android.systemui.classifier.FalsingManagerFake;
|
|
@@ -241,7 +240,6 @@ public class StatusBarTest extends SysuiTestCase {
|
|
@Mock private DismissCallbackRegistry mDismissCallbackRegistry;
|
|
@Mock private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
|
|
@Mock private TunerService mTunerService;
|
|
- @Mock private FODCircleViewImpl mFODCircleViewImpl;
|
|
@Mock private ScreenPinningRequest mScreenPinningRequest;
|
|
@Mock private LockscreenLockIconController mLockscreenLockIconController;
|
|
@Mock private StatusBarNotificationActivityStarter.Builder
|
|
@@ -409,8 +407,7 @@ public class StatusBarTest extends SysuiTestCase {
|
|
mDismissCallbackRegistry,
|
|
mNotificationShadeDepthControllerLazy,
|
|
mStatusBarTouchableRegionManager,
|
|
- mTunerService,
|
|
- mFODCircleViewImpl);
|
|
+ mTunerService);
|
|
|
|
when(mNotificationShadeWindowView.findViewById(R.id.lock_icon_container)).thenReturn(
|
|
mLockIconContainer);
|
|
diff --git a/services/core/Android.bp b/services/core/Android.bp
|
|
index 55e109e3329..7ad86fae59f 100644
|
|
--- a/services/core/Android.bp
|
|
+++ b/services/core/Android.bp
|
|
@@ -141,7 +141,6 @@ java_library_static {
|
|
"org.lineageos.platform.internal",
|
|
"overlayable_policy_aidl-java",
|
|
"SurfaceFlingerProperties",
|
|
- "vendor.lineage.biometrics.fingerprint.inscreen-V1.0-java",
|
|
],
|
|
}
|
|
|
|
diff --git a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
|
|
index 5bb4d272eae..70369732fea 100644
|
|
--- a/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
|
|
+++ b/services/core/java/com/android/server/biometrics/BiometricServiceBase.java
|
|
@@ -1047,7 +1047,7 @@ public abstract class BiometricServiceBase extends SystemService
|
|
/**
|
|
* @return true if this is keyguard package
|
|
*/
|
|
- protected boolean isKeyguard(String clientPackage) {
|
|
+ private boolean isKeyguard(String clientPackage) {
|
|
return mKeyguardPackage.equals(clientPackage);
|
|
}
|
|
|
|
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
|
|
index 5b51aa6e72a..a90fee6788a 100644
|
|
--- a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
|
|
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
|
|
@@ -80,17 +80,12 @@ import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
-import lineageos.app.LineageContextConstants;
|
|
-
|
|
-import vendor.lineage.biometrics.fingerprint.inscreen.V1_0.IFingerprintInscreen;
|
|
-
|
|
import java.io.File;
|
|
import java.io.FileDescriptor;
|
|
import java.io.PrintWriter;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
-import java.util.NoSuchElementException;
|
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
|
|
/**
|
|
@@ -112,9 +107,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
private static final long FAIL_LOCKOUT_TIMEOUT_MS = 30 * 1000;
|
|
private static final String KEY_LOCKOUT_RESET_USER = "lockout_reset_user";
|
|
|
|
- private final boolean mHasFod;
|
|
- private boolean mIsKeyguard;
|
|
-
|
|
private final class ResetFailedAttemptsForUserRunnable implements Runnable {
|
|
@Override
|
|
public void run() {
|
|
@@ -649,7 +641,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
|
|
@GuardedBy("this")
|
|
private IBiometricsFingerprint mDaemon;
|
|
- private IFingerprintInscreen mFingerprintInscreenDaemon;
|
|
private final SparseBooleanArray mTimedLockoutCleared;
|
|
private final SparseIntArray mFailedAttempts;
|
|
private final AlarmManager mAlarmManager;
|
|
@@ -671,21 +662,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
new Fingerprint(getBiometricUtils().getUniqueName(getContext(), groupId),
|
|
groupId, fingerId, deviceId);
|
|
FingerprintService.super.handleEnrollResult(fingerprint, remaining);
|
|
- if (remaining == 0 && mHasFod) {
|
|
- IFingerprintInscreen fodDaemon = getFingerprintInScreenDaemon();
|
|
- if (fodDaemon != null) {
|
|
- try {
|
|
- fodDaemon.onFinishEnroll();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "onFinishEnroll failed", e);
|
|
- }
|
|
- }
|
|
- try {
|
|
- mStatusBarService.hideInDisplayFingerprintView();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "hideInDisplayFingerprintView failed", e);
|
|
- }
|
|
- }
|
|
});
|
|
}
|
|
|
|
@@ -697,16 +673,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
@Override
|
|
public void onAcquired_2_2(long deviceId, int acquiredInfo, int vendorCode) {
|
|
mHandler.post(() -> {
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- if (daemon != null) {
|
|
- try {
|
|
- if (daemon.handleAcquired(acquiredInfo, vendorCode)) {
|
|
- return;
|
|
- }
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "handleError failed", e);
|
|
- }
|
|
- }
|
|
FingerprintService.super.handleAcquired(deviceId, acquiredInfo, vendorCode);
|
|
});
|
|
}
|
|
@@ -726,29 +692,12 @@ public class FingerprintService extends BiometricServiceBase {
|
|
|
|
final Fingerprint fp = new Fingerprint("", groupId, fingerId, deviceId);
|
|
FingerprintService.super.handleAuthenticated(authenticated, fp, token);
|
|
- if (mHasFod && fp.getBiometricId() != 0) {
|
|
- try {
|
|
- mStatusBarService.hideInDisplayFingerprintView();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "hideInDisplayFingerprintView failed", e);
|
|
- }
|
|
- }
|
|
});
|
|
}
|
|
|
|
@Override
|
|
public void onError(final long deviceId, final int error, final int vendorCode) {
|
|
mHandler.post(() -> {
|
|
- IFingerprintInscreen daemon = getFingerprintInScreenDaemon();
|
|
- if (daemon != null) {
|
|
- try {
|
|
- if (daemon.handleError(error, vendorCode)) {
|
|
- return;
|
|
- }
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "handleError failed", e);
|
|
- }
|
|
- }
|
|
FingerprintService.super.handleError(deviceId, error, vendorCode);
|
|
// TODO: this chunk of code should be common to all biometric services
|
|
if (error == BiometricConstants.BIOMETRIC_ERROR_HW_UNAVAILABLE) {
|
|
@@ -796,21 +745,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
Slog.w(TAG, "authenticate(): no fingerprint HAL!");
|
|
return ERROR_ESRCH;
|
|
}
|
|
- if (mHasFod) {
|
|
- IFingerprintInscreen fodDaemon = getFingerprintInScreenDaemon();
|
|
- if (fodDaemon != null) {
|
|
- try {
|
|
- fodDaemon.setLongPressEnabled(mIsKeyguard);
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "setLongPressEnabled failed", e);
|
|
- }
|
|
- }
|
|
- try {
|
|
- mStatusBarService.showInDisplayFingerprintView();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "showInDisplayFingerprintView failed", e);
|
|
- }
|
|
- }
|
|
return daemon.authenticate(operationId, groupId);
|
|
}
|
|
|
|
@@ -821,13 +755,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
Slog.w(TAG, "cancel(): no fingerprint HAL!");
|
|
return ERROR_ESRCH;
|
|
}
|
|
- if (mHasFod) {
|
|
- try {
|
|
- mStatusBarService.hideInDisplayFingerprintView();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "hideInDisplayFingerprintView failed", e);
|
|
- }
|
|
- }
|
|
return daemon.cancel();
|
|
}
|
|
|
|
@@ -859,21 +786,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
Slog.w(TAG, "enroll(): no fingerprint HAL!");
|
|
return ERROR_ESRCH;
|
|
}
|
|
- if (mHasFod) {
|
|
- IFingerprintInscreen fodDaemon = getFingerprintInScreenDaemon();
|
|
- if (fodDaemon != null) {
|
|
- try {
|
|
- fodDaemon.onStartEnroll();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "onStartEnroll failed", e);
|
|
- }
|
|
- }
|
|
- try {
|
|
- mStatusBarService.showInDisplayFingerprintView();
|
|
- } catch (RemoteException e) {
|
|
- Slog.e(TAG, "showInDisplayFingerprintView failed", e);
|
|
- }
|
|
- }
|
|
return daemon.enroll(cryptoToken, groupId, timeout);
|
|
}
|
|
|
|
@@ -893,9 +805,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
context.registerReceiver(mLockoutReceiver, new IntentFilter(getLockoutResetIntent()),
|
|
getLockoutBroadcastPermission(), null /* handler */);
|
|
mLockPatternUtils = new LockPatternUtils(context);
|
|
-
|
|
- PackageManager packageManager = context.getPackageManager();
|
|
- mHasFod = packageManager.hasSystemFeature(LineageContextConstants.Features.FOD);
|
|
}
|
|
|
|
@Override
|
|
@@ -980,7 +889,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
|
|
daemon.setActiveGroup(userId, fpDir.getAbsolutePath());
|
|
mCurrentUserId = userId;
|
|
- mIsKeyguard = isKeyguard(clientPackage);
|
|
}
|
|
mAuthenticatorIds.put(userId,
|
|
hasEnrolledBiometrics(userId) ? daemon.getAuthenticatorId() : 0L);
|
|
@@ -1118,26 +1026,6 @@ public class FingerprintService extends BiometricServiceBase {
|
|
return mDaemon;
|
|
}
|
|
|
|
- private synchronized IFingerprintInscreen getFingerprintInScreenDaemon() {
|
|
- if (!mHasFod) {
|
|
- return null;
|
|
- }
|
|
-
|
|
- if (mFingerprintInscreenDaemon == null) {
|
|
- try {
|
|
- mFingerprintInscreenDaemon = IFingerprintInscreen.getService();
|
|
- if (mFingerprintInscreenDaemon != null) {
|
|
- mFingerprintInscreenDaemon.asBinder().linkToDeath((cookie) -> {
|
|
- mFingerprintInscreenDaemon = null;
|
|
- }, 0);
|
|
- }
|
|
- } catch (NoSuchElementException | RemoteException e) {
|
|
- Slog.e(TAG, "Failed to get IFingerprintInscreen interface", e);
|
|
- }
|
|
- }
|
|
- return mFingerprintInscreenDaemon;
|
|
- }
|
|
-
|
|
private long startPreEnroll(IBinder token) {
|
|
IBiometricsFingerprint daemon = getFingerprintDaemon();
|
|
if (daemon == null) {
|
|
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
|
|
index 2412209452b..13b9508a9c8 100644
|
|
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
|
|
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
|
|
@@ -747,28 +747,6 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D
|
|
return mTracingEnabled;
|
|
}
|
|
|
|
- @Override
|
|
- public void showInDisplayFingerprintView() {
|
|
- if (mBar != null) {
|
|
- try {
|
|
- mBar.showInDisplayFingerprintView();
|
|
- } catch (RemoteException ex) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void hideInDisplayFingerprintView() {
|
|
- if (mBar != null) {
|
|
- try {
|
|
- mBar.hideInDisplayFingerprintView();
|
|
- } catch (RemoteException ex) {
|
|
- // do nothing
|
|
- }
|
|
- }
|
|
- }
|
|
-
|
|
@Override
|
|
public void setBlockedGesturalNavigation(boolean blocked) {
|
|
if (mBar != null) {
|
|
--
|
|
2.25.1
|
|
|