From 9aa5430865783f764b375c3fb7fe80f4ef8d2bab Mon Sep 17 00:00:00 2001
From: N0m4n904 <noah.anleitner@halogenos.org>
Date: Sat, 28 Dec 2024 09:26:07 +0100
Subject: [PATCH] Revert "surfaceflinger: Allow ZOrder override for UDFPS dim
 layer"

This reverts commit a4dfaaa4970684aa8c1f4017af3b826b7427d6ec.
---
 .../include/compositionengine/UdfpsExtension.h              | 4 +---
 .../surfaceflinger/CompositionEngine/src/OutputLayer.cpp    | 3 ---
 .../surfaceflinger/CompositionEngine/src/UdfpsExtension.cpp | 6 +-----
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/services/surfaceflinger/CompositionEngine/include/compositionengine/UdfpsExtension.h b/services/surfaceflinger/CompositionEngine/include/compositionengine/UdfpsExtension.h
index cf69da9855..4306cb4a02 100644
--- a/services/surfaceflinger/CompositionEngine/include/compositionengine/UdfpsExtension.h
+++ b/services/surfaceflinger/CompositionEngine/include/compositionengine/UdfpsExtension.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021-2024 The LineageOS Project
+ * Copyright 2021-2022 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.
@@ -20,11 +20,9 @@
 #define __UDFPS_EXTENSION__H__
 
 #define UDFPS_BIOMETRIC_PROMPT_LAYER_NAME "BiometricPrompt"
-#define UDFPS_DIM_LAYER_NAME "Dim Layer for UDFPS"
 #define UDFPS_LAYER_NAME "UdfpsControllerOverlay"
 #define UDFPS_TOUCHED_LAYER_NAME "SurfaceView[UdfpsControllerOverlay](BLAST)"
 
-extern uint32_t getUdfpsDimZOrder(uint32_t z);
 extern uint32_t getUdfpsZOrder(uint32_t z, bool touched);
 extern uint64_t getUdfpsUsageBits(uint64_t usageBits, bool touched);
 
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index 45f98eb8a8..408c58cc6e 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -463,9 +463,6 @@ void OutputLayer::writeOutputDependentGeometryStateToHWC(HWC2::Layer* hwcLayer,
         (strncmp(getLayerFE().getDebugName(), UDFPS_BIOMETRIC_PROMPT_LAYER_NAME,
                  strlen(UDFPS_BIOMETRIC_PROMPT_LAYER_NAME)) == 0)) {
         z_udfps = getUdfpsZOrder(z, false);
-    } else if (strncmp(getLayerFE().getDebugName(), UDFPS_DIM_LAYER_NAME,
-                       strlen(UDFPS_DIM_LAYER_NAME)) == 0) {
-        z_udfps = getUdfpsDimZOrder(z);
     } else if (strncmp(getLayerFE().getDebugName(), UDFPS_TOUCHED_LAYER_NAME,
                        strlen(UDFPS_TOUCHED_LAYER_NAME)) == 0) {
         z_udfps = getUdfpsZOrder(z, true);
diff --git a/services/surfaceflinger/CompositionEngine/src/UdfpsExtension.cpp b/services/surfaceflinger/CompositionEngine/src/UdfpsExtension.cpp
index 5ae381597d..2d9d086dd2 100644
--- a/services/surfaceflinger/CompositionEngine/src/UdfpsExtension.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/UdfpsExtension.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2020-2024 The LineageOS Project
+ * Copyright 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.
@@ -17,10 +17,6 @@
 #ifndef TARGET_PROVIDES_UDFPS_LIB
 #include <compositionengine/UdfpsExtension.h>
 
-uint32_t getUdfpsDimZOrder(uint32_t z) {
-    return z;
-}
-
 uint32_t getUdfpsZOrder(uint32_t z, __unused bool touched) {
     return z;
 }
-- 
GitLab