Commit Graph

1423 Commits

Author SHA1 Message Date
TreeHugger Robot 89b670056f Merge "Moving all-apps predictions to Launcher model" into ub-launcher3-master 2020-07-29 22:02:59 +00:00
Sunny Goyal 8b74cc761b Moving all-apps predictions to Launcher model
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
2020-07-29 13:07:52 -07:00
Yuchen He 12baaadeca Enable memory dump for Launcher
Bug: 154772063
Change-Id: I3b2bc2e341037746891658f2596999248ec272ef
2020-07-29 17:15:09 +00:00
Hyunyoung Song 0a4a4d920e Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"
Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"

Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"

Revert submission 12190253-merge_ub-launcher3-rvc-qpr-dev_6690853

Reason for revert: Build ID picked from ub-launcher3-master and not ub-launcher3-rvc-qpr-dev

Reverted Changes:
I9e658ece0:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
I2a47fe180:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Ie86b0a2e0:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Id3ca76da6:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Ib6a63da0f:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Bug: 162366734


Change-Id: Ie81853a34c9a48d5b3fd922c65483a9ff639e0ce
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-28 23:43:43 +00:00
Sreyas Rangaraju 58ca5c8729 Merge "Introducing a new gesture scope" into ub-launcher3-rvc-qpr-dev 2020-07-28 20:03:27 +00:00
Samuel Fufa 884fc46942 Merge "Adding tracing for work profile removal" into ub-launcher3-rvc-qpr-dev am: 0cfcdc2170 am: c222411b30
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12241857

Change-Id: I03558944743b4672b88db0094fab8f9af65d9a55
2020-07-28 18:37:18 +00:00
Samuel Fufa 0cfcdc2170 Merge "Adding tracing for work profile removal" into ub-launcher3-rvc-qpr-dev 2020-07-28 17:52:21 +00:00
Samuel Fufa cfec6b5151 Adding tracing for work profile removal
Bug: 159671700
Change-Id: I6e1bcdfbf1bbaab989106ce2979575652a3fb404
2020-07-28 17:09:08 +00:00
TreeHugger Robot 87ec5d5555 Merge "Misc test improvements" into ub-launcher3-master 2020-07-28 15:32:51 +00:00
TreeHugger Robot f737f00d89 Merge "Productizing useful diags" into ub-launcher3-master 2020-07-28 02:21:46 +00:00
vadimt 00ad8ee720 Introducing a new gesture scope
Gesture may occur outside of Launcher and not trigger system gesture recognition
by TIS.

Change-Id: Ibbb0180d6ef3856ab652164e6f3c1c86488a4caa
(cherry picked from commit a37ecee104)
2020-07-27 20:56:12 +00:00
vadimt f8ceabbcc1 Misc test improvements
Ignoring state events from NexusLauncher in Launcher3 tests.
Improving diags for failed app launch.

Change-Id: I3ffb49c598edef7b6698b48ba7b63e6163ef25b4
2020-07-24 17:59:50 -07:00
vadimt 4c80053950 Speed up tests by injecting input events asynchronously
This way, we can get a humble ~3% acceleration

Change-Id: I53705d457838ea41be9af9ae0851ee8d2e2c1c3f
2020-07-23 19:13:10 -07:00
vadimt e1c0dda778 Eliminating 10-sec wait for a non-existing widget
If we want to ensure that a widget doesn't exist, it's sufficient to
wait 100 ms

Change-Id: I9982e89e1a376678df2271954ce177a90a6a579d
2020-07-23 23:06:19 +00:00
Winson Chung 0ad7b172e6 Handle uiMode changes
- 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
2020-07-23 21:05:31 +00:00
Hyunyoung Song 65b16d6db2 Merging from ub-launcher3-rvc-qpr-dev @ build 6690853
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-qpr-dev-rvc-qpr-dev_6690853.html

Change-Id: Ie86b0a2e0d82646a0c3d44a0214cbb985435320d
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-23 03:47:06 +00:00
Winson Chung 0c2b05947e Handle uiMode changes
- 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
2020-07-21 17:20:53 +00:00
TreeHugger Robot 44b72984e6 Merge "Removing diags for a fixed flake" into ub-launcher3-master 2020-07-20 20:27:09 +00:00
TreeHugger Robot 0abeb31ca3 Merge "Introducing a new gesture scope" into ub-launcher3-master 2020-07-20 19:50:19 +00:00
vadimt 665232be61 Removing diags for a fixed flake
Bug: 160238801
Change-Id: Ia166eb1f154ddeeb70da5a141c9e985a265ba49a
2020-07-20 12:24:50 -07:00
TreeHugger Robot d8181f4dd3 Merge "Removing workarounds for a fixed bug" into ub-launcher3-master 2020-07-18 19:38:56 +00:00
vadimt a37ecee104 Introducing a new gesture scope
Gesture may occur outside of Launcher and not trigger system gesture recognition
by TIS.

Change-Id: Ibbb0180d6ef3856ab652164e6f3c1c86488a4caa
2020-07-17 18:30:16 -07:00
vadimt ba161b7393 Increasing wait time for end-action events.
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
2020-07-15 22:26:51 +00:00
Becky Qiu 928a421b99 Merging from ub-launcher3-master @ build 6682763
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6682763.html

Change-Id: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-15 20:50:57 +00:00
vadimt 40c9cfa3c8 Productizing useful diags
The bug doesn't repro, but it makes sense to keep the diags

Bug: 156287114
Change-Id: I4a9f43e02eec1b1386067a90e4c17ad109adcfa5
2020-07-14 15:53:32 -07:00
vadimt 4bc691b988 Removing workarounds for a fixed bug
Bug: 148422894
Change-Id: Ic6faa173ac5f28c8656daf68ac8304563264afdd
2020-07-13 20:02:13 -07:00
vadimt 4945540579 Removing a method that simply returns false
Bug: 154157191
Change-Id: Idedf1ce0ba78e915460cf3ea22cf5e7c70a96e92
2020-07-10 19:19:08 -07:00
TreeHugger Robot 53f2dd05e7 Merge "Revert "Temporarily disabling events checking in git_master"" 2020-07-10 20:50:11 +00:00
Vadim Tryshev 5fbd925715 Revert "Temporarily disabling events checking in git_master"
This reverts commit 0b65822f30.

Reason for revert: Switched from logcat to TestProtocol for
events checking.

Bug: 153824894
Change-Id: Ifdc50400bf8a4d6d4a918efd376817b2882be7bb
2020-07-09 20:24:47 +00:00
vadimt ae76bebfed More diags for non-receiving scroll end
Bug: 160238801
Change-Id: I2e19d16e49e84e93bdf135eb97d5f033475305e8
2020-07-08 10:09:46 -07:00
vadimt a190dc1f40 Zero tolerance towards referred destroyed activities
After a framework fix, we are not allowing rooted
destroyed activities at all.

