Commit Graph

16416 Commits

Author SHA1 Message Date
Sunny Goyal 3a75b494f2 Merge "Fixing WidgetBottomSheet getting cut off around insets" into udc-dev 2023-05-06 09:43:06 +00:00
Treehugger Robot 698f59ccbb Merge "Loading widget description on the background thread" into udc-dev 2023-05-06 08:19:12 +00:00
Fengjiang Li 9a055ee5dd Merge "[3/n] Update StartupLatencyLogger's @VisibleForTesting" into udc-dev 2023-05-06 03:32:03 +00:00
Sebastián Franco 5fd9a76760 Merge "Call getModelWriter() to get the newest version instead of using the old one" into udc-dev 2023-05-06 00:22:20 +00:00
Sunny Goyal 2185f6f420 Loading widget description on the background thread
Bug: 281074741
Test: Varified on device
Flag: N/A
Change-Id: I6b9b13e712534bdc582b98dbfb7bdfcc40d2f19d
2023-05-05 23:15:41 +00:00
Sunny Goyal e7da062d9a Fixing WidgetBottomSheet getting cut off around insets
Bug: 265639220
Test: Verified on device
Flag: N/A
Change-Id: If595fde8e84a226aef82f41caa0be913b22d99c2
2023-05-05 23:15:31 +00:00
Sebastian Franco a64f3a6c98 Call getModelWriter() to get the newest version instead of using the old one
DropTargetHandler was calling getModelWriter() on a final variable
and the model writer it was using was and old one.

Fix: 280170665
Test: Manul test, delete widget and rotate the device, you have to do this twice.
Change-Id: I7b3ac4b272568fcc81438ffd5ac84cf7b64a62ea
2023-05-05 16:09:38 -06:00
Brandon Dayauon 1ee28cd273 Merge "ENABLE_TWOLINE_ALLAPPS default true (only in teamfood)" into udc-dev 2023-05-05 20:49:58 +00:00
Sunny Goyal 2e17bcaa0b Merge "Simplifying widget cell layout" into udc-dev 2023-05-05 19:18:46 +00:00
Sunny Goyal 8de4199463 Simplifying widget cell layout
Calculating the preview scale during onMeasure to ensure the
content is never clipped.

Bug: 268715418
Test: Verified on device
Change-Id: Ia0fd5ca3ccaae9644e043d75f810e91909a2aea0
2023-05-05 09:28:30 -07:00
Sunny Goyal 8d9e468dbb Revert "Revert "Changing GridMigrationTask to use ModelDbController directly""
This reverts commit 30bb3a247a.

Reason for revert: Fixed original issue

Change-Id: I02d85d604631795d96f0379eb94b7b6789102ea9
2023-05-05 16:00:49 +00:00
Jordan Silva 11167aa1f2 Merge "Fix text sizes and alignment in drop target" into udc-dev 2023-05-05 14:09:23 +00:00
Holly Jiuyu Sun ae1c56e34d Merge "[play] Add debug config flag to GMS Play." into udc-dev 2023-05-05 06:55:43 +00:00
Brandon Dayauon 017e7a2e06 ENABLE_TWOLINE_ALLAPPS default true (only in teamfood)
- modified test so enabling two line all apps work
- have appIconSelector() select from content description

bug: 275116822
test: manual
Change-Id: Id3ccc6859b55d6b8a80ca509d420409d484207cf
2023-05-04 19:37:48 -07:00
Fengjiang Li 1ecbfe153c [3/n] Update StartupLatencyLogger's @VisibleForTesting
Change to use (otherwise = VisibleForTesting.PROTECTED)

