Use LauncherApps API and badging APIs instead of PackageManager.
With compatability layer that uses PackageManager pre L.
Adds support to show apps from current user and any managed profiles.
Background: Managed profiles are user sandboxes that are visible from
the primary user and can be launched as if they are a part of this user.
A launcher should now be capable of listing apps from this user as well
as related profiles of this user.
Launching of activities is now via the LauncherApps interface, to allow
for cross-profile app launching. Only activities with category LAUNCHER
can be added as a shortcut on the workspace for a managed profile.
Widgets and non-application shortcuts are only supported for the
current profile. Widgets from the managed profile are not available.
Change-Id: I5f396b1bf7f91ad91a5710ea4a0fd14573972eb9
-> Delete items contained directly on the desktop whose screens
no longer exist (do not remove items contained in hotseat or
folders, except as described below)
-> Delete items contained by folder ids which are no longer present
(ie. orphaned as their parent folder no long exists)
Change-Id: I2f47cc970ce00677cb1c83c0f0a2d13b6f16a33e
Traditionally Launcher workspace customization is offered through
overlays at build time, but we don't have access to partner-specific
customization at build time. To solve this, this adds a new
"partner-folder" tag which points at an XML resource provided by
an external package.
The external package XML can't depend on the binary XML attributes
defined by Launcher3, so we switch to using manual string-based
attribute lookups. Partners can also provide extra wallpapers.
When a folder only results in a single item, promote that item into
the folder location instead of deleting completely.
Bug: 13340779
Change-Id: Ide558288bef4113565f288b700d8245055c0fee9
-> Any workspace item whose screen id is not present in the
screens table is removed from the database. This is
intended to restore database consistency.
issue 13741729
Change-Id: I9a04b4165f1d85541025fcf48ddf2ad9e39ae94e
Move the URI used to import favorites from launcher2 to be loaded
from a string resource. This allows it to be overridden.
This will enable permissions fix for GoogleSearch.
Bug: 12058200
Change-Id: I31243fe89f545c9771d5cceffe1c9e7668a42bc5
Adds support for new types in default_workspace xml files.
Adds support to favorite that attempts to resolve an intent specified
by URI. If a logical choice can be found from the resolve, it adds the
shortcut.
Adds support for a resolve, which contains several favorites and attempts
to add the shortcuts until one is successful.
Bug: 10547358
Change-Id: Ia30341e77e7d4a0bd4a4f4e6a3d9ce2a48a46237
Launcher2 on sw720dp devices had 8 hotseat slots; Launcher3
has only 6 on those same devices. When importing the old
hotseat, the empty slot (so technically there were 9)
occupied by the all apps button didn't line up with the new
all apps button, causing a hole on the hotseat. Furthermore,
the icon in old position 3 was clobbered by the new all apps
icon:
0 1 2 3 (#) 4 5 6 7 ==> 0 1 2 (:) _ 4 5
In this CL we introduce a separate sort-and-place step for
hotseat icons so that any icon colliding with the new
all-apps slot can be moved to the right to find the next
nearest open slot. This works well for the 8->6 case; it
will probably do something reasonable, if not ideal, for
other grid migration scenarios.
But those are not covered by this bug.
Bug: 13015468
Change-Id: I7edb3f27addc78ad02bbfcd1c39175ca56220007
-> Also removed the db-created as a criteria for showing the clings
(this was a bit problematic in some cases and going forward)
-> Instead, we use database upgrade as a signal to not show the clings.
This is used instead of the above criteria (to prevent old users from
seeing the migration cling and losing their data.)
-> Stripped some old code related to custom clings that's no longer used.
Change-Id: Ib5e5285e5ddbc60e69eb998ee9fd092ae879150d
The workspacescreens table is updated in LauncherModel.updateWorkspaceScreenOrder
and that the operation to remove all screens, then reinsert the new list of
screens in not inside a single transaction, so if the app is updating or
crashes between ContentResolver.delete and ContentResolver.bulkInsert then
the data will be lost. This CL makes it all happen inside 1 transaction.
Bug: 12523285
Change-Id: I409dbc9f48fa9c8bd4bf3b1453204a4daac1689a
-> Also, leave the last row empty on every screen
-> Fix bug where shortcuts weren't getting moved (introduced in
previous CL)
-> Only dedupe items directly on the workspace
Bug 12416411
Bug 12572727
Change-Id: Id95cc6081c57cc289c2a85b2a6872ee0bf3eb98a
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
Added the xml resource in Launcher3 package as well.
This is a dummy resource with just hotseat icons.
Previously reviewed on: http://ag/396580
Change-Id: I31b0d7d4796d028f44f746260c381f2d8226605a
This reverts commit f4ed1be4ef.
This broke the build:
packages/apps/Launcher3/src/com/android/launcher3/LauncherProvider.java:292: cannot find symbol
symbol : variable default_workspace_no_all_apps
location: class com.android.launcher3.R.xml
return R.xml.default_workspace_no_all_apps;
Change-Id: I40e80494f06f08de3d827c6816075ac4d269ea6a
Resetting the item id was breaking the widget loading code
and is totally unnecessary.
Bug: 11352675
Change-Id: I2e70e542ecc5d8c0664b674ebdac5d520b71b8a0
Note that this doesn't honor folder nesting (that is, you
can't include an XML file full of shortcuts inside a
<folder> node and expect them all to appear in that folder).
It's really just a way to concatenate/overlay multiple XML
files, making it easier to make a few tweaks/additions for
certain screen sizes or locales.
Bug: 10932771
Change-Id: I1fc29477d0717a8a7bc116f16729a955e6c625d5
- Fixing issue where the LauncherModel would be out of sync on first migration, and subsequent crashes
Change-Id: I6f58b09b615b28958c7f941e58ff9ae0ee3ba939
The application context for LauncherAppState is supplied by
the application whenever it starts; don't ask for an
instance before that.
Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
This removes Launcher's static data and other state out of
the Application object. Now LauncherApplication (extends
Application) exists only to instantiate LauncherAppState.
Change-Id: I4e323bd78b77536b92054105536a55c0c2c19ba8
-> load old provider
-> permute pages
-> strip all duplicates from workspace
-> add [allapps minus workspaceapps] to apps folder
Change-Id: Id319d532c6bf1d78370ecc736e95a9475d831de8