Bug: 139137636

Change-Id: I0dda200db438e1a1b5587636ee08f65300dfa6d1
2020-06-26 18:33:27 +00:00
TreeHugger Robot ac802c2bdc Merge "Improving diagnostics when Launcher dies during a gesture" into ub-launcher3-master 2020-06-25 22:32:28 +00:00
vadimt 56fe9150fa Improving diagnostics when Launcher dies during a gesture
Instead of crashing upon getting uninitialized event sequence, we show a
meaningful message.

Bug: 159921830
Change-Id: Ie42039b39a453c60bd5df3e54058d582137bba06
2020-06-25 13:32:20 -07:00
vadimt fb099c7fe1 Improving diagnostics when can't find a widget
Instead of "exceeded number of attempts" now printing that can't scroll
to widget.

Change-Id: Ia6f582e038d68fc35f152d94e592f60ef0bc2cf4
2020-06-24 21:54:16 +00:00
TreeHugger Robot 44035d9d17 Merge "Merging from ub-launcher3-rvc-dev @ build 6621659" into rvc-dev am: 738b1af342 am: f7897465e3 am: 808a7c1920 am: dde7797ec5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11975976

Change-Id: Ifdd13981f0e61d248e89a1f10eec3b51369840f4
2020-06-24 04:26:33 +00:00
Sunny Goyal 315eb02012 Merging from ub-launcher3-rvc-dev @ build 6621659
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6621659.html

Change-Id: Id9689e3dfa641c0e004c9dc975e281358bed7ad7
2020-06-23 16:28:38 -07:00
TreeHugger Robot 2f987f6466 Merge "Add an exported flag in manifest" into ub-launcher3-master 2020-06-23 21:31:32 +00:00
Ashwini Oruganti aa902e859b Add an exported flag in manifest
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
2020-06-23 13:58:18 -07:00
Hyunyoung Song 85d90a16bc Merging from ub-launcher3-rvc-dev @ build 6617269
Bug: 150504032
Test: manual, presubmit on the source branch
https://android-launcher.teams.x20web.corp.google.com/merge/ub-launcher3-rvc-dev_rvc-dev_6617269.html

Change-Id: I7a13230553f9c42d5f67164234c33cf77efa9cf2
Merged-In: I2a168bfa8e3979ade26ab1d3cddbbae84cf79590
2020-06-23 05:11:31 +00:00
Hyunyoung Song 0b51b916b0 Merging from ub-launcher3-rvc-dev @ build 6617269
Bug: 150504032
Test: manual, presubmit on the source branch
https: //android-launcher.teams.x20web.corp.google.com/merge/ub-launcher3-rvc-dev_master_6617269.html
Change-Id: I2a168bfa8e3979ade26ab1d3cddbbae84cf79590
2020-06-22 18:53:39 -07:00
vadimt 839fb7b3ae Eliminating messages that launcher activity is frozen
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
2020-06-22 15:39:19 -07:00
vadimt a17a10cddd Changing event check implementation from logcat to TestProtocol
Bug: 153670015
Change-Id: Id9fc759bd5be68758ef9cf0abbba3cd6fa452796
2020-06-22 11:04:03 -07:00
Pinyao Ting 5c2f1a6fa4 Merging from ub-launcher3-rvc-dev @ build 6577335 am: 8020bf2f4b am: e0a0876062 am: af957e82c4 am: cd902c0fc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11828234

Change-Id: I7def4bc74da0e4bf8ce19bd281d90945f45a6a3d
2020-06-11 09:58:01 +00:00
vadimt 45564c831b Removing debug requests from non-debug test info handlers
Bug: 152629799
Bug: 153670015
Change-Id: I02776be811d1d3325b35880d19d25a6638f904ef
2020-06-10 18:48:37 -07:00
Pinyao Ting 8020bf2f4b Merging from ub-launcher3-rvc-dev @ build 6577335
Bug: 150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_6577335.html

Change-Id: Ie1f44dd646088759fef66251fe9e5f584b804d73
2020-06-10 21:54:11 +00:00
vadimt d9092e83d6 Removing instrumentation for unreproable bug
Bug: 152645831
Change-Id: Iacdb103b01375b8bf48691867b844adebcd325a0
2020-06-05 15:30:31 -07:00
Ashwini Oruganti 23c2836690 Add an exported flag in manifest
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
2020-06-04 18:25:35 -07:00
Tracy Zhou 40a53f5398 Merge "Merging from ub-launcher3-rvc-dev @ build 6541617" into rvc-dev am: 614c185e21 am: dfbe0fc1a3 am: ffa5d445b1 am: 1ee4743a17
Change-Id: Idcc1eb34ad0df71379b0689728d5304cda3bcf43
2020-05-30 08:36:42 +00:00
Tracy Zhou 6699858d49 resolve merge conflicts of 5d065997f8 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I277a74dac999f3f56836fafc04ac799f84154013
2020-05-29 19:38:36 -07:00
Tracy Zhou 6ae611a8eb Merging from ub-launcher3-rvc-dev @ build 6541617
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6541617.html

Change-Id: I23f7656c1cc1fcc922aab4f533bcb25509bc882f
2020-05-29 12:03:25 -07:00
TreeHugger Robot fd522fe13e Merge "Using unstable client for fetching test info for oop tests" into ub-launcher3-rvc-dev 2020-05-29 05:26:46 +00:00
Winson Chung bc849d6159 Using unstable client for fetching test info for oop tests
Bug: 157661745
Change-Id: Ifbb211f9bbaa444df682145a0a9e82c5d0f24bdf
2020-05-28 20:14:54 -07:00
Tracy Zhou d67be77066 Merging from ub-launcher3-rvc-dev @ build 6538292
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6538292.html

Change-Id: I53b084ca2dc94d94f87d696bbfd7666b55d712ad
2020-05-28 17:45:04 -07:00
TreeHugger Robot b0948db99d Merge "Dumping TIS state on failures" into ub-launcher3-rvc-dev 2020-05-27 21:38:55 +00:00
vadimt 835e612aee Dumping TIS state on failures
Bug: 156287114
Change-Id: Ib438aae3cc4682b1f1c958e59337c095480d910a
2020-05-27 13:48:58 -07:00
vadimt 3096b78914 Add navigation mode diags to the system anomaly detection
Bug: 156095088
Change-Id: I3504cc2187c4bcc6229ecbcb0da360e310eeaa9f
2020-05-27 11:20:22 -07:00
TreeHugger Robot 1152e4526d Merge "Adding a method checking whether Overview has tasks" into ub-launcher3-rvc-dev 2020-05-21 20:47:31 +00:00
TreeHugger Robot 9eae863216 Merge "Insert delays in dumping input state" into ub-launcher3-rvc-dev 2020-05-21 20:39:29 +00:00
TreeHugger Robot bfe7b44a91 Merge "Checking success of injectInputEvent" into ub-launcher3-rvc-dev 2020-05-21 20:29:34 +00:00
vadimt e238271384 Adding a method checking whether Overview has tasks
Change-Id: I9817218990c470ad7f266e336d931e2cd313535e
2020-05-21 13:11:42 -07:00
vadimt f5e98ead9d Insert delays in dumping input state
Hpoing to avoid overwhelming logcat

