518 Commits

Author SHA1 Message Date
Sunny Goyal
0fe505bf82 Autoinstalls loading xml
> Launcher checkes for an apk in the system image with a broadcast
receiver for action:
com.android.launcher3.action.LAUNCHER_CUSTOMIZATION
> Default layout is parsed from that apk, which can also contain
icons and string resources used in the layout config

Change-Id: I44fc9e7c3134f525f7b5db29f4e8bb56e17ce445
2014-08-12 14:13:18 -07:00
Sunny Goyal
ff57227711 Adding support to restore widgets even for jelly beans.
> Show 'widget-not-ready' until the widget app is installed
> Once the app is installed, bind a new widget id (not required on L if
  id-remap was received).
  **Remove the widget if bind failed
> If the widget has no configuration screen, show the widget, otherwise
  show 'setup-widget'.
> Clicking 'setup-widget' shows the config screen, and updates the
  widget on RESULT_OK.

issue: 10779035

Change-Id: I2f8b06d09dd6acbc498cdd93edc59c26e5ce17af
2014-08-08 14:29:02 -07:00
Sunny Goyal
e755d469d4 Implementing a package install progress listener for L
issue: 15835307

Change-Id: I71aaea087963f2e0e1206447190cbe23c174057d
2014-08-01 14:45:39 -07:00
Sameer Padala
513edaebce Modify code so it compiles on google3
The diamond operator isn't supported on google3 Android projects.

Change-Id: Ie7298b051330bb2cd32426d4c537882faa2f8ebd
2014-07-29 16:17:08 -07:00
Sunny Goyal
05e318d8f7 Fixing spell correcton
Change-Id: I29d980d8073680fafa8fcc01bc2ec81258919da2
2014-07-29 11:49:35 -07:00
Sunny Goyal
87bee403ed Merge "Merging motorola's patch to fix ClassCastException" into ub-now-master 2014-07-22 16:21:19 +00:00
Sunny Goyal
0c4a64451e Merging motorola's patch to fix ClassCastException
issue: 15518616
Change-Id: I7d707f12cb20be9aa24d7ea86051f3712b3534af
2014-07-22 13:56:13 -07:00
Sunny Goyal
651077bdd6 Adding app widget restore support in Launcher3 for android L
When the app is restored, it displays placeholders for all pending widgets.
These placeholders can be moved and removed similar to a widget (size is fixed
to what defined in backup). Once the system notifies the launcher of the new
widget ids, the place holders are replaced with actual widgets.

issue: 10779035

Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055
2014-07-21 10:34:21 -07:00
Sunny Goyal
c5c60ad359 Merging Motorola's patch to disable apps when is safe mode.
issue: 16044192

Change-Id: I10069dcdf459ecc71361271e883eabb743d77822
2014-07-18 16:10:34 -07:00
Sunny Goyal
3484638cad Adding a circular progress bar for preloader icons
Change-Id: I1b5ba61c01a16a8cb5d3f9e31f827f8c99a1ffc9
2014-07-16 13:37:56 -07:00
Sunny Goyal
f599ccfe96 Showing icons for apps on sdcard which are not available during system boot.
issue 15852084

Change-Id: I1e6f59a413581ae3af4219ab32cb5af3d726d382
2014-07-16 18:59:50 +00:00
Kenny Guy
c2bd8101b8 Revert "Revert Cls stopping now-master running on googlefood"
This reverts commit 7bc272a11b.

Conflicts:
	src/com/android/launcher3/BubbleTextView.java

Change-Id: Id1fb2e1249e72658ce5477165c9bcacba9de2b04
2014-06-30 12:30:31 +01:00
Chris Wren
40c5ed3039 Offer to delete broken promise icons.
Track state of promise in the info, not the view.
Fix bugs around moving promises to folders.
Fix bugs around filterign and removing promises.

Bug: 12764789
Change-Id: If5e8b6d315e463154b5bafe8aef7ef4f9889bb95
2014-06-27 15:17:56 -04:00
Sunny Goyal
2a6cf09be9 Fix issue where sometimes duplicate icons are added on homescreen when
installing a package

Shortcuts placed by the user have no package in their intent.
Ensure that this is accounted for when searching for duplicates.

issue: 12888844