Bug: Bug: 278092752
Test: print launcher startup latency logs locally
Flag: not needed
Change-Id: I19630cc3436370e4d6a846e58dee002e5d28d5d7
2023-05-04 16:13:24 -07:00
Brian Isganitis 64ee67c6b5 Merge "Add header protection for Taskbar All Apps search bar." into udc-dev 2023-05-04 22:20:46 +00:00
Josep del Río 229d11892a Merge "Close floating panels on Launcher when using Escape" into udc-dev 2023-05-04 20:50:28 +00:00
Charlie Anderson 178802d35c Merge "Revert "Changing GridMigrationTask to use ModelDbController directly"" into udc-dev 2023-05-04 17:58:01 +00:00
Treehugger Robot c2dca5fec4 Merge "Always insetting the widget by a minimum of 6dp" into udc-dev 2023-05-04 17:48:48 +00:00
Josep del Rio 1d976c6702 Close floating panels on Launcher when using Escape
This change will make the Escape key close floating panels in
Launcher.

Bug: 280801803
Test: Flashed on device, tried with physical keyboard and panels
will close.

Change-Id: Ie09e57716a7be74638037abe6272b47eec1b8a6c
2023-05-04 16:07:50 +00:00
Charlie Anderson 30bb3a247a Revert "Changing GridMigrationTask to use ModelDbController directly"
This reverts commit 9ef41413e0.

Reason for revert: This was the only launcher CL during the time  b/280669657 and 280680602 occurred

Change-Id: Id7107f0935f84908ca87e1ae4c62ab05efe41a24
2023-05-04 15:19:58 +00:00
Fengjiang Li efb0c4e98c Merge "[2/n] Refactor StartupLatencyLogger 1. Use kt stirng's $substitutions for StartupLatencyLogger 2. Add "otherwise =" for @VisibleForTesting" into udc-dev 2023-05-04 13:39:08 +00:00
Nick Chameyev 1aa2383d26 Merge "[Unfold animation] Start Launcher animation preemptively to synchronize the first frame" into udc-dev 2023-05-04 09:36:04 +00:00
Fengjiang Li 91503ecbd6 [2/n] Refactor StartupLatencyLogger
1. Use kt stirng's $substitutions for StartupLatencyLogger
2. Add "otherwise =" for @VisibleForTesting

Bug: 278092752
Test: tested on phone, foldable and tablet, print latency logs in logcat
Change-Id: If56b90dafbff0e0b1f7ea076581d71a0b5271d71
2023-05-03 15:51:53 -07:00
Sebastián Franco db982003b2 Merge "Adding unit test to ReorderAlgorithm" into udc-dev 2023-05-03 20:13:15 +00:00
Sunny Goyal 6c304b157d Always insetting the widget by a minimum of 6dp
Removing default widget padding logic. Also widget padding it applied
at ShortcutAndWidgetContainer so that the widgetView always has the
correct size.

Bug: 274826296
Bug: 257589413
Test: Verified using screenshots
Flags: N/A
Change-Id: Id4b5e94db6ec7b2aa3dca87b1e9ccc831b608cac
2023-05-03 12:18:33 -07:00
Sebastian Franco 45b39b50e5 Adding unit test to ReorderAlgorithm
Adding 100 different test cases for the ReorderAlgorithm.
The test cases are randomly generated using generateRandomTestCase()
the boards are generated once and then written in the file
reorder_algorithm_test_cases. I will leave the code to generate
the boards in the Test even though is not used anymore in case
we need to generate more boards later on.

Also, I found that the ReorderAlgorithm was not deterministic,
meaning that it could generate two different results with the same
inputs (views positions and view being drag positions), because
it was traversing a map whose has was the object id which is
random. So I sort the views before traversing them.

Bug: 229292911
Test: atest ReorderAlgorithmUnitTestCase

Change-Id: I196eb8f1dafcb57d5259969268c458129ae4f46b
2023-05-03 11:22:09 -06:00
Sunny Goyal 9ef41413e0 Changing GridMigrationTask to use ModelDbController directly
instead of using content uris