Bug: 156287114
Change-Id: Ia0e95ade205a2c5cd6d7a27b59c9896fb78370af
2020-05-21 12:42:32 -07:00
vadimt 623670c2e3 Checking success of injectInputEvent
Bug: 156287114
Change-Id: Id000b39a187c909475dd6dd409d14430b3654517
2020-05-21 12:32:33 -07:00
Vadim Tryshev 2c75d08806 Merge "Failing with diags when UiObject2 container disappears" into ub-launcher3-rvc-dev 2020-05-21 17:53:03 +00:00
Joshua Trask 2ec25956af Merging from ub-launcher3-rvc-dev @ build 6511067 am: 41dc164d11 am: 3ec5c4970c am: e7f0d0ab9d am: 72139e2d8b
Change-Id: I7cdba25d938f4ef1a6f355f58ab5085ea17b8730
2020-05-20 22:16:03 +00:00
vadimt 8a8255916f Failing with diags when UiObject2 container disappears
Change-Id: If6af49087a5afd6374776e55067b0502dabb7585
2020-05-20 15:05:49 -07:00
Joshua Trask 41dc164d11 Merging from ub-launcher3-rvc-dev @ build 6511067
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6511067.html

Change-Id: Ifc8c251ef0f03e66de3b1c9fa94bfcb980704769
2020-05-20 11:12:54 -04:00
TreeHugger Robot 7cdb4cfecc Merge "Rename closeEvents to reduce confusion" into ub-launcher3-rvc-dev 2020-05-18 21:21:14 +00:00
TreeHugger Robot e5a83db490 Merge "Remove tracing for a fixed flake" into ub-launcher3-rvc-dev 2020-05-18 17:21:41 +00:00
vadimt 2bba25a08d Remove tracing for a fixed flake
Bug: 155926212
Change-Id: Ia847d735d58154bc768b69d3ae3dc0af7fcdbf11
2020-05-18 16:34:57 +00:00
Winson Chung 20195cf7fb Merging from ub-launcher3-rvc-dev @ build 6492476 am: 6e0d05fc41 am: 3cc9e2dcc1 am: 33d5253e1d am: 62f74e265d
Change-Id: Iedb9659268f3f252d611722375e9e24b8289b91f
2020-05-16 03:52:28 +00:00
vadimt bb6f5f5242 Add dumpsys input where it was missing
Bug: 156287114
Change-Id: Ie0a71e8dc261abfde4eec3ce882786d77a870c32
2020-05-15 13:12:37 -07:00
vadimt 7e4d19f842 Rename closeEvents to reduce confusion
Change-Id: I73f083c568846ec8f96b4b403afdaf10d75a106e
2020-05-14 19:52:01 -07:00
vadimt 5670d462de Avoid truncation of input trace
Bug: 156287114
Change-Id: Iac0f93d4e8082907210bd6312d1c046ff1f49dba
2020-05-14 14:25:38 -07:00
Winson Chung 6e0d05fc41 Merging from ub-launcher3-rvc-dev @ build 6492476
Bug: 150504032
Test: manual, presubmit on the source branch
    x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6492476.html
Change-Id: I96b36965f7b471eb77aa78a8b923ed9298e8a02f
2020-05-13 23:22:18 +00:00
TreeHugger Robot 1462617c97 Merge "Starting investigation for non-delivered TIS events" into ub-launcher3-rvc-dev 2020-05-13 20:40:47 +00:00
vadimt 87db7187c6 Starting investigation for non-delivered TIS events
Bug: 156287114
Change-Id: Icae88318a8e5a8f6b9931913b24ad3ece5475cc3
2020-05-13 13:08:39 -07:00
TreeHugger Robot 794ca4dba5 Merge "Dumping view hierarchy before swiping to Overview" into ub-launcher3-rvc-dev 2020-05-13 04:16:18 +00:00
vadimt 0790cef41c Dumping view hierarchy before swiping to Overview
Bug: 156044202
Change-Id: I21a11a7a55103cffbc05ddeeb93ecc4f6f4063e7
2020-05-12 18:25:32 -07:00
TreeHugger Robot eb0136b7c4 Merge "Abstracting out state handler logic into base classes so that it can also be used in different activity" into ub-launcher3-rvc-dev 2020-05-12 00:29:52 +00:00
TreeHugger Robot 3d668090af Merge "Resolve Test flakes" into ub-launcher3-rvc-dev 2020-05-11 23:40:43 +00:00
Sunny Goyal 35e7d38681 Abstracting out state handler logic into base classes so that it can
also be used in different activity

Change-Id: Ic5e60b21e1429c71f1cd4e7041e70bf4fc9761b7
2020-05-11 16:38:26 -07:00
vadimt 5d59df4fd9 Don't check TIS events mismatch for successful gestures
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
2020-05-11 13:14:06 -07:00
Samuel Fufa b549819676 Resolve Test flakes
-> 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
2020-05-10 13:51:41 -07:00
TreeHugger Robot 4f51725717 Merge "Adding waiting for Launcher initialization" into ub-launcher3-rvc-dev 2020-05-08 21:26:30 +00:00
vadimt 2794f563a0 Adding tracing for switching to overview instead of all apps
Bug: 156095088
Change-Id: I1257617192e913d06edd0879396957b1e40524b7
2020-05-08 10:39:29 -07:00
James O'Leary 5282caff65 Merging from ub-launcher3-rvc-dev @ build 6469858 am: fe68c9eec1 am: dab51b766e am: 36c83f49c7 am: 57ca886825
Change-Id: Ia889c0aef2222097331117bda308fe944cd2a027
2020-05-08 17:30:37 +00:00
vadimt 60d3333ff0 Adding waiting for Launcher initialization
This may fix or ease TIS sometimes not receiving events.

Bug: 154157191
Change-Id: I5db9e88397788014dbba9716d777a2b97347828c
2020-05-08 09:29:08 -07:00
James O'Leary fe68c9eec1 Merging from ub-launcher3-rvc-dev @ build 6469858
Bug: 150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_6469858.html

