From 69783ad68a262d10530b278d8dbe58ae7a9eacea Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Mon, 20 May 2024 15:04:28 +0800 Subject: [PATCH] Revert "Color transform fix" This reverts commit 8c025657014280e8391c0f49f633d5ae53c021db. --- .../base/99_0261-Color-transform-fix.patch | 113 ------------------ 1 file changed, 113 deletions(-) delete mode 100644 aosp_diff/base_aaos/frameworks/base/99_0261-Color-transform-fix.patch diff --git a/aosp_diff/base_aaos/frameworks/base/99_0261-Color-transform-fix.patch b/aosp_diff/base_aaos/frameworks/base/99_0261-Color-transform-fix.patch deleted file mode 100644 index 1c1cea373a..0000000000 --- a/aosp_diff/base_aaos/frameworks/base/99_0261-Color-transform-fix.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 9df8d585174b2b75454580731ef755e415e98123 Mon Sep 17 00:00:00 2001 -From: zhonghuis -Date: Thu, 25 Apr 2024 17:54:24 +0000 -Subject: [PATCH] Color transform fix - -Update color transform reboot setting to fix -previous performance regression issue - -Tracked-On: OAM-117740 -Signed-off-by: zhonghuis ---- - .../display/color/ColorDisplayService.java | 65 ++++++++++--------- - 1 file changed, 35 insertions(+), 30 deletions(-) - -diff --git a/services/core/java/com/android/server/display/color/ColorDisplayService.java b/services/core/java/com/android/server/display/color/ColorDisplayService.java -index 138ab3bdfc87..48baa7e6c57d 100644 ---- a/services/core/java/com/android/server/display/color/ColorDisplayService.java -+++ b/services/core/java/com/android/server/display/color/ColorDisplayService.java -@@ -493,56 +493,61 @@ public final class ColorDisplayService extends SystemService { - - void setContrastInitial() { - int contrastValue = setColorTransformProperty(PROP_KEY_CONTRAST, DEFAULT_CONTRAST_LEVEL); -- contrastValue = (contrastValue >= 0 && contrastValue <= 255) ? contrastValue : DEFAULT_CONTRAST_LEVEL; -- final long token = Binder.clearCallingIdentity(); -- try { -- setContrastLevelInternal(contrastValue); -- } finally { -- Binder.restoreCallingIdentity(token); -+ if (contrastValue >= 0 && contrastValue <= 255 && contrastValue != DEFAULT_CONTRAST_LEVEL){ -+ final long token = Binder.clearCallingIdentity(); -+ try { -+ setContrastLevelInternal(contrastValue); -+ } finally { -+ Binder.restoreCallingIdentity(token); -+ } - } - } - - void setHueInitial() { - int hueValue = setColorTransformProperty(PROP_KEY_HUE, DEFAULT_HUE_LEVEL); -- hueValue = (hueValue >= 0 && hueValue <= 360) ? hueValue : DEFAULT_HUE_LEVEL; -- final long token = Binder.clearCallingIdentity(); -- try { -- setHueLevelInternal(hueValue); -- } finally { -- Binder.restoreCallingIdentity(token); -+ if (hueValue >= 0 && hueValue <= 360 && hueValue != DEFAULT_HUE_LEVEL){ -+ final long token = Binder.clearCallingIdentity(); -+ try { -+ setHueLevelInternal(hueValue); -+ } finally { -+ Binder.restoreCallingIdentity(token); -+ } - } - } - - void setSaturationInitial() { - int saturationValue = setColorTransformProperty(PROP_KEY_SATURATION, DEFAULT_SATURATION_LEVEL); -- saturationValue = (saturationValue >= 0 && saturationValue <= 100) ? saturationValue : DEFAULT_SATURATION_LEVEL; -- final long token = Binder.clearCallingIdentity(); -- try { -- setSaturationLevelInternal(saturationValue); -- } finally { -- Binder.restoreCallingIdentity(token); -+ if (saturationValue >= 0 && saturationValue <= 100 && saturationValue != DEFAULT_SATURATION_LEVEL){ -+ final long token = Binder.clearCallingIdentity(); -+ try { -+ setSaturationLevelInternal(saturationValue); -+ } finally { -+ Binder.restoreCallingIdentity(token); -+ } - } - } - - void setWhitebalanceInitial() { - int whitebalanceValue = setColorTransformProperty(PROP_KEY_WHITEBALANCE, DEFAULT_WHITEBALANCE_LEVEL); -- whitebalanceValue = (whitebalanceValue >= 0 && whitebalanceValue <= 200) ? whitebalanceValue : DEFAULT_WHITEBALANCE_LEVEL; -- final long token = Binder.clearCallingIdentity(); -- try { -- setWhitebalanceLevelInternal(whitebalanceValue); -- } finally { -- Binder.restoreCallingIdentity(token); -+ if (whitebalanceValue >= 0 && whitebalanceValue <= 200 && whitebalanceValue != DEFAULT_WHITEBALANCE_LEVEL){ -+ final long token = Binder.clearCallingIdentity(); -+ try { -+ setWhitebalanceLevelInternal(whitebalanceValue); -+ } finally { -+ Binder.restoreCallingIdentity(token); -+ } - } - } - - void setLuminanceInitial() { - int luminanceValue = setColorTransformProperty(PROP_KEY_LUMINANCE, DEFAULT_LUMINANCE_LEVEL); -- luminanceValue = (luminanceValue >= 0 && luminanceValue <= 255) ? luminanceValue : DEFAULT_LUMINANCE_LEVEL; -- final long token = Binder.clearCallingIdentity(); -- try { -- setLuminanceLevelInternal(luminanceValue); -- } finally { -- Binder.restoreCallingIdentity(token); -+ if (luminanceValue >= 0 && luminanceValue <= 255 && luminanceValue != DEFAULT_LUMINANCE_LEVEL){ -+ final long token = Binder.clearCallingIdentity(); -+ try { -+ setLuminanceLevelInternal(luminanceValue); -+ } finally { -+ Binder.restoreCallingIdentity(token); -+ } - } - } - --- -2.34.1 -