Commit Graph

302 Commits

Author SHA1 Message Date
Brandon Dayauon
f2b2202bd8 Fix the badge in badge (triple badging), by simply removing the user badge (FLAG_SKIP_USER_BADGE).
This is used in the bigIconRow where we remove the workBadge in the icon and put the icon after the title in BIG_ICON_ROW.

bug:276957152
Flag: n/a
Test: manual -
before: https://screenshot.googleplex.com/BXShenE2kGrZXtF
after: https://screenshot.googleplex.com/AVYxpDyJ7JGet8h

Change-Id: Icefb9c8192d9841c95c8f6d628026f336e0b7195
2023-10-23 11:33:31 -07:00
Pat Manning
4c27e8c6f0 Migrate cursor feature flag to trunk stable flag.
Fix: 300054410
Test: TaplTestsTransientTaskbar, TaplTestsQuickstep
Flag: enableCursorHoverStates
Change-Id: I5c320e0fd2bdd2ed39b00b62b1399e163c3384e7
2023-10-20 12:17:36 +01:00
Brandon Dayauon
d45403ee2d Merge "Fix text jumping from one line -> two line when scrolling" into main 2023-10-05 00:36:17 +00:00
Brandon Dayauon
6c345f4d4c Fix text jumping from one line -> two line when scrolling
The issue this happens is because the paint letter spacing can change during checkForEllipsis()
so during vertical calculation for two line, set the paint letter spacing to the MIN_LETTER_SPACING that is used
in checkForELlipsis()

bug: 303319642
Test: After: https://drive.google.com/file/d/14YfmEWNpmllSAdLeUamUpewa8ljbqXAU/view?usp=sharing
before: https://drive.google.com/file/d/14Y_I-iuyOGHCr809AlqNL8o1IdFjk3_8/view?usp=sharing
Flag: disabled
Change-Id: I1f56a9e9d22ab45b0491e5fa65b5bfc5b10fc720
2023-10-04 16:44:03 -07:00
Brandon Dayauon
39276d643b Merge "Make DISPLAY_SEARCH_RESULT_SMALL not badged" into main 2023-10-04 16:13:10 +00:00
Brandon Dayauon
0ae52c9863 Make DISPLAY_SEARCH_RESULT_SMALL not badged
bug: 299364813
Test:Manual -
before: https://drive.google.com/file/d/1Gb_bV5oIEPAvNYnqMJwscX-r1iz967eY/view?usp=sharing
after: https://drive.google.com/file/d/1GTH1A8biVAVnWXaArMkdzWK9kiwFhVCn/view?usp=sharing

Flag: n/a
Change-Id: I6e928079d53bfa7f87cde4d420ee05b1edf875f5
2023-10-03 15:49:45 +00:00
fbaron
461a9aa1b1 Cleanup ENABLE_DOWNLOAD_APP_UX_V3 and ENABLE_DOWNLOAD_APP_UX_V2
Fix: 270395186
Fix: 270395134
Test: verify everything works as before
Flag: no flag
Change-Id: I838ed115c371cd157fe3bbe01a5385b8b3f8f918
2023-09-27 23:29:33 +00:00
Brandon Dayauon
3cdb32cc1f Do a vertical check for two line text, if it clips dont show two line.
Added extra 16dp to the cell height in DeviceProfile as per spec: https://docs.google.com/presentation/d/1dSt-zY_wRrOmd9a9nsQG458CIK0RUqVJsHJxLHP_0Nc/edit#slide=id.g237e909075a_2_6
Updated tests andincluded vertical check to see if two line can be fully rendered without being clipped. Otherwise just show one line.
Since existing cell height is 104dp, we add 16dp to be up to spec (120dp)
- Clean up FeatureFlag ENABLE_TWOLINE_ALLAPPS and now use aconfig flag

bug: 270390937
Test: manually - photos
Regular font: https://screenshot.googleplex.com/ArUcgZgHqR4ZWBQ
Bigger font than regular that makes text to one line because it wouldve truncate: https://screenshot.googleplex.com/6s8EdMAbBLsYhLi
Bigger font than regular with predicted app row (twoline):
https://screenshot.googleplex.com/38TEQei5GvPiCc7
Super big font: https://screenshot.googleplex.com/3JUYYprJRQ32Hsq
big display and regular font: https://screenshot.googleplex.com/55rBKVQ8htSe9Vc
big display and bigger than regular font: https://screenshot.googleplex.com/3atzKzJUbfM7YQW
flag: is off