Change-Id: Ia2feae3192f875638692e55f4c88746c0a8159a3
2020-05-07 17:53:51 -04:00
Vadim Tryshev 340e68219e Merge "Restarting event reader after reaching the end of stream" into ub-launcher3-rvc-dev 2020-05-07 21:29:46 +00:00
vadimt 3e089e8a26 Restarting event reader after reaching the end of stream
This should'n happen, but happens. The best we can do is to re-run the
logcat command.

Change-Id: I471d9f0188243c81585b75f81dd03450c1f7ad9b
2020-05-07 12:29:19 -07:00
TreeHugger Robot d4f87007b6 Merge "Likely, fixing view hierarchy changing during pressHome." into ub-launcher3-rvc-dev 2020-05-07 17:41:22 +00:00
vadimt 29896284a8 Likely, fixing view hierarchy changing during pressHome.
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
2020-05-06 19:08:59 -07:00
vadimt fbfe79d8a1 Debug tracing for view hierarchy changing during pressHome
Bug: 155926212
Change-Id: Ie9e8470c23b954890ae41fc9a442422f21093855
2020-05-06 16:41:13 -07:00
TreeHugger Robot fc9ea9b0fc Merge "Speeding up TAPL by calling getVisibleStateMessage() less frequently" into ub-launcher3-rvc-dev 2020-05-04 23:18:04 +00:00
TreeHugger Robot 7bb915ba8e Merge "Remove unnecessary waitForIdle calls" into ub-launcher3-rvc-dev 2020-05-04 22:44:21 +00:00
vadimt faf4da386d Speeding up TAPL by calling getVisibleStateMessage() less frequently
The information in the message can be derived from the object dump
printed anyways.

Change-Id: I22ee136568b767c3218eaabc3920c77b3ceaa78f
2020-05-04 15:40:47 -07:00
vadimt 357e5499a2 Remove unnecessary waitForIdle calls
They were added back in times when the
code was very different, and we don't need them now.

Change-Id: Ie96b081a4f2319c7b58d22ffc410f74e9ab56d94
2020-05-04 18:57:52 +00:00
vadimt 55495201e0 Avoiding cascading "nested events checking" failure after timed-out wait
Bug: 155656943
Change-Id: I0f11552349a9f6b3b14bd1bebb37904d5dfa9c55
2020-05-04 10:52:08 -07:00
vadimt 9fd3a943ba Don't do full anomaly check after every gesture
This call is relatively expensive. Perform only cheap launcher crash
test, and do anomaly only if there are problems.

Change-Id: If45567bcedf8d177970739e9de95cbb29add744c
2020-04-30 19:31:21 -07:00
TreeHugger Robot dfd8c4806f Merge "More logging for LogEventChecker appearing to skip events" into ub-launcher3-rvc-dev 2020-04-30 20:24:21 +00:00
vadimt 232737c854 More logging for LogEventChecker appearing to skip events
Bug: 155347466
Change-Id: I6598bcf36c1f7ae76e9bb6b2eccefbd00899de2e
2020-04-30 10:19:10 -07:00
vadimt a1f0a10662 Removing tracking activity start/stop events
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
2020-04-29 14:23:53 -07:00
Santiago Etchebehere 010ebfb0b2 Merging from ub-launcher3-rvc-dev @ build 6436292 am: 82902c0da6 am: afdae84544 am: 0b2e2aec60 am: 731943e045
Change-Id: Ia4f765487ec506a0c11bd940f8268d828a95661b
2020-04-29 06:51:45 +00:00
TreeHugger Robot d4066f5876 Merge "Support for counting activity creations" into ub-launcher3-rvc-dev 2020-04-28 23:26:37 +00:00
Santiago Etchebehere 82902c0da6 Merging from ub-launcher3-rvc-dev @ build 6436292
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6436292.html

Change-Id: I28d6ec42b7a6a8e779abb306cc29c9801910206f
2020-04-27 22:40:31 -07:00
vadimt 2e6fdd7d93 Optimization: reducing number of getNavigationModeMismatchError calls
They are relatively expensive

Change-Id: I34de56884ec3f88e69c709026d3b72e62c787681
2020-04-27 13:08:50 -07:00
vadimt 921f9fd254 Support for counting activity creations
Bug: 139137636
Change-Id: Ib999fd3c82eb2997662578ec35e1d9e1e75e3cbb
2020-04-27 12:41:26 -07:00
vadimt 0703464556 Checking that there are no more than 2 live activities at any moment
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
2020-04-23 16:35:09 +00:00
TreeHugger Robot d73d39b45a Merge "Makeshift analog of Strictmode leak detector" into ub-launcher3-rvc-dev 2020-04-23 03:22:31 +00:00
vadimt b3e8ae8230 Makeshift analog of Strictmode leak detector
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
2020-04-22 19:00:12 -07:00
Govinda Wasserman 70c451656c Merging from ub-launcher3-rvc-dev @ build 6418896 am: df280add9e am: 3aa30d3d33 am: d69b63289b am: faf0d494e4
Change-Id: I58bc9692fe66b4461aa67eec532ca93a4d0a1726
2020-04-23 00:17:07 +00:00
Govinda Wasserman df280add9e Merging from ub-launcher3-rvc-dev @ build 6418896
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6418896.html

Change-Id: I9ce7f3e6a95d278509fe18b36c84d871a76066f1
2020-04-22 15:35:47 +00:00
Sunny Goyal 34ff8cb3c1 Adding common code for instrumentation and robolectric tests
Change-Id: Ia338f0565868bb174ef5f6721924944792866be6
2020-04-20 14:42:30 -07:00
TreeHugger Robot 11e36db88a Merge "Cleanup code related to ag/11035582" into ub-launcher3-rvc-dev 2020-04-16 22:04:45 +00:00
Hyunyoung Song 88121f0d1f Merge "Merging from ub-launcher3-rvc-dev @ build 6396980" into rvc-dev am: ce6f43f0df am: 2e9cdc6e40 am: f100a96813 am: 326667e069
Change-Id: I6404160b5243848ab73a93ecc3e84d549f0385a1
2020-04-16 22:04:04 +00:00
TreeHugger Robot 64abef8ca1 Merge "Choosing better points to output "start" events for TAPL" into ub-launcher3-rvc-dev 2020-04-16 21:58:47 +00:00
Vinit Nayak 916456bb5f Cleanup code related to ag/11035582
Fixes: 154235554
Change-Id: I114d1e1b9e446e15a774a5a51bdf988070091523
2020-04-16 14:16:56 -07:00
Hyunyoung Song 19a6022ae4 Merging from ub-launcher3-rvc-dev @ build 6396980
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-rvc-dev_rvc-dev_6396980.html

