Predictions are loaded and managed by Launcher model and follow
the model lifecycle. They are then bound to the callback which
handles the UI
Bug: 160748731
Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
Gesture may occur outside of Launcher and not trigger system gesture recognition
by TIS.
Change-Id: Ibbb0180d6ef3856ab652164e6f3c1c86488a4caa
(cherry picked from commit a37ecee104)
Ignoring state events from NexusLauncher in Launcher3 tests.
Improving diags for failed app launch.
Change-Id: I3ffb49c598edef7b6698b48ba7b63e6163ef25b4
- Launcher already dedupes if there are no theme changes
Bug: 148988542
Test: adb shell cmd uimode car yes/no, adb shell cmd uimode night yes/no
Change-Id: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
Merged-In: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
- Launcher already dedupes if there are no theme changes
Bug: 148988542
Test: adb shell cmd uimode car yes/no, adb shell cmd uimode night yes/no
Change-Id: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
This is supposed to fix a flake in one of widgets tests.
The end-scroll event is posted by the system server to another thread
may arrive in ~13 sec.
The delay may have been caused by the previous test that just created
and deleted a user, so the system is busy with processing that.
Bug: 160238801
Change-Id: I43d0804252202ae04c731f35fb219c4be4bd4a76
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6682763.html
Change-Id: Ibff46b3ef7ff89accb459db323f31179adb4ef21
This reverts commit 0b65822f30.
Reason for revert: Switched from logcat to TestProtocol for
events checking.
Bug: 153824894
Change-Id: Ifdc50400bf8a4d6d4a918efd376817b2882be7bb
Instead of crashing upon getting uninitialized event sequence, we show a
meaningful message.
Bug: 159921830
Change-Id: Ie42039b39a453c60bd5df3e54058d582137bba06
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for future versions. This change adds the value reflecting the
previous default to the manifest.
These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.
Bug: 150232615
Bug: 158198882
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: I083a7bcab968c881f7cdff7152a249691ffac316
They were ultimately caused by killing Launcher process from tests.
Now having a test info handler request to clear db.
Bug: 152629799
Change-Id: Ia81ddc3e338718c4cff08c7396b9fda1b7091024
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for future versions. This change adds the value reflecting the
previous default to the manifest.
These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.
Bug: 150232615
Bug: 158198882
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: I083a7bcab968c881f7cdff7152a249691ffac316
Perhaps, due to a framework bug, events sometimes don't get delivered to
TIS; this doesn't seem to cause user-visible problems.
Later we'll need to investigate why this happens.
Bug: 154157191
Change-Id: I25f45ccab10f6c537c14610e40c2d02d2d3f28ad
-> Synchronize calls in LoaderTask.java
issue 156041043
-> Remove non system users on setup
If a work test crashes before getting to run its teardown - we might end up with a user profile that could throw off subsequent tests.
issue 156022161
Test: Manual
Change-Id: Ife708a3de01572f7cb2187078d592d8d570dd951
Test RequestPinItemTest.testPinShortcut doesn't wait for the add-to-home
prompt to disappear before proceeding to pressHome. So sometimes
pressHome still sees that prompt that disappears while pressHome is
executing.
Now waiting for the prompt to disappear.
Bug: 155926212
Change-Id: I2c7bfe26839ae406da592e81de8836666c373756
This call is relatively expensive. Perform only cheap launcher crash
test, and do anomaly only if there are problems.
Change-Id: If45567bcedf8d177970739e9de95cbb29add744c
They were not especially useful in investigations; besides, these events
can be sent by the system asynchronously for actions that happened
before entering TAPL, causing flakes.
Change-Id: I72b5aad5521c6c0969f5b657b3db3e4d855f1d64
This is tightening the makeshift strictmode criteria.
Starting with this moment, we will know that there is
no memory growth during tests execution, which is a big deal.
Big: 139137636
Change-Id: I5edc84524463bd1736d727496ad0fc031bb9624c
Strictmode leak detector is still a goal, but we might not be able to
achieve it in R. Strictmode has several framework-side bugs that perhaps
hide Launcher-side strictmode violations, while the time to fix
everything is limited, and new leaks get introduced all the time.
For now, implementing a check that is slightly more relaxed than
Strictmode, but still ensures the absence of leaks. I’ll keep
eliminating Strictmode violations as well as keep strengthening the
makeshift checker conditions until we’ll be able to enable Strictmode in
continuous testing.
I’m disabling Strictmode checks for now so that they don’t generate
unnecessary hprof dumps, but leaving the code dealing with strictmode.
Bug: 139137636
Change-Id: Ib10136b0d4e9892f70a19cd052ae5a54cf0a4efb
Now doing this before branching points, thus avoiding flakes when the
execution can go to an unexpected branch and not produce an event.
Bug: 153824894
Change-Id: If117da0498eaf2d94c9610552724981be34c6569
On the Launcher side, moving setLayoutFrozen from the posted action to
avoid a possible short scrollable period just after the view is shown.
Bug: 152354290
Change-Id: I7319236d8a6e49a7e017fd54d593ee131dff10a9
Also avoiding scrolling widgets horizontally when the gesture could
happen in the lower system gesture area.
Change-Id: I80192db7e407f8c1715aad3b96178c00b5710e71
Slight revert of ag/10668129 with adjustment
of disabling it for tests.
Fixes: 151456795
Test: Ran the labtest command for OOP
tests for crosshatch (where this issue
was first detected)
Change-Id: I315d138c2e4a6d4068304e9b5fb2e1b7feb34e63
Also fixing duplicate long press events resulting from both framework
and Launcher own detection reporting long presses.
Change-Id: Ib46de5bd60850f1c5578992c8c1172ddbc0961f3
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.
Change-Id: Ie4ea5865afd900bebbd8287dad2372c94dce8ad5
Unlocking the device at the beginning
of the test does help, but perhaps we should prevent
locking during the test execution.
Some failures still remain.
Bug: 151613234
This is a workaround for the infra not unlocking
the device properly.
I don't have access to may machine, so
I've created this CL in Gerrit editor, didn't test,
but it should work.
Bug: 151613234
- hide overlay icon in landscape mode
- don't show edu if user has already seen legacy work profile edu
- make sure personal tab is highlighted when work profile is reinstalled
- always go home after a work profile is added or removed
- add tests for work edu flow
Bug: 150122946
Test: Manual
Change-Id: I8f80ac763acf03ca31a534464f4ddfd84528d329
Makes use of there being a single instance of OverviewActionsView
rather than each Task having it's own.
Change-Id: I881121f84de99cade3cd8f07fa8510a557b28f57
This replaces PendingAppWidgetHostView with configured widget view when
OPTION_APPWIDGET_RESTORE_COMPLETED is set to True by a widget provider.
Bug: 63667276
Test: Manual
Change-Id: Ide21f5e9a7dac7e3d6a745660a38ad0b951b47d3
Can do this via API with the exact heap state that triggered the
callback because using API allows to avoid deadlock that we'd have in
main thread if we used shell command.
checkDetectedLeaks() is still needed, as I'll add throwing an
exception there soon.
Bug: 139137636
Change-Id: I3c8670071b058c5c146ac58bb16152c980553065
This is perhaps not a leak, but it conflicts with how StrictMode
activity leak detection works.
Bug: 139137636
Change-Id: I1608e348d8b238142c42ed81ae125fd07ef6b673
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.
PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.
The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]
Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
It's a supplemental method, and mysterious glitches that happen during
its work shouldn't cause the whole test to crash.
Example:
java.lang.NullPointerException: Attempt to read from field 'com.android.server.appwidget.AppWidgetServiceImpl$ProviderId com.android.server.appwidget.AppWidgetServiceImpl$Provider.id' on a null object reference
at android.os.Parcel.createExceptionOrNull(Parcel.java:2291)
at android.os.Parcel.createException(Parcel.java:2269)
at android.os.Parcel.readException(Parcel.java:2252)
at android.os.Parcel.readException(Parcel.java:2194)
at android.accessibilityservice.IAccessibilityServiceConnection$Stub$Proxy.findAccessibilityNodeInfoByAccessibilityId(IAccessibilityServiceConnection.java:875)
at android.view.accessibility.AccessibilityInteractionClient.findAccessibilityNodeInfoByAccessibilityId(AccessibilityInteractionClient.java:430)
at android.view.accessibility.AccessibilityInteractionClient.getRootInActiveWindow(AccessibilityInteractionClient.java:214)
at android.app.UiAutomation.getRootInActiveWindow(UiAutomation.java:607)
at androidx.test.uiautomator.UiDevice.getWindowRoots(UiDevice.java:1102)
at androidx.test.uiautomator.UiDevice.findObject(UiDevice.java:150)
at com.android.launcher3.tapl.LauncherInstrumentation.getSystemAnomalyMessage(LauncherInstrumentation.java:334)
at com.android.launcher3.tapl.LauncherInstrumentation.getAnomalyMessage(LauncherInstrumentation.java:359)
at com.android.launcher3.tapl.LauncherInstrumentation.checkForAnomaly(LauncherInstrumentation.java:369)
at com.android.launcher3.tapl.LauncherInstrumentation.lambda$eventsCheck$11(LauncherInstrumentation.java:1269)
at com.android.launcher3.tapl.LauncherInstrumentation.lambda$eventsCheck$11$LauncherInstrumentation(Unknown Source:0)
at com.android.launcher3.tapl.-$$Lambda$LauncherInstrumentation$3iFY1gd72Tm3mPf31PMij-eBaBk.close(Unknown Source:2)
at com.android.launcher3.tapl.AddToHomeScreenPrompt.addAutomatically(AddToHomeScreenPrompt.java:53)
at com.android.launcher3.ui.widget.RequestPinItemTest.runTest(RequestPinItemTest.java:163)
at com.android.launcher3.ui.widget.RequestPinItemTest.testPinWidgetNoConfig_customPreview(RequestPinItemTest.java:95)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:148)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:142)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:923)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.appwidget.AppWidgetServiceImpl$AppWidgetManagerLocal.getHostedWidgetPackages(AppWidgetServiceImpl.java:4887)
at com.android.server.accessibility.AccessibilitySecurityPolicy.computeValidReportedPackages(AccessibilitySecurityPolicy.java:229)
at com.android.server.accessibility.AbstractAccessibilityServiceConnection.findAccessibilityNodeInfoByAccessibilityId(AbstractAccessibilityServiceConnection.java:621)
at android.accessibilityservice.IAccessibilityServiceConnection$Stub.onTransact(IAccessibilityServiceConnection.java:372)
at android.os.Binder.execTransactInternal(Binder.java:1138)
Change-Id: If7ae23d07b69d524c3f300607f0866cce6405416
Tests that check for all apps in overview mode were only checking for
actions being enabled. This isn't sufficient logic, two button mode also
uses all apps.
Centralize the check for all apps.
Test: local tapl tests
Change-Id: If1bf98019e6f1aea8f7967883aba6780743e9d6b
I'll check whether the tests are still flaky and assign to the test
owner if they are.
Bug: 148867106
Change-Id: Ic850abc862b0f266b100aa6bfff4e89b3802e50d
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.
Change-Id: I5851aafb6d04398c5727712eaf8561916a30c4c5
Overview actions removes the all apps from overview. Don't run the tests
that depend on these.
Ultimately need to add more tests for the actions.
Test: tapl local
Change-Id: I2471d10af7bc03a40a94f99aa16354b85bdb3ad7
In the development environment, the device may stay for long time
without reboot, and the logcat size may turn to be long enough to
overflow the memory.
Suppressing OOM exceptions.
Change-Id: I562e2c03312e88f669d9cb660af6e8849dc0c8ef
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.
Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
Start a thread to read logcat synchronusly instead
of back-tracking at the end of the test
Also:
* Reusing the same logcat process for all checks. This eliminates
reading the log from its start for every gesture. We don’t kill that
process at the end, and don’t stop the thread. I’ve verified that
“am instrument” doesn’t hang, and the logcat process gets automatically
killed after the test process exits.
* Not using mStarted latch, as there is no need to wait until the reader
reaches the start mark.
Bug: 149422395
Change-Id: Ide4ed19ad8d099c41918f38c2b073b8b2e143b69
This reverts commit c2842d8f4a.
Reason for revert: CL broke TaplTestsLauncher3.testDevicePressMenu in 2-button mode
Change-Id: Idebda69a36b94686415434e8e3f158a8a7abc5bb
This is a temporary attempt to solve the supposed unreliability of the
"-t" parameter of logcat while the permanent solution (ag/10290062) is
being reviewed.
Bug: 149422395
Change-Id: I327a94de4349bb6cea32f9b8f66bb6e292725b8f
* Adds additional fields to launcher_log.proto to capture smart folder related information.
* Uses ProtoLite to generate log object using builder pattern and converts to nano version before writing to clearcut. Hence not making drastic change to existing logging pattern.
Change-Id: I89b10da8d4e35e3abc7ddb553046946f91b43445
I saw flakes when logcat didn't return records that are 300ms after the
specified time. I hope that moving the start time 1 sec back will
workaround this.
Change-Id: I6a4b66094d38f555d10284f19a71152a8be47b2e
Activity tracker is accessed on a non-UI thread, which can cause a non-initialized
Launcher to be treated as initialized
Bug: 149022794
Change-Id: I6634a6aff891592369c16469bbe95a9ea611819c
There is a guaranteed order in which TIS events will be registered
relative to other TIS events. However, relative to the touch events
arriving to the activity, TIS events can come in any order.
Now the event checker verifies 2 independent ordered event sequences:
from TIS, and “the rest” (Main).
Change-Id: I5872e0e3b0b498050a91c67105fbe4a29411375a
Assuming that the nav mode state needs to "settle", adding waiting for
this.
This might be a temporary solution.
Bug: 149024111
Change-Id: Ifbd874546a4cb6b07ad3d3825c95d19bc5836b38