Commit Graph

56 Commits

Author SHA1 Message Date
Jon Miranda
c0f1f4f3af Fix bug where changing the display size does not update the launcher grid.
The bug is caused by launcher saving the grid name and using that grid name
to look for matching display options. This makes sense when changing the grid
size, but doesn't work well when changing the display size.

Example: Initial Pixel display size is set to Default, so we save "normal" as
the KEY_IDP_GRID_NAME. When we change display size to Largest, the
KEY_IDP_GRID_NAME is still "normal" and so we only look at display options
under "normal". Before this, Pixel with display size set to Largest would be
set to "reasonable".

This should be safe change for Q, and we can have a proper fix when we
officially support changing grid size.

Bug: 131867841
Change-Id: If5f3b0a13b90069973e929024b26bd9b9c45a7d8
2019-05-28 16:05:09 -07:00
vadimt
1b383af652 Not using magic constants for navbar height
Change-Id: I6783b8a2ebb059ce35748d8c3e818cbe732ff40d
2019-05-08 17:20:34 -07:00
Sunny Goyal
905262c1a7 Adding utility method to get adaptive icon scale
Change-Id: I5ff190c3b794bb13309375782ccd420e85b59091
2019-05-03 21:31:46 -07:00
Ryan Mitchell
01b8b68db7 Rename launcher:iconSize attribute to prevent overriding material
A previous change [1] introduced the material library as a static library
for the SecondaryDisplayLauncher. The material library defines a
resource "attr/iconSize" with format="dimension" while Launcher3 defines
a resource of the same name with format="float". The material resource
is being overriden by the Launcher3 resource and is preventing aapt2
from disallowing multiple definitions of the same attribute with
different formats.

This change renames the Launcher3 iconSize so it will not collide with
the material resource.

[1] If183dd35a1d197c4a9a8225a021e36c4f1662587

Bug: 129146717
Test: build success and inspection of generated apk
Change-Id: I5eb54ea606ddcfb47d5150b44906a8707203e905
2019-04-24 16:22:51 +00:00
Sunny Goyal
8b0cb4113f Listening only for "android" package for overlay changes
Bug: 130917995
Change-Id: I37160a886a0afdc02dca8f7da6e8aa54c795882d
2019-04-22 09:02:08 -07:00
Sunny Goyal
58fa4b66ea Removing some redundant resource definitions
Change-Id: I68ae602116e6eb334dfce2a013fcc42068c464bf
2019-03-22 16:24:16 -07:00
Hyunyoung Song
e11eb47c4e Move overlay monitoring logic out of config monitor
Bug: 126417894

Change-Id: I5b474a2a41bbd951fa0a99673fa8bf4342adade5
2019-03-19 15:46:09 -07:00
Sunny Goyal
90e3fbca62 Updating folder shape when icon shape changes
> Removing unnecessary threading logic and the code was running on main thread anyway

Bug: 118757840
Change-Id: I7a012db5a0dbe2c23bd6ff2cd39679a803731ee8
2019-01-23 16:43:26 -08:00
Sunny Goyal
7d892ff198 Adding API to set the current grid
Bug: 122262084
Change-Id: Ie356d4a90cf1e5a3715fde62cd3502384856e8b5
2019-01-11 15:09:06 -08:00
Sunny Goyal
eff44f331c Adding content provider for exposing launcher grid settings
Bug: 122262084
Change-Id: I3e89e0a9400fb3e81f932af3606eb49c36d34894
2019-01-09 17:47:24 -08:00
TreeHugger Robot
238f324ebf Merge "Adding support for putting arbitary attributes in InvariantDeviceProfile" into ub-launcher3-master 2019-01-09 20:21:03 +00:00
Hyunyoung Song
b4d1ca4902 Refresh icon cache for recents when rro overrides the adaptive icon path
Bug: 122472687
Change-Id: I646c3918480740ea322e60252e3ceb006964567f
2019-01-09 11:37:12 -08:00
Sunny Goyal
5bc1846375 Adding support for putting arbitary attributes in InvariantDeviceProfile
This would allow derivative projects to profile profile specific
customization options

Change-Id: Id4703dc54d649a8d8a930f72c836c4ec23ffc45d
2019-01-07 15:26:21 -08:00
Hyunyoung Song
c55a350da8 Refresh icon cache when icon shape path has changed
Bug: 120505990

$ adb shell cmd overlay enable --user 0 com.android.theme.icon.roundedrect
$ adb shell cmd overlay disable --user 0 com.android.theme.icon.roundedrect
$ adb shell cmd overlay enable --user 0 com.android.theme.icon.teardrop
$ adb shell cmd overlay disable --user 0 com.android.theme.icon.teardrop