Change-Id: I2fb8b7c2b8f7cb74926904bf49a96aeb59a5a9f8
2014-06-27 08:20:23 -07:00
Kenny Guy
7bc272a11b Revert Cls stopping now-master running on googlefood
This reverts commits 01453e855f.
and 242bbe1b72.
"Add content description to bagded icons."
"Remove reflection now we are building against L"

Bug: 15833449
Change-Id: I81a5316f5619a9cd3b6ab9fd03b2ba96657b7f68
2014-06-24 11:43:19 +01:00
Kenny Guy
01453e855f Add content description to bagded icons.
Enabled accesibility so that icons badged by the
managed profile have a content description
that is different to the non-bagdged version.

Bug: 15106236
Change-Id: Id483273173d9539916eebd59111d179087526be3
2014-06-23 16:42:37 +01:00
Kenny Guy
242bbe1b72 Remove reflection now we are building against L
Remove reflection and update changed renamed L APIs
now that branch has L sdk.

Change-Id: I223c6528487110eb328e2e229bbcbefb701e0c20
2014-06-23 13:56:05 +01:00
Adam Cohen
a28b78e838 Fix issue where shortcuts were still being added even if corresponding app is uninstalled
issue 14410162

Change-Id: I7857aace069c4eb4c1ee504088f4526d61e1f30e
2014-05-20 17:04:13 -07:00
Jason Monk
bbe1e24c5f Fix issue where always trying to migrate
Rather than check if the ContentProviderClient is null (which fails
in when using the Redirector), check the PackageManager directly
for the authority we are looking for.

Bug: 14466459

Change-Id: I7420352a15dcea5037196670f18705e7a34f0672
2014-05-16 18:02:21 -04:00
Adam Cohen
71483f417b Removing antiquated migration path logic
-> also added some extra debugging for issue 14466459

Change-Id: I1ac9352c52c15d3e37f945cffabbca49343d2b8f
2014-05-16 12:26:36 -07:00
Chris Wren
0e584b5802 check for long and short component names.
Bug: 14650346
Change-Id: Ic2195a4f60b63f8ec85c42284e0fd58d6f473a9f
2014-05-12 16:10:46 -04:00
Kenny Guy
1317e2dd4a Fix bug with user of shortcut not being remembered over restart.
Intent extra was being set as int rather than long so being
missed.
Also use LauncherApps if neccessary in case where launching
without launch animation.
Unregister for package notifications when terminating.

Bug: 14636181
Change-Id: I1575f6eed806446782092dffe8c01afe7b6507fe
2014-05-08 19:01:16 +01:00
Amith Yamasani
6cc806d678 Watch for profile events and reload
Reload the workspace and all-apps list when a managed profile
is added or removed.

Bug: 14484845
Change-Id: I69210c22e568f2a561266ef2846ddf8f6d659070
2014-05-02 13:47:11 -07:00
Kenny Guy
ed13187a74 Launcher3 multi-profile support
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
2014-04-30 23:43:00 +01:00
Jason Monk
050eaf2a87 Merge "Add synchronization to DeferredBindRunnables" into ub-now-nova 2014-04-23 16:39:12 +00:00
Jason Monk
a0a7a7440e Add synchronization to DeferredBindRunnables
Seems that on occasion the list is being iterated on while being
modified.  To fix this added synchronization to all modifications
to the list as well as iterating on a copy of the list to cut
down on time holding the lock.

Bug: 12885709
Change-Id: I4287bdedbeb8e438b49c1f79b44819a752c28a69
2014-04-22 10:33:33 -04:00
Adam Cohen
a8171169ff am 76ac344c: Merge "Allow the old launcher content URI to be overrided" into ub-now-mister-ugly
* commit '76ac344cb61a74267c04249c9e9feec41a82c504':
  Allow the old launcher content URI to be overrided
2014-04-18 21:32:23 +00:00
Adam Cohen
76ac344cb6 Merge "Allow the old launcher content URI to be overrided" into ub-now-mister-ugly 2014-04-17 00:53:52 +00:00
Chris Wren
b358f813c9 additional debug logs to track welcome back behavior.
Bug: 13568891
Change-Id: I359202ce59b3444e46331485ea22f542ae908e36
2014-04-16 13:37:00 -04:00
Jason Monk
0bfccebc9b Allow the old launcher content URI to be overrided
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
2014-03-21 15:42:06 -04:00
Jason Monk
8e19cf22a4 Fix missing stack trace on checkItemInfoLocked call
Just put this change into Launcher2, now adding to Launcher3