Change-Id: If639a1565ce5c4af36d7bce3701b0d1d77fedec0
2020-04-15 15:49:20 -07:00
vadimt cf275c1bd7 Choosing better points to output "start" events for TAPL
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
2020-04-15 12:45:11 -07:00
Vinit Nayak 770cc42685 Revert "Cleanup code related to ag/11035582"
This reverts commit a2a1f86dff.

Reason for revert: b/154068414

Change-Id: I1db0018fa97d5a5380651cf7d04a05a0abd62857
2020-04-15 05:24:10 +00:00
Vinit Nayak 02885183a4 Disable sensor manager for tests in platform am: fd3fc081d9 am: e21c4ec073 am: c90f5d74af am: ab0f9ee5f0
Change-Id: If75533e7330ee94a7ce2481aae8b978100f043e0
2020-04-14 22:21:59 +00:00
Vinit Nayak a2a1f86dff Cleanup code related to ag/11035582
Bug: 153443049
Change-Id: I2a9e46fa4ffc613751c9f427ce892ddad3878b35
2020-04-14 14:02:49 -07:00
vadimt 0b65822f30 Temporarily disabling events checking in git_master
Bug: 153824894
Change-Id: I5f294d1a808b1ceefd0b753de6c9207cf92de06d
2020-04-14 01:31:57 +00:00
Vinit Nayak fd3fc081d9 Disable sensor manager for tests in platform
Bug: 153443049
Change-Id: Ieaa4b8144eba11c5d3025a1bcca42a8552d1c702
(cherry picked from commit 1a09958626)
2020-04-13 23:43:05 +00:00
Vinit Nayak 1a09958626 Disable sensor manager for tests in platform
Bug: 153443049
Change-Id: Ieaa4b8144eba11c5d3025a1bcca42a8552d1c702
2020-04-13 15:47:02 -07:00
TreeHugger Robot 77cf9b780f Merge "Adding tracing for apparently skipping verifiable events" into ub-launcher3-rvc-dev 2020-04-10 03:01:05 +00:00
Sunny Goyal e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
vadimt 8cb2f9ce08 Adding tracing for apparently skipping verifiable events
Bug: 153670015
Change-Id: I481c095f1245ba4252eb07e08b4130c857dd6e72
2020-04-09 13:02:48 -07:00
TreeHugger Robot e8fade9140 Merge "Adding diags to getWidget" into ub-launcher3-rvc-dev 2020-04-09 04:47:09 +00:00
vadimt 9915a7c60f TAPL waits for widgets recycler to become scrollable
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
2020-04-08 18:56:52 -07:00
vadimt 180c2e10fc Adding diags to getWidget
Also avoiding scrolling widgets horizontally when the gesture could
happen in the lower system gesture area.

Change-Id: I80192db7e407f8c1715aad3b96178c00b5710e71
2020-04-08 21:12:20 +00:00
Matt Casey 884f8f217f Merging from ub-launcher3-master @ build 6369897
Test: manual, presubmit on the source branch
Bug:150504032

x20/teams/android-launcher/merge/ub-launcher3-master_6369897.html

Change-Id: Id94544cf790a7dcf0841f66648ac864bf2f530d4
2020-04-07 00:54:25 +00:00
Adam Cohen df83c9026d Merging from ub-launcher3-master @ build 6356169
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_6356169.html

Change-Id: Ife6c578d9a1e212eccdf3cf9a0cd838132eb90f5
2020-04-03 18:34:45 +00:00
Vinit Nayak b9cb1e3c8f Merge "Re-enable orientation sensor for Overview animation" into ub-launcher3-master 2020-04-02 19:02:30 +00:00
Vinit Nayak 6b7cc3fdc2 Re-enable orientation sensor for Overview animation
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
2020-04-02 11:07:10 -07:00
vadimt 00a031fbab More diags for missing widgets
Bug: 152645831
Change-Id: Idf6584220328a0853cd8dd65ebb5c54bab9980fd
2020-04-01 15:33:35 -07:00
TreeHugger Robot 639aca6142 Merge "Catching StaleObjectException (and everything else) from get bounds" into ub-launcher3-master 2020-04-01 22:16:08 +00:00
TreeHugger Robot 7b4a1f5b3c Merge "Events checking for long press events" into ub-launcher3-master 2020-04-01 18:33:24 +00:00
TreeHugger Robot f1939f6f54 Merge "Including full diags from system alerts" into ub-launcher3-master 2020-04-01 18:20:32 +00:00
vadimt e277fec466 Events checking for long press events
Also fixing duplicate long press events resulting from both framework
and Launcher own detection reporting long presses.

Change-Id: Ib46de5bd60850f1c5578992c8c1172ddbc0961f3
2020-03-31 19:08:17 -07:00
vadimt 486744b173 Including full diags from system alerts
Change-Id: I779d3ccb683aea46e7e1b58ed088933d5685c183
2020-03-31 18:36:38 -07:00
vadimt bb3f515690 Catching StaleObjectException (and everything else) from get bounds
This will improve diags because fail() adds useful info to the message

Change-Id: I0a27f80c71a900078c94d9dd44d431fc206a37a0
2020-03-31 14:03:00 -07:00
vadimt 5486970e31 Improving events checks diags
Printing matching sequences and making putput more readable.

Change-Id: I3325aa2a8291096017533372f9da0f7550f39313
2020-03-30 13:21:19 -07:00
TreeHugger Robot 349e95f1e4 Merge "TAPL: Verifying activity start/stop events" into ub-launcher3-master 2020-03-28 03:45:24 +00:00
TreeHugger Robot f64cef8ee6 Merge "Adding more tracing for a widgets test flake" into ub-launcher3-master 2020-03-28 01:37:17 +00:00
vadimt 926ed41fab Adding more tracing for a widgets test flake
Bug: 152354290
Change-Id: Ie3ed8430e3f3d5c93f1bea698be46f2ddd22dea0
2020-03-27 17:40:32 -07:00
vadimt 75add7cef5 Debug tracing for "widget not present" flake
Bug: 152645831
Change-Id: I1e318650e45ab8e2a60eccef2f4f3c247b2a6b5b
2020-03-27 15:08:36 -07:00
vadimt 0dd1bd1113 TAPL: Verifying activity start/stop events
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
2020-03-27 10:23:33 -07:00
vadimt 77e3e87038 Merging from ub-launcher3-master @ build 6327709
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_rvc-dev_6327709.html