Change-Id: I6998ea5da35d3e00ac75327d16b5ca676fb11c1a
2023-09-26 02:38:16 +00:00
Brandon Dayauon
8e24505d09 Merge "Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW" into udc-qpr-dev am: 28ae77df37 am: f9a203c586
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24724750

Change-Id: I4e955f635773b5084b315282d373b16cff6988e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 16:22:21 +00:00
Brandon Dayauon
47000ae6e6 Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW
- Create another icon, "all_apps_predicted_row_icon" that will be the mDisplay for the predicted app row
in AllAppsList

Bug:299171695
Test: video
Before: https://drive.google.com/file/d/1HxNW0015nQHCc7eQiySf-gwsHrLs_JjR/view?usp=sharing
after: https://drive.google.com/file/d/1HyEwKI-yumILTCjglKcqovhTlRVjNGxg/view?usp=sharing - making sure that QL is fine and dragging regular Toast results are normal
Flag: N/a
Change-Id: Ie002cacb168396dbea39f79679bd6a04b80e374b
2023-09-20 14:21:10 -07:00
Pat Manning
349f101411 Merge "Migrate ENABLE_CURSOR_HOVER_STATES to aconfig" into main 2023-09-19 16:56:45 +00:00
Brandon Dayauon
08cdbc57c7 Fix color in workspace. Where theme badge is applied when it shouldn't
bug: 300368356
Test: Manual
Flag: n/a
Change-Id: I9f391e4ffde41eedba7130f496f4f5e3f51d58db
2023-09-14 21:28:03 +00:00
Pat Manning
c49d60b946 Migrate ENABLE_CURSOR_HOVER_STATES to aconfig
- Keeping FeatureFlags.ENABLE_CURSOR_HOVER_STATES for local testing until aconfig is available in FlagFlipper
- Still reference ENABLE_CURSOR_HOVER_STATES in tests as aconfig still can't be mocked

Bug: 300054410
Test: manual
Change-Id: Id385e8ee32ccf8b920b9b7f9cc620af32def589f
2023-09-14 11:08:02 +01:00
Anushree Ganjam
2a14b978c6 Remove the test aconfig lib.
zhidou@ from ACE team is working on AConfigFakelib which will be useful
to set fake flag values in both unit tests and UI automator tests.
Meanwhile, we will mock the flag values for unit tests and UI automator
tests will have all flags values defaulted to false.

testAConfigLib with "test:true" doesn't generate fake flags values and
forces us to set the flag values using "SetFlagsRule". "SetFlagsRule"
doesn't work with Out Of Proc tests and hence doesn't serve the purpose
for us. AConfigFakelib and FakeFlagTargetPreparer should use for Out Of
Proc tests.

testAConfigLib with "test:true" is suitable for java host tests where
there is no device involved. Launcher tests are instrumentation tests and tests run on actual
devices. So we can use the production version of the AConfig lib and device
config flag values will be fetched for UI Automator tests.

Also migrating "enable_twoline_allapps" to trunk stable. Unit tests is
using mockito to mock the flag value as false. The owner of
"enable_twoline_allapps" can mock the value to true in unit tests as
next step.

Bug: 294913042
Test: Local studio build and soong build
Flag: enable_twoline_allapps

Change-Id: Iea42bf18197832a9ecbddc1c3aaa8c9e36169131
2023-08-30 15:20:51 -07:00
Pat Manning
77dce5f27a Merge "Do not clip scaled Launcher icons on hover." into udc-qpr-dev 2023-08-23 22:24:40 +00:00
Kevin Lim
b3b467c27f [NexusLauncher] Expose setLayoutHorizontal.
mLayoutHorizontal is exposed so that classes that extend BubbleTextView
can override this programmatically based on LayoutType.

mLayoutHorizontal prevents the title in horizontal cases affecting the
icon bounds measure, and shifting things such as the icon halo.

Bug: b/288471727
Test: See ag/24199217
Test: New tests in SearchResultIconTest
Test: No regression in SearchResultSmallIconRowTest
Change-Id: I424c1597d29ed26d7dea9e666ff2d274847e3217
2023-08-23 19:13:59 +00:00
Pat Manning
d0f729d13c Do not clip scaled Launcher icons on hover.
Include change for setting the hover state flag programatically, as FastBitmapDrawable does not currently support DeviceConfig flags.

