Align color resources in launcher projects.

This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
This commit is contained in:
Marcelo Arteiro
2024-07-01 18:18:08 +00:00
parent 2495e980ed
commit f38d98d1a6
81 changed files with 477 additions and 783 deletions
@@ -15,6 +15,7 @@
*/
package com.android.launcher3.util;
import android.R;
import android.content.Context;
import android.content.ContextWrapper;
import android.view.ContextThemeWrapper;
@@ -39,11 +40,16 @@ public class ActivityContextWrapper extends ContextThemeWrapper implements Activ
private final MyDragLayer mMyDragLayer;
public ActivityContextWrapper(Context base) {
super(base, android.R.style.Theme_DeviceDefault);
this(base, R.style.Theme_DeviceDefault);
}
public ActivityContextWrapper(Context base, int theme) {
super(base, theme);
mProfile = InvariantDeviceProfile.INSTANCE.get(base).getDeviceProfile(base).copy(base);
mMyDragLayer = new MyDragLayer(this);
}
@Override
public BaseDragLayer getDragLayer() {
return mMyDragLayer;