Commit Graph

13012 Commits

Author SHA1 Message Date
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
Sunny Goyal 3fe4a146cf Simplifying IconCache access code
Providing a way to access icon cache without LauncherAcitivtiyInfo.
This allows fetching LauncherActivityInfo only when required, thus
avoiding system RPC when the icon is already in cache.

Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
2017-01-03 15:58:53 -08:00
Mario Bertschler ee4ee424b4 Enables direct scrolling on the fastscroll bar.
This enables to touch anywhere in the scrollbar to directly scroll to that particular point
without the need of exactly touching the thumb to start fastscrolling.

This feature is currently behind a feature flag LAUNCHER3_DIRECT_SCROLL and enabled by default.

Change-Id: I5b86c6acb71ff0c88476343657da221c7bdc59c3
2017-01-03 14:22:26 -08:00
Jon Miranda 9f33cb2ce2 Bind the out IntRange using its start and end values.
In applyDeltaAndBound, we add the current IntRange values
+ delta param to the outbound IntRange -- but then we only
bind based on the current IntRange values, so the out IntRange
values can end be out of bounds.

Change-Id: Ibbaae8c2c2734107d1fd7ce8a59a4c66d83068ad
2017-01-03 09:38:11 -08:00
Jon Miranda 097a725bb8 Fixed mw bug where resize frame is off when resizing.
When a widget resizes in multi-window mode (ie. user is dragging
the resize frame), the frame is misaligned until the user lets go.
This is because the translation value to center fit the resized
widget is not taken into consideration.

Bug: 32176631
Change-Id: I6f9ee7be12d3266f021796576c771f86f6120246
2016-12-29 17:09:10 -08:00
Jonathan Miranda bf8a265deb Merge "Fix widget reorder animations in multi-window mode." into ub-launcher3-master 2016-12-30 00:42:11 +00:00
Mario Bertschler 83d40e0608 Merge "Fixes a bug where the user ends in freescroll state even for regular workspace mode." into ub-launcher3-master 2016-12-29 23:33:01 +00:00
Sunny Goyal 8ad02b8f3f Removing static access to Context through LauncherAppState
Bug: 33032833
Change-Id: I09baaa6d79187b3096a2ab3a89d7dcaeaf9eee68
2016-12-29 15:12:14 -08:00
Sunny Goyal c6b833dcbb Merge "Removing all compatibility code below Lollipop" into ub-launcher3-master 2016-12-29 21:29:31 +00:00
Mario Bertschler dcc26fc693 Fixes a bug where the user ends in freescroll state even for regular workspace mode.
The bug happened while reordering pages in overview mode and clicking the back button.
The fix is to check the precodition in enableFreeScroll if we are in a valid state for enabling freescroll (currently only overview mode).

Bug: 33347786
Change-Id: Icc3005fd431569e2b9e3f52d2249de8ba8d13eab
2016-12-29 12:03:35 -08:00
Jon Miranda c9c57631a9 Fix clipping of drag outline by increasing padding.
Low resolution will be addressed in future CL.

Bug: 31915722
Change-Id: I6bdd32b7a30819fde1f15473a63ac280029b6715
2016-12-20 10:08:42 -08:00
Jon Miranda 2126691ce2 Fix widget reorder animations in multi-window mode.
The original animation assumed that the views are not
translated and not scaled. In multi-window mode this
assumption is no longer valid, because app widgets are
scaled and translated to fit center within their cells.

Bug: 32176631
Change-Id: Id60c793730d982277c9d91860e9fb0e6a0df7d38
2016-12-20 09:31:47 -08:00
Hyunyoung Song 3285da35cb Nav bar should change to light theme in sync with the status bar
b/33708486

Nav bar should be in sync with status bar in all apps screen.
Nave bar should not change with status bar when in workspace mode.

Change-Id: Ib5a0d33d3e38f1b3ffa9693657ba7de3b6e01fed
2016-12-19 14:46:21 -08:00