Created
December 3, 2020 17:06
-
-
Save Dil3mm4/8f0846d90c46cf5fb0f3fb99345caf8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From da934ae53fc57e3fc822478c302825971602d7af Mon Sep 17 00:00:00 2001 | |
From: Dil3mm4 <[email protected]> | |
Date: Thu, 3 Dec 2020 16:39:34 +0000 | |
Subject: [PATCH] LockIcon: refresh icon onThemeChanged | |
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java | |
index 585795502625..da0950228114 100644 | |
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java | |
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java | |
@@ -20,6 +20,7 @@ import android.annotation.IntDef; | |
import android.content.Context; | |
import android.content.res.ColorStateList; | |
import android.content.res.Configuration; | |
+import android.content.res.TypedArray; | |
import android.graphics.Color; | |
import android.graphics.drawable.Animatable2; | |
import android.graphics.drawable.AnimatedVectorDrawable; | |
@@ -273,4 +274,11 @@ public class LockIcon extends KeyguardAffordanceView { | |
} | |
+ public void onThemeChanged() { | |
+ TypedArray typedArray = getContext().getTheme().obtainStyledAttributes( | |
+ null, new int[]{ R.attr.wallpaperTextColor }, 0, 0); | |
+ int iconColor = typedArray.getColor(0, Color.WHITE); | |
+ typedArray.recycle(); | |
+ onThemeChange(iconColor); | |
+ } | |
} | |
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 f45385783ccd..01566d183246 100644 | |
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | |
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | |
@@ -1516,6 +1516,7 @@ public class StatusBar extends SystemUI implements DemoMode, | |
if (mAmbientIndicationContainer instanceof AutoReinflateContainer) { | |
((AutoReinflateContainer) mAmbientIndicationContainer).inflateLayout(); | |
} | |
+ mLockscreenLockIconController.getView().onThemeChanged(); | |
mNotificationIconAreaController.onThemeChanged(); | |
} | |
-- | |
2.20.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment