diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java index e61519f058..5cc135664c 100644 --- a/src/com/android/launcher3/LauncherProvider.java +++ b/src/com/android/launcher3/LauncherProvider.java @@ -46,6 +46,58 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.function.ToIntFunction; +/** + * This provider facilitates the import and export of home screen metadata within the + * Launcher's database. This includes managing shortcut placement, launch intents, and labels. + * Each row in the Launcher3 database corresponds to a single item on the workspace (often + * referred to as "favorites"). + * + *

Only applications installed on the system partition or those possessing the platform's + * signature can access this provider. + * + *

After data insertion into the Launcher's database, a row may be deleted during Launcher + * startup if any of these conditions are true. This list is not exhaustive: + *

+ * + *

Although query, bulkInsert, and insert methods are available, their direct use is not + * recommended. Instead, prefer the XML-based insertion methods accessible via the + * {@code call()} method. This preference is due to several reasons, including: + *

+ * + *

It's important to note that the XML format has non-obvious and strict requirements. For + * instance: + *

+ * + *

During a launcher restore, a grid migration might occur, either due to user preference or + * design updates. This migration can cause items to be repositioned or moved to different pages, + * depending on the old and new grid sizes. Therefore, precise placement cannot be guaranteed + * in all situations. + */ public class LauncherProvider extends ContentProvider { private static final String TAG = "LauncherProvider";