Change-Id: I0a135e14daf3671648f02999da13d323efb5fe81
2020-03-25 06:06:46 +00:00
vadimt 7a9f1628f2 Repeating unlocking the phone several times
Bug: 151613234
Change-Id: Id5cbc247d7827fa31c2011d817b2964c1486daeb
2020-03-21 15:09:39 -07:00
vadimt 7500c241ac Increasing wait time till unlock
Bug: 151613234
Change-Id: I47e0a87551cebf31fa309b9a65b2ecff809a7f00
2020-03-21 13:04:15 -07:00
Vadim Tryshev b66ba0bae7 Merge "Adding more checks around unlocking the phone" into ub-launcher3-master 2020-03-21 04:03:32 +00:00
TreeHugger Robot 0ddd265fdb Merge "[Flake test] add state checks for WorkTabTest#testWorkEduIntermittent" into ub-launcher3-master 2020-03-21 02:14:49 +00:00
vadimt 330fde4aaf Adding more checks around unlocking the phone
Bug: 151613234
Change-Id: I045306cce2ce85d6895c9f050ebb4d2bd15ba232
2020-03-20 18:55:53 -07:00
TreeHugger Robot 1af6be57c8 Merge "Disable battery defender to avoid locking during the test" into ub-launcher3-master 2020-03-20 23:20:57 +00:00
vadimt 1b4247d9cd Disable battery defender to avoid locking during the test
Bug: 151613234
Change-Id: Id323025c1a3bb53cc39839aa2295fcd25436e68e
2020-03-20 14:26:31 -07:00
TreeHugger Robot 7d3a113d05 Merge "Work profile accessibility fixes" into ub-launcher3-master 2020-03-20 20:46:25 +00:00
Samuel Fufa 7f6baf9f60 [Flake test] add state checks for WorkTabTest#testWorkEduIntermittent
Bug: 151768149
Test: labtest
Change-Id: I676175629c60662763b26ce24eba4a361784fbeb
2020-03-20 13:28:00 -07:00
Samuel Fufa 45c3b10448 Work profile accessibility fixes
- Remove TextView and use work switches text
- Allow talkback to read recyclerview overlay

Bug: 151884799
Bug: 151803591
Bug: 151274763
Bug: 151585835
Test: Manual
Change-Id: Ieee0d37d0244eb12ecb923d710cbbd6a86281062
2020-03-20 11:52:03 -07:00
vadimt d8070756f1 Making sure the device doesn't lock during test execution
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
2020-03-19 20:33:47 +00:00
vadimt 14b60d77b7 Unlocking device from the test
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
2020-03-19 17:59:34 +00:00
Winson Chung c18b7a4b04 Revert^2 "Merging from ub-launcher3-master @ build 6294827"
70a76a61bf
Bug: 151611270
Change-Id: I16e0afcda998d2b1293ff47a66d5562fa4da77dc
2020-03-17 20:51:09 +00:00
Anthony Stange 70a76a61bf Revert "Merging from ub-launcher3-master @ build 6294827"
Revert "Merging from ub-launcher3-master @ build 6294827"

Revert "Merging from ub-launcher3-master @ build 6294827"

Revert "Merging from ub-launcher3-master @ build 6294827"

Revert "Merging from ub-launcher3-master @ build 6294827"

Revert submission 10673936-merge_ub-launcher3-master_6294827

Reason for revert: b/151611270
Reverted Changes:
I38a587a1b:Merging from ub-launcher3-master @ build 6294827
I74ae8bea8:Merging from ub-launcher3-master @ build 6294827
I115742e03:Merging from ub-launcher3-master @ build 6294827
Iceb1e8523:Merging from ub-launcher3-master @ build 6294827
Ie242e3907:Merging from ub-launcher3-master @ build 6294827
I609b18fdd:Merging from ub-launcher3-master @ build 6294827

Change-Id: I96f08492cb92e2f670375269423d8b45a81312cf
2020-03-16 15:24:15 +00:00
Vinit Nayak 8674a882f6 Merging from ub-launcher3-master @ build 6294827
Bug:150504032
 Test: manual, presubmit on the source branch
 x20/teams/android-launcher/merge/ub-launcher3-master_rvc-dev_6294827.html

Change-Id: I74ae8bea8c64f116ca7663569cc0e9569f506ca5
2020-03-16 06:14:18 +00:00
TreeHugger Robot f85fcc792f Merge "Hide work apps when work profile is paused" into ub-launcher3-master 2020-03-12 18:12:59 +00:00
Samuel Fufa f5a4deb120 Hide work apps when work profile is paused
- 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
2020-03-12 10:25:50 -07:00
TreeHugger Robot e6df7da2a2 Merge "Enabling event verification for Launcher3" into ub-launcher3-master 2020-03-07 07:19:13 +00:00
TreeHugger Robot d9da5a45fd Merge "Enabling widget config tests after fixing flakiness" into ub-launcher3-master 2020-03-06 06:53:51 +00:00
Vinit Nayak 8f03c5c1ce Merging from ub-launcher3-master @ build 6269120
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_rvc-dev_6269120.html
Change-Id: I17d430abf3804e30d5d76628c2a4e693d4f1d700
2020-03-06 03:50:15 +00:00
vadimt 16eca5500d Enabling event verification for Launcher3
Will help investigating otherwise mysterious failures.

Change-Id: I805ed136baf6d86921fdb4782304fcdafbd3af5c
2020-03-05 19:02:18 -08:00
TreeHugger Robot f67ab6c64d Merge "Catching everything from dumpHprofData" into ub-launcher3-master 2020-03-06 02:14:19 +00:00
vadimt bb2bf277c0 Catching everything from dumpHprofData
Change-Id: I79ced1d4bb3e6ea43ce6fa5bd07fe22b577006f9
2020-03-05 17:22:18 -08:00
vadimt 3abc8511a5 Enabling widget config tests after fixing flakiness
Bug: 148867106
Change-Id: I8bbd9ef9b1ca574f79f3f76869051495b59734ce
2020-03-05 15:01:38 -08:00
vadimt 6d605da821 Verifying that tests run against a matching Launcher version
Change-Id: I3a6c9e1a2487cfd571abdf4bdd18ab17c7ac9406
2020-03-05 13:36:12 -08:00
Sreyas Rangaraju 75f7e649c0 Merge "OverviewActions: Creating single view instance. Makes use of there being a single instance of OverviewActionsView rather than each Task having it's own." into ub-launcher3-master 2020-03-04 22:40:35 +00:00
Sreyas 321bfae905 OverviewActions: Creating single view instance.
Makes use of there being a single instance of OverviewActionsView
rather than each Task having it's own.

Change-Id: I881121f84de99cade3cd8f07fa8510a557b28f57
2020-03-04 11:38:59 -08:00
Vadim Tryshev 0ae6433a61 Merge "Saving heap dump immediately as reported by StrictMode" into ub-launcher3-master 2020-03-04 19:31:55 +00:00
TreeHugger Robot fe41c3af21 Merge "Allow Launcher to automatically restore widgets" into ub-launcher3-master 2020-03-04 00:16:09 +00:00
Samuel Fufa 9151c011b9 Allow Launcher to automatically restore widgets
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
2020-03-03 15:35:48 -08:00
vadimt 3d9dad3b9b Saving heap dump immediately as reported by StrictMode
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
2020-03-03 18:21:07 +00:00
TreeHugger Robot b83399b46e Merge "Fixing activity being referred after destroying." into ub-launcher3-master 2020-03-03 18:09:11 +00:00
vadimt b1eaa1752e Fixing activity being referred after destroying.
This is perhaps not a leak, but it conflicts with how StrictMode
activity leak detection works.

