Commit Graph

342 Commits

Author SHA1 Message Date
Yasan
89475edf3e Dock widget provider support (#3108)
Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-11-14 14:57:56 +03:30
Yasan
d75e31c021 Custom Notification Dot Counter Color Support (#2977)
* Add `notificationDotTextColor` to `PreferenceManager2`
* Add `notificationDotTextColor` to preferences UI
* Pass counter color to `DotRenderer`
* Convert `LauncherDefault` to `Default`
* Optimize imports
* Rename "Default" to "Managed by Lawnchair"
* Use the correct `ColorDot` on `ColorPreference`
* Show a contrast warning for dot colors
* Show a special icon on `ColorDot` when the color is 0
* Make `ColorDot(Color)` private to avoid accidental usages
* Create `WarningPreference` as a reusable composable for warnings
* Use Rounded icon on `WarningPreference`
* Fix `ColorContrastWarning.kt`'s file name
* Update platform_frameworks_libs_systemui

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-09-28 09:03:08 +03:30
Yasan
995f89f9eb Add custom color support to Notification Dots (#2789)
Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-07-24 01:02:52 +07:00
Patryk Michalik
1f5597a908 Update dependencies 2022-06-17 18:39:24 +02:00
Suphon Thanakornpakapong
848f6128ee Move text size overrides to device profile 2022-05-19 16:49:02 +07:00
YASAN
074a102ded Notification count support for Notification Dots (#2587)
* Add notification dot counter to preferences

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>

* Add counter support to notification dots

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>

Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-05-16 23:17:02 +07:00
Suphon Thanakornpakapong
b41bc60300 Add option to enable taskbar on phones
Co-authored-by: Danny Lin <danny@kdrag0n.dev>
2022-05-11 09:04:51 +07:00
Suphon Thanakornpakapong
11e1a2fdc8 Merge remote-tracking branch 'aosp/android12L-release' into 12.1-dev 2022-05-08 20:29:17 +07:00
Patryk
824635cc84 Migrate “pref_allAppsCellHeightMultiplier” to Preferences DataStore 2022-03-07 16:13:40 +01:00
Patryk Michalik
4ca25a6a76 Migrate “pref_darkStatusBar,” “pref_dockSearchBar,” “pref_iconShape,” and “pref_themedHotseatQsb” to Preferences DataStore 2022-02-11 19:41:43 +01:00
Alex Chau
4c98374d99 DeviceProfile.overviewRowSpacing should exclude extra top margin on grid tasks
Bug: 207350366
Bug: 210158657
Test: manual
Change-Id: I28116407c4267259a75fd39637104cea9db73fe3
2021-12-10 23:29:08 +00:00
Alex Chau
992db75dae Use percentage scaling for overview thumbnail size
- Limit overview to screen ratio to be at max 70%
- Tuned row spacing and page spacing
- Added 2 more test activities to testOverviewForTablet to avoid dismissing tasks at end of grid, as more grid tasks are now shown

Bug: 207350366
Test: manual
Change-Id: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230
Merged-In: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230
2021-12-07 14:50:40 +00:00
Alex Chau
1bf0fe1b70 Add back screenshot button to Launcher3
- Also make spacing between buttons always 36dp
- Updated screenshot button image for Launcher3

Fix: 208384949
Test: Start overview in Launcher3WithQuickStep, test screenshot button is working
Change-Id: Ieb60ce134813202c1d14137fff0a131e1f5f8c96
2021-12-03 12:32:29 +00:00
Alex Chau
6095333370 Consider two panel in home to overview transition
- Get the value from DeviceProfile directly

Fix: 202444558
Test: manual
Change-Id: Ifadbbf34c8103d7275b8b4043dcae47d1168ae83
2021-11-24 18:11:45 +00:00
Alex Chau
2998307cd6 Use only current density to check isTablet
- Removed DeviceProfile.allowRotation and use DeviceProfile.isTablet instead, which only uses current density to calculate its value
- Reverted default allow_rotation preference handling to before ag/14234761

Fix: 203817448
Test: isTablet is set correctly in different screen sizes
Change-Id: Ic6c8dfc774e7787f62d489ad27720a7644c1e8c7
2021-11-19 15:27:01 +00:00
TreeHugger Robot
42f111dc27 Merge "Revert "Add feature flag to control two panel home in portrait"" into sc-v2-dev 2021-11-17 17:47:16 +00:00
Alex Chau
9012582ef7 Revert "Add feature flag to control two panel home in portrait"
This reverts commit b1c36ce938.

Reason for revert: experiment no longer requried
Bug: 197723099

Change-Id: I585fa4364ab5326a19b099a80a1a02a66370d84f
2021-11-17 14:16:58 +00:00
Alex Chau
56bd257478 Update overview clear all button to be larger
- Tuned the size and corner radius
- Tuned the margin from screen edge
- Tuned the vertical position

Bug: 204153113
Test: manual
Change-Id: Ibf3df599b31c7ecc2c9c951fc89e7e09c90253ef
2021-11-04 16:02:17 +00:00
Patryk Michalik
db6c43f239 Add ability to change height of rows in App Drawer 2021-11-03 14:01:50 +01:00
Suphon Thanakornpakapong
96fa31a774 Make drawer cells square when labels are hidden 2021-10-20 16:26:24 +07:00
Suphon Thanakornpakapong
b098df0f7d Fix drawer icon size tied to workspace icon size 2021-10-13 11:04:39 +07:00
Suphon Thanakornpakapong
497e6ebe95 Implement hotseat search bar 2021-10-11 11:51:24 +07:00
Thales Lima
83bedbfe97 launcher: refactoring variables into arrays
There are a lot of variables that can be merged together into arrays
following some optimizations done in other places.

Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I1d73fbb5da2df2345ced7f46df5bae5d75d9d6b1
2021-10-08 13:36:56 +01:00
Suphon Thanakornpakapong
554e466864 More fixes 2021-10-08 12:16:21 +07:00
Thales Lima
78d00adcbe launcher: create more space options
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.

Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
2021-10-05 12:26:05 +01:00
Suphon Thanakornpakapong
cc2bd15873 Merge remote-tracking branch 'aosp/android12-release' into 12-dev 2021-10-05 14:13:08 +07:00
Thales Lima
d90faab655 launcher: create attrs for more horizontal margin options
According to new specs, margins are different depending on orientation
and fold/unfolded. Also change the name of the variable to
horizontalMargin, since it applies the same padding to both sides.

Bug: 191879424
Test: manual and checking paddings in HSV
Change-Id: I8990c02b928a22b9f3b0cf3cbc3abf08df4daa9d
2021-09-30 14:06:56 +01:00
Thales Lima
f8182da6c5 Merge "launcher: create paddings for foldables" into sc-v2-dev 2021-09-30 09:19:22 +00:00
Samuel Fufa
abb827b376 Merge "[Foldable] Apply max width to AllApps in unfolded state." into sc-v2-dev 2021-09-29 22:07:42 +00:00
Thales Lima
7a6752da51 launcher: create paddings for foldables
This creates a new padding file that bring some foldables up to spec
with VisD. For 2 panel layouts it now uses workspace margin instead of
cell layout padding.

Bug: 191879424
Fixes: 200035429
Test: checking paddings in HSV
Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
2021-09-29 11:53:29 +01:00
sfufa@google.com
de0132939b [Foldable] Apply max width to AllApps in unfolded state.
Since we are applying the same iconWidth in AllApps as Workspace in unfolded state, this change restricts AllApps to span only the area required to display AllApps contents and not span full available width. Unfolded/phone behavior remains the same.

Bug: 199959857
Bug: 194259694
Test: visual
Change-Id: Ie5658d566f20e825e666ef17db79a87b07dc2936
2021-09-24 15:18:01 -07:00
Pierre Barbier de Reuille
578deba57d Correct the computation of the cell size.
The previous computation ignored the left/right padding of the cell
layout.

Fix: 200968203
Test: Manually
Change-Id: I5a017b90c11e2cd710f16fece5cdae902ccb1e72
2021-09-24 14:18:28 +01:00
Tony Wickham
21970ccd29 Remove nonOverlappingTaskarInsets
- Override our insets in LauncherRootView to explicitly only care about nav bar size, ignoring any insets due to taskbar.
- Previously we used nonOverlappingTaskbarInsets to belatedly subtract from measurements in e.g. DeviceProfile, but now we can revert most of those calculations since we effectively subtract taskbar insets at the root.

Test: visual in different orientations and navigation modes, and testPressHomeOnAllAppsContextMenu to ensure REQUEST_WINDOW_INSETS still works for automated tests
Fixes: 200607741
Change-Id: I8de5a268c686a1354b4beaa30e101bab6bed5af9
2021-09-21 13:52:43 -07:00
Thales Lima
d1df5fcaac launcher: use scalable grid in 4x4
Many changes are required to make scalable displays work correctly on
foldables. This first one is making sure that the correct number of
columns is used when calculating the used width for scalable grid. The
spaces around the workspace are not final yet.

Bug: 191879424
Test: manual
Change-Id: Idc41ed004580f1f86d8f9595d005abc72301b1e3
2021-09-17 10:43:42 +01:00
Alex Chau
b1c36ce938 Add feature flag to control two panel home in portrait
Bug: 197723099
Test: manual
Change-Id: I20d7751e09053dc90c495f398334431f390f64bf
2021-08-25 11:54:08 +01:00
Alex Chau
2683bd7728 Merge "Support different task icon margin for grid tasks" into sc-v2-dev 2021-08-18 08:41:42 +00:00
Vinit Nayak
ca1d523734 Merge "Add GroupedTaskView for gestures in staged split." into sc-v2-dev 2021-08-17 23:26:53 +00:00
Vinit Nayak
17c4b33db6 Add GroupedTaskView for gestures in staged split.
* Currently only works for portrait 50/50 split
* Have gesture swipe animation flow use multiple
TaskViewSimulators, one for each app in split
* Added new APIs in shell to query for actively running
tasks to determine if we're in split screen
* Lots of UI polish needed during gesture
* Launching into staged split after live tile ends
not implemented yet.

Bug: 181704764
Change-Id: Ib90e99e1e10b19121e8709385e1334b9380d6502
2021-08-17 13:46:43 -07:00
Alex Chau
eaa6d682d4 Support different task icon margin for grid tasks
- Focused and non focused grid now have differnt margin between icon and snapshot
- The overall margin above snapshot is still the same
- Invoke updateChildTaskOrientations when focus task changes to update the margin
- Also lowered the row spacing according to spec

Bug: 194194694
Test: manual
Change-Id: I25267bef19d5a8b1dc1cf96fc1babdc3ebc39330
2021-08-17 18:33:21 +01:00
Tony Wickham
40f86763bc Merge changes from topic "taskbar-crop-tasks" into sc-v2-dev
* changes:
  Extend taskbar color to entire screen in overview
  Use WindowBounds#insets instead of WindowInsets in DeviceProfile
2021-08-17 14:52:50 +00:00
Tony Wickham
635e180e56 Extend taskbar color to entire screen in overview
Only when taskbar is unstashed in apps:
- Scrim workspace with the taskbar color when opening apps and in BackgroundAppState
- Crop opening apps to above the taskbar
- Crop TaskViews to above the taskbar during gestures

If taskbar is stashed in apps, behavior is the same as before, i.e. no scrim over the wallpaper and no cropping of tasks.

Added a field DeviceProfile#taskbkarPresentInApps to distinguish these cases. LauncherTaskbarUIController and TaskbarStashController ensure this value is set appropriately.

Test: Ensure tasks don't appear behind taskbar when it's unstashed; set ENABLE_SCRIM_FOR_APP_LAUNCH = true to test the whole screen scrimming when opening an app

Bug: 196257194
Fixes: 190681228
Change-Id: I481501457a5a6d49c380feea3db3b4058e4cf3f8
2021-08-16 16:50:52 -07:00
Tony Wickham
f5ce2f624d Use WindowBounds#insets instead of WindowInsets in DeviceProfile
This reports more consistently and is cheaper.

Test: Log windowBounds.insets.bottom vs windowInsets.getSystemWindowInsetBottom() and note that the former is correct after fold/unfold even though the latter starts reporting 0
Bug: 196874770
Change-Id: I41eb0ab51d3761a988e680cd6d61e40bcacf567f
2021-08-16 16:45:12 -07:00
Alex Chau
1e4484669d Remove widget panel
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)

Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
2021-08-13 21:48:35 +01:00
Andras Kloczl
30fe9152d5 Update two panel specific launcher home icon sizing
Test: manual
Bug: 191879424
Change-Id: I4f51616004d78036ad801298bb5ba72af8de3f30
2021-08-12 18:46:01 +01:00
Jonathan Miranda
86d80936ac Merge "Update extra space allocations for taller devices." into sc-dev am: dd16ecbc61
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15457550

Change-Id: I8fe398bacbdc11a3ba6d43829c1be75248249740
2021-08-05 18:42:44 +00:00
Jon Miranda
a56cb84141 Update extra space allocations for taller devices.
- Take less space from cells
- Distribute some of the empty space above the workspace
- Already confirmed from previous testing that these thresholds
  only affect taller devices

Bug: 194688362
Test: long press on app icons,
      test drag and drop bounds
      test drop target bounds
      test folder opening bounds
      test all grids on taller devices

Change-Id: If90b7663ab4afedca1193bdd73a0ae38a1f25243
2021-08-04 12:00:36 -07:00
Alex Chau
ac9df38e9f Make icon drawable for non-focused grid tasks smaller
- Center the icon drawable in center of IconView with and allow a smlaler size to be set

Bug: 194194694
Test: dismiss focus task, swipe from app etc.
Change-Id: I2855249b13e2ccdb45f101bfb7afef4311f7b46f
2021-08-03 17:36:15 +01:00
Jonathan Miranda
4edf78695d Merge "Add more restrictions on whether we increase the hotseat size for tall devices." into sc-dev am: 4a17e66166
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15412628

Change-Id: Ifb92308f3c0a3fef040e3a863e9e11300ad46334
2021-07-30 20:50:28 +00:00
TreeHugger Robot
02d45252f3 Merge "Fix cell size calculation in large screen devices" into sc-v2-dev 2021-07-30 11:39:26 +00:00
Steven Ng
2a5c594855 Fix cell size calculation in large screen devices
Test: Digital clock widget is no longer cropped.
Bug: 184966000, 194784402
Change-Id: I26c406da1e10232019f34620a4d2bc0dbafcbb31
2021-07-30 11:14:11 +01:00