Commit Graph

4413 Commits

Author SHA1 Message Date
Kenny Guy 792dd77e8c Return null from compat when resolveActivity returns null.
Fixes bug that LauncherAppsCompatVL.resolveActivity was wrapping
a null in a compat class when LauncherApps.resolveActivity returns
null.

Bug: 14891460
Change-Id: I0364b198486f14393e51ac383a9d10b89e466bdf
2014-05-14 13:16:07 +01:00
Adrian Roos 0c28186282 Merge "Fix NPE in WidgetPreviewLoader" into ub-now-nova 2014-05-14 11:21:53 +00:00
Adrian Roos fa9ffc28fd Fix NPE in WidgetPreviewLoader
Change-Id: Ic746f2a5e4237a9ea82abf5f9532307d40432ac1
2014-05-14 13:06:47 +02:00
Chris Wren 244637b59c Merge "work around bug in LauncherAppsCompat to find restored icons" into ub-now-nova 2014-05-13 21:55:13 +00:00
Chris Wren 075f9f5b66 work around bug in LauncherAppsCompat to find restored icons
Bug: 14895464
Change-Id: Iff4f1a9a2e8edf789231be7a1c20e277e18eb05c
2014-05-13 16:18:21 -04:00
Kenny Guy b6cc40bc15 Don't clear flags in startActivity
Move setting flags for starting apps back to
AppInfo from Launcher.startActivity.

Bug: 14839470
Change-Id: I1dc928e9ebce9ce4d411678f94b5ca4284c1255f
2014-05-13 15:58:58 +01:00
Kenny Guy f8b1dfd293 Reset profile ids when backing up / restoring favorites.
Clear the profile id when packing an intent for backup.
Set the profile id to the current user when restoring
a favorite from a backup.

Change-Id: I9d976fbe16773b34a74e57d080ff797ba51f9b04
2014-05-13 13:02:21 +01:00
Chris Wren 418dcb881a Merge "check for long and short component names." into ub-now-nova 2014-05-12 20:46:39 +00:00
Chris Wren 0e584b5802 check for long and short component names.
Bug: 14650346
Change-Id: Ic2195a4f60b63f8ec85c42284e0fd58d6f473a9f
2014-05-12 16:10:46 -04:00
Adam Cohen e0aaa0d3de Remove antiquated way of determining CellInfo during long press
-> allows us to eliminate cast of getTag() to CellInfo to fix
   issue 13587508

Change-Id: Id2277206765621f664b758cce800bf8423231b1e
2014-05-12 12:45:59 -07:00
Kenny Guy a1f26fdb50 Merge "Fix missing space in select statement in backup helper." into ub-now-nova 2014-05-12 11:50:19 +00:00
Adam Cohen e1c92c4afa Remove debug println
Change-Id: I8bf8f948394ed2ecbcb3da3761506c9aa5752494
2014-05-09 16:40:59 -07:00
Adam Cohen 689ff16ea2 Cleanup pattern for removing the extra empty screen after drag operations
-> Fixes a couple bugs: issue 12179908, issue 12372657, issue 13287732

Change-Id: I24b5abe8e432ea331eeb77407120a8cec28f6376
2014-05-09 15:05:53 -07:00
Kenny Guy 43ea7ac8ad Fix missing space in select statement in backup helper.
Also check when backing up favourites that they are
for current user.

Change-Id: Ic9d496c30612ee531fa84a22f852b3012df00b4f
2014-05-09 18:05:29 +01: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
Adrian Roos 2e7db96278 Merge "Dump open files if we run out of file descriptors" into ub-now-nova 2014-05-07 11:44:58 +00:00
Anjali Koppal 627d9467d3 Merge "Add setters for mWorkspaceLoading and mWaitingForResult." into ub-now-nova 2014-05-05 23:28:33 +00:00
Anjali Koppal ff7ceff73c Add setters for mWorkspaceLoading and mWaitingForResult.
Change-Id: Id542fa6467d13641127cec7150b8f50a9e088657
2014-05-05 14:16:28 -07:00
Amith Yamasani 2c4fad14fc Merge "Watch for profile events and reload" into ub-now-nova 2014-05-03 04:22:41 +00:00
Sameer Padala 5ac58cab3e am e697a9a0: Move Partner.java into the Wallpaper directory.
* commit 'e697a9a042509b3872b164dc02d0a465d5b917c2':
  Move Partner.java into the Wallpaper directory.
2014-05-02 22:51:11 +00:00
Sameer Padala e697a9a042 Move Partner.java into the Wallpaper directory.
WallpaperPicker depends on this and have this class in Launcher3 would cause a
circular dependency in google3

Change-Id: Ia582bcb988a4f6375904660546b1bc1744d25238
2014-05-02 15:06:35 -07: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
Adrian Roos 1f375ab633 Dump open files if we run out of file descriptors
Bug: 12782843
Change-Id: I7254c2cb6c3f721a06b9301d674c9560f86dfde6
2014-04-29 23:15:01 +02:00
Adrian Roos 8f3f6830f2 Sanity check screenId before persisting ItemInfo.
Bug: 13447571
Change-Id: I014dcf1eb313c2312953716fb53e542caaeb285b
2014-04-28 15:45:55 +02:00
Jason Monk 4ff73887f2 Don't close folder when adding something to it
Remove the call that closes a folder when something from All Apps
is added to it.