Bug: 139137636
Change-Id: I1608e348d8b238142c42ed81ae125fd07ef6b673
2020-03-02 18:36:01 -08:00
Vinit Nayak a406f727ad Add vertical layout support for Overview in portrait
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
2020-03-02 18:02:35 -08:00
Vadim Tryshev 1f2182683e Merge "Not failing when getSystemAnomaly fails" into ub-launcher3-master 2020-03-02 19:41:35 +00:00
Mehdi Alizadeh 3210c06687 Merging from ub-launcher3-master @ build 6248758
Test: manual, presubmit on the source branch
http: //x20/teams/android-launcher/merge/ub-launcher3-master_6248758.html
Change-Id: I1c64ab220493793ba10cbbecf38a4df8381d8a54
Bug: 150504032
2020-02-29 01:52:25 +00:00
Vadim Tryshev d8995a6fda Merge "Revert "TAPL: Verifying activity start/stop events"" into ub-launcher3-master 2020-02-28 22:29:47 +00:00
Vadim Tryshev 3dd64ca3a8 Revert "TAPL: Verifying activity start/stop events"
This reverts commit 1186700c9a.

Reason for revert: Fails in the lab

Change-Id: I6715a058c76d96752b904331968b46a07ce93f85
2020-02-28 22:28:16 +00:00
Vadim Tryshev 3be0443d37 Merge "Revert "Enabling flaky tests per our new flaky test policy"" into ub-launcher3-master 2020-02-28 21:34:25 +00:00
Vadim Tryshev f450b2500c Revert "Enabling flaky tests per our new flaky test policy"
This reverts commit 983145c594.

Reason for revert: Too flaky

Change-Id: Ifabb638d6ce0a539518bc0b6b667a9783b6ca29d
2020-02-28 21:33:16 +00:00
Zak Cohen 23ceafe3d5 Merge "TAPL tests - make all apps in overview checks less fragile." into ub-launcher3-master 2020-02-28 21:21:36 +00:00
vadimt 18b9f396d6 Not failing when getSystemAnomaly fails
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
2020-02-28 12:08:19 -08:00
Zak Cohen dc24231e4f TAPL tests - make all apps in overview checks less fragile.
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
2020-02-28 11:59:33 -08:00
Vadim Tryshev 64a932ed2a Merge "TAPL: Verifying activity start/stop events" into ub-launcher3-master 2020-02-28 19:22:32 +00:00
Vadim Tryshev 1fabbf5a23 Merge "Enabling flaky tests per our new flaky test policy" into ub-launcher3-master 2020-02-28 18:29:23 +00:00
vadimt 983145c594 Enabling flaky tests per our new flaky test policy
I'll check whether the tests are still flaky and assign to the test
owner if they are.

Bug: 148867106
Change-Id: Ic850abc862b0f266b100aa6bfff4e89b3802e50d
2020-02-27 17:59:32 -08:00
Zak Cohen eecb258cc7 Merge changes from topic "enable" into ub-launcher3-master
* changes:
  Overview Actions - Enable by default.
  TAPL test update - don't run all apps in overview tests with actions.
2020-02-27 19:48:51 +00:00
Vadim Tryshev 0e0b176361 Merge "Not showing "mismatched events" and other diags after Launcher crashes" into ub-launcher3-master 2020-02-27 19:45:39 +00:00
TreeHugger Robot 3ba6800552 Merge "Using StrictMode to detect activity leaks" into ub-launcher3-master 2020-02-27 19:19:14 +00:00
vadimt 1186700c9a TAPL: Verifying activity start/stop events
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
2020-02-27 11:12:35 -08:00
Vadim Tryshev 9f62bc10af Merge "Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu" into ub-launcher3-master 2020-02-27 19:08:29 +00:00
TreeHugger Robot 39c610192a Merge "Catching OOM exceptions in auto-investigator" into ub-launcher3-master 2020-02-27 01:14:52 +00:00
vadimt da12b805cc Not showing "mismatched events" and other diags after Launcher crashes
Change-Id: Iee5f8813c3610314d486589bc361466a05da0ecb
2020-02-26 12:19:32 -08:00
TreeHugger Robot 833cd43206 Merge "Adding a failure investigator" into ub-launcher3-master 2020-02-26 17:47:59 +00:00
vadimt dbc7583054 Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu
Change-Id: I04199f46024b05f05d04ba2be7a797842bb48527
2020-02-25 18:17:04 -08:00
Zak Cohen fe935dfbc1 TAPL test update - don't run all apps in overview tests with actions.
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
2020-02-25 15:09:12 -08:00
vadimt 1779a38290 Using StrictMode to detect activity leaks
Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
2020-02-25 14:46:27 -08:00
vadimt 6f96376620 Catching OOM exceptions in auto-investigator
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
2020-02-25 11:05:39 -08:00
vadimt 65ed9c3d9b Adding a failure investigator
Change-Id: Ie1c9820ecb7373a1f4428a24867c51332a84e65c
2020-02-24 19:10:50 -08:00
vadimt b79614cc93 Performing a check for a crashed Launcher process for each UI test 2020-02-25 02:28:32 +00:00
Sreyas a241df66df OverviewActions: Creating parent view to house RecentsView and Overview Actions.
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.

Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
2020-02-21 16:14:51 -08:00
Vadim Tryshev 1562d104b8 Merge "Updating logcat reading logic" into ub-launcher3-master 2020-02-21 00:27:46 +00:00
vadimt 2f41808e9b Updating logcat reading logic
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
2020-02-20 22:02:52 +00:00
Samuel Fufa aeaad97eb7 Increase timeout for WorkTabTest.toggleWorks test
Bug: 149927292
Change-Id: I6dcd0bfa2fe584be9e46f653992f9c748e795614
2020-02-20 11:22:49 -08:00
Samuel Fufa d1c0779726 Increase timeout for flaky work test
Bug:149867607
Change-Id: Ic746a4857a47fc29372d19419ddfa6eaebd06f87
2020-02-19 17:08:26 -08:00
Jon Miranda 98e484548c Merging from ub-launcher3-master @ build 6219992
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6219992.html

