Table creation sometimes fails scilently, which leads to a crash loop.
This way, we will try to create a table every time after crash, so
the device would eventually be able to recover.
Bug: 24263894
Change-Id: Ic0169d33f4092042423afa24320182786c544d47
* commit 'c74e41973a74aa416e16aeadaa2f491153da26bc':
Restoring provider behavior for reloading app on old devices > For older devices, launcher will only reload in case of inserts with specific query parameters > For older devices, launcehr will notify content observers of any internal inserts > Chaning TAG for Launcher provider as max logging tag is only 23 characters
> For older devices, launcher will only reload in case of inserts with specific query parameters
> For older devices, launcehr will notify content observers of any internal inserts
> Chaning TAG for Launcher provider as max logging tag is only 23 characters
Bug: 23821706
Change-Id: I32891387612d967c41ddae848c43dc4b1de1b0e9
> Renaming Lmp to Lollipop
> Lollipop_MR1 instead of directly using 22
> Using M APIs directly instead of reflection
Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
Adding support for restoring from a larger device, if the grid size
difference is not more that 1.
During restore add all the items in the DB, and run a one-time migration
the next time launcher starts.
The migration strategy is defined in ShrinkWorkspaceTask.java which involves
resizing, moving and removing some items.
Change-Id: I6ee411f6db5bf0152b527e16146a88c56dec2d97
> Not deleting icons from cache, which have not been restored yet
> Not checking if activity exists during DB migration. Missing
components are removed during loader anyway
> Backing up and restoring bitmaps even when iconType is resource.
This allows us to show a proper bitmap icon, until the correct
resource is available.
> Loading proper shortcutResource icon for promiseIcons
> Checking against promise intent when verifying duplicates
> A launcher App intent can contain EXTRA_PROFILE
Bug: 22094970
Change-Id: I982971338846733833ec133119393af0bea0eb08
> Using callback insted of using a content observer
> Setting the listener in LauncherAppState to prevent resource leak
Change-Id: Id23a4d5c8812e86178997e536226e09ec3740f84
> Previously folders were getting deleted based on in-memory
loader state. If for some reason, an item failed to load, we would
delete the folder from DB as well.
Bug: 21354058
Change-Id: I5318ee8a99afa9cafd93ed2b9ef0e155f502a41b
> Make package-private and @Thunk all private methods and constructors accessed from inner classes.
Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
-> Pulling out the parts of device profile which can (and need to be)
initialized and accessed without access to an Activity context,
ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
and we will create one of these for each Activity instance, and
this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
all appropriate dimensions can be computed without an Activity
context (by only specifying orientation). This would be an
extension of this CL and allow us to know exactly how launcher
will look in both orientations from any context.
Sets the stage for some improvements around b/19514688
Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
> Use low res only for app shortcuts
> Running icon migration after restore
> Running icon migration again for all users
> Deduping shortcuts added from widget tray
Bug: 20945600
Change-Id: I3bb47545fdd9832510069026fbae8966d2311cc1
> This ensures that the classLoader does not need to load
LauncherProvider to access LauncherSettings
> Making a few fields public.
Change-Id: I2e8ee6e169552739f09e500d3b6acbcee7cd0718
> Only deduping shortcuts for the primary user as custom shortcuts
for secondary users is not supported.
Change-Id: If129dee64a395602006ebb996d4b09b93b89084f
Elimates 304 methods based on dex analysis
The java compiler generates sythetic accessor methods for all private
fields, methods and contructors accessed from inner classes. By marking them
package-private and @Thunk instead, sythentic accessor methods are no
longer needeed. These annotated elements should be treated as private.
Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
> Adding options column in DB to store generation purpose flags
> Storing isSorted flag in FolderInfo
> Adding a switch for A-Z sorting (only visible if pageCount > 1)
> When in sorted mode, spring-load snaps to the target location for 1.5 seconds
Change-Id: I8c7c778d2cc3ccbd35a2890a1a705e1c1a7e9a66
Since screenId is changed to primary key, the rowId can now be 0 (earlier
it was auto-increment and never 0)
Bug: 19566734
Change-Id: Icf0e4294a581039101df1ad1756fdb6e581c4cba
Content providers are created during process startup (before Application.onCreate),
and we should not be doing expensive stuff in Provider.onCreate
Adding an exception for now as it looks like LauncherProvider initialization is needed
before we can show meaningful UI.
Bug: 19094644
Change-Id: I860c2934c110d3a43f1a3afa00729077dc64796c
> Removing DB upgrade logic for versions before 12. Launcher3
was forked off Launcher2 when DB version was already 12, so, there
can never be a lower version of the DB.
> Removing logic for auto import of launcher2 DB. This flow had
been permanently disabled by a flag, and we show a confirmation
prompt/cling before migration
Change-Id: I2ac2f21fefc41ee247164566a088927263b09459