Commit Graph

82 Commits

Author SHA1 Message Date
Jon Miranda
6cdc16cf84 Update cache version based on new icon sizes.
Change-Id: Ia82edd366cba19efbec0c1764484c51a976c5aa1
2017-06-27 14:04:01 -07:00
Jon Miranda
b28c4fcf35 Landscape grid changes for Workspace/All Apps.
This is the just first CL to get eyes on the changes.
Next CL will update the All Apps to be full width.

Bug: 37015359
Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
2017-06-23 11:47:48 -07:00
TreeHugger Robot
3fede16f22 Merge "Do not apply legacy treatment on shortcuts Bug: 62617041" into ub-launcher3-dorval-polish 2017-06-22 19:21:27 +00:00
Hyunyoung Song
d84f771f75 Do not apply legacy treatment on shortcuts
Bug: 62617041

Change-Id: I56a04536fe1bcba9912c5da3ce5a9c9b75bc3506
2017-06-22 11:49:33 -07:00
Sunny Goyal
e463c8f191 Rafactoring shadow generator logic to allow customizing various parameters
Change-Id: I38f8ac4352cb9e23d377832ffe2f4923a4df7a70
2017-06-20 13:37:05 -07:00
Jon Miranda
0966072c91 Portrait grid changes for Workspace/All Apps.
Bug: 37015359
Change-Id: Ifbdd0e71c36e532b189e02283e3eeb562ebe2654
2017-06-19 17:02:45 -07:00
Sunny Goyal
b3648e084f Refactoring some shadow generator logic into common methods
Change-Id: I25fc3248be5148fb1c14944eb4ddeec5bd4125b2
2017-05-02 16:17:29 -07:00
Hyunyoung Song
09204172b3 [MANUAL] resolve merge conflicts of 59c0e0e91 to ub-launcher3-dorval-polish
Change-Id: I7c80b665b5216e99284f5b04b8500fc35d916985
2017-04-27 11:43:47 -07:00
Tony Wickham
6c300c89ec resolve merge conflicts of 128b7e59a to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I927373593dfb1b67b504a76b1ad013357b363a6e
2017-04-05 13:14:01 -07:00
Tony Wickham
86222d23e2 Add support for getting widgets/shortucts for a particular package/user
Bug: 34940468
Bug: 33553066
Change-Id: I5d0131df206c6a13d4227ad28c5b094bbf1343df
2017-04-04 14:36:52 -07:00
Tony
ca4e6b4b59 resolve merge conflicts of 26b174659 to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ifb24f291b096b979044e5c87ec58c24e9c479728
2017-03-30 18:10:05 -07:00
Tony Wickham
26b1746593 Add support for system shortcuts in popup container
- Currently the system shortcuts are just widgets and app info
- As shortcuts, they live in ShortcutsItemView
- They are populated either as icons only (if there are deep
  shortcuts) or as icons + text
- Widgets are disabled until binding them is complete (we request for
  them to be bound on long-press now). We should revisit this.

Bug: 34940468
Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
2017-03-30 16:35:56 -07:00
Sunny Goyal
afc3f09240 Adding support for showing the widget preview based on the provided RemoteViews
am: c65a0085d7

Change-Id: Iabea96bb74294e2775a08427c17e154020d9bc40
2017-03-17 18:41:31 +00:00
Sunny Goyal
c65a0085d7 Adding support for showing the widget preview based on the provided RemoteViews
Bug: 35811129
Change-Id: I336e48cd00cfec2e617ac73bd8a81419b0944aa7
2017-03-17 11:25:29 -07:00
Sunny Goyal
9b29ca5add Defining HomeScreenElementTheme for elements which appear on top of
wallpaper

> Using HomeScreenElementTheme for workspace items
> Fixing view inflation where wrong layout inflater was being used

Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
2017-02-17 11:37:30 -08:00
Sunny Goyal
7d87cb1a6e Updating the shortcut preview generation logic
Drawing a shortcut icon on a white round-rect with shadow
Also center aligning the preview

Bug: 34819119
Change-Id: Ic25be6bf301aeb11315a5050f009259b26c6134a
2017-02-16 13:41:04 -08:00
Sunny Goyal
92bbfa19c3 Updating the default widget preview generation logic
We draw a while round rect box which is divided into the cells to
represent the widget size. The app icon is drawn in the center
for this white box.

