Commit Graph

49925 Commits

Author SHA1 Message Date
Sunny Goyal b38fab7573 Adding support for drag and drop for requestPinItem.
On long pressing, the confirmation activity starts a system
drag-n-drop and focuses the launcher activity. We then drive
the launcher drag controller using the system drag event

Caveats:
> We use a transparent preview for system drag and drop and use
  a view inside launcher for actual preview. This gives us better
  control over various animations.
> The parameters for drag operation are passed to the Launcher
  activity using the intent. Since onNewIntent and onDragEvent
  come at different times and are not associated, a random uuid
  is used as mime-type to match the drag event with intent params
> If the workspace is locked (eg, loader is running) the drag
  operation is simply dropped. Will be imporved in follow up cls

Bug: 33584624
Change-Id: I0bb5b25b690f86b6af31a14e11beb669fcb3a281
2017-01-24 22:24:54 -08:00
Mario Bertschler ab45ec0c23 Merge "Fixes a bug to not be able to scroll widgets intoduced when enabling to swipe allapps from everywhere." into ub-launcher3-master 2017-01-25 02:09:01 +00:00
Fan Zhang a14281cacf Fix color for widget tray to match Default.Settings theme
Change-Id: Ief4079853a8275a75c27d3c22b57a72a35274307
Fix: 34672511
Test: visual
2017-01-24 15:55:55 -08:00
Mario Bertschler 248c575cca Fixes a bug to not be able to scroll widgets intoduced when enabling
to swipe allapps from everywhere.

The fix is to determine if the widget is scrollable on layouting instead
of the callback when a widget has been updated.

Bug: 34641906

Change-Id: Idc9d8ade7e601279b87856333ae754f4785131ac
2017-01-24 12:01:44 -08:00
Sunny Goyal 658058b960 Adding some widget addition flow tests
> Added two dummy widget providers: with config and without config
> Added tests for verify widget config flow

Change-Id: I4577f085abe8f8b82047b644c71cc9065358153a
2017-01-23 15:28:25 -08:00
Sunny Goyal 76891df785 Merge "Adding WidgetAddFlowHandler to handle widget addition and configuration." into ub-launcher3-master 2017-01-23 19:33:28 +00:00
Sunny Goyal 04a324afb7 Adding WidgetAddFlowHandler to handle widget addition and configuration.
This will allow us to override the implementation and provide custom
logic for widget addition.

Bug: 33584624
Change-Id: I310bf39e301c7e1c8de4f62456594535e2fe5bbc
2017-01-23 10:54:30 -08:00
TreeHugger Robot c711e6006f Merge "Import translations. DO NOT MERGE" into ub-launcher3-master 2017-01-21 01:18:03 +00:00
Sunny Goyal 0e452ecfdb Merge "Using WidgetCell in the Pin Item confirmation prompt for a consistent UI Also fixing some platform API changes in PinItemRequestCompat" into ub-launcher3-master 2017-01-21 00:03:01 +00:00
Sunny Goyal 65513ba58c Using WidgetCell in the Pin Item confirmation prompt for a consistent UI
Also fixing some platform API changes in PinItemRequestCompat

Bug: 33584624
Change-Id: I255829f0079f1a3967bf8d6a337da12c890eb7ec
2017-01-20 15:44:15 -08:00
Bill Yi a6c4034543 Import translations. DO NOT MERGE
Change-Id: I4be6c1c59d520117f5471af788140d48ca214a31
Auto-generated-cl: translation import
2017-01-20 13:51:01 -08:00
TreeHugger Robot 331ade2bab Merge "Fix shortcuts alignment in landscape" into ub-launcher3-master 2017-01-20 21:23:38 +00:00
Tony Wickham 10bf35ff1a Fix shortcuts alignment in landscape
- Take left inset into account.
- If there is no way to orient the shortcuts next to the icon,
  instead center it in the drag layer and don't draw the arrow.
- If possible, place the shortcuts to the left or right of the
  icon when centered vertically. If for whatever reason that
  isn't possible, center the shortcuts horizontally as well.

Bug: 33421656
Change-Id: I838b30ea487e0f7c64637db1cb8991ca3ee16bf9
2017-01-20 12:30:24 -08:00
Sunny Goyal dbb28b2bf8 Merge "Adding support for new APIs in O related to configurable shortcuts" into ub-launcher3-master 2017-01-20 18:35:08 +00:00
Sunny Goyal a2441e88ff Updating widget preview generation to not embed any badge.
Instead drawing badge in the view directly.

