Commit Graph

23 Commits

Author SHA1 Message Date
Jagrut Desai
2e8ca87c21 Taskbar in Desktop Windowing Mode
Test: presubmit
Bug: 330146462
Flag: NONE
Change-Id: Ib33f90704c3010df6a52e2a1c420960b11dbd0d4
2024-05-01 09:29:24 -07:00
Sunny Goyal
10fa016352 Fixing MainThreadInitializedObject
> Making SafeCloseable implementation mandatory, to prevent leaks during test and preview
> Removing getNoCreate method and defining executeIfCreated to avoid null pointer exceptions
> Fixing sandbox value leaking into main, by Checking sandbox against App context
> Converting sanbox to an interface instead a class

Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: I951dcde871898e745ff6490a1c4f8fd1512888f5
2024-04-22 17:04:33 -07:00
Sunny Goyal
11117d9b2a Using resource override instead of code-swap for ApiWrapper
Bug: 330920490
Flag: None
Test: Presubmit
Change-Id: Iac19f32e64d2c76ed5b4f8592943ee4ae7af51b5
2024-04-09 11:14:44 -07:00
Brandon Dayauon
68c18236ad Disable two line text legacy flag.
Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
2024-03-08 21:32:22 -08:00
Brandon Dayauon
b177c9226e Use setFlags to disable two line toggle flag in tests.
disableFlags for Flags.FLAG_ENABLED_TWOLINE_TOGGLE

bug: 316027081
Test: presubmit/gantry/manual
BubbleTextViewTest: https://screenshot.googleplex.com/8zFHWbwCFyxTTHC
Flag: com.android.launcher3.enable_twoline_toggle DEVELOPMENT
Change-Id: I530126de6ac63395acd2d176935e6f6f9759d4c3
2024-02-22 14:19:31 -08:00
Jagrut Desai
f584d784f8 Making AbstractDeviceProfileTest tnd FakeInvariantDeviceProfileTesto only run on CF_PHONE
Test: Presubmit
Bug: 315230497
Bug: 322418756
Bug: 321596072
Flag: NONE

Change-Id: I668f87304df0ba1dcace3d802906c8a66912d381
2024-02-08 12:06:44 +00:00
Sunny Goyal
a90500d233 Using system API for rotating DisplayCutout instead of rotating it ourselves
Bug: 321913010
Flag: NONE
Test: Manual
Change-Id: Iebbc8c17dc3b92a73866b7e22dfbde18eb3a52ff
2024-02-06 10:26:18 -08:00
Winson Chung
734c6f3974 Workaround for handling single device specific state in dump tests
- There's a DeviceProfile state that is dynamic on a specific device
  class (based on a fw resource), this causes problems with the dump
  tests which compare the device profile against static prior dumps.
  For now, we can just update the expected dump based on the state
  of the resource to ensure that the current device profile state on
  this device matches.  To do this, we also need to consolidate the
  various duplicate methods to assert the current and golden dumps
  match to have a common place to adjust the expected dump.

Bug: 315230497
Test: atest DeviceProfileDumpTest
Test: atest DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I5130d330878757702af07e166a669cc76452b271
2023-12-15 05:10:04 +00:00
Alex Chau
c09a98a87d Use WindowConfiguration to match DeviceProfile in IDP.getDeviceProfile
- Also fix WindowBounds.isLandscape to use full display bounds to determine isLandscape, otherwise both orientation will be treated as isLandscape when using availableSize

Bug: 309801705
Test: manual and presubmit
Flag: NONE
Change-Id: Ic7f4235e620d4760a9af356f23066fe5b23304e6
2023-11-14 18:38:51 +00:00
Alex Chau
1ce67a6122 Use SandboxContext in AbstractDeviceProfileTest
- Added a initializeForTesting method to SandboxContext
- Also made SandboxContext non-abstract, so it can be used in tests to inject mock MainThreadInitializedObject into the SandboxContext, this should avoid mocked MainThreadInitializedObject bled into another test

Test: presubmit
Flag: None
Bug: 303328913
Change-Id: I37157d81b08b80f1e90eacca7dc2ce482cd08aa4
2023-10-12 11:43:37 +01:00
Brian Isganitis
06139e079c Migrate Kotlin tests to use mockito-kotlin2.
Test: atest
Bug: 300509464
Flag: No
Change-Id: I5e0d0f1f29d51cdbfacd51f7229afddf8bd66f7e
2023-10-03 16:04:19 -04:00
Jagrut Desai
3a7d139110 Add isTransientTaskbar as DeviceProfile Builder Property
- Breakout CL part 5
- This is a breakout cl from ag/24272821 to make it more readable and atomic.
- This cl consist of adding isTransientTaskbar as DeviceProfile Builder Poropety
- This cl alos consist a shared pref listener for taskbar pinning to update device profile.

