ColorContoller: Fix getting default accent color
For some reason typed array is not working for users with a dirty flash after adding RGB picker
Use settingslib to get it
Signed-off-by: Varun Date <date.varun123@gmail.com>
Change-Id: Ifa76e98658a70097ed0a9341c066eb1824979eca
diff --git a/src/com/android/systemui/navigation/pulse/ColorController.java b/src/com/android/systemui/navigation/pulse/ColorController.java
index ca2c0bc..f8c04eb 100644
--- a/src/com/android/systemui/navigation/pulse/ColorController.java
+++ b/src/com/android/systemui/navigation/pulse/ColorController.java
@@ -35,6 +35,7 @@
import android.util.TypedValue;
import com.android.internal.util.ContrastColorUtil;
+import com.android.settingslib.Utils;
public class ColorController extends ContentObserver
implements ColorAnimator.ColorAnimationListener,
@@ -127,9 +128,7 @@
}
int getAccentColor() {
- final TypedValue value = new TypedValue();
- mContext.getTheme().resolveAttribute(android.R.attr.colorAccent, value, true);
- return value.data;
+ return Utils.getColorAccentDefaultColor(mContext);
}
@Override