Fix: 243191650
Test: FastBitmapDrawableTest. Screenshot tests in another cl.
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: I0eb796ae62e571a3287132bfcb99c4fca1e2fbe4
2023-08-23 08:45:43 +00:00
Brandon Dayauon
7e3761614f Make mDisplay DISPLAY_SEARCH_RESULT visible for test
bug: 278922113
Test: locally manually
Flag: n/a
Change-Id: I4c5dcecca66466f796f1fbdc25698da55e50f156
2023-07-11 14:20:14 +00:00
Brandon Dayauon
f2ea399ec6 Fix prediction row title consistency
There's an inconsistency with prediction row in 0-state and all apps page.
This happens because we change the number of lines (to 1 line) after calculating and rendering the two lines.
Which is why if you look at the photos, in all apps, Amazon app just shows "Amazon" instead of "Amazon Sh.."

Instead of changing the number of lines after processing, just set a separate display to the prediction app row

bug:288811197
Flag: teamfood
Test: manual - locally added test BubbleTextView
before 0-state: https://screenshot.googleplex.com/5q9iYypgwwtDa8b
before allapps prediction row: https://screenshot.googleplex.com/BVxGMTT43stDzZ9
after allapps prediction row: https://screenshot.googleplex.com/BfNTFPXwf4FHuRN

Change-Id: Ifefe6dc8dd4a117be7b63f92ff837d0467a51f8b
2023-06-28 14:45:07 -07:00
Thales Lima
7945649c5e Implement calculations of Responsive Grid in DeviceProfile
When a grid has a responsive spec and the feature flag is on, use the new calculations for the sizes in Workspace. This shouldn't affect Scalable grids.

Fix: 277064708
Test: HomeScreenImageTest
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Idef3d17fbfa1b2e0c82c12e7784a7584f1ba1b88
2023-05-30 16:14:34 +00:00
fbaron
1406a0f606 Update notification dot color
Bug: 268521231
Test: Verify that notification dot colors match the figma attached in the bug
Change-Id: Id0cbf9f2447819ae3e6e00e880eca1be3f189826
2023-05-15 11:06:46 -07:00
Brandon Dayauon
7d67331c72 Fix two line item of app-title only in A-Z list and not predicted app row
Create protected method that would be overidden if two lines should be supported

bug: 274686392
test: manual
Change-Id: I34bbd9980aee70397ee75744bedfa61c340a2741
2023-04-19 15:15:16 -07:00
fbaron
6664d8c80b Update the pending app icon to match new specs
Bug: 276950579
Test: Download apps and verify that they match the updated specs
Change-Id: I03b9a5c87514e91c646e961ec57f63f1305d0327
2023-04-04 13:40:55 -07:00
Hyunyoung Song
7eae6a4ce1 Merge "Icon should not disappear on drag and drop" into tm-qpr-dev 2023-03-26 07:22:55 +00:00
hyunyoungs
825480fbcc Icon should not disappear on drag and drop
Bug: 275009677
Test: BubbleTextViewTest

Change-Id: Iddff7a0130c9a0ddb76223064338459dbe9b52e8
2023-03-24 15:16:20 -07:00
Brandon Dayauon
f50106c322 Fix clipping in SearchResultBigIconRow
Remove the compound drawable padding being set in bubbleTextView because this causes the clipping.
This was originally set here horizontal layout, instead will set the correct compound drawable padding
on the horizontal container itself specifically (in another CL) so it doesn't affect other views/layoutTypes that uses
SearchResultBigIconRow

bug: 274723319
test: Manual - before: https://screenshot.googleplex.com/C2G6UXRMUkCJsAk
after: https://screenshot.googleplex.com/9R85bzfuiRiALqw
Change-Id: Ifee3016663225bc922fce602a52ab9f0534d1ef9
2023-03-22 22:16:07 +00:00
Tony Wickham
1e29b04f19 Set PredictedAppIcon ring disabled when icon is disabled
Test: drag a predicted app from taskbar, ensure both ring and icon are
set to grayscale
Fixes: 268759548

Change-Id: I764ebcd486c09eceaf30c5bd5153a1dd2ff5be72
2023-03-22 16:53:10 +00:00
Brandon Dayauon
26958a0961 Merge "Set textSize and compound drawable padding for mDisplay == DISPLAY_SEARCH_RESULT" into tm-qpr-dev 2023-03-16 22:52:47 +00:00
Brandon Dayauon
b1957cd6fb Set textSize and compound drawable padding for mDisplay == DISPLAY_SEARCH_RESULT
This is so it matches closely to all apps icons but the difference is that the icon size is 48dp.