Bug: 277345535
Test: Updated tests
Flag: Presubmit
Change-Id: Ib62db3334c01d9e7d27ae7b02ea703d046e2bcaa
2023-05-03 08:54:14 -07:00
Nick Chameyev 705c665c06 [Unfold animation] Start Launcher animation preemptively to synchronize the first frame
Starts unfold animation in Launcher right after receiving
configuration change for the unfolded screen.
This makes sure that before we unblock the screen we
have the first frame of the unfold animation ready
in Launcher (transformations are applied).

Bug: 271099882
Test: atest com.android.systemui.unfold.util.PreemptiveUnfoldTransitionProgressProviderTest
Test: manual testing fold/unfold, checking perfetto traces
Test: test with flag enabled/disabled
Change-Id: Icb8f91f9264248600d4bed14811445f50aac99c7
2023-05-03 11:35:03 +01:00
Fengjiang Li c15679d512 Merge "[1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency" into udc-dev 2023-05-03 03:18:46 +00:00
Fengjiang Li 5a36c17a32 [1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency
More details at "Log Startup Latency" section in go/launcher-startup-latency

Test: tested on phone, foldable and tablet, print latency logs in logcat
Bug: 278092752
Change-Id: Ibf269b0ecd6007d29b95e36f65ab6f02c45deb3a
2023-05-02 17:08:05 -07:00
Jordan Silva 567372fbda Fix text sizes and alignment in drop target
Drop target button texts are being resized incorrectly.
When both buttons are visible, the text is considerably smaller compared
to only one visible button. This happens even for the default display and font scale 1.

Fix: 271279172
Test: manual. test all combinations of display size and font size.
Test: HomeScreenEditStateImageTest
Change-Id: Ib001dcf8b096c65b138946bdad49cf8199fb5b1d
2023-05-02 14:57:49 +02:00
Vinit Nayak 90dce8b8b2 Merge "Refactor handling data launching split screen to separate class" into udc-dev 2023-05-01 19:55:21 +00:00
Sebastián Franco c9cc7ea612 Merge "Set start time for open folder animation before starting the animation" into udc-dev 2023-04-29 02:39:01 +00:00
Vinit Nayak 2a014d4c0d Refactor handling data launching split screen to separate class
* SplitSelectDataHolder contains logic for knowing how
to launch split, separate from the actual API calls to launch split

Flag: ENABLE_SPLIT_LAUNCH_DATA_REFACTOR
Bug: 279494325
Test: Tested w/ all 6 types of launches noted in
SplitSelectDataHolder#@SplitLaunchType.
Also checked to make sure most-recent running tasks are
still being used where applicable.

Change-Id: I8114f87e9956b100622c80f578e291937ed4eeac
2023-04-28 18:00:22 -07:00
Stefan Andonian 5961d96235 Merge "Move Wallpaper RPC call to background thread." into udc-dev 2023-04-28 20:13:40 +00:00
Stefan Andonian efcff6ceb6 Move Wallpaper RPC call to background thread.
Bug: 251502424
Test: Used logs to time it. This was taking anywhere from 3ms to 19ms on my Pixel 7 Pro device.
Change-Id: I4e9ce55c1269a31f15e910628153c3dfdfd26649
2023-04-27 21:29:39 +00:00
Schneider Victor-tulias 8c1bffb24f Merge "Remove unused debug logs" into udc-dev 2023-04-27 17:44:42 +00:00
Luca Zuccarini 0c856a0c94 Merge "[Toast] Enable background drawables by default in Teamfood." into udc-dev 2023-04-27 15:29:02 +00:00
Holly Sun 48d0645a2e [play] Add debug config flag to GMS Play.
Bug: 274633778
Flag: ENABLE_SEARCH_UNINSTALLED_APPS. Off
Test: manual. adb shell setprop log.tag.GmsPlay VERBOSE
Change-Id: Ic2232011f039893998adbad2fb93f34e8f6bd85c
2023-04-26 17:22:44 -07:00
Vinit Nayak af55572713 Merge "Add logs for PackageUpdatedTask" into udc-dev 2023-04-26 23:05:42 +00:00
Andy Wickham a4627d2235 Merge "Add long swipe from app to overview gesture (with flag)." into udc-dev 2023-04-26 21:30:53 +00:00
Vinit Nayak 6106ae9ac7 Add logs for PackageUpdatedTask
* That's the bit that updates new packages for work profile,
at least from command line.
* There is variability in how long it could take work profile
apps to show up, from 2-8 seconds.

Bug: 243688989
Change-Id: I710befc5f17b4a16bff523eb03f1e88975cafd43
2023-04-26 13:21:57 -07:00
Andy Wickham 830e4b7ce0 Add long swipe from app to overview gesture (with flag).
High level:
 - As you swipe up from an app (OtherActivityInputConsumer),
   a state transition animation to All Apps is created in
   AnimatorControllerWithResistance. The animation is played
   alongside the Recents resistance animation (i.e. past the
   settling point of Overview, which is at mCurrentShift 1).
 - The actual state transition to All Apps only happens if you
   release your finger in the "all apps region." This is set to
   mCurrentShift 2, so double the distance that Overview rests.
 - A haptic plays whenever you enter or exit this region, and
   the all apps animation is set to 0 until the region is
   active. This is so it's clear that something different is
   happening.
 - The panel that was previously used for tablets is now used
   for phones during this transition. It comes in at full
   opacity when you enter the region, and the contents (apps
   and search suggestions) fade in as you continue swiping.
 - The only gesture that is recognized in the all apps region
   is a fling downwards, which will return you to the previous
   app. Otherwise a left/right/up fling or slow release will
   finish the all apps transition.
 - The threshold is ignored if the flag is disabled (default)
   or if FallbackActivityInterface is active.

Flag:
The threshold is ignored if ENABLE_ALL_APPS_FROM_OVERVIEW is
disabled (default).

Bug: 259619990
Bug: 275132633
Test: Manual with and without the flag enabled
Change-Id: Ie311b77252416d97677b2c56fad61dfd392b6fe8
2023-04-26 10:52:04 -07:00
Fengjiang Li 216ae0f7ec Merge "Fix NPE of predictive back in TaskbarAllAppsSlideInView" into udc-dev 2023-04-26 05:15:33 +00:00
Treehugger Robot 826a5c8e71 Merge "Move Block 23 flag back into its section" into udc-dev 2023-04-26 02:37:32 +00:00
Sebastian Franco 57fc157e25 Set start time for open folder animation before starting the animation
The start time of the animation was being set after the animation started
causing the animation to jump to an start time after it already
started wich was very obvious when setting the animation speed to 0.

To test set the aimation speed to zero like so:

  adb shell settings put global animator_duration_scale 0
  adb shell settings put global transition_animation_scale 0
  adb shell settings put global window_animation_scale 0

Fix: 279662507
Test: explained above
Test: FolderScreenShootTest will test it in the future
Change-Id: Id6e10720ffdf64e062e533cd3187f386f57ae906
2023-04-25 16:42:03 -07:00
Vinit Nayak 4549e2c851 Merge "Add link to block directory" into udc-dev 2023-04-25 23:21:16 +00:00
Vinit Nayak 80a3213d6b Merge "Route PredictedAppIcon clicks through launcher" into udc-dev 2023-04-25 23:20:41 +00:00
Vinit Nayak 1bb594c72b Route PredictedAppIcon clicks through launcher
* This allows us to intercept launching predicted apps for
split-screen if user is in split selection flow
* Defaults to existing behavior of ItemClickHandler.INSTANCE
if we do not need to intercept the click

Bug: 276361926
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE
Test: Launches as expected when not in split, launches in
split when selected as second app to initiate split with

Change-Id: Ieb45137ae89da340d314e995f4f6eb1f8b49a42f
2023-04-25 12:31:56 -07:00