Change-Id: Iff1e0d32b4ded4cb51c91c187d85f128b92157ca
2020-02-19 13:11:10 -08:00
Samuel Fufa f240ef2a0c Merge "Add Tests for work profile toggle" into ub-launcher3-master 2020-02-16 02:28:23 +00:00
TreeHugger Robot 2c87fb99f6 Merge "Revert "Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause"" into ub-launcher3-master 2020-02-15 07:02:24 +00:00
Vadim Tryshev 47b3588ba5 Revert "Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause"
This reverts commit c2842d8f4a.

Reason for revert: CL broke TaplTestsLauncher3.testDevicePressMenu in 2-button mode

Change-Id: Idebda69a36b94686415434e8e3f158a8a7abc5bb
2020-02-15 02:25:35 +00:00
TreeHugger Robot fa19162a0c Merge "Starting querying logcat events 1 min before start of the gesture" into ub-launcher3-master 2020-02-15 01:31:42 +00:00
vadimt c2842d8f4a Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause
Change-Id: I012d5144651f5e7fb362caaef6eec8cee7622fb4
2020-02-14 14:50:28 -08:00
vadimt 05f3a21fca Starting querying logcat events 1 min before start of the gesture
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
2020-02-14 11:30:14 -08:00
Samuel Fufa ea4dcf468e Add Tests for work profile toggle
+ Fix minor style issues

Bug: 140099753
Bug: 112899690
Test: Manual
Change-Id: I1257560be79748abe54a75a74d93caa4390943b5
2020-02-13 17:21:54 -08:00
Thiru Ramasamy f40c579524 Merge "Initial draft of smart folder logging to clearcut pipeline." into ub-launcher3-master 2020-02-14 00:49:14 +00:00
thiruram c1c2bfa7fb Initial draft of smart folder logging to clearcut pipeline.
* 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
2020-02-13 13:32:21 -08:00
vadimt 68e8578588 Not trying to disable running tests after a failed finalizer
Turns out there is no good way to know that an exception comes from a
finalizer.

Change-Id: I0cb2c518d0b7dc20ad7734ed46ba6af1b8a9d36e
2020-02-11 13:27:17 -08:00
TreeHugger Robot 9f3cf1aa07 Merge "Restoring generating screenshots of failures" into ub-launcher3-master 2020-02-11 04:39:33 +00:00
Vadim Tryshev 47a73672db Merge "Verifying events from TouchInteractionService" into ub-launcher3-master 2020-02-11 01:46:53 +00:00
vadimt 1006f73a95 TAPL: Start getting events 10 sec ahead of the first expected one
This is a workaround for -t param skipping 4 first sec of recording.

Change-Id: I834d83f5f4ba760171209ab2e06ae40ea4aa9e25
2020-02-10 13:49:29 -08:00
TreeHugger Robot ee205a0292 Merge "Making some TAPL members public so that tests could use them directly" into ub-launcher3-master 2020-02-08 09:35:35 +00:00
vadimt 6c95453a19 Restoring generating screenshots of failures
Now correctly inheriting from a statement.

Change-Id: I7fdf03c8ce144ba31d978950af7e71a09004ae1e
2020-02-07 19:43:08 -08:00
vadimt 359cc2a5e5 Making some TAPL members public so that tests could use them directly
Change-Id: I508d25d404a073f5bf76762e0b129e09b46b1582
2020-02-07 18:06:01 -08:00
TreeHugger Robot 93d3117295 Merge "Events: moving logcat filter 1 sec back" into ub-launcher3-master 2020-02-08 00:56:04 +00:00
TreeHugger Robot 3042387909 Merge "remove stability annotation since it hasn't been flaking in the last month" into ub-launcher3-master 2020-02-07 22:46:03 +00:00
vadimt f81dc291ba Events: moving logcat filter 1 sec back
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
2020-02-07 14:00:54 -08:00
Pinyao Ting 796891bc06 remove stability annotation since it hasn't been flaking in the last
month

Bug: 146432215
Test: run flake locally
Change-Id: Ie7604088e82451f2c705f143d70af3f5c3b9c52d
2020-02-07 13:50:20 -08:00
TreeHugger Robot 958995a771 Merge "Fixing race condition on test information provider" into ub-launcher3-master 2020-02-07 21:09:11 +00:00
Sunny Goyal 5fffa47cac Fixing race condition on test information provider
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
2020-02-07 12:37:44 -08:00
vadimt d633c9c7da Verifying events from TouchInteractionService
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
2020-02-07 11:46:03 -08:00
TreeHugger Robot 352e750e80 Merge "Increasing nav mode settlement timeout as an attempt to workaround nav mode mismatch bug." into ub-launcher3-master 2020-02-07 19:08:08 +00:00
TreeHugger Robot 8c2f22e5ab Merge "Adding one more automatic flake classifier" into ub-launcher3-master 2020-02-07 18:46:40 +00:00
vadimt c71db98747 Increasing nav mode settlement timeout as an attempt to workaround nav
mode mismatch bug.

Bug: 148422894
Change-Id: I1295c1415a308ec461d302c9973309f4de77f984
2020-02-07 10:34:59 -08:00
TreeHugger Robot 70607cfe0a Merge "Attempt to workaround navigation mode mismatch errors" into ub-launcher3-master 2020-02-07 01:10:23 +00:00
TreeHugger Robot b2c5eb3ad0 Merge "Investigator: adding "Screen is empty" as another sign of crashed sysui" into ub-launcher3-master 2020-02-06 23:53:29 +00:00
vadimt ec9c109c46 Attempt to workaround navigation mode mismatch errors
Assuming that the nav mode state needs to "settle", adding waiting for
this.

This might be a temporary solution.

Bug: 149024111
Change-Id: Ifbd874546a4cb6b07ad3d3825c95d19bc5836b38
2020-02-06 23:14:49 +00:00
Hongwei Wang 51c6fdf7c3 Merging from ub-launcher3-master @ build 6188107
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6188107.html

Change-Id: I84c1ea301508ba5f0f3d337a423cea8e61832c0d
2020-02-06 15:03:07 -08:00
TreeHugger Robot 8b65dbc9a7 Merge "Disable testWidgetConfig" into ub-launcher3-master 2020-02-06 19:51:49 +00:00
vadimt 6a1cb09890 Disable testWidgetConfig
Bug: 148867106
Change-Id: I3957f03d2f30f340cc3e90626927f7d62624c120
2020-02-06 10:41:42 -08:00
Vadim Tryshev 328c9e5ac6 Merge "More diags for logic disabling other tests after a finalizer failure" into ub-launcher3-master 2020-02-06 03:27:39 +00:00
TreeHugger Robot 86c1807d3c Merge "Disable failing test testConfigCancelled" into ub-launcher3-master 2020-02-06 01:33:59 +00:00
TreeHugger Robot a0912d502a Merge "Making test run flavor available to tests." into ub-launcher3-master 2020-02-05 20:54:12 +00:00