This will allow us to reuse the same preview when we do not want to draw
badges. This also simplified badging of shortcut config activities.

Change-Id: I9c07c33bf9c2b8ef81a00026b1d42587868c906f
2017-01-19 14:00:40 -08:00
Sunny Goyal 782f0c9a89 Adding support for new APIs in O related to configurable shortcuts
> Config activities can now return PinItemRequest which can be used to pin
  deep shortcuts

Bug: 33584624
Change-Id: Ic0df436bd79e069615b9d60d24eb7594b824b2da
2017-01-19 13:54:31 -08:00
Sunny Goyal 278359539c Adding support for requesting addition of shortcut/widget
on the workspace.

Bug: 33584624
Change-Id: I664366822fe8088742faff2cce006239ab0771bc
2017-01-18 18:38:34 -08:00
Sunny Goyal 627006eeb4 Merge "Moving icon generation out of ShortcutInfo constructor so that it can be created on the UI thread" into ub-launcher3-master 2017-01-18 23:48:53 +00:00
Tony Wickham 197f97bde4 Merge "FastBitmapDrawable can draw an icon badge (notification count)" into ub-launcher3-master 2017-01-18 22:36:17 +00:00
Tamas Berghammer 73f61f26e5 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler" am: 924fb5ccb8
am: ad72bf8b50  -s ours

Change-Id: Id2281a355d7f82cbec61bc8eee4f241ec9daaae6
2017-01-18 22:13:24 +00:00
Tamas Berghammer ad72bf8b50 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
am: 924fb5ccb8

Change-Id: I5e3cb0439fe609fb7df4d56ce5860b8020734bb1
2017-01-18 20:24:23 +00:00
Tamas Berghammer ff6be5b343 Update package names to work with the proto3 compiler am: e2ff6b3133
am: 5d72bd1b1e

Change-Id: I3ec5036c98d4634acb3fd98c190de6b325096792
2017-01-18 19:56:21 +00:00
Sunny Goyal 1b0726359b Moving icon generation out of ShortcutInfo constructor so that it
can be created on the UI thread

Change-Id: If84e52041eb4ab20807f5cfd4b7f31d7b5f381ed
2017-01-18 11:30:59 -08:00
Tamas Berghammer 924fb5ccb8 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
This reverts commit e2ff6b3133.

Change-Id: I3aaf0b7331697fb318afbc1e99e904ea0441e3b8
2017-01-18 19:28:55 +00:00
Tamas Berghammer 5d72bd1b1e Update package names to work with the proto3 compiler
am: e2ff6b3133

Change-Id: Id52eaddc657447349babd846de41a86e71393896
2017-01-18 17:45:18 +00:00
Mario Bertschler 8e98cb876f Fixes a bug where in Android O the all apps search icon appears
on screen rotation.

The fix is by applying a "different" transparent (transparent
white instead of transparent black) for the hint color in focus
state. The root problem lies in DynamicDrawableSpan and restoring
state in EditText if hint color is #000000.

Bug: b/34259116
Change-Id: Id3c46b2af4d5cdb18c0510504f2fe66dece7056f
2017-01-17 15:04:37 -08:00
Sunny Goyal a3db1fc674 Merge "Only marking items not already restored as restore" into ub-launcher3-master 2017-01-14 20:03:10 +00:00
Sunny Goyal f7740433ed Merge "Fixing AppWidgetsRestoredReceiver updating model on UI thread" into ub-launcher3-master 2017-01-13 23:00:40 +00:00
Sunny Goyal bde762c618 Merge "Loading proper app icon if the associated activity is null" into ub-launcher3-master 2017-01-13 20:37:53 +00:00
Tony Wickham 9a8d11f930 FastBitmapDrawable can draw an icon badge (notification count)
- Added BadgeInfo to contain data to be shown in a badge
  (currently just notification count).
- Added BadgeRenderer in DeviceProfile to contain things
  relevant to drawing the badge, such as size and Paint's.
- Added IconPalette to compute colors for the badge based
  on a dominant color (will also be used for notifications)
- FastBitmapDrawable uses these classes to draw the badge.

Bug: 32410600
Change-Id: I6595a4879943357590f7d20c22594691a573ecaf
2017-01-13 10:58:10 -08:00
Sunny Goyal c1ad0ce8ae Only marking items not already restored as restore
> Moving the restore property to LoaderCursor

Bug: 34123089
Change-Id: I1f992ef086d65e0b3cf18d3b2cf37a4f254c97d2
2017-01-13 10:38:41 -08:00
Sunny Goyal 761d49a7a1 Merge "Removing promiseIntent property from ShortuctInfo" into ub-launcher3-master 2017-01-13 18:34:53 +00:00
Sunny Goyal e6e7200791 Removing promiseIntent property from ShortuctInfo
> Instead of checking promiseIntent != null, using isPromise() for consistency
> Fixing bug where clicking a pending icon does not launch anything
> Fixing bug where draging an icon on Info target, permanently hides the icon

Change-Id: Ic8f6b56042dba42d5ed9aedb0f5947186e1a4208
2017-01-12 18:54:21 -08:00
Hyunyoung Song e495056bd3 Merge "Use MaskableIconDrawable only in dogfood builds" into ub-launcher3-master 2017-01-13 01:34:03 +00:00
Hyunyoung Song 9a5203a539 Use MaskableIconDrawable only in dogfood builds
Bug: 32063838
Change-Id: Id0d15c4fff54b9429dbe5f9ee7ef26fd9cf8703d
2017-01-12 17:09:12 -08:00
Sunny Goyal f745b925b4 Loading proper app icon if the associated activity is null
Bug: 34123342
Change-Id: Ibb80c6e442beea34c612fb4ce5246260714820e2
2017-01-11 14:20:57 -08:00
Sunny Goyal 2eb9cc48a6 Fixing AppWidgetsRestoredReceiver updating model on UI thread
Bug: 34203314
Change-Id: If2c149f353109350e45e581a654956bec78bce96
2017-01-11 14:15:42 -08:00
Sunny Goyal 3e9be43b6e No more LauncherActivityInfoCompat
Bug: 32745285
Change-Id: I00f13794d5dc0a2b1fe03ec74de36018f22eb386
2017-01-11 13:06:50 -08:00
Sunny Goyal 87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -08:00
Jonathan Miranda 4130705141 Merge "Reset initial animation values before completing reorder animation." into ub-launcher3-master 2017-01-11 20:21:00 +00:00
Sunny Goyal 1cc1c9ad83 Enforcing background thread when accessing iconCacheDb.
> Moving any icon cache access to background thread
> Updating Apps list to avoid loading icons for ignored apps

Bug: 21325319
Change-Id: Id72755100f1176ccfcc99249c5e02873cc249a13
2017-01-10 23:42:49 -08:00
Roozbeh Pournader 11d8893745 Rename language+country resources to just language
Bug: 26496609
Test: none
Change-Id: Ic9c49ce5df386d7e2a81991adb137c7525aa77d4
2017-01-10 21:32:30 -08:00
Sunny Goyal 19ea5cc0c8 Merge "Creating AllAppsBackgroundDrawable using DrawableFactory to allow easier overriding using derivative projects" into ub-launcher3-master 2017-01-11 00:26:29 +00:00
Sunny Goyal 006d099483 Merge "Refactoring some loadWorkspace logic in a separate class" into ub-launcher3-master 2017-01-10 22:01:14 +00:00
Sunny Goyal aaf86fe9a0 Refactoring some loadWorkspace logic in a separate class
Bug: 34112546
Change-Id: I8a43ed1646056aa1957ac3d6ea82018691df6386
2017-01-10 13:53:50 -08:00
Sunny Goyal aa29244754 Fixing AppInfo missing intent when loading icon
Bug: 34199268
Change-Id: I7223d1d408e7b48f9c63c9801c2805aaf7363038
2017-01-10 13:51:01 -08:00
Mario Bertschler 10e0a8947c Merge "This enables to slide up All Apps from anywhere in the workspace, not only over the hotseat." into ub-launcher3-master 2017-01-09 23:01:52 +00:00
Mario Bertschler cd0f679030 This enables to slide up All Apps from anywhere in the workspace,
not only over the hotseat.

The tricky part handling with scrollable widgets is solved by
setting requestDisallowInterceptTouchEvent from within the
widget view host (and resetting it upon performing long click).

Change-Id: I8b60e7ea2c1e8ae830b4737e94ed2d796265fa24
2017-01-09 14:42:52 -08:00
Sunny Goyal 49f19f0af9 Adding some logging around launcher restore
> Also enabling fileLog when the device is debug build (even when
launcher is not dogfood build)

Bug: 30735662
Change-Id: Ieab2c962d57f6f7f972f8111070d4ecbef06b3e7
2017-01-09 14:27:56 -08:00
Jonathan Miranda e09bacc1ef Merge "Fixed mw bug where resize frame is off when resizing." into ub-launcher3-master 2017-01-09 19:48:01 +00:00