App Pairs (behind flag): Add new ItemInfo types and DB save functionality
This is the second of several patches implementing the App Pairs feature behind a flag.
This patch includes:
- AppPairsController, a new controller that will handle creation, launching, and deletion of app pairs
- ITEM_TYPE_APP_PAIR is a new type of FolderInfo (FolderInfo now can be either a folder or an app pair, and should probably be renamed to CollectionInfo or something more generic in future)
- Necessary plumbing for these new types
- Database code that handles saving a new app pair to the database with the correct schema
Flag: ENABLE_APP_PAIRS (set to false)
Bug: 274189428
Test: Not included in this CL, but will follow
Change-Id: Ie3aefd4eb9171f471789f54876de742849d3013b
diff --git a/src/com/android/launcher3/LauncherSettings.java b/src/com/android/launcher3/LauncherSettings.java
index 1cd2a30..ad03221 100644
--- a/src/com/android/launcher3/LauncherSettings.java
+++ b/src/com/android/launcher3/LauncherSettings.java
@@ -112,6 +112,10 @@
*/
public static final int ITEM_TYPE_DEEP_SHORTCUT = 6;
+ /**
+ * The favorite is an app pair for launching split screen
+ */
+ public static final int ITEM_TYPE_APP_PAIR = 10;
// *** Below enum values are used for metrics purpose but not used in Favorites DB ***
@@ -256,6 +260,7 @@
case ITEM_TYPE_DEEP_SHORTCUT: return "DEEPSHORTCUT";
case ITEM_TYPE_TASK: return "TASK";
case ITEM_TYPE_QSB: return "QSB";
+ case ITEM_TYPE_APP_PAIR: return "APP_PAIR";
default: return String.valueOf(type);
}
}