From e8dd1a78ff2202510cc747491496a56d160215a4 Mon Sep 17 00:00:00 2001 From: Alejandro Nijamkin Date: Thu, 16 Feb 2023 11:34:07 -0800 Subject: [PATCH] [Launcher] App grid support for reset (1/4). This CL chain provides a rewritten implementation of the UI for the app grid selector which supports the new wallpaper picker "reset" functionality. A previous attempt that kept the UI's old implementation required the introduction of many hacks in classes that are shared across multiple selector-like experiences. Bug: 267804479 Test: unit and integration JUnit tests added for the data, domain, and ui layers of the wallpaper picker code Test: manually made sure that the selector works to switch between different launcher app icon grid options; the preview of the launcher updates correctly; when exiting back to the main wallpaper picker screen, the reset button appears and the section item is updated to show the currently-selected option; touching the reset button and confirming the reset correctly reverts to the original option, updating the section item as well Change-Id: If1f8c96ef5004125b61ff6b4ae19848932693e0f --- .../android/launcher3/graphics/GridCustomizationsProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/launcher3/graphics/GridCustomizationsProvider.java b/src/com/android/launcher3/graphics/GridCustomizationsProvider.java index 9426c22509..2c8f1f3a2a 100644 --- a/src/com/android/launcher3/graphics/GridCustomizationsProvider.java +++ b/src/com/android/launcher3/graphics/GridCustomizationsProvider.java @@ -138,12 +138,14 @@ public class GridCustomizationsProvider extends ContentProvider { } idp.setCurrentGrid(getContext(), gridName); + getContext().getContentResolver().notifyChange(uri, null); return 1; } case ICON_THEMED: case SET_ICON_THEMED: { LauncherPrefs.get(getContext()) .put(THEMED_ICONS, values.getAsBoolean(BOOLEAN_VALUE)); + getContext().getContentResolver().notifyChange(uri, null); return 1; } default: