Commit Graph

13024 Commits

Author SHA1 Message Date
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
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
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
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
Sunny Goyal 260b07fa86 Creating AllAppsBackgroundDrawable using DrawableFactory to allow
easier overriding using derivative projects

Change-Id: I7265d888876ea0928391f76ec1bcb7d928c0f27a
2017-01-08 13:14:51 -08:00
Sunny Goyal 2c3194e879 Merge "Removing logic around replacing icon during restore" into ub-launcher3-master 2017-01-06 18:01:37 +00:00
Sunny Goyal a32bf9b181 Removing logic around replacing icon during restore
This logic was dependent on key-value based backup. Since we are
using full-backup, the appropriate flags are never set.

Bug: 18764649
Change-Id: I95a93eee63ac9c82acfb66abfdd1a5407974df46
2017-01-05 14:07:58 -08:00
Sunny Goyal 2d7cca1e05 Updating PendingAppWidgetHostView to load icon on the background thread
Bug: 21325319
Change-Id: I0886eec5a3f36f5e1ac18020c54891a56bdb5ed2
2017-01-05 13:55:35 -08:00
Mario Bertschler a167a6e04b Merge "Enables direct scrolling on the fastscroll bar." into ub-launcher3-master 2017-01-05 19:29:40 +00:00
Hyunyoung Song b0d77fe35f Revert "Build empty test apk until junit dependency issue is sorted out."
This reverts commit 4c82c33a64.

Change-Id: I39c142e2b0e882245a6928264465578e4ddc12c9
2017-01-05 10:55:42 -08:00
Jon Miranda 72dbd91a56 Reset initial animation values before completing reorder animation.
In some reorder cases, the icons would stop in a transient position.

Change-Id: I9d358e74ab403989929dee87542d3dde78c2f229
2017-01-04 14:03:07 -08:00
Sunny Goyal a39a98dac9 Merge "Fixing onPageBeginTransition not being called when scrolling overlay" into ub-launcher3-master 2017-01-04 21:57:39 +00:00
Sunny Goyal 76dbf6fafd Fixing onPageBeginTransition not being called when scrolling overlay
Bug: 33693546
Change-Id: If212a196648fbb2c725ca4800a157ec24f278ca8
2017-01-04 09:29:16 -08:00
Sunny Goyal 619880f436 Merge "Simplifying IconCache access code" into ub-launcher3-master 2017-01-04 00:33:45 +00:00