We need to make sure the custom content is adding synchronously
while the rest of the workspace is being created. If we wait
for it to be added in a separate run task, we see a black
flash during rotation.
Also rename a few methods and remove obsolete methods.
Bug: 11802691
Change-Id: I3f6500aa1fabe68cef59ad8c764877f954986a99
Naive fix to b/12656485. Other Runnables in Launcher similarly check
that mWorkspace hasn't become null between being posted and being
executed, so I think this is probably appropriate.
Bug: 12656485
Change-Id: Ib4f3d0e8686c6249fe838144b1e8120c85f66f01
The appereance of the settings button in overview mode is now dependent on
a overridable method, such that we can have it in GEL, but not in Launcher3.
This change also adjusts the logic of how wide the overview panel is, depending
on how many items we have.
Bug: 12441429
Change-Id: Ibf537c26602785f565292cbfa213eb123469ebcd
The AllApps button doesn't usually accept longpresses, but
you can trick it into trying by holding one finger on it and
another on another icon in the hotseat. This patch defends
against that and bails out if the longpressed item has the
all apps rank (position in hotseat).
Bug: 11740833
Change-Id: I99785ccbc9e6dc6be2a9e56289b3cc0275fbb65c
The user will be able to request "icon migration", which is
not a direct mapping of the old workspace, but rather
follows this heuristic for bringing the user's favorite
icons (by dint of their existence on the workspace) into
Launcher3:
Workspace shortcuts are placed in lexicographic order on the workspace
starting at screen 0 (leaving the bottom row of screen 0 empty to make
sure there's room to move things around). Folders are preserved and
their contents sorted. Duplicate icons (that is, shortcuts
with the same intent, pursuant to some cleanups) are removed.
Hotseat icons are migrated in their original place, unless their new
location is not accommodated by the hotseat (i.e. the L3 hotseat is
too small on this device), in which case they're treated like any
other shortcut and tossed into the workspace.
To test, turn on Launcher.ENABLE_DEBUG_INTENTS and then:
$ adb shell am broadcast -a com.android.launcher3.action.DELETE_DATABASE
$ adb shell am broadcast -a com.android.launcher3.action.MIGRATE_DATABASE
Bug: 12416411
Change-Id: Ia5c56f36c11455867ea20a39f70210f595020a87
- Moving the property to LauncherAppState
- The property is only read on dogfood builds.
The property can be set using setprop or /data/local.prop
Change-Id: I14c7354efb12edb93f97e81687a6f920cc634e9a
- This allows GEL to initially supply an empty string if hotword isn't
active, and later on update the cling if and when the hotword becomes
active.
- This isn't expensive as it'll only be called if Launcher first calls
getFirstRunClingSearchBarHint, i.e. once every fresh install/clear
data
Bug: 11116105
Change-Id: Ia963bb62d7b331afd0c34adfa6c4b6bdbac48349
Previously, LoaderTask would be run asynchronously to bind
the workspace when started on -1 which would cause the user's
wallpaper to briefly flash when rotating the device on -1.
Bug: 11802691
Change-Id: I3a1a7a32fa28a81e041a283a93d808d5a8884133