This also means Taskbar is transient by default in automated tests,
instead of persistent. Updated some checks accordingly.
Flag: LEGACY ENABLE_TRANSIENT_TASKBAR ENABLED
Test: TaskbarExpandCollapse#hideShowTaskbar; TaplTestsTaskbar;
TaplTestsTransientTaskbar; TaplTestsPersistentTaskbar
Bug: 270395798
Change-Id: Ib6e592a31a55a912a7ea991a421a9c60bca51c80
- 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
- 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
This CL allows user to long press on Taskbar divider view to bring up divider popup view. It also included functionality of allowing user to turn on always show taskbar from the divider popup view.
Test: Manual
Bug: 265436055
Bug: 265434718
Bug: 265434902
Bug: 265434705
Flag: ENABLE_TASKBAR_PINNING
Change-Id: Ied54d718483a9b06b053d68988e5c294a786002a
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.
Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions
Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places
Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
- Also removed transient_taskbar_two_panels_size and use sw720dp override instead, to be consistent with how we handle small vs large tablet in overview
- Also made isTransientTaskbar mockable so we can test that in DeviceProfileDumpTest
Bug: 260596114
Test: DeviceProfileDumpTest
Change-Id: I3c2236b95d91246e9581531478e3c97601cfb2ec
This avoids us trying to read FORCE_PERSISTENT_TASKBAR feature flag
which apparently crashes tests due to permission issues. Going forward,
when we support persistent taskbar better, we should update the tests
and this check as commented in the code.
Test: com.google.android.apps.nexuslauncher.TaplTestsNexus#testSearchNoInputs
Fixes: 261604544
Change-Id: I35c20825e8171766834f0f32be4f3818d02ab1df
This will allow us to test taskbar pinning before the entrypoint for
such a setting is finalized.
Test: manual, TODO: will need to update TaplTestsTaskbar to account for
this mode
Flag: FORCE_PERSISTENT_TASKBAR [off]
Bug: 258604917
Change-Id: I4535978563ffbe9a6cc6ece7720cdb75e787ff44
This reverts commit e7011d2b87.
Reason for revert: attempt to fix test issues
- Instead of using SharedPrefs which can be flaky anyways,
we pass along a boolean to test transient taskbar when
we are in the test harness
Bug: 257549303
Test: TaplTestsTaskbar
Change-Id: I7c15a97363adc377f29853c1fe60b1960c77bfc3
This change is only for the visual appearance of the
transient taskbar.
Bug: 252905206
Test: manual
Change-Id: I4990b20b39089a0c27ec2a72dd3010cf64ddba1d
- Mock WindowManagerProxy instead of IDP in DeviceProfileTest
- Extracted NavigationMode to standalone class
- Moved parseNavigationMode to WindowManagerProxy so it can be mocked
- Moved DeviceProfileTest to internal repo
Bug: 242086027
Test: DeviceProfileTest
Change-Id: Ia5a43293b1380f04d786d2adf8503cfd10f7674a
- Also skip most of initDeviceProfile/onIdpChanged if DeviceProfile didn't actually change to effectively skip the 2nd unexpected onConfigurationChangeded caused by setRequestedOrientation (b/211763738)
Test: Change display size while in app or at home screen
Fix: 240019605
Change-Id: If307742639bd269622140a7da0dc900887c67937
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.
Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
- Moved debug logs under DEBUG flag which defaults to false
- Moved info+ logs to permanent log tags
Fix: 198965093
Test: manual
Change-Id: Iea99f053da08e921542a8f532a9837997e10de5e
- For system Launcher, migrate to use getPossibleMaximumWindowMetrics instead of getDisplays
- Removed usage of displayId
- In estimateInternalDisplayBounds, use CachedDisplayInfo directly as a key
- When cache retunrs null for the current display (e.g. the 3P launcher case), invalidate the cache and estimate again, and only add to supportedBounds if current display is not found in the new cache
Bug: 227459045
Bug: 198965093
Test: manual
Change-Id: Ibcc05ba483ed31a40d16e3cf49c3f3d43af68cf6
- Update Info when perDisplayBounds has changed
- Add more detailed logging to displayInfo, realBounds and perDisplayBounds
- Add perDisplayBounds to dumpsys and replace supportedBounds
Bug: 233562339
Test: manual
Change-Id: I9a040e8465a8b0a2dcde61bab06c6ca1df3006da
Revert submission 17983445-hotseat_span
Reason for revert: b/231283023
Reverted Changes:
Ice4e37929:Fix hotseat width to span a number of columns
I9ed508490:Fix hotseat width to span a number of columns
Change-Id: Iabf67c5efd8155131a0c8a88192ddd671a43747b
This code contains utility clases that can change the display
of a device and make it look like another device.
The function DisplayEmulator#emulate receives a DeviceEmulationData
a certain grid to emulate and a callback, everyting that happens
inside of the callback will happen when the device is being emulated
and can be used by other tests.
Example test:
package com.android.launcher3.deviceemulator;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.MediumTest;
import com.android.launcher3.deviceemulator.models.DeviceEmulationData;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.TimeUnit;
@MediumTest
@RunWith(AndroidJUnit4.class)
public class TestTest extends AbstractLauncherUiTest {
@Test
public void testEmulation() throws Exception {
String deviceCode = "pixel6pro";
DeviceEmulationData deviceData = DeviceEmulationData.getDevice(deviceCode);
String grid = "normal";
DisplayEmulator displayEmulator = new DisplayEmulator(mTargetContext);
displayEmulator.emulate(deviceData, grid, () ->{
TimeUnit.SECONDS.sleep(10);
return true;
});
}
}
Test: You could use the test above to make your device look like a
Pixel6 pro for 10 secons.
Fix: 229028257
Change-Id: Icd79be405a2e14dda0bc5f555b0e46149e16f912
This should make it more configurable, and be independent of the screen size set by the user.
Fix: 223726518
Test: atest Launcher3Tests:HotseatSizeTest
Test: atest Launcher3Tests:InlineQsbTest
Change-Id: If04f3fb0f556103f60b580c757a9fc06da561516
- This is a regression from ag/17070486 when tested, likely because DeviceProfiles are no longer re-created when changing display sizes, so correct values need to be calculated on the starting state
Bug: 221961069
Test: verify smallestWidth specific resource on changing display sizes
Change-Id: I1539bad4b35b36f0056d59307ab5fbec23a71f49
> Moving the code from ApiWrapper to Resource overlays for better maintainability
> Accounting for display cutouts in insets estimation
> Using same logic in display controller and view inset dispatching
Test: Verified on device
Bug: 221961069
Change-Id: I78466353563692ce3f7512b0146ef8b61ef14bc0
- We have less space on tablets when 3 button nav is enabled because QSB is now inline with the icons. This creates a new attribute to define how many icons should be shown when in that mode. This could be used for other grids in the future as well.
- InvariantDeviceProfile now listens for nav mode changes
Fixes 214882090, 221420204
Test: manual
Change-Id: I012432a1a322c4e5505e46a1198c841ab124aaa6
Navigation mode affects display properties like bounds and
most listeners already had a similar display listener. This
will remove race conditions when managing the two events.
Bug: 221961069
Test: Presubmit
Change-Id: If7a22e006e6b969ecddf075001066809aa72995c
This was going through the whole display-info-changed flow
when only the refreshrate changed. This was causing updates
with outdated information (where displaymanager callback
happens before configurationchanged). The result is that
things like touch-monitors (based on display info) were
out-of-sync with view content (which is based on configuration).
This change just updates the local record of screenrefresh
when it changes.
Bug: 179308296
Test: With fixed-rotation-in-config, open recents and repeatedly
rotate the device. Make sure touch regions stay aligned
with recents content.
Change-Id: I9a8c553dfa55ec4402edcecac44bc87cb51c75fc
- If the number of screen bounds a.k.a. number of displays has changed, it should be a bug from system and add a log for that
Bug: 198965093
Test: manual
Change-Id: I74612e6c0d2f3cfd52b509e43ea16adf0eec76de
- Currently CHANGE_ACTIVE_SCREEN is dispatched when rotating too, which is incorrect. mScreenSizeDp is different in portrait and landscape, and varies more than swapping width/height due to different insets applied. Therefore, use the change of unique display id as a signal instead.
Fix: 202366729
Test: Rotate device, overview stays
Test: Unfold devices, overview goes away
Change-Id: Id8a7d4a1e237717521bfc5a5a67f23c4ee801c61
> Updating IDP to use fixed bitmap sizes, so that the cache
stays valid
> Caching last known windowMetrices for non-active displays and
using estimation only when the cache is not available
> Only reloading model if IDP change could have affected the model
> Remove unnecessary listeners from IDP which are already controlled by
model lifecycle
Bug: 191657065
Test: Manual
Change-Id: Ia8e6dfafd0977e62aa3fcf367ad79f7a49b2df51
This reverts commit 455ba62b5d.
Reason for revert: Breaks tests on all targets
Bug: 196825541
Bug: 197570389
Change-Id: Ida6792a09c54dee46105b6b914a0dd1545bdf48d
- ag/14286682 changed to re-create window context in onConfigChange, which regressed the stale Resource problem, changed back to use mWindowContext instead
- Removed unnecessary extraInternalDisplays empty check, as empty / before S is already handled inside Display Info CTOR
Test: Change display size between default and large, taskbar is enabled/disabled correctly
Bug: 181215299
Change-Id: I7397d2dc1a1ce8e132e706e9de592558df6a18e7
> Simulating the windo wmanager API to get available device
profiles until final API
> When a device has multiple internal displays, and with both
tablet and phone possibilities, it uses a split workspace layout
Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
- WindowContext (or updated DisplayContext for Pre-S) contains updated Resources to be used for the listener
Fixes: 181215299
Fixes: 176656141
Test: Swap between large/small screen, large sreen UI is seen
Test: Swap between font size, launcher icon text is updated
Test: Start secondary home
Test: Repeat the above tests with Utilities.ATLEAST_S hardcoded to false
Change-Id: Ib33025ac0276c84fe2b3213e9946721e5988e3da
Pre-S: Continue to use config-changed broadcast for configuration changes
and display-changed event for rotation changes
S+: Use WindowContext#componentCallbacks for config and rotation changes, and
continue to use display listener for frame-rate changes
Bug: 179308296
Test: Manual and presubmit
Change-Id: I533e69068b5fa6c052a02759ef309dd075ee6a4b