Change-Id: I06663b9727f7434aae737d39977f1e6cf09bffbf
2019-01-04 11:57:52 -08:00
Sunny Goyal
6d55f66e13 Fixing use of new API available only on API 24
Change-Id: Iaf29d46925c45eeda485f882c1f59841fc3cfcea
2019-01-02 12:14:03 -08:00
Sunny Goyal
415f173331 Changing the format for device profile definition
Device profiles are defined such that the grid size is fixed
and only the icon and text sizes change. For every grid size option
there are multiple display configurations.

Bug: 118758696
Change-Id: I54aac9106c576324b02530913c447e849b4ae1da
2018-12-07 00:06:25 -08:00
Sunny Goyal
87dc48b7bf Handling configuration changes at runtime instead of killing the process
Change-Id: I0c7f7e58ddb690f371c257b6142a4e918e9acb7f
2018-10-19 12:52:17 -07:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Sunny Goyal
36b54228fc Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
2018-07-10 13:52:17 -07:00
Sunny Goyal
d0e360a858 Lazy loading LauncherAppState
Separating InvarantDeviceProfile out of LauncherAppState and creating
LauncherAppState only when it is actually used

Change-Id: I2ee55f53cae01f11203f94675bb5f70c65ad2b9d
2018-07-03 14:39:21 -07:00
Sunny Goyal
f633ef5f43 Adding fallback recents activity
> Refactoring RecentsView to a common base class
> Moving some dependency form Launcher to BaseActivity
> Using the Recents view in RecentsActivity

Change-Id: Ie0e6741d356291e77420798c140c999121de3a0d
2018-03-13 17:22:52 -07:00
Sunny Goyal
d70e75a514 Removing launcher dependency when logging quickstep interaction
as Launcher may not be ready when the touch gesture completes.

Change-Id: Ia69eb7bfb0340f7b7ce9b6c67be8851e5429f867
2018-02-22 10:21:41 -08:00
Sunny Goyal
b1d222e9a7 Removing support for app prediction from Launcher3
Derivative projects can extend the FloatingHeader to add support
to custom content in all-apps screen.

Change-Id: I4e29221a72e5a077a756713a6774cda7ecde8f1b
2018-01-30 20:53:11 -08:00
Adam Cohen
2782449da6 Demo mode default layout support
67062454

Change-Id: Ic060d3d7dba4fffe688dddf7cd04c48e4baaf813
2017-09-29 15:49:34 +00: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
Sunny Goyal
66d91e51d4 resolve merge conflicts of 40dfa3bf6 to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iee500631827ebc48c63c203fdcd0de888adcb135
2017-03-27 10:40:52 -07:00
Sunny Goyal
4610324261 Revert "Adding some logging around launcher grid when device profile changes"
Bug: 35425060
This reverts commit c29de85780.

Change-Id: I4320be3473f914289f88c8cbb376a68af006d7de
2017-03-20 16:08:17 -07:00
Justin Cui
6d00d97704 Merge "Make landscapeProfile and protraitProfile public." into ub-launcher3-dorval
am: b00fcd4e49

Change-Id: Ie62cdf16f27edf46e5b2bbec81873b99f124bb48
2017-03-20 17:41:58 +00:00
cuijiaxing
abda8d79b4 Make landscapeProfile and protraitProfile public.
This is needed to make prediction sticky: b/21654652

Change-Id: Ie8cb77ed9cbf1bf5b164828d0c4335111039e7c5
2017-03-20 17:14:11 +00:00
Sunny Goyal
3d706ad703 Separating the config and flags in different directories so that
it is easier to override one or the other

Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
2017-03-07 09:30:51 -08:00
Sunny Goyal
c29de85780 Adding some logging around launcher grid when device profile changes
Bug: 35349518
Change-Id: Ia71504cd37749f8eaa5e038ac2867bcd9749a4bb
2017-02-15 14:40:30 -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
c13403c612 Defining various modes for CellLayout: Workspace, Hotseat & Folder
> Moving the definition of modes to xml
> Defining attributes in xml

Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
2016-11-21 15:20:16 +05:30
Winson
1f06427266 Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due
  to insets.  This is necessary since there are now different layouts
  depending on which side the navigation bar is on
- Consolidating hotseat and other layout into the device profile 
  launcher layout logic
- Making the all apps icons match the workspace icon height
- Tweaking caret drawable to draw to the bounds specified to simplify
  layout in each orientation
- Fixing minor issue with page indicator shifting in landscape
- Centering overview buttons to the workspace page

