Handle messages to update Launcher preview color
Receive color update messages with a list of color resource ids and a corresponding list of color overrides, and adjust the preview accordingly. Flag: com.android.systemui.shared.new_customization_picker_ui Test: manually verified that the selected colors are previewed Bug: 350718581 Change-Id: Ibcde0575416df00b76627ac1004f21f5f9af1196
This commit is contained in:
@@ -95,6 +95,7 @@ public class GridCustomizationsProvider extends ContentProvider {
|
||||
|
||||
private static final int MESSAGE_ID_UPDATE_PREVIEW = 1337;
|
||||
private static final int MESSAGE_ID_UPDATE_GRID = 7414;
|
||||
private static final int MESSAGE_ID_UPDATE_COLOR = 856;
|
||||
|
||||
// Set of all active previews used to track duplicate memory allocations
|
||||
private final Set<PreviewLifecycleObserver> mActivePreviews =
|
||||
@@ -289,6 +290,11 @@ public class GridCustomizationsProvider extends ContentProvider {
|
||||
renderer.updateGrid(gridName);
|
||||
}
|
||||
break;
|
||||
case MESSAGE_ID_UPDATE_COLOR:
|
||||
if (Flags.newCustomizationPickerUi()) {
|
||||
renderer.previewColor(message.getData());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// Unknown command, destroy lifecycle
|
||||
Log.d(TAG, "Unknown preview command: " + message.what + ", destroying preview");
|
||||
|
||||
Reference in New Issue
Block a user