Bug: 34819119
Change-Id: Ie4d83712577f21b276c6744a55993f71da368398
2017-02-08 15:28:02 -08: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
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
a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Sunny Goyal
7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal
ec5a42e1ac Merge "Catching OOM during widget preview generation" into ub-launcher3-master 2016-10-27 22:04:51 +00:00
Sunny Goyal
3ef8691f82 Fixing wrong cache lookup call
Cache entry was saved using flattenToShortString, but the
lookup was using flattenToString

Change-Id: I4c012d5a90a89121989db059d31d3dd288fa5b8c
2016-10-27 11:40:59 -07:00
Sunny Goyal
2570d107f5 Catching OOM during widget preview generation
Bug: 32365481
Change-Id: Ifc49b033c3ad83213d50793301d94bb6337a412d
2016-10-27 11:39:14 -07:00
Andrew Sapperstein
abef55a1c1 Update Launcher to use theme colors.
Instead of using hard-coded variants of colors, use the theme color
that corresponds (colorAccent, colorPrimary, etc).

Updated:
- "Search for more apps" text
- App info drop target hover color
- PageIndicatorDots
- All apps & widget scroll bar & scroll popup colors
- All apps section text color
- widget picker background color

TODO:
- widget picker header color

BUG: 28625102
Change-Id: I74b543ff71b8caef8cd950c8183ac84c759cb4d5
2016-06-20 11:46:44 -07:00
Sunny Goyal
6388b2c61b Adding some utility methods for thread verification
Change-Id: I3fb6a1b860bba8a6efe413dd2698f972dc3e2506
2016-04-15 18:03:50 -07:00
Sunny Goyal
4ddc40130a Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfo
In PackageItemInfo,, using the user of the first item in the sub-list

Bug: 27585511
Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
2016-03-18 11:06:01 -07:00
Hyunyoung Song
3e840f4343 Prevent work profile widget DnD crash
b/26079469

Change-Id: I3d49ac498bbaaef8ca8a3051f5ab4b35ef771410
2016-03-01 11:57:44 -08:00
Sunny Goyal
6f70936f7f Preventing launcher crashes due to low disk space.
In case of low disk space, all write operations to the IconCache are
silently ignored. This will not affect the Launcher behavior and
user will still see the latest icons, but in some cases, icon loading
would appear slow

Bug: 24585352
Change-Id: I85ccc519046fc3708403388bba89e019a3f2ce3d
2015-12-18 10:20:52 -08:00
Sunny Goyal
1ba7e36cc8 Fixing null check when calling mutateOnMainThread
Bug: 25269169
Change-Id: I74f7fb833a374f59a16487099f1bf72b086e88ee
2015-10-26 10:42:12 -07:00
Sunny Goyal
8ac727b2c6 Using custom threadpool executor instead of the one defined in AsyncTask
Change-Id: I8fe95d932c5de14c74f0576bfc3d1f641d12b448
2015-09-23 15:39:14 -07:00
Sunny Goyal
7ca991104e Using an executor with increased queue size for loading previews
An async task can be in the queue even if it has been cancelled. It
is removed only after it gets executed once. So the executor can get
blocked if there are some tasks which are running, and we keep posting
and cancelling preview load tasks.

Bug: 24306650
Change-Id: I836c8d53258542cc6f31952dff84323cc057437c
2015-09-23 10:48:50 -07:00
Sunny Goyal
2d648b057f Refreshing widget list when a package containing a widget changes
Bug: 20698931
Change-Id: I50bafac1fc0a855edb1ace633a8a6f87a5c3040e
2015-08-11 21:25:19 -07:00
Sunny Goyal
a2a039b66f Using a reverse hashmap instead of indexOfValue in userManager
Bug: 22980139
Change-Id: I87b633d194ff4e1529dd679dc02da573ed374207
2015-08-05 13:23:25 -07:00
Sunny Goyal
233ee964a9 Calculating widget minSpans and spans statically/independent of orientation
> Filtering the widget list and excluding widgets which dont fit the grid
 > setting minSpans for the widget item when binding.

Bug: 22541314
Bug: 22559137
Change-Id: Ieda48b56c95bee0c7ec71dd691af7e23e2d43db6
2015-08-03 16:39:49 -07:00
Hyunyoung Song
b9f932e089 Prevent from widget cell preview image from being cut off.
b/22541466