Bug: 30021487
Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
2016-07-20 10:17:08 -07:00
Sunny Goyal
819e1936bb Defining the list of predefined device profiles in xml.
This allows the profiles to be easily customized by derivatives.

Change-Id: Iaec2b7a0eda34581c8e48b7dc44817013632dabe
2016-07-07 16:57:49 -07:00
Sunny Goyal
bb011dad4e Adding a flag (enabled by default) to remove the all-apps button.
All apps can still be opened by clicking the caret.

Bug: 29398447
Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
2016-06-17 08:17:22 -07:00
Sunny Goyal
6f866095c0 Removing dependency on wallpaper size settings from launcher
> Moving wallpaper desired width calculation to xml

Bug: 14470153
Change-Id: I8803af158861507a40e5d55e9aa6d515be47eefa
2016-03-17 17:04:37 -07:00
Sunny Goyal
f076eae0ca Adding support for migrating the grid between any two valid screens sizes.
The grid is migrated in steps where each step consists of at max one column change and at max one row change.
Adding some unit tests for GridMigrationLogic

Bug: 25958224
Change-Id: Ie54e872ea0925cc4c463edbba0a7201d62b373a0
2016-01-20 11:58:09 -08:00
Sunny Goyal
643b87af42 Merge "Extending the grid migration logic to handle density changes" into ub-launcher3-master 2016-01-07 19:38:32 +00:00
Sunny Goyal
f862a26347 Extending the grid migration logic to handle density changes
For hotseat migratino, we simply drop the items with least weight
If the workspace row/column decreases by 2 or more, we clear the whole workspace

Bug: 25958224
Change-Id: I7131b955023d185ed10955f593184b9238546dc8
2016-01-06 10:16:44 -08:00
Sunny Goyal
96a0963c4a Adding support for negative x and y in layout xml.
Fixing default configurations for some screen sizes.

> Negative values for x and y are parsed as distance from end
column and row respectively. e.g.  (-1, -2) => (3, 2) in a
4x4 grid

Bug: 26110981
Change-Id: I4ca30e225ed6e2a31610ab23235d2cd10e8d317c
2015-12-18 17:17:08 -08:00
Sunny Goyal
fc21830e6b Normalizing app icons based on the standard icon guidelines
Bug: 18245189
Change-Id: Iaadcddbe3f966733a13b2e1fb60ba09a8b3aef9a
2015-12-02 19:46:36 -08:00
Sunny Goyal
9326461652 Adding margin to Drag layer instead of checking for right insets at every place
Bug: 25692432
Change-Id: I853f41a17c54b30b7772b9fd8556d9465de84752
2015-12-01 14:43:32 -08:00
Tony Wickham
d70a4b7b78 am d6b4037b: Grid adjustments, specifically for Ryu.
* commit 'd6b4037b093445fefa7d036da339dd549fae7a9b':
  Grid adjustments, specifically for Ryu.
2015-10-09 00:38:29 +00:00
Tony Wickham
d6b4037b09 Grid adjustments, specifically for Ryu.
> Less than 14% of the screen is used for left/right workspace padding.
  (To be clear, this means 7% for the left and 7% for the right.)
> Hotseat icons are the same size as workspace icons.
> Far left and right hotseat edges line up with workspace edges.
> All Apps button is scaled down 8dp.

Bug: 24003478

Change-Id: Idb057ab0f6ba29e7fd93feac7573ca2e07c7e839
2015-10-08 09:23:10 -07:00
Sunny Goyal
bbf0184603 Using 23 instead of Build.Versoin.M until the final SDK is available.
Change-Id: I9f8f6fe049afcd0ceb0797ddc803a2e77bab0437
2015-10-08 07:42:49 -07:00
Sunny Goyal
21d89fbf8c Merge "Fixing overscroll effect when the navigation bar is opaque" into ub-launcher3-burnaby-polish 2015-10-07 17:22:44 +00:00
Winson Chung
850de64c0d Merge "Fixing other missing cases of truncated sorts." into ub-launcher3-burnaby-polish 2015-09-30 00:06:55 +00:00
Winson
46a06da01c Fixing other missing cases of truncated sorts.
Bug: 24505761
Change-Id: I9b9358e8b134f0c4aac32ac536d9c8a1f0629957
2015-09-29 16:58:02 -07:00
Tony Wickham
58ecbe40f6 Flipped widths of Nexus 4 and Nexus 5 in InvariantDeviceProfile.
Without this change, Nexus 4 uses the Nexus 5 device profile and
vice versa. But because the profiles have exactly the same values,
it didn't matter that they were flopped.

Change-Id: I3fd788e040feb8de5bb5f5e336acbd4ac995dc0f
2015-09-29 15:19:32 -07:00