The call to checkItemInfoLocked from addItemToDatabase was missing a stack
trace so that if the check failed, the stack trace did not contain what
triggered the add.

Change-Id: Ia2e2aae20b16d4adadfe1da53b49e93073fab55c
2014-03-20 15:06:57 -04:00
Chris Wren
aeff7ea434 update promise icon status
also fix a crash in LauncherModel.DEBUG_LOADERS

Bug: 10778992
Change-Id: Iafc28c1e0c2f2a1283783a7ce27e181634b62993
2014-03-11 13:41:05 -04:00
Winson Chung
eb23cb2a90 Properly releasing ContentProviderClient after LauncherModel check.
Change-Id: I0823ada46661b5ba0c36a0bb9f792969a1d04561
2014-03-06 18:41:51 +00:00
Chris Wren
6d0dde01f3 use restored icon for restored app shortcuts
Bug: 10778992
Change-Id: Ie430a6587d49dc0d78b87b81582c0cef7c281017
2014-02-14 11:49:30 -05:00
Yura
085c853a57 Do updateWorkspaceScreenOrder inside a single transaction.
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
2014-02-11 15:15:29 +00:00
Chris Wren
b6d4c2827a update placeholder on package install or restore
Bug: 10778992
Change-Id: I3293d8bab8ae0ef49fc5554531bba5bd6f70932c
2014-02-06 15:05:16 -05:00
Adam Cohen
c87c21a0cd Merge "Small refactor to separate adding workspace / all apps items" into ub-now-lunchbox 2014-02-05 22:25:41 +00:00
Adam Cohen
76a47a1b22 Small refactor to separate adding workspace / all apps items
Change-Id: I06b7bc7f7f0e01696cb9670b8385e5148593e3e0
2014-02-05 13:05:02 -08:00
Chris Wren
f4d081107f handle shortcut restore for missing packages
Bug: 10778992
Change-Id: I8766b8d4dd9c0269d52a7ec3da58dd408bc5f09f
2014-01-27 17:30:48 -05:00
Adam Cohen
556f6135f9 Don't migrate shortcuts for components that no longer exist
Bug 12570791

Change-Id: Ie4b55afcee0c4d1d16acf7b830d7885800943454
2014-01-15 23:32:46 +00:00
Winson Chung
e43a1e7882 Tightening migration conditions. (Bug 11973614)
Change-Id: I6d7417b705227472d035f428cbec933cc6dbf2ce
2014-01-15 11:34:54 -08:00
Winson Chung
234b506f46 Merge "Adding migration Clings. (Bug 11973614)" into jb-ub-now-kermit 2014-01-10 23:40:40 +00:00
Winson Chung
a694524047 Adding migration Clings. (Bug 11973614)
- Refactoring Launcher cling code out to LauncherClings.

Change-Id: Iff4f84f5b8bfeb69b1be0b4802022c3eb20b6f2c
2014-01-10 22:28:16 +00:00
Adam Cohen
8b5b05b7f3 Merge "New launcher2 icon migration algorithm." into jb-ub-now-kermit 2014-01-10 21:42:39 +00:00
Dan Sandler
d502404a44 New launcher2 icon migration algorithm.
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
2014-01-10 15:49:51 -05:00
Nilesh Agrawal
16f3ea870a Allow DISABLE_ALL_APPS to be set using a system property.
- 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
2014-01-09 17:21:09 -08:00
Winson Chung
3ee4a474f2 Accounting for new Package event extras when updating forward-locked apps. (Bug 11855584)
Change-Id: I983c82a74690a9031d18d456ff43dc8750081871
2014-01-08 14:05:08 -08:00
Michael Jurka
34c2e6cf7a Clean up imports 2013-12-13 16:20:53 +01:00
Adam Cohen
ae4409dea9 Don't load items which exceed the grid bounds
-> Unified location where this is managed (with other placement verification)
-> For now, not deleting out of bounds items, but can turn it on in one line

Change-Id: I5e1a5cd357d80475ae40af7b89a0cd372d5c241b
2013-12-11 17:46:39 -08:00
Dan Sandler
a40916d534 Merge "Size hotseat data structure appropriately." into jb-ub-now-kermit 2013-12-11 15:03:02 +00:00