>TL;DR;; when introducing mProfileBadgeMargin to correctly place
> work profile badge. Drawing origin of the preview image resulted
> to the left of (0, 0).

Change-Id: Ic52fc2e17c55c76f4f57aa833451ffa19bbbeb09
2015-07-30 15:04:59 -07:00
Sunny Goyal
b4cbea4ad4 Fixing nullpointer when creating new DB
LauncherProvider is not ready until the DBHelper is created
Change-Id: Iabd61005892f15fd4a31d882100d87df2b2a7b85
2015-06-16 15:18:41 -07:00
Hyunyoung Song
ed717bcd61 Merge "Fix last bit of WidgetTray jank issue b/21133230" into ub-launcher3-burnaby 2015-06-16 18:08:14 +00:00
Hyunyoung Song
e98f4a4d6d Fix last bit of WidgetTray jank issue
b/21133230

Change-Id: Ic198b8d21be1b0f3465cd4efc30a240e3ec4304a
2015-06-16 10:45:24 -07:00
Sunny Goyal
383c507c47 Removing ContentObserver in launcher
> Using callback insted of using a content observer
> Setting the listener in LauncherAppState to prevent resource leak

Change-Id: Id23a4d5c8812e86178997e536226e09ec3740f84
2015-06-16 10:31:43 -07:00
Hyunyoung Song
41e3369d5f Work profile badge alignment
b/21336417

Change-Id: Icd54320fa0d0976cac0ae66d180cc2c99ddd0c1c
2015-06-15 12:26:54 -07:00
Hyunyoung Song
f00d02b254 Improve AyncTask throughput inside WidgetPreviewLoader
b/21133230
> Synchronized block was creating a bottleneck for the AsyncTasks.
> Remove calls that doesn't need to be synchronized outside synchronized block.
> Also removed setAlpha call as after the bottleneck was removed,
Inefficient alpha view usage alert started popping up in traceview.
Due to less jankness, removing the fadein animation doesn't have any
visible effect.

Link to lock congestion visualization:
https://x20web.corp.google.com/~hyunyoungs/no_crawl/traceview/traceview_lockcontention.html

Result: gfx-avg-jank delta = "-1"
Change-Id: If12817df0730f346cdba7e2f38f232eb9a4336c0
2015-06-05 13:30:19 -07:00
Sunny Goyal
316490e636 Removing some synthetic method creation
> Make package-private and @Thunk all private methods and constructors accessed from inner classes.

Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
2015-06-02 10:04:59 -07:00
Winson Chung
5f4e0fdd2e Moving all apps code into sub package.
- Renaming resources, dimens, etc to be more consistent
- Removing old AppsCustomize resources and other unused code

Change-Id: I15ce35e7cb7a9b9344fc7103963e4e4c9e45d89a
2015-05-22 12:21:40 -07:00
Adam Cohen
2e6da1539b Refactoring DeviceProfile
-> Pulling out the parts of device profile which can (and need to be)
   initialized and accessed without access to an Activity context,
   ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
   initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
   and we will create one of these for each Activity instance, and
   this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
   all appropriate dimensions can be computed without an Activity
   context (by only specifying orientation). This would be an
   extension of this CL and allow us to know exactly how launcher
   will look in both orientations from any context.

Sets the stage for some improvements around b/19514688

Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
2015-05-21 16:16:40 -07:00
Hyunyoung Song
2bd3d7d1cb Load PackageItemInfo in background thread to prevent ANR
- Decoupled widget model from widget view, and placed the
creation to LauncherModel.
- As a result packagemanager operation, iconcache retrieval is all done inside
LauncherModel on background thread
b/21311085
b/21325319

Change-Id: I294698527db58b89f3da558090a367530c058776
2015-05-21 13:04:53 -07:00
Winson Chung
05304db905 Reducing delay in applying widget previews loaded in the background.
- Push the writing of previews to the DB to the worker thread
  to ensure that we can apply the loaded preview as soon as
  possible.
- Reducing additional bitmap allocations from cancelled tasks
  that did not re-add their bitmaps to the unused set
  (happens when the list is scrolling quickly).

Change-Id: Ib7c2cfdfcc668c215b3a74271e1165235fbdf752
2015-05-20 10:56:54 -07:00