bug: 261047689
test: manual - https://screenshot.googleplex.com/83YwnfwSfR6CJRB and https://screenshot.googleplex.com/68Yqz9hk5NHETKK
Change-Id: I381d9415d2a80a9d36291828a1a31d0c83fc395e
2023-03-14 13:27:30 -07:00
Brandon Dayauon
2b3343018e Shortcut/people icon horizontal layout polish
- allow two line for SearchResultShortcutIcons (also be used in search_result_icon_container)

bug: 261047689
test: manual - https://screenshot.googleplex.com/9wwjxp3nqf4iyJr
Change-Id: Ie8d1415ea94f843f32abb9e4416064c1b674be6d
2023-03-14 11:03:18 -07:00
Brandon Dayauon
5ddc6ab4da Merge "Support two line text in AllApps/OnDeviceSearch w/ feature flag" into tm-qpr-dev 2023-03-10 17:21:37 +00:00
Brandon Dayauon
cf88ea1e62 Support two line text in AllApps/OnDeviceSearch w/ feature flag
Made separate feature flag for on device search
Add unit test to test twoLine string
- Unit tests for testing newStringThatShouldSupportTwoLineText() in BubbleTextView.java. This class tests a couple of strings
and uses the getLineCount() to determine if the test passes. Verifying with getLineCount() is sufficient since BubbleTextView can only be in one line or two lines,
and this is enough to ensure whether the string should be specifically wrapped onto the second line and to ensure truncation.

bug: 201388851
test: presubmit, ran locally on big and small device, before: https://screenshot.googleplex.com/3Q6pwveFDZqxDXL (ORIGINAL TWO LINE TEXT)
after:  https://screenshot.googleplex.com/7pkwUto6HGzMYoT

Change-Id: I93e6ed179e1081d5cdffc6db9c7ae34de8021c24
2023-03-09 15:13:04 -08:00
Federico Baron
db599b2d8e Fix bug where homescreen shows installation completed when it's technically still downloading and fix animation that repeats in apps with quick install
Fix: 269702659
Test: Download an app that has a lighning next to the install text and verify that the animation plays smoothly and that it doesn't animate until we finish downloading completely.
Change-Id: I11147444a85db01c75d63b5cdd09d1d911a28c75
2023-03-09 14:44:41 -08:00
Sunny Goyal
82dfc15037 Simplifying code around multiple translation components
Bug: 270759683
Test: Verified on device
Change-Id: I6c758c715828ae25e0e3c60b793cf85d70cb2487
2023-03-02 12:22:03 -08:00
Jagrut Desai
3addf0b66d Merge "Implement All Apps Icon upto the visual Specs." into tm-qpr-dev 2023-02-25 01:49:59 +00:00
Jagrut Desai
560b0eac62 Implement All Apps Icon upto the visual Specs.
Test: Visual
Bug: 267382941

Change-Id: If675c2f4767014598b23d8a2c2e684f5a8fb4f19
2023-02-24 15:41:06 -08:00
Brandon Dayauon
97baa50a07 Merge "Make shortcuts on people row themed" into tm-qpr-dev 2023-02-22 01:44:04 +00:00
Jon Miranda
13e9b9f889 Translate the taskbar icons to match nav handle shape.
- We need to reset icon alignment whenever icon layout bound
  changes. This fixes the issue where we build an icon
  alignment animator before any of the views are laid out.
- Separated animation logic between.
  createTransientAnimToIsStashed and createAnimToIsStashed
* The values still require a bit more tuning but this gets us
  a lot closer to spec for many of the motion polish.

Bug: 267806083
Bug: 246634367
Bug: 246635237
Test: manual
Change-Id: Id122134b22ef4e418ce632e4a8137239dc8bb313
2023-02-17 10:56:59 -08:00
Brandon Dayauon
e640a9ea00 Make shortcuts on people row themed
bug: 260112992
test: before: https://screenshot.googleplex.com/AVeT2GF94TGqYfn
test: after: https://screenshot.googleplex.com/9d8dpDGfTQ8gnrb
Change-Id: I3c4c237a231bff6e60b26d48a8811b8272a4ee63
2023-02-03 14:14:15 -08:00
Federico Baron
4eb502ae10 Add finish icon scale animation for downloading apps
We add an animation when we finish downloading an app where the scale of the icon increases to from scale 0.867 to scale 1