Bug: 14273032
Change-Id: Iac970a5c997fd254eae006be75cfbba9826f47af
2014-04-24 16:53:23 -04:00
Jason Monk 031d0ff4ad Merge "Fix accessibility announce on apps page" into ub-now-nova 2014-04-24 16:33:07 +00:00
Jason Monk ed05f09aa1 Fix accessibility announce on apps page
Stops the workspace from announcing incorrectly while the apps
page is open, also makes the apps announce which page on opening.

Bug: 13006306
Change-Id: I723011fc55c24b66604a24b16c17bac4f5653f84
2014-04-24 10:13:05 -04:00
Jason Monk 490d6941fa Merge "Fix long press after already moving off icon" into ub-now-nova 2014-04-23 18:55:48 +00:00
Adam Cohen 16f645542a Merge "Second try removing orphaned items from the database" into ub-now-nova 2014-04-23 18:21:15 +00:00
Jason Monk 050eaf2a87 Merge "Add synchronization to DeferredBindRunnables" into ub-now-nova 2014-04-23 16:39:12 +00:00
Adam Cohen f9c14de995 Second try removing orphaned items from the database
-> 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
2014-04-22 16:11:40 -07:00
Jeff Sharkey 27b4e0f7d6 am 5aeef581: Add support for partner customization.
* commit '5aeef58131e1c330d1d9c1dfcacf2e6eea6ced4b':
  Add support for partner customization.
2014-04-22 21:02:11 +00:00
Jeff Sharkey 5aeef58131 Add support for partner customization.
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
2014-04-22 12:28:51 -07: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
Jason Monk 02dd7aea3d Fix long press after already moving off icon
When an icon is in the Hotseat and a user drags off from the icon,
but continues holding down, the icon gets a long press triggered
by the CheckLongPressHelper.

To fix this a check has been added on move events to see if the
point has moved outside the view and to cancel the long press
check callback if it has.

Bug: 13569451
Change-Id: Id175cdc220d70b5e9f8e492ed5a3cc7c3f11db10
2014-04-22 10:27:01 -04:00
Sameer Padala be3e410b7a Fix source code so it compiles on google3
This is a follow up to cr/65191596 which checked for String + array warnings.

Change-Id: Id70eaa32b63b838b03be21d632c7470039b6423f
2014-04-21 19:37:17 -07: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 d83ebf9270 DO NOT MERGE disable launcher restore for 3.4 launch.
Change-Id: I8e439df25cad2cb9cf92cf1faef22906420e22cb
2014-04-16 14:10:10 -04: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
Mathew Inwood ad9c776bc1 am 85900298: Take account of bounds set on drag drawables.
* commit '859002985e0e5d73f54c942f2024607431db60fc':
  Take account of bounds set on drag drawables.
2014-04-16 16:30:01 +00:00
Mathew Inwood 859002985e Take account of bounds set on drag drawables.
If bounds are set on a compound drawable in a textview, drawing it into a
bitmap set to the intrinsic size of the drawable results in it being scaled
down in the top corner. Scaling it down again into the grid icon size then
gives a tiny icon.

Use the drawable bounds if any are set, otherwise use the intrinsic size.

Bug: 14103508
Change-Id: Idadd7bb891dc33d092eb9ceb3025b9a5d9e1bfd8
2014-04-16 14:17:39 +01:00
Adrian Roos 65d60e21ec Fix skia crash in widget preview loading
This fix works making sure all drawables are mutated before drawing
them in the background. Mutation has to be executed on the main
thread because that operation is not thread safe.

Bug: 12525890
Change-Id: Id7bdf9cf48d3e7b7f31938bdea4a3bf1632cf337
2014-04-16 14:16:14 +02:00
Chris Wren 1a1fdf4185 turn off LauncherAppState.DEBUG
Change-Id: Ia6d54235c353c27c8716d7fd9270a7f2ee7bc93f
2014-04-15 13:57:15 -04:00
Winson Chung babb53ef8f Adding external path for drag/drops.
Change-Id: I3b315c4d14cadb9210f15d3c3e0b9545f4591be4
2014-04-14 18:44:21 -07:00
Mathew Inwood b90860a996 Expose workspace.moveToDefaultScreen.
This is to allow derived launcher classes to move the workspace to the
default screen when a drag is started, in case the current screen is not
capable of acting as a drop target.

Bug: 13962574
Change-Id: I8a6e94ce08be825c344beb708d244d2def5f319f
2014-04-11 17:22:56 +01:00
Adam Cohen a7946070dc Fix serious data loss issue for folders and hotseat items
Change-Id: I37a5b44c670c2a1f99eb97b77cfdbc78534fdf91

bug 13964735
2014-04-11 01:13:46 +00:00
Adam Cohen f6a47bbc05 Merge "Ensure the intro view is always the top view in the draglayer if it is present" into ub-now-mister-ugly 2014-04-09 17:37:26 +00:00
Adam Cohen 646fdf70b4 Upping activity start delay
Change-Id: I4b72ae9d719825e1be8f1feb3643f9311dde2534
2014-04-08 17:02:08 -07:00