Test: Manual, Visual
Bug: 265170176
Flag: ENABLE_TASKBAR_PINNING
Change-Id: I2ade751ffc8c59bd4b862b56c8ca7eb2aa05b7f2
2023-09-28 12:01:58 -07:00
Vadim Tryshev
5cdb5070ad Adding TestStabilityRule to AbstractDeviceProfileTest
This will help to demote tests derived from it from presubmit

Bug: 298077774
Test: presubmit
Flag: N/A
Change-Id: Ieb842b3fb92db2aeb6ed84cf2576888d7ee68016
2023-09-08 13:35:05 -07:00
Thales Lima
19c41f5932 Merge "Create specs for hotseat" into udc-qpr-dev 2023-08-10 20:08:38 +00:00
Jordan Silva
3646a1b7e1 Fix workspace and hotseat paddings for responsive grid in landscape
Add paddings for workspace and hotseat when vertical bar is enabled.

Fix: 294033018
Flag: ENABLE_RESPONSIVE_WORKSPACE
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeGridDumpTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Change-Id: I7358d2eb7b7c53b436756c21bd81d4746ea01801
2023-08-10 14:15:35 +00:00
Thales Lima
f8bfb036ba Create specs for hotseat
Some attributes of hotseat change depending on the size of the device. In the future more attributes could be moved to the spec, e.g. hotseat icons.

Fix: 292204436
Test: CalculatedHotseatSpecTest
Test: HotseatSpecsTest
Test: SizeSpecTest
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I6a4e05d75af819dbf1444a5ca45c2080f55dc203
2023-08-10 10:23:23 +00:00
Thales Lima
9cc14e3610 Migrate DeviceProfile dump tests to files
Using files makes it easier to update the changed properties.

Fix: 286049633
Test: DeviceProfileDumpTest
Flag: N/A
Change-Id: I5f51a99c1bb1688c59466282c836ef30466ae53d
2023-06-14 11:03:27 +01:00
Thales Lima
52fbedf2f1 Merge "Calculate sizes for responsive grid" into udc-dev am: d282d5956e am: dc7d900708
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22764617

Change-Id: I29151c20fb9a05163a0f17b0317bff1ebf14588e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 15:36:07 +00:00
Thales Lima
c98b7815c6 Calculate sizes for responsive grid
This shouldn't change anything in the grids, only calculate the sizes of the grid.

Bug: 277064708
Test: CalculatedWorkspaceSpecTest
Test: WorkspaceSpecsTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Id1f90ef44f5b869113d063bad17589e7e88d1d20
2023-05-17 10:33:36 +00:00
Alex Chau
7af659da9e DisplayController should deep compare mPerDisplayBounds
- In CHANGE_SUPPORTED_BOUNDS check, it uses Map.equals, but as the value is a primitive array WindowBounds[], equals check does not deep compare the arrays and may result in false negative
- One example is when fontScale changes, DisplayController re-create bounds from WindowManagerProxy, result in new WindowBounds[] created, and the shallow compare results in unexpected CHANGE_SUPPORTED_BOUNDS

Fix: 282736623
Test: DisplayControllerTest
Change-Id: I3897595c58559192b951ecfee7c9f62a07dafe1f
2023-05-17 09:40:46 +00:00
Thales Lima
ec5abba93b Add feature flag and attribute for responsive grid
This shouldn't change anything in the grids, only support the creation of responsive grids in the future. For now, to check that the flag works, turn it on and check the dumpsys. There is also a dump test created for this.

Fix: 277064696
Fix: 277064702
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I1bef87043a100234bd661cd6ac00007fdc654116
2023-05-09 12:06:18 +01:00
Thales Lima
69166dd054 Create a DeviceProfileDumpTest for nonquickstep
This makes sure we are still testing non scalable grids as well

Bug: 241386436
Test: DeviceProfileDumpTest
Change-Id: I06b442cf1052a952ee834f98c5005ea8e950c2f0
2023-02-13 17:31:13 +00:00
Thales Lima
1a2d4bd6f4 Create an XML parser for WorkspaceSpecs
Extract DeviceProfileTest to Launcher3 so it can be used in other tests as well, and change name of previous base test to be more descriptive.

Bug: 241386436
Test: WorkspaceSpecsTest
Change-Id: I64613bb5a23c374ed15fb6d936192236a541ab9b
2023-02-08 11:20:14 +00:00