Bug: 254858049
Test: Download an app and visualize finish download animation
Change-Id: I67912f86b0e35091a5fe1b39c3463a1ff203bd3b
2023-01-13 15:35:14 -08:00
Sunny Goyal
47d4d81b4f Cleaning Utilities.java
> Removing some unused methods
> Moving some specialized methods to corresponding classes
> Removing GridProvider check as it is released

Bug: 257555083
Test: Presubmit
Change-Id: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
Merged-In: Ib0f8c673d018071d3f4b7d9247e0a35718ab009c
2022-11-17 01:06:16 +00:00
Brandon Dayauon
d3755f46cc Scale icons from search to make app icons big like AA -> workspace
when dragging from search.

To scale the icon during dragging (instead of long press) I created a scale variable within DragOptions
so that right before dragStart gets called in DragController.java (in callOnDragStart())
the dragview scales before dragging..
 * note: the scale from search is 1.687 and the scale from allApps is 1.107
- included searchResult and smallSearchResult
- Added animation for scaling icon (used Interpolators.EMPHASIZED 500ms as suggested by motion designer)
- Cancel animation when drag finishes

bug: 222666176
test: Manual - after: https://drive.google.com/file/d/1ZZHnXlzdTxlM-RUIdJ6EOYkPPg6tCUxC/view?usp=sharing
before: https://drive.google.com/file/d/1NpBz3kT_slHXtpXObr_G8K6SZYG9_bLX/view?usp=sharing

Change-Id: I01309a3be928987ba00422ad947b80a3df865973
2022-10-11 13:29:35 -07:00
James O'Leary
ede514f275 Update notification dot from T90 to T80
Bug: 213314628
Test: work with UX to pick something darker than T80, present options
from T70 to T90, get feedback to use T80, verify at runtime via
screenshot dot is T80.

Change-Id: Ic5b47a419eb7697c22c4dd9ab849b8a00d73be9f
2022-06-06 16:01:45 -04:00
Sunny Goyal
d7281d097d Merge "Adding support for easily extending Launcher DragAndDrop support" into tm-dev 2022-05-12 17:00:49 +00:00
Sunny Goyal
f0ff70a2a5 Adding support for easily extending Launcher DragAndDrop support
Bug: 232165524
Test: Verified locally
Change-Id: I3b4f37bc9914de55330662edd678e6fdd0eafece
2022-05-11 21:34:08 +00:00
James O'Leary
1557ba37c1 Separate color into app color and dot color; specify dot color
Design intends for predicted app disc to use the app color, and the
dot to use tertiary T90/shade100. Both currently use `color`. Separating
into two separate colors lets use define the two separate colors
requested by design.

Bug: 213314628
Test: Manual inspection at runtime
Change-Id: If50c32d0bf67493192ce32a33775311d58f21942
2022-05-11 16:57:49 +00:00
Sunny Goyal
52f4c16a94 Revert^2 "Removing some unused code from All-Apps"
13ae6784b5

Change-Id: I06a4c9cc6beba4fc87b4a9375872c68e71e1c5f6
2022-04-27 03:22:58 +00:00
Sunny Goyal
13ae6784b5 Revert "Removing some unused code from All-Apps"
Revert submission 17866780-cancel-request

Reason for revert: wrong icons

Reverted Changes:
Iedc98e5ef:Cancelling previous request and clearing UI when a...
I72394fb42:Removing some unused code from All-Apps

Change-Id: I2ecefcaf07e6105a10f86b8dc19f75089e45a3e0
2022-04-22 19:53:37 +00:00
Sunny Goyal
3946ecd441 Removing some unused code from All-Apps
Bug: 229860311
Test: Verified on device
Change-Id: I72394fb421679688f87cdbf725859ec35529a59e
2022-04-20 09:54:48 -07:00
Stefan Andonian
1d57706125 Update monochrome theme icon notification dot color
Bug: 189498337
Test: Hard-coded the notification dots to be visible, and verified they were the correct color.
Screenshot: https://screenshot.googleplex.com/AVbbW6P2bm6jYNS
Change-Id: I38a78cda056273eb300d458e663f79ccdd28f36a
2022-03-29 16:21:32 +00:00