From 2948807708ee52cb7679b998e1702ebab0cf528c Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Wed, 1 Sep 2021 10:22:51 -0700 Subject: [PATCH 001/949] Added ParcelableSubject.marshallsEquallyTo() method for generic parcelable equality check. Made BundleSubject extend ParcelableSubject. PiperOrigin-RevId: 394260745 --- .../test/ext/truth/os/BundleSubject.java | 2 +- .../test/ext/truth/os/ParcelableSubject.java | 25 +++++++++- .../ext/truth/os/ParcelableSubjectTest.java | 50 +++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java diff --git a/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java b/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java index 0acff8dc8..dd1f5e1d0 100644 --- a/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java +++ b/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java @@ -30,7 +30,7 @@ import com.google.common.truth.Truth; /** Subject for making assertions about {@link Bundle}s. */ -public final class BundleSubject extends Subject { +public final class BundleSubject extends ParcelableSubject { public static BundleSubject assertThat(Bundle bundle) { return Truth.assertAbout(bundles()).that(bundle); diff --git a/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java b/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java index 864669942..df8ae0889 100644 --- a/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java +++ b/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java @@ -16,15 +16,18 @@ package androidx.test.ext.truth.os; import static androidx.test.core.os.Parcelables.forceParcel; +import static com.google.common.truth.Fact.fact; +import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.google.common.truth.FailureMetadata; import com.google.common.truth.Subject; import com.google.common.truth.Truth; +import java.util.Arrays; /** Testing subject for {@link Parcelable}s. */ -public final class ParcelableSubject extends Subject { +public class ParcelableSubject extends Subject { public static ParcelableSubject assertThat(T parcelable) { return Truth.assertAbout(ParcelableSubject.parcelables()).that(parcelable); @@ -41,8 +44,28 @@ public static Subject.Factory, T> pa this.actual = subject; } + /** + * Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle. + */ public void recreatesEqual(Creator creator) { T recreated = forceParcel(actual, creator); check("recreatesEqual()").that(actual).isEqualTo(recreated); } + + /** Asserts that the subject serializes to the same bytes as some other one. */ + public void marshallsEquallyTo(Parcelable other) { + Parcel parcel = Parcel.obtain(); + try { + actual.writeToParcel(parcel, 0); + byte[] actualBytes = parcel.marshall(); + parcel.setDataPosition(0); + other.writeToParcel(parcel, 0); + byte[] otherBytes = parcel.marshall(); + if (!Arrays.equals(actualBytes, otherBytes)) { + failWithActual(fact("expected to serialize like", other)); + } + } finally { + parcel.recycle(); + } + } } diff --git a/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java b/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java new file mode 100644 index 000000000..c2ffda5f8 --- /dev/null +++ b/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.ext.truth.os; + +import static androidx.test.ext.truth.os.ParcelableSubject.assertThat; +import static androidx.test.ext.truth.os.ParcelableSubject.parcelables; +import static com.google.common.truth.ExpectFailure.assertThat; + +import android.accounts.Account; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import com.google.common.truth.ExpectFailure; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(AndroidJUnit4.class) +public final class ParcelableSubjectTest { + + @Rule public final ExpectFailure expectFailure = new ExpectFailure(); + + @Test + public void marshallsEquallyTo() { + Account account = new Account("name", "type"); + Account other = new Account("name", "type"); + assertThat(account).marshallsEquallyTo(other); + } + + @Test + public void marshallsEquallyTo_failure() { + Account account = new Account("name", "type"); + Account other = new Account("different name", "type"); + expectFailure.whenTesting().about(parcelables()).that(account).marshallsEquallyTo(other); + assertThat(expectFailure.getFailure()) + .factValue("expected to serialize like") + .isEqualTo(other.toString()); + } +} From ba887c9a195e5e2c30f26c78be3816e6ab6803ac Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Wed, 1 Sep 2021 14:04:52 -0700 Subject: [PATCH 002/949] Added ParcelableSubject.marshallsEquallyTo() method for generic parcelable equality check. Made BundleSubject extend ParcelableSubject. PiperOrigin-RevId: 394310064 --- .../test/ext/truth/os/BundleSubject.java | 2 +- .../test/ext/truth/os/ParcelableSubject.java | 25 +--------- .../ext/truth/os/ParcelableSubjectTest.java | 50 ------------------- 3 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java diff --git a/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java b/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java index dd1f5e1d0..0acff8dc8 100644 --- a/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java +++ b/ext/truth/java/androidx/test/ext/truth/os/BundleSubject.java @@ -30,7 +30,7 @@ import com.google.common.truth.Truth; /** Subject for making assertions about {@link Bundle}s. */ -public final class BundleSubject extends ParcelableSubject { +public final class BundleSubject extends Subject { public static BundleSubject assertThat(Bundle bundle) { return Truth.assertAbout(bundles()).that(bundle); diff --git a/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java b/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java index df8ae0889..864669942 100644 --- a/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java +++ b/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java @@ -16,18 +16,15 @@ package androidx.test.ext.truth.os; import static androidx.test.core.os.Parcelables.forceParcel; -import static com.google.common.truth.Fact.fact; -import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.google.common.truth.FailureMetadata; import com.google.common.truth.Subject; import com.google.common.truth.Truth; -import java.util.Arrays; /** Testing subject for {@link Parcelable}s. */ -public class ParcelableSubject extends Subject { +public final class ParcelableSubject extends Subject { public static ParcelableSubject assertThat(T parcelable) { return Truth.assertAbout(ParcelableSubject.parcelables()).that(parcelable); @@ -44,28 +41,8 @@ public static Subject.Factory, T> pa this.actual = subject; } - /** - * Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle. - */ public void recreatesEqual(Creator creator) { T recreated = forceParcel(actual, creator); check("recreatesEqual()").that(actual).isEqualTo(recreated); } - - /** Asserts that the subject serializes to the same bytes as some other one. */ - public void marshallsEquallyTo(Parcelable other) { - Parcel parcel = Parcel.obtain(); - try { - actual.writeToParcel(parcel, 0); - byte[] actualBytes = parcel.marshall(); - parcel.setDataPosition(0); - other.writeToParcel(parcel, 0); - byte[] otherBytes = parcel.marshall(); - if (!Arrays.equals(actualBytes, otherBytes)) { - failWithActual(fact("expected to serialize like", other)); - } - } finally { - parcel.recycle(); - } - } } diff --git a/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java b/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java deleted file mode 100644 index c2ffda5f8..000000000 --- a/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package androidx.test.ext.truth.os; - -import static androidx.test.ext.truth.os.ParcelableSubject.assertThat; -import static androidx.test.ext.truth.os.ParcelableSubject.parcelables; -import static com.google.common.truth.ExpectFailure.assertThat; - -import android.accounts.Account; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import com.google.common.truth.ExpectFailure; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -@RunWith(AndroidJUnit4.class) -public final class ParcelableSubjectTest { - - @Rule public final ExpectFailure expectFailure = new ExpectFailure(); - - @Test - public void marshallsEquallyTo() { - Account account = new Account("name", "type"); - Account other = new Account("name", "type"); - assertThat(account).marshallsEquallyTo(other); - } - - @Test - public void marshallsEquallyTo_failure() { - Account account = new Account("name", "type"); - Account other = new Account("different name", "type"); - expectFailure.whenTesting().about(parcelables()).that(account).marshallsEquallyTo(other); - assertThat(expectFailure.getFailure()) - .factValue("expected to serialize like") - .isEqualTo(other.toString()); - } -} From 1882700811e59561e465792099e2bb131144ce7b Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Wed, 1 Sep 2021 14:44:39 -0700 Subject: [PATCH 003/949] Added ParcelableSubject.marshallsEquallyTo() method for generic parcelable equality check. Made BundleSubject extend ParcelableSubject. PiperOrigin-RevId: 394318743 --- .../test/ext/truth/os/ParcelableSubject.java | 23 +++++++++ .../ext/truth/os/ParcelableSubjectTest.java | 50 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java diff --git a/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java b/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java index 864669942..a1152c7d1 100644 --- a/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java +++ b/ext/truth/java/androidx/test/ext/truth/os/ParcelableSubject.java @@ -16,12 +16,15 @@ package androidx.test.ext.truth.os; import static androidx.test.core.os.Parcelables.forceParcel; +import static com.google.common.truth.Fact.fact; +import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.google.common.truth.FailureMetadata; import com.google.common.truth.Subject; import com.google.common.truth.Truth; +import java.util.Arrays; /** Testing subject for {@link Parcelable}s. */ public final class ParcelableSubject extends Subject { @@ -41,8 +44,28 @@ public static Subject.Factory, T> pa this.actual = subject; } + /** + * Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle. + */ public void recreatesEqual(Creator creator) { T recreated = forceParcel(actual, creator); check("recreatesEqual()").that(actual).isEqualTo(recreated); } + + /** Asserts that the subject serializes to the same bytes as some other one. */ + public void marshallsEquallyTo(Parcelable other) { + Parcel parcel = Parcel.obtain(); + try { + actual.writeToParcel(parcel, 0); + byte[] actualBytes = parcel.marshall(); + parcel.setDataPosition(0); + other.writeToParcel(parcel, 0); + byte[] otherBytes = parcel.marshall(); + if (!Arrays.equals(actualBytes, otherBytes)) { + failWithActual(fact("expected to serialize like", other)); + } + } finally { + parcel.recycle(); + } + } } diff --git a/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java b/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java new file mode 100644 index 000000000..c2ffda5f8 --- /dev/null +++ b/ext/truth/javatests/androidx/test/ext/truth/os/ParcelableSubjectTest.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.ext.truth.os; + +import static androidx.test.ext.truth.os.ParcelableSubject.assertThat; +import static androidx.test.ext.truth.os.ParcelableSubject.parcelables; +import static com.google.common.truth.ExpectFailure.assertThat; + +import android.accounts.Account; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import com.google.common.truth.ExpectFailure; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(AndroidJUnit4.class) +public final class ParcelableSubjectTest { + + @Rule public final ExpectFailure expectFailure = new ExpectFailure(); + + @Test + public void marshallsEquallyTo() { + Account account = new Account("name", "type"); + Account other = new Account("name", "type"); + assertThat(account).marshallsEquallyTo(other); + } + + @Test + public void marshallsEquallyTo_failure() { + Account account = new Account("name", "type"); + Account other = new Account("different name", "type"); + expectFailure.whenTesting().about(parcelables()).that(account).marshallsEquallyTo(other); + assertThat(expectFailure.getFailure()) + .factValue("expected to serialize like") + .isEqualTo(other.toString()); + } +} From 30246745b868a40d14c6c0c29f9299a7891878b4 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Thu, 2 Sep 2021 10:57:13 -0700 Subject: [PATCH 004/949] Introduce a ExperimentalTestApi annotation and replace all instances of Beta, Experimental* with it. And introduce a androidx.test:annotation library to house it. As discussed previously 'Beta' was a confusing and inconsistent name since it gets conflated with the 'beta' release. The rest of the 'Experimental*' annotations were created each for a different feature. Having feature specific experimental annotations is problematic from an API compatibility and enforcement perspective. PiperOrigin-RevId: 394498339 --- annotation/BUILD.bazel | 9 + annotation/LICENSE | 202 ++++++++++++++++++ .../test/annotation/AndroidManifest.xml | 24 +++ .../java/androidx/test/annotation/BUILD.bazel | 18 ++ .../test/annotation/ExperimentalTestApi.java | 41 ++++ build_extensions/axt_versions.bzl | 1 + .../java/androidx/test/espresso/BUILD.bazel | 3 +- .../test/espresso/device/EspressoDevice.java | 4 +- .../test/espresso/matcher/BUILD.bazel | 3 +- .../matcher/HasBackgroundMatcher.java | 4 +- .../test/espresso/matcher/ViewMatchers.java | 6 +- .../androidx/test/espresso/intent/BUILD.bazel | 14 +- .../test/espresso/intent/Intents.java | 4 +- .../java/androidx/test/BUILD.bazel | 4 +- .../permission/PermissionRequester.java | 4 +- .../BasicScreenCaptureProcessor.java | 4 +- .../test/runner/screenshot/ScreenCapture.java | 4 +- .../screenshot/ScreenCaptureProcessor.java | 4 +- .../test/runner/screenshot/Screenshot.java | 4 +- runner/monitor/java/androidx/test/BUILD.bazel | 4 +- .../java/androidx/test/annotation/Beta.java | 2 +- .../ExperimentalDeviceInteraction.java | 34 --- .../annotation/ExperimentalScreenshot.java | 36 ---- .../runner/InstrumentationConnection.java | 4 +- .../graphics/HardwareRendererCompat.java | 4 +- runner/rules/java/androidx/test/BUILD.bazel | 3 +- .../test/rule/GrantPermissionRule.java | 4 +- .../test/rule/PortForwardingRule.java | 4 +- .../androidx/test/rule/ServiceTestRule.java | 4 +- .../test/rule/logging/AtraceLogger.java | 4 +- .../test/rule/provider/ProviderTestRule.java | 4 +- .../test/services/storage/BUILD.bazel | 15 +- .../storage/ExperimentalTestStorage.java | 34 --- .../test/services/storage/TestStorage.java | 3 +- .../storage/TestStorageConstants.java | 4 +- 35 files changed, 358 insertions(+), 162 deletions(-) create mode 100644 annotation/BUILD.bazel create mode 100644 annotation/LICENSE create mode 100644 annotation/java/androidx/test/annotation/AndroidManifest.xml create mode 100644 annotation/java/androidx/test/annotation/BUILD.bazel create mode 100644 annotation/java/androidx/test/annotation/ExperimentalTestApi.java delete mode 100644 runner/monitor/java/androidx/test/annotation/ExperimentalDeviceInteraction.java delete mode 100644 runner/monitor/java/androidx/test/annotation/ExperimentalScreenshot.java delete mode 100644 services/storage/java/androidx/test/services/storage/ExperimentalTestStorage.java diff --git a/annotation/BUILD.bazel b/annotation/BUILD.bazel new file mode 100644 index 000000000..8724e6dc9 --- /dev/null +++ b/annotation/BUILD.bazel @@ -0,0 +1,9 @@ +# Publicly visible androidx.test.annotation alias + +licenses(["notice"]) + +android_library( + name = "annotation", + visibility = ["//visibility:public"], + exports = ["//annotation/java/androidx/test/annotation"], +) diff --git a/annotation/LICENSE b/annotation/LICENSE new file mode 100644 index 000000000..886ba3704 --- /dev/null +++ b/annotation/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017 Google + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/annotation/java/androidx/test/annotation/AndroidManifest.xml b/annotation/java/androidx/test/annotation/AndroidManifest.xml new file mode 100644 index 000000000..929e9f72d --- /dev/null +++ b/annotation/java/androidx/test/annotation/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + diff --git a/annotation/java/androidx/test/annotation/BUILD.bazel b/annotation/java/androidx/test/annotation/BUILD.bazel new file mode 100644 index 000000000..4ee89ebfa --- /dev/null +++ b/annotation/java/androidx/test/annotation/BUILD.bazel @@ -0,0 +1,18 @@ +# Description: Build rules for building androidx.test.annotation from source + +# all users should reference the equivalent targets in //third_party/android/androidx_test/junit +package( + default_visibility = ["//annotation:__subpackages__"], +) + +android_library( + name = "annotation", + srcs = glob( + ["**/*.java"], + ), + manifest = "AndroidManifest.xml", + tags = ["alt_dep=//annotation"], + deps = [ + "//:androidx_annotation_experimental", + ], +) diff --git a/annotation/java/androidx/test/annotation/ExperimentalTestApi.java b/annotation/java/androidx/test/annotation/ExperimentalTestApi.java new file mode 100644 index 000000000..408d6ff42 --- /dev/null +++ b/annotation/java/androidx/test/annotation/ExperimentalTestApi.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.annotation; + +import androidx.annotation.RequiresOptIn; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Signifies that an androidx.test public API (public class, method or field) is subject to + * incompatible changes, or even removal, in a future release. An API bearing this annotation is + * exempt from any compatibility guarantees made by its containing library. Note that the presence + * of this annotation implies nothing about the quality or performance of the API in question, only + * the fact that it is not "API-frozen." + */ +@Retention(RetentionPolicy.CLASS) +@Target({ + ElementType.ANNOTATION_TYPE, + ElementType.CONSTRUCTOR, + ElementType.FIELD, + ElementType.METHOD, + ElementType.TYPE +}) +@RequiresOptIn +public @interface ExperimentalTestApi {} diff --git a/build_extensions/axt_versions.bzl b/build_extensions/axt_versions.bzl index ca1f820fc..a41a8bf00 100644 --- a/build_extensions/axt_versions.bzl +++ b/build_extensions/axt_versions.bzl @@ -15,6 +15,7 @@ UIAUTOMATOR_VERSION = "2.2.0" JANK_VERSION = "1.0.1" SERVICES_VERSION = "1.4.1-alpha01" # stable 1.4.0 ORCHESTRATOR_VERSION = "1.4.1-alpha01" # stable 1.4.0 +ANNOTATION_VERSION = "1.0.0-alpha01" # Maven dependency versions ANDROIDX_VERSION = "1.0.0" diff --git a/espresso/core/java/androidx/test/espresso/BUILD.bazel b/espresso/core/java/androidx/test/espresso/BUILD.bazel index 085e4e1b9..331c82ba2 100644 --- a/espresso/core/java/androidx/test/espresso/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/BUILD.bazel @@ -1,6 +1,6 @@ load("//build_extensions:release.bzl", "axt_release_lib") load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ESPRESSO_VERSION", "HAMCREST_VERSION", "RUNNER_VERSION", "KOTLIN_VERSION") +load("//build_extensions:axt_versions.bzl", "ANNOTATION_VERSION", "ESPRESSO_VERSION", "HAMCREST_VERSION", "KOTLIN_VERSION", "RUNNER_VERSION") load("//build_extensions:combine_jars.bzl", "combine_jars") load("//build_extensions:remove_from_jar.bzl", "remove_from_jar") @@ -279,6 +279,7 @@ maven_artifact( "org.hamcrest:hamcrest-integration:%s" % HAMCREST_VERSION, "com.google.code.findbugs:jsr305:2.0.1", "org.jetbrains.kotlin:kotlin-stdlib:%s" % KOTLIN_VERSION, + "androidx.test:annotation:%s" % ANNOTATION_VERSION, ], artifact_id = "espresso-core", group_id = "androidx.test.espresso", diff --git a/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java b/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java index a2cd7083b..5cef5bd5f 100644 --- a/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java +++ b/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java @@ -15,7 +15,7 @@ */ package androidx.test.espresso.device; -import androidx.test.annotation.ExperimentalDeviceInteraction; +import androidx.test.annotation.ExperimentalTestApi; /** Entry point for device centric operations */ public class EspressoDevice { @@ -28,7 +28,7 @@ private EspressoDevice() {} * *

This API is experimental and subject to change or removal. */ - @ExperimentalDeviceInteraction + @ExperimentalTestApi public static DeviceInteraction onDevice() { return new DeviceInteraction(); } diff --git a/espresso/core/java/androidx/test/espresso/matcher/BUILD.bazel b/espresso/core/java/androidx/test/espresso/matcher/BUILD.bazel index 07527da27..5a665631c 100644 --- a/espresso/core/java/androidx/test/espresso/matcher/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/matcher/BUILD.bazel @@ -22,14 +22,15 @@ android_library( ), deps = [ "//:androidx_annotation", + "//annotation", "//espresso/core/java/androidx/test/espresso:interface", "//espresso/core/java/androidx/test/espresso/remote:interface", "//espresso/core/java/androidx/test/espresso/remote/annotation:remote_msg_annotations", "//espresso/core/java/androidx/test/espresso/util", "//runner/android_junit_runner", "@maven//:com_google_guava_guava", - "@maven//:org_hamcrest_hamcrest_all", "@maven//:junit_junit", + "@maven//:org_hamcrest_hamcrest_all", ], ) diff --git a/espresso/core/java/androidx/test/espresso/matcher/HasBackgroundMatcher.java b/espresso/core/java/androidx/test/espresso/matcher/HasBackgroundMatcher.java index 8f6b1a242..5c333b1e8 100644 --- a/espresso/core/java/androidx/test/espresso/matcher/HasBackgroundMatcher.java +++ b/espresso/core/java/androidx/test/espresso/matcher/HasBackgroundMatcher.java @@ -23,7 +23,7 @@ import android.os.Build; import android.util.Log; import android.view.View; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.util.Arrays; import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; @@ -33,7 +33,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public final class HasBackgroundMatcher extends TypeSafeMatcher { private static final String TAG = "HasBackgroundMatcher"; diff --git a/espresso/core/java/androidx/test/espresso/matcher/ViewMatchers.java b/espresso/core/java/androidx/test/espresso/matcher/ViewMatchers.java index 9d084c8c4..5f9ff826d 100644 --- a/espresso/core/java/androidx/test/espresso/matcher/ViewMatchers.java +++ b/espresso/core/java/androidx/test/espresso/matcher/ViewMatchers.java @@ -44,7 +44,7 @@ import android.widget.Spinner; import android.widget.TextView; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.espresso.remote.annotation.RemoteMsgConstructor; import androidx.test.espresso.remote.annotation.RemoteMsgField; import androidx.test.espresso.util.HumanReadables; @@ -1658,7 +1658,7 @@ protected boolean matchesSafely(View view, Description mismatchDescription) { * *

This API is currently in beta. */ - @Beta + @ExperimentalTestApi public static Matcher hasBackground(final int drawableId) { return new HasBackgroundMatcher(drawableId); } @@ -1668,7 +1668,7 @@ public static Matcher hasBackground(final int drawableId) { * *

This API is currently in beta. */ - @Beta + @ExperimentalTestApi public static Matcher hasTextColor(final int colorResId) { return new BoundedDiagnosingMatcher(TextView.class) { private Context context; diff --git a/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel b/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel index 7cabdec09..64ec279db 100644 --- a/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel +++ b/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel @@ -1,5 +1,11 @@ # Description: # Common library for testing inter and intra app communication via intents. + +load("//build_extensions:release.bzl", "axt_release_lib") +load("//build_extensions:maven_repo.bzl", "maven_artifact") +load("//build_extensions:axt_versions.bzl", "ESPRESSO_VERSION", "RUNNER_VERSION", "CORE_VERSION", "ANNOTATION_VERSION") +load("//build_extensions:combine_jars.bzl", "combine_jars") + licenses(["notice"]) # Apache License 2.0 package( @@ -26,6 +32,7 @@ android_library( "//espresso/core/java/androidx/test/espresso/matcher", "//espresso/intents/java/androidx/test/espresso/intent/matcher", "//runner/android_junit_runner", + "//annotation" "@maven//:org_hamcrest_hamcrest_all", "@maven//:junit_junit", ], @@ -45,8 +52,6 @@ android_library( # ** Generate the release artifacts ** -load("//build_extensions:release.bzl", "axt_release_lib") - android_library( name = "espresso_intents_release_lib", exports = [ @@ -64,10 +69,6 @@ axt_release_lib( ], ) -load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ESPRESSO_VERSION", "RUNNER_VERSION", "CORE_VERSION") -load("//build_extensions:combine_jars.bzl", "combine_jars") - filegroup( name = "intents_src", srcs = [ @@ -92,6 +93,7 @@ maven_artifact( "androidx.test.espresso:espresso-core:%s" % ESPRESSO_VERSION, "androidx.test:core:%s" % CORE_VERSION, "androidx.test:rules:%s" % RUNNER_VERSION, + "androidx.test:annotation:%s" % ANNOTATION_VERSION, ], artifact_id = "espresso-intents", group_id = "androidx.test.espresso", diff --git a/espresso/intents/java/androidx/test/espresso/intent/Intents.java b/espresso/intents/java/androidx/test/espresso/intent/Intents.java index 31a5fff8d..9a74c9b41 100644 --- a/espresso/intents/java/androidx/test/espresso/intent/Intents.java +++ b/espresso/intents/java/androidx/test/espresso/intent/Intents.java @@ -24,7 +24,7 @@ import android.app.Instrumentation; import android.content.Intent; import android.view.View; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.espresso.NoMatchingViewException; import androidx.test.espresso.ViewAssertion; import androidx.test.espresso.intent.matcher.IntentMatchers; @@ -239,7 +239,7 @@ public void checkException() { *

Callers can then verify the list of captured intents using their choice of assertion * framework, such as truth. */ - @Beta + @ExperimentalTestApi public static List getIntents() { final FutureTask> getIntents = new FutureTask<>( diff --git a/runner/android_junit_runner/java/androidx/test/BUILD.bazel b/runner/android_junit_runner/java/androidx/test/BUILD.bazel index 425dda479..59dcc74ee 100644 --- a/runner/android_junit_runner/java/androidx/test/BUILD.bazel +++ b/runner/android_junit_runner/java/androidx/test/BUILD.bazel @@ -1,6 +1,6 @@ load("//build_extensions:release.bzl", "axt_release_lib") load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ANDROIDX_VERSION", "JUNIT_VERSION", "MONITOR_VERSION", "RUNNER_VERSION", "SERVICES_VERSION") +load("//build_extensions:axt_versions.bzl", "ANDROIDX_VERSION", "ANNOTATION_VERSION", "JUNIT_VERSION", "MONITOR_VERSION", "RUNNER_VERSION", "SERVICES_VERSION") # Description: Build rules for building androidx.test from source licenses(["notice"]) # Apache License 2.0 @@ -26,6 +26,7 @@ android_library( ], deps = [ "//:androidx_annotation", + "//annotation", "//runner/monitor", "//services/events/java/androidx/test/services/events", "//services/storage", @@ -71,6 +72,7 @@ maven_artifact( "androidx.test:monitor:[%s]" % MONITOR_VERSION, "androidx.test.services:storage:[%s]" % SERVICES_VERSION, "junit:junit:%s" % JUNIT_VERSION, + "androidx.test:annotation:%s" % ANNOTATION_VERSION, ], artifact_id = "runner", group_id = "androidx.test", diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java b/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java index 4ab0bb05e..3c59d822c 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java @@ -28,7 +28,7 @@ import android.text.TextUtils; import android.util.Log; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.platform.content.PermissionGranter; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.runner.permission.UiAutomationShellCommand.PmCommand; @@ -50,7 +50,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi @TargetApi(value = 23) public class PermissionRequester implements PermissionGranter { diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/BasicScreenCaptureProcessor.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/BasicScreenCaptureProcessor.java index f9425fe34..52f336127 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/BasicScreenCaptureProcessor.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/BasicScreenCaptureProcessor.java @@ -22,7 +22,7 @@ import android.os.Build; import android.util.Log; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -39,7 +39,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public class BasicScreenCaptureProcessor implements ScreenCaptureProcessor { private static int sAndroidRuntimeVersion = Build.VERSION.SDK_INT; private static String sAndroidDeviceName = Build.DEVICE; diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCapture.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCapture.java index 95df80e1d..eda81ffa8 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCapture.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCapture.java @@ -22,7 +22,7 @@ import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; import androidx.annotation.NonNull; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.io.IOException; import java.util.HashSet; import java.util.Set; @@ -41,7 +41,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public final class ScreenCapture { private static final Bitmap.CompressFormat DEFAULT_FORMAT = PNG; diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCaptureProcessor.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCaptureProcessor.java index 4f2767f98..3048006a9 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCaptureProcessor.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/ScreenCaptureProcessor.java @@ -16,7 +16,7 @@ package androidx.test.runner.screenshot; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.io.IOException; /** @@ -24,7 +24,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public interface ScreenCaptureProcessor { /** diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java index db7f358f2..87cf174c9 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java @@ -26,7 +26,7 @@ import android.view.View; import androidx.annotation.VisibleForTesting; import androidx.test.InstrumentationRegistry; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.io.IOException; import java.util.HashSet; import java.util.Set; @@ -44,7 +44,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public final class Screenshot { private static int androidRuntimeVersion = Build.VERSION.SDK_INT; private static UiAutomationWrapper uiWrapper = new UiAutomationWrapper(); diff --git a/runner/monitor/java/androidx/test/BUILD.bazel b/runner/monitor/java/androidx/test/BUILD.bazel index 2cc95f410..f29b73198 100644 --- a/runner/monitor/java/androidx/test/BUILD.bazel +++ b/runner/monitor/java/androidx/test/BUILD.bazel @@ -1,6 +1,6 @@ load("//build_extensions:release.bzl", "axt_release_lib") load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ANDROIDX_VERSION", "MONITOR_VERSION") +load("//build_extensions:axt_versions.bzl", "ANDROIDX_VERSION", "ANNOTATION_VERSION", "MONITOR_VERSION") # Description: Build rules for building androidx.test from source licenses(["notice"]) # Apache License 2.0 @@ -22,6 +22,7 @@ android_library( ":compiletime_hidden_apis", ":runtime_hidden_apis", "//:androidx_annotation", + "//annotation", ], ) @@ -69,6 +70,7 @@ maven_artifact( src = ":monitor_release.aar", artifact_deps = [ "androidx.annotation:annotation:%s" % ANDROIDX_VERSION, + "androidx.test:annotation:%s" % ANNOTATION_VERSION, ], artifact_id = "monitor", group_id = "androidx.test", diff --git a/runner/monitor/java/androidx/test/annotation/Beta.java b/runner/monitor/java/androidx/test/annotation/Beta.java index 40f5614c1..b6f0d16a3 100644 --- a/runner/monitor/java/androidx/test/annotation/Beta.java +++ b/runner/monitor/java/androidx/test/annotation/Beta.java @@ -28,7 +28,7 @@ * annotation implies nothing about the quality or performance of the API in question, only the fact * that it is not "API-frozen." * - * @deprecated Create a "@RequiresOptIn" annotation specific to the API instead + * @deprecated Use {@link ExperimentalTestApi} instead. */ @Retention(RetentionPolicy.CLASS) @Target({ diff --git a/runner/monitor/java/androidx/test/annotation/ExperimentalDeviceInteraction.java b/runner/monitor/java/androidx/test/annotation/ExperimentalDeviceInteraction.java deleted file mode 100644 index 3665b80b0..000000000 --- a/runner/monitor/java/androidx/test/annotation/ExperimentalDeviceInteraction.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package androidx.test.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PACKAGE; -import static java.lang.annotation.ElementType.TYPE; - -import androidx.annotation.RequiresOptIn; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** Annotation denoting that the DeviceInteraction APIs are experimental and require opt-in. */ -@Retention(RetentionPolicy.CLASS) -@Target({TYPE, METHOD, CONSTRUCTOR, FIELD, PACKAGE}) -@RequiresOptIn() -public @interface ExperimentalDeviceInteraction {} diff --git a/runner/monitor/java/androidx/test/annotation/ExperimentalScreenshot.java b/runner/monitor/java/androidx/test/annotation/ExperimentalScreenshot.java deleted file mode 100644 index 88df5c0ee..000000000 --- a/runner/monitor/java/androidx/test/annotation/ExperimentalScreenshot.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package androidx.test.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PACKAGE; -import static java.lang.annotation.ElementType.TYPE; - -import androidx.annotation.RequiresOptIn; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation denoting that the image capturing APIs library are experimental and require opt-in. - */ -@Retention(RetentionPolicy.CLASS) -@Target({TYPE, METHOD, CONSTRUCTOR, FIELD, PACKAGE}) -@RequiresOptIn() -public @interface ExperimentalScreenshot {} diff --git a/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java b/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java index 1b2afe509..91d7192ba 100644 --- a/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java +++ b/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java @@ -38,7 +38,7 @@ import androidx.annotation.NonNull; import android.util.Log; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.util.ParcelableIBinder; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.runner.MonitoringInstrumentation; @@ -73,7 +73,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public class InstrumentationConnection { private static final String TAG = "InstrConnection"; diff --git a/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java b/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java index 860f5357a..61eebe39d 100644 --- a/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java +++ b/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java @@ -18,7 +18,7 @@ import android.graphics.HardwareRenderer; import android.os.Build.VERSION; import android.util.Log; -import androidx.test.annotation.ExperimentalScreenshot; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.util.ReflectionUtil; import androidx.test.internal.util.ReflectionUtil.ReflectionException; import androidx.test.internal.util.ReflectionUtil.ReflectionParams; @@ -30,7 +30,7 @@ * *

This API is currently experimental and subject to change or removal. */ -@ExperimentalScreenshot +@ExperimentalTestApi public class HardwareRendererCompat { private static final String TAG = "HardwareRendererCompat"; diff --git a/runner/rules/java/androidx/test/BUILD.bazel b/runner/rules/java/androidx/test/BUILD.bazel index ad7286cd4..395b9e9e0 100644 --- a/runner/rules/java/androidx/test/BUILD.bazel +++ b/runner/rules/java/androidx/test/BUILD.bazel @@ -1,6 +1,6 @@ load("//build_extensions:release.bzl", "axt_release_lib") load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "RUNNER_VERSION") +load("//build_extensions:axt_versions.bzl", "ANNOTATION_VERSION", "RUNNER_VERSION") load("//build_extensions:combine_jars.bzl", "combine_jars") # Description: Build rules for building androidx.test from source @@ -65,6 +65,7 @@ maven_artifact( src = ":rules_release.aar", artifact_deps = [ "androidx.test:runner:%s" % RUNNER_VERSION, + "androidx.test:annotation:%s" % ANNOTATION_VERSION, ], artifact_id = "rules", group_id = "androidx.test", diff --git a/runner/rules/java/androidx/test/rule/GrantPermissionRule.java b/runner/rules/java/androidx/test/rule/GrantPermissionRule.java index f83673e41..b8292e006 100644 --- a/runner/rules/java/androidx/test/rule/GrantPermissionRule.java +++ b/runner/rules/java/androidx/test/rule/GrantPermissionRule.java @@ -21,7 +21,7 @@ import android.Manifest.permission; import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.platform.ServiceLoaderWrapper; import androidx.test.internal.platform.content.PermissionGranter; import androidx.test.runner.permission.PermissionRequester; @@ -71,7 +71,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public class GrantPermissionRule implements TestRule { private PermissionGranter permissionGranter; diff --git a/runner/rules/java/androidx/test/rule/PortForwardingRule.java b/runner/rules/java/androidx/test/rule/PortForwardingRule.java index 858ce7078..5a3b9178f 100644 --- a/runner/rules/java/androidx/test/rule/PortForwardingRule.java +++ b/runner/rules/java/androidx/test/rule/PortForwardingRule.java @@ -22,7 +22,7 @@ import androidx.annotation.NonNull; import android.util.Log; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.util.Properties; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -39,7 +39,7 @@ * * @hide */ -@Beta +@ExperimentalTestApi public class PortForwardingRule implements TestRule { private static final String TAG = "PortForwardingRule"; diff --git a/runner/rules/java/androidx/test/rule/ServiceTestRule.java b/runner/rules/java/androidx/test/rule/ServiceTestRule.java index 4a14fb8c8..ea84dadcb 100644 --- a/runner/rules/java/androidx/test/rule/ServiceTestRule.java +++ b/runner/rules/java/androidx/test/rule/ServiceTestRule.java @@ -24,7 +24,7 @@ import androidx.annotation.NonNull; import android.util.Log; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.util.Checks; import androidx.test.platform.app.InstrumentationRegistry; import java.util.concurrent.CountDownLatch; @@ -73,7 +73,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public class ServiceTestRule implements TestRule { private static final String TAG = "ServiceTestRule"; diff --git a/runner/rules/java/androidx/test/rule/logging/AtraceLogger.java b/runner/rules/java/androidx/test/rule/logging/AtraceLogger.java index 543fddece..9479d02bd 100644 --- a/runner/rules/java/androidx/test/rule/logging/AtraceLogger.java +++ b/runner/rules/java/androidx/test/rule/logging/AtraceLogger.java @@ -19,7 +19,7 @@ import android.app.UiAutomation; import android.os.ParcelFileDescriptor; import android.util.Log; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -35,7 +35,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public class AtraceLogger { private static final String ATRACE_START = "atrace --async_start -b %d -c %s"; diff --git a/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java b/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java index 6c1f37c24..a3d78944e 100644 --- a/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java +++ b/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java @@ -32,7 +32,7 @@ import android.text.TextUtils; import android.util.Log; import androidx.annotation.VisibleForTesting; -import androidx.test.annotation.Beta; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.platform.app.InstrumentationRegistry; import java.io.BufferedReader; import java.io.File; @@ -130,7 +130,7 @@ * *

This API is currently in beta. */ -@Beta +@ExperimentalTestApi public class ProviderTestRule implements TestRule { private static final String TAG = "ProviderTestRule"; diff --git a/services/storage/java/androidx/test/services/storage/BUILD.bazel b/services/storage/java/androidx/test/services/storage/BUILD.bazel index 2126ea5d9..7bb64c8e1 100644 --- a/services/storage/java/androidx/test/services/storage/BUILD.bazel +++ b/services/storage/java/androidx/test/services/storage/BUILD.bazel @@ -3,7 +3,7 @@ load("@build_bazel_rules_android//android:rules.bzl", "android_library") load("//build_extensions:maven_repo.bzl", "maven_artifact") load("//build_extensions:release.bzl", "axt_release_lib") -load("//build_extensions:axt_versions.bzl", "MONITOR_VERSION", "SERVICES_VERSION") +load("//build_extensions:axt_versions.bzl", "ANNOTATION_VERSION", "MONITOR_VERSION", "SERVICES_VERSION") package( default_visibility = [ @@ -14,14 +14,6 @@ package( licenses(["notice"]) -java_library( - name = "experimental_storage_annotation", - srcs = ["ExperimentalTestStorage.java"], - deps = [ - "@maven//:androidx_annotation_annotation_experimental", - ], -) - android_library( name = "storage", srcs = [ @@ -31,7 +23,7 @@ android_library( ], manifest = "AndroidManifest.xml", deps = [ - ":experimental_storage_annotation", + "//annotation", "//runner/monitor", "//services/storage/java/androidx/test/services/storage/file", "@maven//:com_google_code_findbugs_jsr305", @@ -44,7 +36,7 @@ java_library( name = "test_storage_constants", srcs = ["TestStorageConstants.java"], deps = [ - ":experimental_storage_annotation", + "//annotation", ], ) @@ -80,6 +72,7 @@ maven_artifact( artifact_deps = [ "androidx.test:monitor:[%s]" % MONITOR_VERSION, "com.google.code.findbugs:jsr305:2.0.1", + "androidx.test:annotation:%s" % ANNOTATION_VERSION, ], artifact_id = "storage", group_id = "androidx.test.services", diff --git a/services/storage/java/androidx/test/services/storage/ExperimentalTestStorage.java b/services/storage/java/androidx/test/services/storage/ExperimentalTestStorage.java deleted file mode 100644 index 55ccfeb2c..000000000 --- a/services/storage/java/androidx/test/services/storage/ExperimentalTestStorage.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package androidx.test.services.storage; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PACKAGE; -import static java.lang.annotation.ElementType.TYPE; - -import androidx.annotation.experimental.Experimental; -import androidx.annotation.experimental.Experimental.Level; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** Annotation denoting this test storage library is experimental. */ -@Retention(RetentionPolicy.CLASS) -@Target({TYPE, METHOD, CONSTRUCTOR, FIELD, PACKAGE}) -@Experimental(level = Level.ERROR) -public @interface ExperimentalTestStorage {} diff --git a/services/storage/java/androidx/test/services/storage/TestStorage.java b/services/storage/java/androidx/test/services/storage/TestStorage.java index 9d45a0ecf..1167c0079 100644 --- a/services/storage/java/androidx/test/services/storage/TestStorage.java +++ b/services/storage/java/androidx/test/services/storage/TestStorage.java @@ -21,6 +21,7 @@ import android.database.Cursor; import android.net.Uri; import android.util.Log; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.platform.io.PlatformTestStorage; import androidx.test.services.storage.file.HostedFile; @@ -44,7 +45,7 @@ * Provides convenient I/O operations for reading/writing testing relevant files, properties in a * test. */ -@ExperimentalTestStorage +@ExperimentalTestApi public final class TestStorage implements PlatformTestStorage { private static final String TAG = TestStorage.class.getSimpleName(); private static final String PROPERTIES_FILE_NAME = "properties.dat"; diff --git a/services/storage/java/androidx/test/services/storage/TestStorageConstants.java b/services/storage/java/androidx/test/services/storage/TestStorageConstants.java index 292acd1b5..11037c4f5 100644 --- a/services/storage/java/androidx/test/services/storage/TestStorageConstants.java +++ b/services/storage/java/androidx/test/services/storage/TestStorageConstants.java @@ -15,8 +15,10 @@ */ package androidx.test.services.storage; +import androidx.test.annotation.ExperimentalTestApi; + /** Holds constants that are shared between on-device and host-side testing infrastructure. */ -@ExperimentalTestStorage +@ExperimentalTestApi public final class TestStorageConstants { /** The parent folder name for all the test related files. */ From 18e284ee457a7bec9ba65bf7a31ae00db4b61e92 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Thu, 2 Sep 2021 11:00:40 -0700 Subject: [PATCH 005/949] Split consolidated api/1.4.0.txt into artifact specific files. This change is intended to set the stable api baseline for moving to per-artifact API enforcement. PiperOrigin-RevId: 394499161 --- api/README.md | 6 +- core/java/androidx/test/core/api/1.4.0.txt | 93 + .../test/espresso/accessibility/api/3.4.0.txt | 12 + .../test/espresso/contrib/api/3.4.0.txt | 68 + .../java/androidx/test/espresso/api/3.4.0.txt | 2086 +++++++++++++++++ .../test/espresso/remote/api/3.4.0.txt | 182 ++ .../espresso/idling/concurrent/api/3.4.0.txt | 21 + .../java/androidx/test/espresso/api/3.4.0.txt | 16 + .../test/espresso/idling/net/api/3.4.0.txt | 21 + .../test/espresso/intent/api/3.4.0.txt | 153 ++ .../androidx/test/espresso/web/api/3.4.0.txt | 228 ++ .../androidx/test/ext/junit/api/1.1.3.txt | 25 + .../androidx/test/ext/truth/api/1.4.0.txt | 211 ++ .../java/androidx/test/core/api/1.4.0.txt | 0 .../androidx/test/ext/junit/api/1.1.3.txt | 0 .../java/androidx/test/api/1.4.0.txt | 90 + .../monitor/java/androidx/test/api/1.4.0.txt | 192 ++ runner/rules/java/androidx/test/api/1.4.0.txt | 93 + .../test/services/storage/api/1.4.0.txt | 0 19 files changed, 3495 insertions(+), 2 deletions(-) create mode 100644 core/java/androidx/test/core/api/1.4.0.txt create mode 100644 espresso/accessibility/java/androidx/test/espresso/accessibility/api/3.4.0.txt create mode 100644 espresso/contrib/java/androidx/test/espresso/contrib/api/3.4.0.txt create mode 100644 espresso/core/java/androidx/test/espresso/api/3.4.0.txt create mode 100644 espresso/core/java/androidx/test/espresso/remote/api/3.4.0.txt create mode 100644 espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/3.4.0.txt create mode 100644 espresso/idling_resource/java/androidx/test/espresso/api/3.4.0.txt create mode 100644 espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/3.4.0.txt create mode 100644 espresso/intents/java/androidx/test/espresso/intent/api/3.4.0.txt create mode 100644 espresso/web/java/androidx/test/espresso/web/api/3.4.0.txt create mode 100644 ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt create mode 100644 ext/truth/java/androidx/test/ext/truth/api/1.4.0.txt create mode 100644 ktx/core/java/androidx/test/core/api/1.4.0.txt create mode 100644 ktx/ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt create mode 100644 runner/android_junit_runner/java/androidx/test/api/1.4.0.txt create mode 100644 runner/monitor/java/androidx/test/api/1.4.0.txt create mode 100644 runner/rules/java/androidx/test/api/1.4.0.txt create mode 100644 services/storage/java/androidx/test/services/storage/api/1.4.0.txt diff --git a/api/README.md b/api/README.md index 38e36910c..5165dfef3 100644 --- a/api/README.md +++ b/api/README.md @@ -1,3 +1,5 @@ -Text output for the androidx.test API. +Deprecated! + +Previous repository for api definitions for androidx.test. +API definitions have been moved to per-library directories. -Generated via blaze build //third_party/android/androidx_test:axt_doc diff --git a/core/java/androidx/test/core/api/1.4.0.txt b/core/java/androidx/test/core/api/1.4.0.txt new file mode 100644 index 000000000..bdce2902a --- /dev/null +++ b/core/java/androidx/test/core/api/1.4.0.txt @@ -0,0 +1,93 @@ + +package androidx.test.core.app { + + public final class ActivityScenario implements java.lang.AutoCloseable java.io.Closeable { + method public void close(); + method public android.app.Instrumentation.ActivityResult getResult(); + method public android.arch.lifecycle.Lifecycle.State getState(); + method public static androidx.test.core.app.ActivityScenario launch(java.lang.Class); + method public static androidx.test.core.app.ActivityScenario launch(java.lang.Class, android.os.Bundle); + method public static androidx.test.core.app.ActivityScenario launch(android.content.Intent); + method public static androidx.test.core.app.ActivityScenario launch(android.content.Intent, android.os.Bundle); + method public androidx.test.core.app.ActivityScenario moveToState(android.arch.lifecycle.Lifecycle.State); + method public androidx.test.core.app.ActivityScenario onActivity(androidx.test.core.app.ActivityScenario.ActivityAction); + method public androidx.test.core.app.ActivityScenario recreate(); + } + + public static abstract interface ActivityScenario.ActivityAction { + method public abstract void perform(A); + } + + public final class ApplicationProvider { + method public static T getApplicationContext(); + } + +} + +package androidx.test.core.content.pm { + + public final class ApplicationInfoBuilder { + method public android.content.pm.ApplicationInfo build(); + method public static androidx.test.core.content.pm.ApplicationInfoBuilder newBuilder(); + method public androidx.test.core.content.pm.ApplicationInfoBuilder setName(java.lang.String); + method public androidx.test.core.content.pm.ApplicationInfoBuilder setPackageName(java.lang.String); + } + + public final class PackageInfoBuilder { + method public android.content.pm.PackageInfo build(); + method public static androidx.test.core.content.pm.PackageInfoBuilder newBuilder(); + method public androidx.test.core.content.pm.PackageInfoBuilder setApplicationInfo(android.content.pm.ApplicationInfo); + method public androidx.test.core.content.pm.PackageInfoBuilder setPackageName(java.lang.String); + } + +} + +package androidx.test.core.os { + + public final class Parcelables { + method public static T forceParcel(T, android.os.Parcelable.Creator); + } + +} + +package androidx.test.core.view { + + public class MotionEventBuilder { + method public android.view.MotionEvent build(); + method public static androidx.test.core.view.MotionEventBuilder newBuilder(); + method public androidx.test.core.view.MotionEventBuilder setAction(int); + method public androidx.test.core.view.MotionEventBuilder setActionIndex(int); + method public androidx.test.core.view.MotionEventBuilder setButtonState(int); + method public androidx.test.core.view.MotionEventBuilder setDeviceId(int); + method public androidx.test.core.view.MotionEventBuilder setDownTime(long); + method public androidx.test.core.view.MotionEventBuilder setEdgeFlags(int); + method public androidx.test.core.view.MotionEventBuilder setEventTime(long); + method public androidx.test.core.view.MotionEventBuilder setFlags(int); + method public androidx.test.core.view.MotionEventBuilder setMetaState(int); + method public androidx.test.core.view.MotionEventBuilder setPointer(float, float); + method public androidx.test.core.view.MotionEventBuilder setPointer(android.view.MotionEvent.PointerProperties, android.view.MotionEvent.PointerCoords); + method public androidx.test.core.view.MotionEventBuilder setSource(int); + method public androidx.test.core.view.MotionEventBuilder setXPrecision(float); + method public androidx.test.core.view.MotionEventBuilder setYPrecision(float); + } + + public class PointerCoordsBuilder { + method public android.view.MotionEvent.PointerCoords build(); + method public static androidx.test.core.view.PointerCoordsBuilder newBuilder(); + method public androidx.test.core.view.PointerCoordsBuilder setCoords(float, float); + method public androidx.test.core.view.PointerCoordsBuilder setOrientation(float); + method public androidx.test.core.view.PointerCoordsBuilder setPressure(float); + method public androidx.test.core.view.PointerCoordsBuilder setSize(float); + method public androidx.test.core.view.PointerCoordsBuilder setTool(float, float); + method public androidx.test.core.view.PointerCoordsBuilder setTouch(float, float); + } + + public class PointerPropertiesBuilder { + method public android.view.MotionEvent.PointerProperties build(); + method public static androidx.test.core.view.PointerPropertiesBuilder newBuilder(); + method public androidx.test.core.view.PointerPropertiesBuilder setId(int); + method public androidx.test.core.view.PointerPropertiesBuilder setToolType(int); + } + +} + diff --git a/espresso/accessibility/java/androidx/test/espresso/accessibility/api/3.4.0.txt b/espresso/accessibility/java/androidx/test/espresso/accessibility/api/3.4.0.txt new file mode 100644 index 000000000..accab6815 --- /dev/null +++ b/espresso/accessibility/java/androidx/test/espresso/accessibility/api/3.4.0.txt @@ -0,0 +1,12 @@ + + +package androidx.test.espresso.accessibility { + + public final class AccessibilityChecks { + method public static androidx.test.espresso.ViewAssertion accessibilityAssertion(); + method public static void disable(); + method public static com.google.android.apps.common.testing.accessibility.framework.integrations.espresso.AccessibilityValidator enable(); + } + +} + diff --git a/espresso/contrib/java/androidx/test/espresso/contrib/api/3.4.0.txt b/espresso/contrib/java/androidx/test/espresso/contrib/api/3.4.0.txt new file mode 100644 index 000000000..10da1c03e --- /dev/null +++ b/espresso/contrib/java/androidx/test/espresso/contrib/api/3.4.0.txt @@ -0,0 +1,68 @@ +package androidx.test.espresso.contrib { + + public final deprecated class AccessibilityChecks { + method public static androidx.test.espresso.ViewAssertion accessibilityAssertion(); + method public static com.google.android.apps.common.testing.accessibility.framework.integrations.espresso.AccessibilityValidator enable(); + } + + public final class ActivityResultMatchers { + method public static org.hamcrest.Matcher hasResultCode(int); + method public static org.hamcrest.Matcher hasResultData(org.hamcrest.Matcher); + } + + public final class DrawerActions { + method public static androidx.test.espresso.ViewAction close(); + method public static androidx.test.espresso.ViewAction close(int); + method public static deprecated void closeDrawer(int); + method public static deprecated void closeDrawer(int, int); + method public static androidx.test.espresso.ViewAction open(); + method public static androidx.test.espresso.ViewAction open(int); + method public static deprecated void openDrawer(int); + method public static deprecated void openDrawer(int, int); + } + + public final class DrawerMatchers { + method public static org.hamcrest.Matcher isClosed(int); + method public static org.hamcrest.Matcher isClosed(); + method public static org.hamcrest.Matcher isOpen(int); + method public static org.hamcrest.Matcher isOpen(); + } + + public final class NavigationViewActions { + method public static androidx.test.espresso.ViewAction navigateTo(int); + } + + public final class PickerActions { + method public static androidx.test.espresso.ViewAction setDate(int, int, int); + method public static androidx.test.espresso.ViewAction setTime(int, int); + } + + public final class RecyclerViewActions { + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction actionOnHolderItem(org.hamcrest.Matcher, androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction actionOnItem(org.hamcrest.Matcher, androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.ViewAction actionOnItemAtPosition(int, androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction scrollTo(org.hamcrest.Matcher); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction scrollToHolder(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction scrollToPosition(int); + } + + public static abstract interface RecyclerViewActions.PositionableRecyclerViewAction implements androidx.test.espresso.ViewAction { + method public abstract androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction atPosition(int); + } + + public final class ViewPagerActions { + method public static androidx.test.espresso.ViewAction clickBetweenTwoTitles(java.lang.String, java.lang.String); + method public static androidx.test.espresso.ViewAction scrollLeft(); + method public static androidx.test.espresso.ViewAction scrollLeft(boolean); + method public static androidx.test.espresso.ViewAction scrollRight(); + method public static androidx.test.espresso.ViewAction scrollRight(boolean); + method public static androidx.test.espresso.ViewAction scrollToFirst(); + method public static androidx.test.espresso.ViewAction scrollToFirst(boolean); + method public static androidx.test.espresso.ViewAction scrollToLast(); + method public static androidx.test.espresso.ViewAction scrollToLast(boolean); + method public static androidx.test.espresso.ViewAction scrollToPage(int); + method public static androidx.test.espresso.ViewAction scrollToPage(int, boolean); + } + +} + diff --git a/espresso/core/java/androidx/test/espresso/api/3.4.0.txt b/espresso/core/java/androidx/test/espresso/api/3.4.0.txt new file mode 100644 index 000000000..bbda40337 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/api/3.4.0.txt @@ -0,0 +1,2086 @@ + +package androidx.test.espresso { + + public final class AmbiguousViewMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + } + + public static class AmbiguousViewMatcherException.Builder { + ctor public Builder(); + method public androidx.test.espresso.AmbiguousViewMatcherException build(); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder from(androidx.test.espresso.AmbiguousViewMatcherException); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder includeViewHierarchy(boolean); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withOtherAmbiguousViews(android.view.View...); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withRootView(android.view.View); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withView1(android.view.View); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withView2(android.view.View); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withViewMatcher(org.hamcrest.Matcher); + } + + public final class AppNotIdleException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public static deprecated androidx.test.espresso.AppNotIdleException create(java.util.List, int, int); + method public static androidx.test.espresso.AppNotIdleException create(java.util.List, java.lang.String); + } + + public class DataInteraction { + method public androidx.test.espresso.DataInteraction atPosition(java.lang.Integer); + method public androidx.test.espresso.ViewInteraction check(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.DataInteraction inAdapterView(org.hamcrest.Matcher); + method public androidx.test.espresso.DataInteraction inRoot(org.hamcrest.Matcher); + method public androidx.test.espresso.DataInteraction onChildView(org.hamcrest.Matcher); + method public androidx.test.espresso.ViewInteraction perform(androidx.test.espresso.ViewAction...); + method public androidx.test.espresso.DataInteraction usingAdapterViewProtocol(androidx.test.espresso.action.AdapterViewProtocol); + } + + public static final class DataInteraction.DisplayDataMatcher extends org.hamcrest.TypeSafeMatcher { + method public void describeTo(org.hamcrest.Description); + method public static androidx.test.espresso.DataInteraction.DisplayDataMatcher displayDataMatcher(org.hamcrest.Matcher, org.hamcrest.Matcher, org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional, androidx.test.espresso.action.AdapterViewProtocol); + method public boolean matchesSafely(android.view.View); + } + + public final class Espresso { + method public static void closeSoftKeyboard(); + method public static deprecated java.util.List getIdlingResources(); + method public static androidx.test.espresso.DataInteraction onData(org.hamcrest.Matcher); + method public static T onIdle(java.util.concurrent.Callable); + method public static void onIdle(); + method public static androidx.test.espresso.ViewInteraction onView(org.hamcrest.Matcher); + method public static void openActionBarOverflowOrOptionsMenu(android.content.Context); + method public static void openContextualActionModeOverflowMenu(); + method public static void pressBack(); + method public static void pressBackUnconditionally(); + method public static deprecated boolean registerIdlingResources(androidx.test.espresso.IdlingResource...); + method public static deprecated void registerLooperAsIdlingResource(android.os.Looper); + method public static deprecated void registerLooperAsIdlingResource(android.os.Looper, boolean); + method public static void setFailureHandler(androidx.test.espresso.FailureHandler); + method public static deprecated boolean unregisterIdlingResources(androidx.test.espresso.IdlingResource...); + } + + public abstract interface EspressoException implements androidx.test.platform.TestFrameworkException { + } + + public abstract interface FailureHandler { + method public abstract void handle(java.lang.Throwable, org.hamcrest.Matcher); + } + + public final class IdlingPolicies { + method public static androidx.test.espresso.IdlingPolicy getDynamicIdlingResourceErrorPolicy(); + method public static androidx.test.espresso.IdlingPolicy getDynamicIdlingResourceWarningPolicy(); + method public static androidx.test.espresso.IdlingPolicy getMasterIdlingPolicy(); + method public static void setIdlingResourceTimeout(long, java.util.concurrent.TimeUnit); + method public static void setMasterPolicyTimeout(long, java.util.concurrent.TimeUnit); + method public static void setMasterPolicyTimeoutWhenDebuggerAttached(boolean); + } + + public final class IdlingPolicy { + method public boolean getDisableOnTimeout(); + method public long getIdleTimeout(); + method public java.util.concurrent.TimeUnit getIdleTimeoutUnit(); + method public boolean getTimeoutIfDebuggerAttached(); + method public void handleTimeout(java.util.List, java.lang.String); + } + + public final class IdlingRegistry { + method public static androidx.test.espresso.IdlingRegistry getInstance(); + method public java.util.Collection getLoopers(); + method public java.util.Collection getResources(); + method public boolean register(androidx.test.espresso.IdlingResource...); + method public void registerLooperAsIdlingResource(android.os.Looper); + method public boolean unregister(androidx.test.espresso.IdlingResource...); + method public boolean unregisterLooperAsIdlingResource(android.os.Looper); + } + + public abstract interface IdlingResource { + method public abstract java.lang.String getName(); + method public abstract boolean isIdleNow(); + method public abstract void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + + public static abstract interface IdlingResource.ResourceCallback { + method public abstract void onTransitionToIdle(); + } + + public final class IdlingResourceTimeoutException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public IdlingResourceTimeoutException(java.util.List); + } + + public final class InjectEventSecurityException extends androidx.test.platform.ui.InjectEventSecurityException implements androidx.test.espresso.EspressoException { + ctor public InjectEventSecurityException(java.lang.String); + ctor public InjectEventSecurityException(java.lang.Throwable); + ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + } + + public final class NoActivityResumedException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public NoActivityResumedException(java.lang.String); + ctor public NoActivityResumedException(java.lang.String, java.lang.Throwable); + } + + public final class NoMatchingRootException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public static androidx.test.espresso.NoMatchingRootException create(org.hamcrest.Matcher, java.util.List); + } + + public final class NoMatchingViewException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public java.lang.String getViewMatcherDescription(); + } + + public static class NoMatchingViewException.Builder { + ctor public Builder(); + method public androidx.test.espresso.NoMatchingViewException build(); + method public androidx.test.espresso.NoMatchingViewException.Builder from(androidx.test.espresso.NoMatchingViewException); + method public androidx.test.espresso.NoMatchingViewException.Builder includeViewHierarchy(boolean); + method public androidx.test.espresso.NoMatchingViewException.Builder withAdapterViewWarning(androidx.test.espresso.util.EspressoOptional); + method public androidx.test.espresso.NoMatchingViewException.Builder withAdapterViews(java.util.List); + method public androidx.test.espresso.NoMatchingViewException.Builder withCause(java.lang.Throwable); + method public androidx.test.espresso.NoMatchingViewException.Builder withRootView(android.view.View); + method public androidx.test.espresso.NoMatchingViewException.Builder withViewMatcher(org.hamcrest.Matcher); + } + + public final class PerformException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public java.lang.String getActionDescription(); + method public java.lang.String getViewDescription(); + } + + public static class PerformException.Builder { + ctor public Builder(); + method public androidx.test.espresso.PerformException build(); + method public androidx.test.espresso.PerformException.Builder from(androidx.test.espresso.PerformException); + method public androidx.test.espresso.PerformException.Builder withActionDescription(java.lang.String); + method public androidx.test.espresso.PerformException.Builder withCause(java.lang.Throwable); + method public androidx.test.espresso.PerformException.Builder withViewDescription(java.lang.String); + } + + public final class Root { + method public android.view.View getDecorView(); + method public androidx.test.espresso.util.EspressoOptional getWindowLayoutParams(); + method public boolean isReady(); + } + + public static class Root.Builder { + ctor public Builder(); + method public androidx.test.espresso.Root build(); + method public androidx.test.espresso.Root.Builder withDecorView(android.view.View); + method public androidx.test.espresso.Root.Builder withWindowLayoutParams(android.view.WindowManager.LayoutParams); + } + + public abstract interface UiController { + method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.espresso.InjectEventSecurityException; + method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.espresso.InjectEventSecurityException; + method public default boolean injectMotionEventSequence(java.lang.Iterable) throws androidx.test.espresso.InjectEventSecurityException; + method public abstract boolean injectString(java.lang.String) throws androidx.test.espresso.InjectEventSecurityException; + method public abstract void loopMainThreadForAtLeast(long); + method public abstract void loopMainThreadUntilIdle(); + } + + public abstract interface ViewAction { + method public abstract org.hamcrest.Matcher getConstraints(); + method public abstract java.lang.String getDescription(); + method public abstract void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface ViewAssertion { + method public abstract void check(android.view.View, androidx.test.espresso.NoMatchingViewException); + } + + public abstract interface ViewFinder { + method public abstract android.view.View getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; + } + + public final class ViewInteraction { + method public androidx.test.espresso.ViewInteraction check(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.ViewInteraction inRoot(org.hamcrest.Matcher); + method public androidx.test.espresso.ViewInteraction noActivity(); + method public androidx.test.espresso.ViewInteraction perform(androidx.test.espresso.ViewAction...); + method public androidx.test.espresso.ViewInteraction withFailureHandler(androidx.test.espresso.FailureHandler); + } + + public abstract interface ViewInteractionComponent { + method public abstract androidx.test.espresso.ViewInteraction viewInteraction(); + } + +} + +package androidx.test.espresso.action { + + public final class AdapterDataLoaderAction implements androidx.test.espresso.ViewAction { + ctor public AdapterDataLoaderAction(org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional, androidx.test.espresso.action.AdapterViewProtocol); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData getAdaptedData(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface AdapterViewProtocol { + method public abstract java.lang.Iterable getDataInAdapterView(android.widget.AdapterView); + method public abstract androidx.test.espresso.util.EspressoOptional getDataRenderedByView(android.widget.AdapterView, android.view.View); + method public abstract boolean isDataRenderedWithinAdapterView(android.widget.AdapterView, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData); + method public abstract void makeDataRenderedWithinAdapterView(android.widget.AdapterView, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData); + } + + public static class AdapterViewProtocol.AdaptedData { + method public java.lang.Object getData(); + field public final deprecated java.lang.Object data; + field public final java.lang.Object opaqueToken; + } + + public static class AdapterViewProtocol.AdaptedData.Builder { + ctor public Builder(); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData build(); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withData(java.lang.Object); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withDataFunction(androidx.test.espresso.action.AdapterViewProtocol.DataFunction); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withOpaqueToken(java.lang.Object); + } + + public static abstract interface AdapterViewProtocol.DataFunction { + method public abstract java.lang.Object getData(); + } + + public final class AdapterViewProtocols { + method public static androidx.test.espresso.action.AdapterViewProtocol standardProtocol(); + } + + public final class CloseKeyboardAction implements androidx.test.espresso.ViewAction { + ctor public CloseKeyboardAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface CoordinatesProvider { + method public abstract float[] calculateCoordinates(android.view.View); + } + + public final class EditorAction implements androidx.test.espresso.ViewAction { + ctor public EditorAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class EspressoKey { + method public int getKeyCode(); + method public int getMetaState(); + } + + public static class EspressoKey.Builder { + ctor public Builder(); + method public androidx.test.espresso.action.EspressoKey build(); + method public androidx.test.espresso.action.EspressoKey.Builder withAltPressed(boolean); + method public androidx.test.espresso.action.EspressoKey.Builder withCtrlPressed(boolean); + method public androidx.test.espresso.action.EspressoKey.Builder withKeyCode(int); + method public androidx.test.espresso.action.EspressoKey.Builder withShiftPressed(boolean); + } + + public final class GeneralClickAction implements androidx.test.espresso.ViewAction { + ctor public deprecated GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber); + ctor public GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, int, int); + ctor public deprecated GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, androidx.test.espresso.ViewAction); + ctor public GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, int, int, androidx.test.espresso.ViewAction); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public class GeneralLocation extends java.lang.Enum implements androidx.test.espresso.action.CoordinatesProvider { + method public static androidx.test.espresso.action.GeneralLocation valueOf(java.lang.String); + method public static final androidx.test.espresso.action.GeneralLocation[] values(); + enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_CENTER; + enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_LEFT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_RIGHT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation CENTER; + enum_constant public static final androidx.test.espresso.action.GeneralLocation CENTER_LEFT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation CENTER_RIGHT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation TOP_CENTER; + enum_constant public static final androidx.test.espresso.action.GeneralLocation TOP_LEFT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation TOP_RIGHT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation VISIBLE_CENTER; + } + + public final class GeneralSwipeAction implements androidx.test.espresso.ViewAction { + ctor public GeneralSwipeAction(androidx.test.espresso.action.Swiper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class KeyEventAction implements androidx.test.espresso.ViewAction { + ctor public KeyEventAction(androidx.test.espresso.action.EspressoKey); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class MotionEvents { + method public static android.view.MotionEvent obtainDownEvent(float[], float[], int, int); + method public static android.view.MotionEvent obtainDownEvent(float[], float[]); + method public static android.view.MotionEvent obtainMovement(long, float[]); + method public static android.view.MotionEvent obtainMovement(long, long, float[]); + method public static android.view.MotionEvent obtainUpEvent(android.view.MotionEvent, float[]); + method public static void sendCancel(androidx.test.espresso.UiController, android.view.MotionEvent); + method public static androidx.test.espresso.action.MotionEvents.DownResultHolder sendDown(androidx.test.espresso.UiController, float[], float[]); + method public static androidx.test.espresso.action.MotionEvents.DownResultHolder sendDown(androidx.test.espresso.UiController, float[], float[], int, int); + method public static boolean sendMovement(androidx.test.espresso.UiController, android.view.MotionEvent, float[]); + method public static boolean sendUp(androidx.test.espresso.UiController, android.view.MotionEvent); + method public static boolean sendUp(androidx.test.espresso.UiController, android.view.MotionEvent, float[]); + } + + public static class MotionEvents.DownResultHolder { + field public final android.view.MotionEvent down; + field public final boolean longPress; + } + + public final class OpenLinkAction implements androidx.test.espresso.ViewAction { + ctor public OpenLinkAction(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface PrecisionDescriber { + method public abstract float[] describePrecision(); + } + + public class Press extends java.lang.Enum implements androidx.test.espresso.action.PrecisionDescriber { + method public static androidx.test.espresso.action.Press valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Press[] values(); + enum_constant public static final androidx.test.espresso.action.Press FINGER; + enum_constant public static final androidx.test.espresso.action.Press PINPOINT; + enum_constant public static final androidx.test.espresso.action.Press THUMB; + } + + public final class PressBackAction implements androidx.test.espresso.ViewAction { + ctor public PressBackAction(boolean); + ctor public PressBackAction(boolean, androidx.test.espresso.action.EspressoKey); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class RepeatActionUntilViewState implements androidx.test.espresso.ViewAction { + ctor protected RepeatActionUntilViewState(androidx.test.espresso.ViewAction, org.hamcrest.Matcher, int); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class ReplaceTextAction implements androidx.test.espresso.ViewAction { + ctor public ReplaceTextAction(java.lang.String); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class ScrollToAction implements androidx.test.espresso.ViewAction { + ctor public ScrollToAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public class Swipe extends java.lang.Enum implements androidx.test.espresso.action.Swiper { + method public static androidx.test.espresso.action.Swipe valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Swipe[] values(); + enum_constant public static final androidx.test.espresso.action.Swipe FAST; + enum_constant public static final androidx.test.espresso.action.Swipe SLOW; + } + + public abstract interface Swiper { + method public abstract androidx.test.espresso.action.Swiper.Status sendSwipe(androidx.test.espresso.UiController, float[], float[], float[]); + } + + public static final class Swiper.Status extends java.lang.Enum { + method public static androidx.test.espresso.action.Swiper.Status valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Swiper.Status[] values(); + enum_constant public static final androidx.test.espresso.action.Swiper.Status FAILURE; + enum_constant public static final androidx.test.espresso.action.Swiper.Status SUCCESS; + } + + public class Tap extends java.lang.Enum implements androidx.test.espresso.action.Tapper { + method public static androidx.test.espresso.action.Tap valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Tap[] values(); + enum_constant public static final androidx.test.espresso.action.Tap DOUBLE; + enum_constant public static final androidx.test.espresso.action.Tap LONG; + enum_constant public static final androidx.test.espresso.action.Tap SINGLE; + } + + public abstract interface Tapper { + method public abstract androidx.test.espresso.action.Tapper.Status sendTap(androidx.test.espresso.UiController, float[], float[], int, int); + method public abstract deprecated androidx.test.espresso.action.Tapper.Status sendTap(androidx.test.espresso.UiController, float[], float[]); + } + + public static final class Tapper.Status extends java.lang.Enum { + method public static androidx.test.espresso.action.Tapper.Status valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Tapper.Status[] values(); + enum_constant public static final androidx.test.espresso.action.Tapper.Status FAILURE; + enum_constant public static final androidx.test.espresso.action.Tapper.Status SUCCESS; + enum_constant public static final androidx.test.espresso.action.Tapper.Status WARNING; + } + + public final class TypeTextAction implements androidx.test.espresso.ViewAction { + ctor public TypeTextAction(java.lang.String); + ctor public TypeTextAction(java.lang.String, boolean); + ctor public TypeTextAction(java.lang.String, boolean, androidx.test.espresso.action.GeneralClickAction); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class ViewActions { + method public static androidx.test.espresso.ViewAction actionWithAssertions(androidx.test.espresso.ViewAction); + method public static void addGlobalAssertion(java.lang.String, androidx.test.espresso.ViewAssertion); + method public static void clearGlobalAssertions(); + method public static androidx.test.espresso.ViewAction clearText(); + method public static androidx.test.espresso.ViewAction click(int, int); + method public static androidx.test.espresso.ViewAction click(); + method public static androidx.test.espresso.ViewAction click(androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.ViewAction closeSoftKeyboard(); + method public static androidx.test.espresso.ViewAction doubleClick(); + method public static androidx.test.espresso.ViewAction longClick(); + method public static androidx.test.espresso.ViewAction openLink(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction openLinkWithText(java.lang.String); + method public static androidx.test.espresso.ViewAction openLinkWithText(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction openLinkWithUri(java.lang.String); + method public static androidx.test.espresso.ViewAction openLinkWithUri(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction pressBack(); + method public static androidx.test.espresso.ViewAction pressBackUnconditionally(); + method public static androidx.test.espresso.ViewAction pressImeActionButton(); + method public static androidx.test.espresso.ViewAction pressKey(int); + method public static androidx.test.espresso.ViewAction pressKey(androidx.test.espresso.action.EspressoKey); + method public static androidx.test.espresso.ViewAction pressMenuKey(); + method public static void removeGlobalAssertion(androidx.test.espresso.ViewAssertion); + method public static androidx.test.espresso.ViewAction repeatedlyUntil(androidx.test.espresso.ViewAction, org.hamcrest.Matcher, int); + method public static androidx.test.espresso.ViewAction replaceText(java.lang.String); + method public static androidx.test.espresso.ViewAction scrollTo(); + method public static androidx.test.espresso.ViewAction swipeDown(); + method public static androidx.test.espresso.ViewAction swipeLeft(); + method public static androidx.test.espresso.ViewAction swipeRight(); + method public static androidx.test.espresso.ViewAction swipeUp(); + method public static androidx.test.espresso.ViewAction typeText(java.lang.String); + method public static androidx.test.espresso.ViewAction typeTextIntoFocusedView(java.lang.String); + } + +} + +package androidx.test.espresso.assertion { + + public final class LayoutAssertions { + method public static androidx.test.espresso.ViewAssertion noEllipsizedText(); + method public static androidx.test.espresso.ViewAssertion noMultilineButtons(); + method public static androidx.test.espresso.ViewAssertion noOverlaps(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion noOverlaps(); + } + + public final class PositionAssertions { + method public static deprecated androidx.test.espresso.ViewAssertion isAbove(org.hamcrest.Matcher); + method public static deprecated androidx.test.espresso.ViewAssertion isBelow(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isBottomAlignedWith(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyAbove(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyBelow(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyLeftOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyRightOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isLeftAlignedWith(org.hamcrest.Matcher); + method public static deprecated androidx.test.espresso.ViewAssertion isLeftOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyAbove(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyBelow(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyLeftOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyRightOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isRightAlignedWith(org.hamcrest.Matcher); + method public static deprecated androidx.test.espresso.ViewAssertion isRightOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isTopAlignedWith(org.hamcrest.Matcher); + } + + public final class ViewAssertions { + method public static androidx.test.espresso.ViewAssertion doesNotExist(); + method public static androidx.test.espresso.ViewAssertion matches(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion selectedDescendantsMatch(org.hamcrest.Matcher, org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.base { + + public abstract interface ActiveRootLister { + method public abstract java.util.List listActiveRoots(); + } + + public abstract class Default implements java.lang.annotation.Annotation { + } + + public final class DefaultFailureHandler implements androidx.test.espresso.FailureHandler { + ctor public DefaultFailureHandler(android.content.Context); + method public void handle(java.lang.Throwable, org.hamcrest.Matcher); + } + + public final class IdlingResourceRegistry { + ctor public IdlingResourceRegistry(android.os.Looper); + method public java.util.List getResources(); + method public void registerLooper(android.os.Looper, boolean); + method public boolean registerResources(java.util.List); + method public void sync(java.lang.Iterable, java.lang.Iterable); + method public boolean unregisterResources(java.util.List); + } + + public abstract interface IdlingUiController implements androidx.test.espresso.UiController { + method public abstract androidx.test.espresso.base.IdlingResourceRegistry getIdlingResourceRegistry(); + } + + public abstract interface InterruptableUiController implements androidx.test.espresso.UiController { + method public abstract void interruptEspressoTasks(); + } + + public abstract class MainThread implements java.lang.annotation.Annotation { + } + + public final class RootViewPicker implements javax.inject.Provider { + method public android.view.View get(); + } + + public abstract class RootViewPickerScope implements java.lang.annotation.Annotation { + } + + public final class ViewFinderImpl implements androidx.test.espresso.ViewFinder { + method public android.view.View getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; + } + +} + + +package androidx.test.espresso.matcher { + + public abstract class BoundedDiagnosingMatcher extends org.hamcrest.BaseMatcher { + ctor public BoundedDiagnosingMatcher(java.lang.Class); + ctor public BoundedDiagnosingMatcher(java.lang.Class, java.lang.Class, java.lang.Class...); + method public final void describeMismatch(java.lang.Object, org.hamcrest.Description); + method protected abstract void describeMoreTo(org.hamcrest.Description); + method public final void describeTo(org.hamcrest.Description); + method public final boolean matches(java.lang.Object); + method protected abstract boolean matchesSafely(T, org.hamcrest.Description); + } + + public abstract class BoundedMatcher extends org.hamcrest.BaseMatcher { + ctor public BoundedMatcher(java.lang.Class); + ctor public BoundedMatcher(java.lang.Class, java.lang.Class, java.lang.Class...); + method public final boolean matches(java.lang.Object); + method protected abstract boolean matchesSafely(S); + } + + public final class CursorMatchers { + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(int, byte[]); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(java.lang.String, byte[]); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(int, double); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(java.lang.String, double); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(int, float); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(java.lang.String, float); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(int, int); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(java.lang.String, int); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(int, long); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(java.lang.String, long); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(int, short); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(java.lang.String, short); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(int, java.lang.String); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(java.lang.String, java.lang.String); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(org.hamcrest.Matcher, org.hamcrest.Matcher); + } + + public static class CursorMatchers.CursorMatcher extends androidx.test.espresso.matcher.BoundedMatcher { + method public void describeTo(org.hamcrest.Description); + method public boolean matchesSafely(android.database.Cursor); + method public androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withStrictColumnChecks(boolean); + } + + public final class HasBackgroundMatcher extends org.hamcrest.TypeSafeMatcher { + ctor public HasBackgroundMatcher(int); + method public void describeTo(org.hamcrest.Description); + method protected boolean matchesSafely(android.view.View); + } + + public final class LayoutMatchers { + method public static org.hamcrest.Matcher hasEllipsizedText(); + method public static org.hamcrest.Matcher hasMultilineText(); + } + + public final class PreferenceMatchers { + method public static org.hamcrest.Matcher isEnabled(); + method public static org.hamcrest.Matcher withKey(java.lang.String); + method public static org.hamcrest.Matcher withKey(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withSummary(int); + method public static org.hamcrest.Matcher withSummaryText(java.lang.String); + method public static org.hamcrest.Matcher withSummaryText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTitle(int); + method public static org.hamcrest.Matcher withTitleText(java.lang.String); + method public static org.hamcrest.Matcher withTitleText(org.hamcrest.Matcher); + } + + public final class RootMatchers { + method public static org.hamcrest.Matcher hasWindowLayoutParams(); + method public static org.hamcrest.Matcher isDialog(); + method public static org.hamcrest.Matcher isFocusable(); + method public static org.hamcrest.Matcher isPlatformPopup(); + method public static org.hamcrest.Matcher isSystemAlertWindow(); + method public static org.hamcrest.Matcher isTouchable(); + method public static org.hamcrest.Matcher withDecorView(org.hamcrest.Matcher); + field public static final org.hamcrest.Matcher DEFAULT; + } + + public final class ViewMatchers { + method public static void assertThat(T, org.hamcrest.Matcher); + method public static void assertThat(java.lang.String, T, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher doesNotHaveFocus(); + method public static org.hamcrest.Matcher hasBackground(int); + method public static org.hamcrest.Matcher hasChildCount(int); + method public static org.hamcrest.Matcher hasContentDescription(); + method public static org.hamcrest.Matcher hasDescendant(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasErrorText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasErrorText(java.lang.String); + method public static org.hamcrest.Matcher hasFocus(); + method public static org.hamcrest.Matcher hasImeAction(int); + method public static org.hamcrest.Matcher hasImeAction(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasLinks(); + method public static org.hamcrest.Matcher hasMinimumChildCount(int); + method public static org.hamcrest.Matcher hasSibling(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasTextColor(int); + method public static org.hamcrest.Matcher isAssignableFrom(java.lang.Class); + method public static org.hamcrest.Matcher isChecked(); + method public static org.hamcrest.Matcher isClickable(); + method public static org.hamcrest.Matcher isCompletelyDisplayed(); + method public static org.hamcrest.Matcher isDescendantOfA(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher isDisplayed(); + method public static org.hamcrest.Matcher isDisplayingAtLeast(int); + method public static org.hamcrest.Matcher isEnabled(); + method public static org.hamcrest.Matcher isFocusable(); + method public static org.hamcrest.Matcher isFocused(); + method public static org.hamcrest.Matcher isJavascriptEnabled(); + method public static org.hamcrest.Matcher isNotChecked(); + method public static org.hamcrest.Matcher isNotClickable(); + method public static org.hamcrest.Matcher isNotEnabled(); + method public static org.hamcrest.Matcher isNotFocusable(); + method public static org.hamcrest.Matcher isNotFocused(); + method public static org.hamcrest.Matcher isNotSelected(); + method public static org.hamcrest.Matcher isRoot(); + method public static org.hamcrest.Matcher isSelected(); + method public static org.hamcrest.Matcher supportsInputMethods(); + method public static org.hamcrest.Matcher withAlpha(float); + method public static org.hamcrest.Matcher withChild(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withClassName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withContentDescription(int); + method public static org.hamcrest.Matcher withContentDescription(java.lang.String); + method public static org.hamcrest.Matcher withContentDescription(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withEffectiveVisibility(androidx.test.espresso.matcher.ViewMatchers.Visibility); + method public static org.hamcrest.Matcher withHint(java.lang.String); + method public static org.hamcrest.Matcher withHint(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withHint(int); + method public static org.hamcrest.Matcher withId(int); + method public static org.hamcrest.Matcher withId(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withInputType(int); + method public static org.hamcrest.Matcher withParent(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withParentIndex(int); + method public static org.hamcrest.Matcher withResourceName(java.lang.String); + method public static org.hamcrest.Matcher withResourceName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withSpinnerText(int); + method public static org.hamcrest.Matcher withSpinnerText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withSpinnerText(java.lang.String); + method public static org.hamcrest.Matcher withSubstring(java.lang.String); + method public static org.hamcrest.Matcher withTagKey(int); + method public static org.hamcrest.Matcher withTagKey(int, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTagValue(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withText(java.lang.String); + method public static org.hamcrest.Matcher withText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withText(int); + } + + public static final class ViewMatchers.Visibility extends java.lang.Enum { + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility forViewVisibility(android.view.View); + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility forViewVisibility(int); + method public int getValue(); + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility valueOf(java.lang.String); + method public static final androidx.test.espresso.matcher.ViewMatchers.Visibility[] values(); + enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility GONE; + enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility INVISIBLE; + enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility VISIBLE; + } + +} + +package androidx.test.espresso.util { + + public final class ActivityLifecycles { + method public static boolean hasForegroundActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + method public static boolean hasTransitioningActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + method public static boolean hasVisibleActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + } + + public final class EspressoOptional { + method public static androidx.test.espresso.util.EspressoOptional absent(); + method public java.util.Set asSet(); + method public static androidx.test.espresso.util.EspressoOptional fromNullable(T); + method public T get(); + method public boolean isPresent(); + method public static androidx.test.espresso.util.EspressoOptional of(T); + method public com.google.common.base.Optional or(com.google.common.base.Optional); + method public T or(com.google.common.base.Supplier); + method public T or(T); + method public T orNull(); + method public static java.lang.Iterable presentInstances(java.lang.Iterable>); + method public com.google.common.base.Optional transform(com.google.common.base.Function); + } + + public final class HumanReadables { + method public static java.lang.String describe(android.database.Cursor); + method public static java.lang.String describe(android.view.View); + method public static java.lang.String getViewHierarchyErrorMessage(android.view.View, java.util.List, java.lang.String, java.lang.String); + } + + public final class TreeIterables { + method public static java.lang.Iterable breadthFirstViewTraversal(android.view.View); + method public static java.lang.Iterable depthFirstViewTraversal(android.view.View); + method public static java.lang.Iterable depthFirstViewTraversalWithDistance(android.view.View); + } + + public static class TreeIterables.ViewAndDistance { + method public int getDistanceFromRoot(); + method public android.view.View getView(); + } + +} + + public final class AtomAction implements androidx.test.espresso.remote.Bindable androidx.test.espresso.ViewAction { + ctor public AtomAction(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.WindowReference, androidx.test.espresso.web.model.ElementReference); + method public E get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; + method public E get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public java.util.concurrent.Future getFuture(); + method public android.os.IBinder getIBinder(); + method public java.lang.String getId(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + method public void setIBinder(android.os.IBinder); + } + + public class EnableJavascriptAction implements androidx.test.espresso.ViewAction { + ctor public EnableJavascriptAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface IAtomActionResultPropagator implements android.os.IInterface { + method public abstract void setError(android.os.Bundle) throws android.os.RemoteException; + method public abstract void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + + public static abstract class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + ctor public Stub(); + method public static androidx.test.espresso.web.action.IAtomActionResultPropagator asInterface(android.os.IBinder); + } + + public static class IAtomActionResultPropagator.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + method public void setError(android.os.Bundle) throws android.os.RemoteException; + method public void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + +} + +package androidx.test.espresso.web.assertion { + + public final class TagSoupDocumentParser { + method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; + method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException; + } + + public abstract class WebAssertion { + ctor public WebAssertion(androidx.test.espresso.web.model.Atom); + method protected abstract void checkResult(android.webkit.WebView, E); + method public final androidx.test.espresso.web.model.Atom getAtom(); + method public final androidx.test.espresso.ViewAssertion toViewAssertion(E); + } + + public final class WebViewAssertions { + method public static androidx.test.espresso.web.assertion.WebAssertion webContent(org.hamcrest.Matcher); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher); + } + + public static abstract interface WebViewAssertions.ResultDescriber { + method public abstract java.lang.String apply(E); + } + +} + +package androidx.test.espresso.web.matcher { + + public final class AmbiguousElementMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public AmbiguousElementMatcherException(java.lang.String); + } + + public final class DomMatchers { + method public static org.hamcrest.Matcher containingTextInBody(java.lang.String); + method public static org.hamcrest.Matcher elementById(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher elementByXPath(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasElementWithId(java.lang.String); + method public static org.hamcrest.Matcher hasElementWithXpath(java.lang.String); + method public static org.hamcrest.Matcher withBody(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTextContent(java.lang.String); + method public static org.hamcrest.Matcher withTextContent(org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.web.model { + + public abstract interface Atom { + method public abstract java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public abstract java.lang.String getScript(); + method public abstract R transform(androidx.test.espresso.web.model.Evaluation); + } + + public final class Atoms { + method public static androidx.test.espresso.web.model.TransformingAtom.Transformer castOrDie(java.lang.Class); + method public static androidx.test.espresso.web.model.Atom getCurrentUrl(); + method public static androidx.test.espresso.web.model.Atom getTitle(); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String); + method public static androidx.test.espresso.web.model.Atom scriptWithArgs(java.lang.String, java.util.List); + method public static androidx.test.espresso.web.model.Atom transform(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + } + + public final class ElementReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + + public final class Evaluation implements androidx.test.espresso.web.model.JSONAble android.os.Parcelable { + ctor protected Evaluation(android.os.Parcel); + method public int describeContents(); + method public java.lang.String getMessage(); + method public int getStatus(); + method public java.lang.Object getValue(); + method public boolean hasMessage(); + method public void readFromParcel(android.os.Parcel); + method public java.lang.String toJSONString(); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; + } + + public abstract interface JSONAble { + method public abstract java.lang.String toJSONString(); + } + + public static abstract interface JSONAble.DeJSONFactory { + method public abstract java.lang.Object attemptDeJSONize(java.util.Map); + } + + public final class ModelCodec { + method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + method public static androidx.test.espresso.web.model.Evaluation decodeEvaluation(java.lang.String); + method public static java.lang.String encode(java.lang.Object); + method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + } + + public class SimpleAtom implements androidx.test.espresso.web.model.Atom { + ctor public SimpleAtom(java.lang.String); + ctor public SimpleAtom(java.lang.String, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement); + method public final java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method protected java.util.List getNonContextualArguments(); + method public final java.lang.String getScript(); + method protected androidx.test.espresso.web.model.Evaluation handleBadEvaluation(androidx.test.espresso.web.model.Evaluation); + method protected void handleNoElementReference(); + method public final androidx.test.espresso.web.model.Evaluation transform(androidx.test.espresso.web.model.Evaluation); + } + + public static final class SimpleAtom.ElementReferencePlacement extends java.lang.Enum { + method public static androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement valueOf(java.lang.String); + method public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement[] values(); + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement FIRST; + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement LAST; + } + + public class TransformingAtom implements androidx.test.espresso.web.model.Atom { + ctor public TransformingAtom(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public java.lang.String getScript(); + method public O transform(androidx.test.espresso.web.model.Evaluation); + } + + public static abstract interface TransformingAtom.Transformer { + method public abstract O apply(I); + } + + public final class WindowReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + +} + +package androidx.test.espresso.web.sugar { + + public final class Web { + ctor public Web(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(org.hamcrest.Matcher); + } + + public static class Web.WebInteraction { + method public androidx.test.espresso.web.sugar.Web.WebInteraction check(androidx.test.espresso.web.assertion.WebAssertion); + method public androidx.test.espresso.web.sugar.Web.WebInteraction forceJavascriptEnabled(); + method public R get(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.WindowReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction perform(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction reset(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withContextualElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.ElementReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withNoTimeout(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withTimeout(long, java.util.concurrent.TimeUnit); + } + +} + +package androidx.test.espresso.web.webdriver { + + public final class DriverAtoms { + method public static androidx.test.espresso.web.model.Atom clearElement(); + method public static androidx.test.espresso.web.model.Atom findElement(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom> findMultipleElements(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom getText(); + method public static androidx.test.espresso.web.model.Atom selectActiveElement(); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom webClick(); + method public static androidx.test.espresso.web.model.Atom webKeys(java.lang.String); + method public static androidx.test.espresso.web.model.Atom webScrollIntoView(); + } + + public final class Locator extends java.lang.Enum { + method public java.lang.String getType(); + method public static androidx.test.espresso.web.webdriver.Locator valueOf(java.lang.String); + method public static final androidx.test.espresso.web.webdriver.Locator[] values(); + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CLASS_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CSS_SELECTOR; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator ID; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator PARTIAL_LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator TAG_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator XPATH; + } + +} + +package androidx.test.ext.junit.rules { + + public final class ActivityScenarioRule extends org.junit.rules.ExternalResource { + ctor public ActivityScenarioRule(java.lang.Class); + ctor public ActivityScenarioRule(java.lang.Class, android.os.Bundle); + ctor public ActivityScenarioRule(android.content.Intent); + ctor public ActivityScenarioRule(android.content.Intent, android.os.Bundle); + method public androidx.test.core.app.ActivityScenario getScenario(); + } + +} + +package androidx.test.ext.junit.runners { + + public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + +} + +package androidx.test.ext.truth.app { + + public class NotificationActionSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationActionSubject assertThat(android.app.Notification.Action); + method public static com.google.common.truth.Subject.Factory notificationActions(); + method public final com.google.common.truth.StringSubject title(); + } + + public class NotificationSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationSubject assertThat(android.app.Notification); + method public final androidx.test.ext.truth.app.PendingIntentSubject contentIntent(); + method public final androidx.test.ext.truth.app.PendingIntentSubject deleteIntent(); + method public final void doesNotHaveFlags(int); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public final void hasFlags(int); + method public static com.google.common.truth.Subject.Factory notifications(); + method public final com.google.common.truth.StringSubject tickerText(); + } + + public class PendingIntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.PendingIntentSubject assertThat(android.app.PendingIntent); + method public static com.google.common.truth.Subject.Factory pendingIntents(); + } + +} + +package androidx.test.ext.truth.content { + + public final class IntentCorrespondences { + method public static com.google.common.truth.Correspondence action(); + method public static com.google.common.truth.Correspondence all(com.google.common.truth.Correspondence...); + method public static com.google.common.truth.Correspondence data(); + } + + public final class IntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.content.IntentSubject assertThat(android.content.Intent); + method public com.google.common.truth.IterableSubject categories(); + method public androidx.test.ext.truth.os.BundleSubject extras(); + method public void filtersEquallyTo(android.content.Intent); + method public void hasAction(java.lang.String); + method public void hasComponent(java.lang.String, java.lang.String); + method public void hasComponent(android.content.ComponentName); + method public void hasComponentClass(java.lang.Class); + method public void hasComponentClass(java.lang.String); + method public void hasComponentPackage(java.lang.String); + method public void hasData(android.net.Uri); + method public void hasFlags(int); + method public void hasNoAction(); + method public void hasPackage(java.lang.String); + method public void hasType(java.lang.String); + method public static com.google.common.truth.Subject.Factory intents(); + } + +} + +package androidx.test.ext.truth.location { + + public final class LocationCorrespondences { + method public static com.google.common.truth.Correspondence at(); + method public static com.google.common.truth.Correspondence equality(); + method public static com.google.common.truth.Correspondence nearby(float); + } + + public class LocationSubject extends com.google.common.truth.Subject { + method public com.google.common.truth.FloatSubject accuracy(); + method public com.google.common.truth.DoubleSubject altitude(); + method public static androidx.test.ext.truth.location.LocationSubject assertThat(android.location.Location); + method public com.google.common.truth.FloatSubject bearing(); + method public com.google.common.truth.FloatSubject bearingAccuracy(); + method public com.google.common.truth.FloatSubject bearingTo(double, double); + method public com.google.common.truth.FloatSubject bearingTo(android.location.Location); + method public com.google.common.truth.FloatSubject distanceTo(double, double); + method public com.google.common.truth.FloatSubject distanceTo(android.location.Location); + method public void doesNotHaveProvider(java.lang.String); + method public com.google.common.truth.LongSubject elapsedRealtimeMillis(); + method public com.google.common.truth.LongSubject elapsedRealtimeNanos(); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public void hasAccuracy(); + method public void hasAltitude(); + method public void hasBearing(); + method public void hasBearingAccuracy(); + method public void hasProvider(java.lang.String); + method public void hasSpeed(); + method public void hasSpeedAccuracy(); + method public void hasVerticalAccuracy(); + method public void isAt(android.location.Location); + method public void isAt(double, double); + method public void isFaraway(android.location.Location, float); + method public void isMock(); + method public void isNearby(android.location.Location, float); + method public void isNotAt(android.location.Location); + method public void isNotAt(double, double); + method public void isNotMock(); + method public static com.google.common.truth.Subject.Factory locations(); + method public com.google.common.truth.FloatSubject speed(); + method public com.google.common.truth.FloatSubject speedAccuracy(); + method public com.google.common.truth.LongSubject time(); + method public com.google.common.truth.FloatSubject verticalAccuracy(); + } + +} + +package androidx.test.ext.truth.os { + + public final class BundleSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.BundleSubject assertThat(android.os.Bundle); + method public com.google.common.truth.BooleanSubject bool(java.lang.String); + method public static com.google.common.truth.Subject.Factory bundles(); + method public void containsKey(java.lang.String); + method public void doesNotContainKey(java.lang.String); + method public void hasSize(int); + method public com.google.common.truth.IntegerSubject integer(java.lang.String); + method public void isEmpty(); + method public void isNotEmpty(); + method public com.google.common.truth.LongSubject longInt(java.lang.String); + method public androidx.test.ext.truth.os.ParcelableSubject parcelable(java.lang.String); + method public com.google.common.truth.IterableSubject parcelableArrayList(java.lang.String); + method public SubjectT parcelableAsType(java.lang.String, com.google.common.truth.Subject.Factory); + method public com.google.common.truth.StringSubject string(java.lang.String); + method public com.google.common.truth.IterableSubject stringArrayList(java.lang.String); + } + + public final class ParcelableSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.ParcelableSubject assertThat(T); + method public static com.google.common.truth.Subject.Factory, T> parcelables(); + method public void recreatesEqual(android.os.Parcelable.Creator); + } + +} + +package androidx.test.ext.truth.view { + + public final class MotionEventSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.MotionEventSubject assertThat(android.view.MotionEvent); + method public void hasAction(int); + method public void hasActionButton(int); + method public void hasButtonState(int); + method public void hasDeviceId(int); + method public void hasDownTime(long); + method public void hasEdgeFlags(int); + method public void hasEventTime(long); + method public void hasFlags(int); + method public void hasHistorySize(int); + method public void hasMetaState(int); + method public void hasPointerCount(int); + method public com.google.common.truth.LongSubject historicalEventTime(int); + method public com.google.common.truth.FloatSubject historicalOrientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject historicalPointerCoords(int, int); + method public com.google.common.truth.FloatSubject historicalPressure(int); + method public com.google.common.truth.FloatSubject historicalSize(int); + method public com.google.common.truth.FloatSubject historicalToolMajor(int); + method public com.google.common.truth.FloatSubject historicalToolMinor(int); + method public com.google.common.truth.FloatSubject historicalTouchMajor(int); + method public com.google.common.truth.FloatSubject historicalTouchMinor(int); + method public com.google.common.truth.FloatSubject historicalX(int); + method public com.google.common.truth.FloatSubject historicalY(int); + method public static com.google.common.truth.Subject.Factory motionEvents(); + method public com.google.common.truth.FloatSubject orientation(); + method public com.google.common.truth.FloatSubject orientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject pointerCoords(int); + method public com.google.common.truth.IntegerSubject pointerId(int); + method public androidx.test.ext.truth.view.PointerPropertiesSubject pointerProperties(int); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject pressure(int); + method public com.google.common.truth.FloatSubject rawX(); + method public com.google.common.truth.FloatSubject rawY(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject size(int); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMajor(int); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject toolMinor(int); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMajor(int); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject touchMinor(int); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject x(int); + method public com.google.common.truth.FloatSubject xPrecision(); + method public com.google.common.truth.FloatSubject y(); + method public com.google.common.truth.FloatSubject y(int); + method public com.google.common.truth.FloatSubject yPrecision(); + } + + public final class PointerCoordsSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerCoordsSubject assertThat(android.view.MotionEvent.PointerCoords); + method public com.google.common.truth.FloatSubject axisValue(int); + method public com.google.common.truth.FloatSubject orientation(); + method public static com.google.common.truth.Subject.Factory pointerCoords(); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject y(); + } + + public final class PointerPropertiesSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerPropertiesSubject assertThat(android.view.MotionEvent.PointerProperties); + method public void hasId(int); + method public void hasToolType(int); + method public void isEqualTo(android.view.MotionEvent.PointerProperties); + method public static com.google.common.truth.Subject.Factory pointerProperties(); + } + +} + +package androidx.test.filters { + + public abstract class FlakyTest implements java.lang.annotation.Annotation { + } + + public abstract class LargeTest implements java.lang.annotation.Annotation { + } + + public abstract class MediumTest implements java.lang.annotation.Annotation { + } + + public abstract class RequiresDevice implements java.lang.annotation.Annotation { + } + + public abstract class SdkSuppress implements java.lang.annotation.Annotation { + } + + public abstract class SmallTest implements java.lang.annotation.Annotation { + } + + public abstract class Suppress implements java.lang.annotation.Annotation { + } + +} + +package androidx.test.jank { + + public abstract class GfxFrameStatsMonitor implements java.lang.annotation.Annotation { + field public static final java.lang.String KEY_AVG_FPS = "framestats-fps"; + field public static final java.lang.String KEY_AVG_JANK_RATE = "framestats-jankrate"; + field public static final java.lang.String KEY_AVG_SLOW_RATE = "framestats-slowrate"; + field public static final java.lang.String KEY_FRAME_COUNT = "framestats-frame-count"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_90TH_PERCENTILE = "framestats-renderthread-90"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_95TH_PERCENTILE = "framestats-renderthread-95"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_99TH_PERCENTILE = "framestats-renderthread-99"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_MEDIAN = "framestats-renderthread-median"; + field public static final java.lang.String KEY_TOTAL_TIME_90TH_PERCENTILE = "framestats-totaltime-90"; + field public static final java.lang.String KEY_TOTAL_TIME_95TH_PERCENTILE = "framestats-totaltime-95"; + field public static final java.lang.String KEY_TOTAL_TIME_99TH_PERCENTILE = "framestats-totaltime-99"; + field public static final java.lang.String KEY_TOTAL_TIME_MEDIAN = "framestats-totaltime-median"; + field public static final java.lang.String KEY_UITHREAD_TIME_90TH_PERCENTILE = "framestats-uithread-90"; + field public static final java.lang.String KEY_UITHREAD_TIME_95TH_PERCENTILE = "framestats-uithread-95"; + field public static final java.lang.String KEY_UITHREAD_TIME_99TH_PERCENTILE = "framestats-uithread-99"; + field public static final java.lang.String KEY_UITHREAD_TIME_MEDIAN = "framestats-uithread-median"; + field public static final java.lang.String KEY_VSYNC_COUNT = "framestats-vsync-count"; + } + + public abstract class GfxMonitor implements java.lang.annotation.Annotation { + field public static final java.lang.String KEY_AVG_FRAME_TIME_50TH_PERCENTILE = "gfx-avg-frame-time-50"; + field public static final java.lang.String KEY_AVG_FRAME_TIME_90TH_PERCENTILE = "gfx-avg-frame-time-90"; + field public static final java.lang.String KEY_AVG_FRAME_TIME_95TH_PERCENTILE = "gfx-avg-frame-time-95"; + field public static final java.lang.String KEY_AVG_FRAME_TIME_99TH_PERCENTILE = "gfx-avg-frame-time-99"; + field public static final java.lang.String KEY_AVG_HIGH_INPUT_LATENCY = "gfx-avg-high-input-latency"; + field public static final java.lang.String KEY_AVG_MISSED_VSYNC = "gfx-avg-missed-vsync"; + field public static final java.lang.String KEY_AVG_NUM_FRAME_MISSED = "gfx-avg-num-frame-deadline-missed"; + field public static final java.lang.String KEY_AVG_NUM_JANKY = "gfx-avg-jank"; + field public static final java.lang.String KEY_AVG_SLOW_BITMAP_UPLOADS = "gfx-avg-slow-bitmap-uploads"; + field public static final java.lang.String KEY_AVG_SLOW_DRAW = "gfx-avg-slow-draw"; + field public static final java.lang.String KEY_AVG_SLOW_UI_THREAD = "gfx-avg-slow-ui-thread"; + field public static final java.lang.String KEY_AVG_TOTAL_FRAMES = "gfx-avg-total-frames"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_50TH_PERCENTILE = "gfx-max-frame-time-50"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_90TH_PERCENTILE = "gfx-max-frame-time-90"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_95TH_PERCENTILE = "gfx-max-frame-time-95"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_99TH_PERCENTILE = "gfx-max-frame-time-99"; + field public static final java.lang.String KEY_MAX_HIGH_INPUT_LATENCY = "gfx-max-high-input-latency"; + field public static final java.lang.String KEY_MAX_MISSED_VSYNC = "gfx-max-missed-vsync"; + field public static final java.lang.String KEY_MAX_NUM_FRAME_MISSED = "gfx-max-num-frame-deadline-missed"; + field public static final java.lang.String KEY_MAX_NUM_JANKY = "gfx-max-jank"; + field public static final java.lang.String KEY_MAX_SLOW_BITMAP_UPLOADS = "gfx-max-slow-bitmap-uploads"; + field public static final java.lang.String KEY_MAX_SLOW_DRAW = "gfx-max-slow-draw"; + field public static final java.lang.String KEY_MAX_SLOW_UI_THREAD = "gfx-max-slow-ui-thread"; + field public static final java.lang.String KEY_MAX_TOTAL_FRAMES = "gfx-max-total-frames"; + field public static final java.lang.String KEY_MIN_TOTAL_FRAMES = "gfx-min-total-frames"; + } + + public abstract interface IMonitor { + method public abstract android.os.Bundle getMetrics(); + method public abstract void startIteration() throws java.lang.Throwable; + method public abstract android.os.Bundle stopIteration() throws java.lang.Throwable; + } + + public abstract interface IMonitorFactory { + method public abstract java.util.List getMonitors(java.lang.reflect.Method, java.lang.Object); + } + + public abstract class JankTest implements java.lang.annotation.Annotation { + } + + public class JankTestBase extends android.test.InstrumentationTestCase { + ctor public JankTestBase(); + method public void afterLoop() throws java.lang.Exception; + method public void afterTest(android.os.Bundle); + method public void beforeLoop() throws java.lang.Exception; + method public void beforeTest() throws java.lang.Exception; + method protected androidx.test.jank.IMonitorFactory createMonitorFactory(); + method protected final android.os.Bundle getArguments(); + method public final int getCurrentIteration(); + method protected androidx.test.jank.IMonitorFactory getMonitorFactory(); + method protected java.util.List getMonitors(java.lang.reflect.Method); + } + +} + +package androidx.test.jank.annotations { + + public abstract class UseMonitorFactory implements java.lang.annotation.Annotation { + } + +} + +package androidx.test.platform { + + public abstract interface TestFrameworkException { + } + +} + +package androidx.test.platform.app { + + public final class InstrumentationRegistry { + method public static android.os.Bundle getArguments(); + method public static android.app.Instrumentation getInstrumentation(); + method public static void registerInstance(android.app.Instrumentation, android.os.Bundle); + } + +} + +package androidx.test.platform.ui { + + public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { + ctor public InjectEventSecurityException(java.lang.String); + ctor public InjectEventSecurityException(java.lang.Throwable); + ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + } + + public abstract interface UiController { + method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectString(java.lang.String) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract void loopMainThreadForAtLeast(long); + method public abstract void loopMainThreadUntilIdle(); + } + +} + +package androidx.test.rule { + + public deprecated class ActivityTestRule implements org.junit.rules.TestRule { + ctor public ActivityTestRule(java.lang.Class); + ctor public ActivityTestRule(java.lang.Class, boolean); + ctor public ActivityTestRule(java.lang.Class, boolean, boolean); + ctor public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory, boolean, boolean); + ctor public ActivityTestRule(java.lang.Class, java.lang.String, int, boolean, boolean); + method protected void afterActivityFinished(); + method protected void afterActivityLaunched(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeActivityLaunched(); + method public void finishActivity(); + method public T getActivity(); + method protected android.content.Intent getActivityIntent(); + method public android.app.Instrumentation.ActivityResult getActivityResult(); + method public T launchActivity(android.content.Intent); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + } + + public class DisableOnAndroidDebug implements org.junit.rules.TestRule { + ctor public DisableOnAndroidDebug(org.junit.rules.TestRule); + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public boolean isDebugging(); + } + + public class GrantPermissionRule implements org.junit.rules.TestRule { + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public static androidx.test.rule.GrantPermissionRule grant(java.lang.String...); + } + + public class ServiceTestRule implements org.junit.rules.TestRule { + ctor public ServiceTestRule(); + ctor protected ServiceTestRule(long, java.util.concurrent.TimeUnit); + method protected void afterService(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeService(); + method public android.os.IBinder bindService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public android.os.IBinder bindService(android.content.Intent, android.content.ServiceConnection, int) throws java.util.concurrent.TimeoutException; + method public void startService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public void unbindService(); + method public static androidx.test.rule.ServiceTestRule withTimeout(long, java.util.concurrent.TimeUnit); + } + + public deprecated class UiThreadTestRule implements org.junit.rules.TestRule { + ctor public UiThreadTestRule(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + method protected boolean shouldRunOnUiThread(org.junit.runner.Description); + } + +} + +package androidx.test.rule.logging { + + public class AtraceLogger { + method public void atraceStart(java.util.Set, int, int, java.io.File, java.lang.String) throws java.io.IOException; + method public void atraceStop() throws java.io.IOException, java.lang.InterruptedException; + method public static androidx.test.rule.logging.AtraceLogger getAtraceLoggerInstance(android.app.Instrumentation); + } + +} + +package androidx.test.rule.provider { + + public class ProviderTestRule implements org.junit.rules.TestRule { + method protected void afterProviderCleanedUp(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeProviderSetup(); + method public android.content.ContentResolver getResolver(); + method public void revokePermission(java.lang.String); + method public void runDatabaseCommands(java.lang.String, java.lang.String...); + } + + public static class ProviderTestRule.Builder { + ctor public Builder(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule.Builder addProvider(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule build(); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommands(java.lang.String, java.lang.String...); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommandsFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setPrefix(java.lang.String); + } + +} + +package androidx.test.runner { + + public final deprecated class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class, androidx.test.internal.util.AndroidRunnerParams) throws org.junit.runners.model.InitializationError; + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + + public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation implements androidx.test.internal.events.client.TestEventClientConnectListener { + ctor public AndroidJUnitRunner(); + method public void onTestEventClientConnect(); + } + + public class MonitoringInstrumentation extends androidx.test.internal.runner.hidden.ExposedInstrumentationApi { + ctor public MonitoringInstrumentation(); + method protected void dumpThreadStateToOutputs(java.lang.String); + method protected java.lang.String getThreadState(); + method protected void installMultidex(); + method protected void installOldMultiDex(java.lang.Class) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; + method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory); + method protected deprecated boolean isPrimaryInstrProcess(java.lang.String); + method protected final boolean isPrimaryInstrProcess(); + method protected void restoreUncaughtExceptionHandler(); + method protected final void setJsBridgeClassName(java.lang.String); + method protected boolean shouldWaitForActivitiesToComplete(); + method protected void specifyDexMakerCacheProperty(); + method public void useDefaultInterceptingActivityFactory(); + method protected void waitForActivitiesToComplete(); + } + + public class MonitoringInstrumentation.ActivityFinisher implements java.lang.Runnable { + ctor public ActivityFinisher(); + method public void run(); + } + + public class UsageTrackerFacilitator implements androidx.test.internal.runner.tracker.UsageTracker { + ctor public UsageTrackerFacilitator(androidx.test.internal.runner.RunnerArgs); + ctor public UsageTrackerFacilitator(boolean); + method public void registerUsageTracker(androidx.test.internal.runner.tracker.UsageTracker); + method public void sendUsages(); + method public boolean shouldTrackUsage(); + method public void trackUsage(java.lang.String, java.lang.String); + } + +} + +package androidx.test.runner.intent { + + public abstract interface IntentCallback { + method public abstract void onIntentSent(android.content.Intent); + } + + public abstract interface IntentMonitor { + method public abstract void addIntentCallback(androidx.test.runner.intent.IntentCallback); + method public abstract void removeIntentCallback(androidx.test.runner.intent.IntentCallback); + } + + public final class IntentMonitorRegistry { + method public static androidx.test.runner.intent.IntentMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.intent.IntentMonitor); + } + + public abstract interface IntentStubber { + method public abstract android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + } + + public final class IntentStubberRegistry { + method public static androidx.test.runner.intent.IntentStubber getInstance(); + method public static boolean isLoaded(); + method public static void load(androidx.test.runner.intent.IntentStubber); + method public static synchronized void reset(); + } + +} + +package androidx.test.runner.intercepting { + + public abstract interface InterceptingActivityFactory { + method public abstract android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method public abstract boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + + public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { + ctor public SingleActivityFactory(java.lang.Class); + method public final android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method protected abstract T create(android.content.Intent); + method public final java.lang.Class getActivityClassToIntercept(); + method public final boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + +} + +package androidx.test.runner.lifecycle { + + public abstract interface ActivityLifecycleCallback { + method public abstract void onActivityLifecycleChanged(android.app.Activity, androidx.test.runner.lifecycle.Stage); + } + + public abstract interface ActivityLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + method public abstract java.util.Collection getActivitiesInStage(androidx.test.runner.lifecycle.Stage); + method public abstract androidx.test.runner.lifecycle.Stage getLifecycleStageOf(android.app.Activity); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + } + + public final class ActivityLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + } + + public abstract interface ApplicationLifecycleCallback { + method public abstract void onApplicationLifecycleChanged(android.app.Application, androidx.test.runner.lifecycle.ApplicationStage); + } + + public abstract interface ApplicationLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + } + + public final class ApplicationLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor); + } + + public final class ApplicationStage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.ApplicationStage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.ApplicationStage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage PRE_ON_CREATE; + } + + public final class Stage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.Stage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.Stage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.Stage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.Stage DESTROYED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PAUSED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PRE_ON_CREATE; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESTARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESUMED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STOPPED; + } + +} + +package androidx.test.runner.permission { + + public class PermissionRequester implements androidx.test.internal.platform.content.PermissionGranter { + ctor public PermissionRequester(); + method public void addPermissions(java.lang.String...); + method public void requestPermissions(); + method protected void setAndroidRuntimeVersion(int); + } + + public abstract class RequestPermissionCallable implements java.util.concurrent.Callable { + ctor public RequestPermissionCallable(androidx.test.runner.permission.ShellCommand, android.content.Context, java.lang.String); + method protected java.lang.String getPermission(); + method protected androidx.test.runner.permission.ShellCommand getShellCommand(); + method protected boolean isPermissionGranted(); + } + + public static final class RequestPermissionCallable.Result extends java.lang.Enum { + method public static androidx.test.runner.permission.RequestPermissionCallable.Result valueOf(java.lang.String); + method public static final androidx.test.runner.permission.RequestPermissionCallable.Result[] values(); + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result FAILURE; + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result SUCCESS; + } + + public abstract class ShellCommand { + ctor public ShellCommand(); + } + +} + +package androidx.test.runner.screenshot { + + public class BasicScreenCaptureProcessor implements androidx.test.runner.screenshot.ScreenCaptureProcessor { + ctor public BasicScreenCaptureProcessor(); + method protected java.lang.String getDefaultFilename(); + method protected java.lang.String getFilename(java.lang.String); + method public java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + field protected java.lang.String mDefaultFilenamePrefix; + field protected java.io.File mDefaultScreenshotPath; + field protected java.lang.String mFileNameDelimiter; + field protected java.lang.String mTag; + } + + public final class ScreenCapture { + method public android.graphics.Bitmap getBitmap(); + method public android.graphics.Bitmap.CompressFormat getFormat(); + method public java.lang.String getName(); + method public void process() throws java.io.IOException; + method public void process(java.util.Set) throws java.io.IOException; + method public androidx.test.runner.screenshot.ScreenCapture setFormat(android.graphics.Bitmap.CompressFormat); + method public androidx.test.runner.screenshot.ScreenCapture setName(java.lang.String); + } + + public abstract interface ScreenCaptureProcessor { + method public abstract java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + } + + public final class Screenshot { + ctor public Screenshot(); + method public static void addScreenCaptureProcessors(java.util.Set); + method public static androidx.test.runner.screenshot.ScreenCapture capture() throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.app.Activity) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.view.View) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static void setScreenshotProcessors(java.util.Set); + } + + public class UiAutomationWrapper { + method public android.graphics.Bitmap takeScreenshot(); + } + +} + +package androidx.test.uiautomator { + + public class By { + method public static androidx.test.uiautomator.BySelector checkable(boolean); + method public static androidx.test.uiautomator.BySelector checked(boolean); + method public static androidx.test.uiautomator.BySelector clazz(java.lang.String); + method public static androidx.test.uiautomator.BySelector clazz(java.lang.String, java.lang.String); + method public static androidx.test.uiautomator.BySelector clazz(java.lang.Class); + method public static androidx.test.uiautomator.BySelector clazz(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector clickable(boolean); + method public static androidx.test.uiautomator.BySelector copy(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.BySelector depth(int); + method public static androidx.test.uiautomator.BySelector desc(java.lang.String); + method public static androidx.test.uiautomator.BySelector desc(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector descContains(java.lang.String); + method public static androidx.test.uiautomator.BySelector descEndsWith(java.lang.String); + method public static androidx.test.uiautomator.BySelector descStartsWith(java.lang.String); + method public static androidx.test.uiautomator.BySelector enabled(boolean); + method public static androidx.test.uiautomator.BySelector focusable(boolean); + method public static androidx.test.uiautomator.BySelector focused(boolean); + method public static androidx.test.uiautomator.BySelector hasChild(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector, int); + method public static androidx.test.uiautomator.BySelector longClickable(boolean); + method public static androidx.test.uiautomator.BySelector pkg(java.lang.String); + method public static androidx.test.uiautomator.BySelector pkg(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector res(java.lang.String); + method public static androidx.test.uiautomator.BySelector res(java.lang.String, java.lang.String); + method public static androidx.test.uiautomator.BySelector res(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector scrollable(boolean); + method public static androidx.test.uiautomator.BySelector selected(boolean); + method public static androidx.test.uiautomator.BySelector text(java.lang.String); + method public static androidx.test.uiautomator.BySelector text(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector textContains(java.lang.String); + method public static androidx.test.uiautomator.BySelector textEndsWith(java.lang.String); + method public static androidx.test.uiautomator.BySelector textStartsWith(java.lang.String); + } + + public class BySelector { + method public androidx.test.uiautomator.BySelector checkable(boolean); + method public androidx.test.uiautomator.BySelector checked(boolean); + method public androidx.test.uiautomator.BySelector clazz(java.lang.String); + method public androidx.test.uiautomator.BySelector clazz(java.lang.String, java.lang.String); + method public androidx.test.uiautomator.BySelector clazz(java.lang.Class); + method public androidx.test.uiautomator.BySelector clazz(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector clickable(boolean); + method public androidx.test.uiautomator.BySelector depth(int); + method public androidx.test.uiautomator.BySelector depth(int, int); + method public androidx.test.uiautomator.BySelector desc(java.lang.String); + method public androidx.test.uiautomator.BySelector desc(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector descContains(java.lang.String); + method public androidx.test.uiautomator.BySelector descEndsWith(java.lang.String); + method public androidx.test.uiautomator.BySelector descStartsWith(java.lang.String); + method public androidx.test.uiautomator.BySelector enabled(boolean); + method public androidx.test.uiautomator.BySelector focusable(boolean); + method public androidx.test.uiautomator.BySelector focused(boolean); + method public androidx.test.uiautomator.BySelector hasChild(androidx.test.uiautomator.BySelector); + method public androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector); + method public androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector, int); + method public androidx.test.uiautomator.BySelector longClickable(boolean); + method public androidx.test.uiautomator.BySelector maxDepth(int); + method public androidx.test.uiautomator.BySelector minDepth(int); + method public androidx.test.uiautomator.BySelector pkg(java.lang.String); + method public androidx.test.uiautomator.BySelector pkg(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector res(java.lang.String); + method public androidx.test.uiautomator.BySelector res(java.lang.String, java.lang.String); + method public androidx.test.uiautomator.BySelector res(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector scrollable(boolean); + method public androidx.test.uiautomator.BySelector selected(boolean); + method public androidx.test.uiautomator.BySelector text(java.lang.String); + method public androidx.test.uiautomator.BySelector text(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector textContains(java.lang.String); + method public androidx.test.uiautomator.BySelector textEndsWith(java.lang.String); + method public androidx.test.uiautomator.BySelector textStartsWith(java.lang.String); + } + + public final class Configurator { + method public long getActionAcknowledgmentTimeout(); + method public static androidx.test.uiautomator.Configurator getInstance(); + method public long getKeyInjectionDelay(); + method public long getScrollAcknowledgmentTimeout(); + method public int getToolType(); + method public int getUiAutomationFlags(); + method public long getWaitForIdleTimeout(); + method public long getWaitForSelectorTimeout(); + method public androidx.test.uiautomator.Configurator setActionAcknowledgmentTimeout(long); + method public androidx.test.uiautomator.Configurator setKeyInjectionDelay(long); + method public androidx.test.uiautomator.Configurator setScrollAcknowledgmentTimeout(long); + method public androidx.test.uiautomator.Configurator setToolType(int); + method public androidx.test.uiautomator.Configurator setUiAutomationFlags(int); + method public androidx.test.uiautomator.Configurator setWaitForIdleTimeout(long); + method public androidx.test.uiautomator.Configurator setWaitForSelectorTimeout(long); + } + + public final class Direction extends java.lang.Enum { + method public static androidx.test.uiautomator.Direction reverse(androidx.test.uiautomator.Direction); + method public static androidx.test.uiautomator.Direction valueOf(java.lang.String); + method public static final androidx.test.uiautomator.Direction[] values(); + enum_constant public static final androidx.test.uiautomator.Direction DOWN; + enum_constant public static final androidx.test.uiautomator.Direction LEFT; + enum_constant public static final androidx.test.uiautomator.Direction RIGHT; + enum_constant public static final androidx.test.uiautomator.Direction UP; + } + + public abstract class EventCondition { + ctor public EventCondition(); + } + + public abstract interface IAutomationSupport { + method public abstract void sendStatus(int, android.os.Bundle); + } + + public abstract class SearchCondition { + ctor public SearchCondition(); + } + + public class StaleObjectException extends java.lang.RuntimeException { + ctor public StaleObjectException(); + } + + public class UiAutomatorInstrumentationTestRunner extends android.test.InstrumentationTestRunner { + ctor public UiAutomatorInstrumentationTestRunner(); + method protected android.test.AndroidTestRunner getAndroidTestRunner(); + method protected void initializeUiAutomatorTest(androidx.test.uiautomator.UiAutomatorTestCase); + } + + public deprecated class UiAutomatorTestCase extends android.test.InstrumentationTestCase { + ctor public UiAutomatorTestCase(); + method public deprecated androidx.test.uiautomator.IAutomationSupport getAutomationSupport(); + method public android.os.Bundle getParams(); + method public androidx.test.uiautomator.UiDevice getUiDevice(); + method public deprecated void sleep(long); + } + + public class UiCollection extends androidx.test.uiautomator.UiObject { + ctor public UiCollection(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiObject getChildByDescription(androidx.test.uiautomator.UiSelector, java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByInstance(androidx.test.uiautomator.UiSelector, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByText(androidx.test.uiautomator.UiSelector, java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public int getChildCount(androidx.test.uiautomator.UiSelector); + } + + public class UiDevice { + method public void clearLastTraversedText(); + method public boolean click(int, int); + method public boolean drag(int, int, int, int, int); + method public deprecated void dumpWindowHierarchy(java.lang.String); + method public void dumpWindowHierarchy(java.io.File) throws java.io.IOException; + method public void dumpWindowHierarchy(java.io.OutputStream) throws java.io.IOException; + method public androidx.test.uiautomator.UiObject findObject(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiObject2 findObject(androidx.test.uiautomator.BySelector); + method public java.util.List findObjects(androidx.test.uiautomator.BySelector); + method public void freezeRotation() throws android.os.RemoteException; + method public deprecated java.lang.String getCurrentActivityName(); + method public java.lang.String getCurrentPackageName(); + method public int getDisplayHeight(); + method public int getDisplayRotation(); + method public android.graphics.Point getDisplaySizeDp(); + method public int getDisplayWidth(); + method public static deprecated androidx.test.uiautomator.UiDevice getInstance(); + method public static androidx.test.uiautomator.UiDevice getInstance(android.app.Instrumentation); + method public java.lang.String getLastTraversedText(); + method public java.lang.String getLauncherPackageName(); + method public java.lang.String getProductName(); + method public boolean hasAnyWatcherTriggered(); + method public boolean hasObject(androidx.test.uiautomator.BySelector); + method public boolean hasWatcherTriggered(java.lang.String); + method public boolean isNaturalOrientation(); + method public boolean isScreenOn() throws android.os.RemoteException; + method public boolean openNotification(); + method public boolean openQuickSettings(); + method public R performActionAndWait(java.lang.Runnable, androidx.test.uiautomator.EventCondition, long); + method public boolean pressBack(); + method public boolean pressDPadCenter(); + method public boolean pressDPadDown(); + method public boolean pressDPadLeft(); + method public boolean pressDPadRight(); + method public boolean pressDPadUp(); + method public boolean pressDelete(); + method public boolean pressEnter(); + method public boolean pressHome(); + method public boolean pressKeyCode(int); + method public boolean pressKeyCode(int, int); + method public boolean pressMenu(); + method public boolean pressRecentApps() throws android.os.RemoteException; + method public boolean pressSearch(); + method public void registerWatcher(java.lang.String, androidx.test.uiautomator.UiWatcher); + method public void removeWatcher(java.lang.String); + method public void resetWatcherTriggers(); + method public void runWatchers(); + method public void setCompressedLayoutHeirarchy(boolean); + method public void setOrientationLeft() throws android.os.RemoteException; + method public void setOrientationNatural() throws android.os.RemoteException; + method public void setOrientationRight() throws android.os.RemoteException; + method public void sleep() throws android.os.RemoteException; + method public boolean swipe(int, int, int, int, int); + method public boolean swipe(android.graphics.Point[], int); + method public boolean takeScreenshot(java.io.File); + method public boolean takeScreenshot(java.io.File, float, int); + method public void unfreezeRotation() throws android.os.RemoteException; + method public R wait(androidx.test.uiautomator.SearchCondition, long); + method public void waitForIdle(); + method public void waitForIdle(long); + method public boolean waitForWindowUpdate(java.lang.String, long); + method public void wakeUp() throws android.os.RemoteException; + } + + public class UiObject { + ctor public deprecated UiObject(androidx.test.uiautomator.UiSelector); + method public void clearTextField() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean click() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickAndWaitForNewWindow() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickAndWaitForNewWindow(long) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickBottomRight() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickTopLeft() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean dragTo(androidx.test.uiautomator.UiObject, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean dragTo(int, int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean exists(); + method protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long); + method public android.graphics.Rect getBounds() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChild(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public int getChildCount() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public java.lang.String getClassName() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public java.lang.String getContentDescription() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getFromParent(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public java.lang.String getPackageName() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public final androidx.test.uiautomator.UiSelector getSelector(); + method public java.lang.String getText() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public android.graphics.Rect getVisibleBounds() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isCheckable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isChecked() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isClickable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isEnabled() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isFocusable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isFocused() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isLongClickable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isScrollable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isSelected() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean longClick() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean longClickBottomRight() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean longClickTopLeft() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean performMultiPointerGesture(android.view.MotionEvent.PointerCoords...); + method public boolean performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int); + method public boolean pinchIn(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean pinchOut(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean setText(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeDown(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeLeft(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeRight(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeUp(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean waitForExists(long); + method public boolean waitUntilGone(long); + field protected static final int FINGER_TOUCH_HALF_WIDTH = 20; // 0x14 + field protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5 + field protected static final deprecated long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L + field protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L + field protected static final deprecated long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L + field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL + } + + public class UiObject2 { + method public void clear(); + method public void click(); + method public void click(long); + method public R clickAndWait(androidx.test.uiautomator.EventCondition, long); + method public void drag(android.graphics.Point); + method public void drag(android.graphics.Point, int); + method public androidx.test.uiautomator.UiObject2 findObject(androidx.test.uiautomator.BySelector); + method public java.util.List findObjects(androidx.test.uiautomator.BySelector); + method public boolean fling(androidx.test.uiautomator.Direction); + method public boolean fling(androidx.test.uiautomator.Direction, int); + method public java.lang.String getApplicationPackage(); + method public int getChildCount(); + method public java.util.List getChildren(); + method public java.lang.String getClassName(); + method public java.lang.String getContentDescription(); + method public androidx.test.uiautomator.UiObject2 getParent(); + method public java.lang.String getResourceName(); + method public java.lang.String getText(); + method public android.graphics.Rect getVisibleBounds(); + method public android.graphics.Point getVisibleCenter(); + method public boolean hasObject(androidx.test.uiautomator.BySelector); + method public boolean isCheckable(); + method public boolean isChecked(); + method public boolean isClickable(); + method public boolean isEnabled(); + method public boolean isFocusable(); + method public boolean isFocused(); + method public boolean isLongClickable(); + method public boolean isScrollable(); + method public boolean isSelected(); + method public void longClick(); + method public void pinchClose(float); + method public void pinchClose(float, int); + method public void pinchOpen(float); + method public void pinchOpen(float, int); + method public void recycle(); + method public boolean scroll(androidx.test.uiautomator.Direction, float); + method public boolean scroll(androidx.test.uiautomator.Direction, float, int); + method public void setGestureMargin(int); + method public void setGestureMargins(int, int, int, int); + method public void setText(java.lang.String); + method public void swipe(androidx.test.uiautomator.Direction, float); + method public void swipe(androidx.test.uiautomator.Direction, float, int); + method public R wait(androidx.test.uiautomator.UiObject2Condition, long); + method public R wait(androidx.test.uiautomator.SearchCondition, long); + } + + public abstract class UiObject2Condition { + ctor public UiObject2Condition(); + } + + public class UiObjectNotFoundException extends java.lang.Exception { + ctor public UiObjectNotFoundException(java.lang.String); + ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable); + ctor public UiObjectNotFoundException(java.lang.Throwable); + } + + public class UiScrollable extends androidx.test.uiautomator.UiCollection { + ctor public UiScrollable(androidx.test.uiautomator.UiSelector); + method protected boolean exists(androidx.test.uiautomator.UiSelector); + method public boolean flingBackward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean flingForward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean flingToBeginning(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean flingToEnd(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByDescription(androidx.test.uiautomator.UiSelector, java.lang.String, boolean) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByText(androidx.test.uiautomator.UiSelector, java.lang.String, boolean) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public int getMaxSearchSwipes(); + method public double getSwipeDeadZonePercentage(); + method public boolean scrollBackward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollBackward(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollDescriptionIntoView(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollForward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollForward(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollIntoView(androidx.test.uiautomator.UiObject) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollIntoView(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollTextIntoView(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToBeginning(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToBeginning(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToEnd(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToEnd(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiScrollable setAsHorizontalList(); + method public androidx.test.uiautomator.UiScrollable setAsVerticalList(); + method public androidx.test.uiautomator.UiScrollable setMaxSearchSwipes(int); + method public androidx.test.uiautomator.UiScrollable setSwipeDeadZonePercentage(double); + } + + public class UiSelector { + ctor public UiSelector(); + method public androidx.test.uiautomator.UiSelector checkable(boolean); + method public androidx.test.uiautomator.UiSelector checked(boolean); + method public androidx.test.uiautomator.UiSelector childSelector(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiSelector className(java.lang.String); + method public androidx.test.uiautomator.UiSelector className(java.lang.Class); + method public androidx.test.uiautomator.UiSelector classNameMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector clickable(boolean); + method protected androidx.test.uiautomator.UiSelector cloneSelector(); + method public androidx.test.uiautomator.UiSelector description(java.lang.String); + method public androidx.test.uiautomator.UiSelector descriptionContains(java.lang.String); + method public androidx.test.uiautomator.UiSelector descriptionMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector descriptionStartsWith(java.lang.String); + method public androidx.test.uiautomator.UiSelector enabled(boolean); + method public androidx.test.uiautomator.UiSelector focusable(boolean); + method public androidx.test.uiautomator.UiSelector focused(boolean); + method public androidx.test.uiautomator.UiSelector fromParent(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiSelector index(int); + method public androidx.test.uiautomator.UiSelector instance(int); + method public androidx.test.uiautomator.UiSelector longClickable(boolean); + method public androidx.test.uiautomator.UiSelector packageName(java.lang.String); + method public androidx.test.uiautomator.UiSelector packageNameMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector resourceId(java.lang.String); + method public androidx.test.uiautomator.UiSelector resourceIdMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector scrollable(boolean); + method public androidx.test.uiautomator.UiSelector selected(boolean); + method public androidx.test.uiautomator.UiSelector text(java.lang.String); + method public androidx.test.uiautomator.UiSelector textContains(java.lang.String); + method public androidx.test.uiautomator.UiSelector textMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector textStartsWith(java.lang.String); + } + + public abstract interface UiWatcher { + method public abstract boolean checkForCondition(); + } + + public class Until { + ctor public Until(); + method public static androidx.test.uiautomator.UiObject2Condition checkable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition checked(boolean); + method public static androidx.test.uiautomator.UiObject2Condition clickable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition descContains(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descEndsWith(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descEquals(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descMatches(java.util.regex.Pattern); + method public static androidx.test.uiautomator.UiObject2Condition descMatches(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descStartsWith(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition enabled(boolean); + method public static androidx.test.uiautomator.SearchCondition findObject(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.SearchCondition> findObjects(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.UiObject2Condition focusable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition focused(boolean); + method public static androidx.test.uiautomator.SearchCondition gone(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.SearchCondition hasObject(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.UiObject2Condition longClickable(boolean); + method public static androidx.test.uiautomator.EventCondition newWindow(); + method public static androidx.test.uiautomator.EventCondition scrollFinished(androidx.test.uiautomator.Direction); + method public static androidx.test.uiautomator.UiObject2Condition scrollable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition selected(boolean); + method public static androidx.test.uiautomator.UiObject2Condition textContains(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textEndsWith(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textEquals(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textMatches(java.util.regex.Pattern); + method public static androidx.test.uiautomator.UiObject2Condition textMatches(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textNotEquals(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textStartsWith(java.lang.String); + } + +} + diff --git a/espresso/core/java/androidx/test/espresso/remote/api/3.4.0.txt b/espresso/core/java/androidx/test/espresso/remote/api/3.4.0.txt new file mode 100644 index 000000000..abae847aa --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/remote/api/3.4.0.txt @@ -0,0 +1,182 @@ + + +package androidx.test.espresso.remote { + + public abstract interface Bindable { + method public abstract android.os.IBinder getIBinder(); + method public abstract java.lang.String getId(); + method public abstract void setIBinder(android.os.IBinder); + } + + public final class ConstructorInvocation { + ctor public ConstructorInvocation(java.lang.Class, java.lang.Class, java.lang.Class...); + method public java.lang.Object invokeConstructor(java.lang.Object...); + } + + public abstract interface Converter { + method public abstract O convert(I); + } + + public final class EspressoRemote implements androidx.test.espresso.remote.RemoteInteraction { + method public synchronized java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); + method public synchronized java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public static androidx.test.espresso.remote.EspressoRemote getInstance(); + method public synchronized void init(); + method public synchronized boolean isRemoteProcess(); + method public synchronized void terminate(); + } + + public abstract interface EspressoRemoteMessage { + } + + public static abstract interface EspressoRemoteMessage.From { + method public abstract T fromProto(M); + } + + public static abstract interface EspressoRemoteMessage.To { + method public abstract M toProto(); + } + + public final class FieldDescriptor { + method public static androidx.test.espresso.remote.FieldDescriptor of(java.lang.Class, java.lang.String, int); + field public final java.lang.String fieldName; + field public final java.lang.Class fieldType; + field public final int order; + } + + public final class GenericRemoteMessage implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + ctor public GenericRemoteMessage(java.lang.Object); + method public com.google.protobuf.MessageLite toProto(); + field public static final androidx.test.espresso.remote.EspressoRemoteMessage.From FROM; + } + + public final class InteractionRequest implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public org.hamcrest.Matcher getRootMatcher(); + method public androidx.test.espresso.ViewAction getViewAction(); + method public androidx.test.espresso.ViewAssertion getViewAssertion(); + method public org.hamcrest.Matcher getViewMatcher(); + method public com.google.protobuf.MessageLite toProto(); + } + + public static class InteractionRequest.Builder { + ctor public Builder(); + method public androidx.test.espresso.remote.InteractionRequest build(); + method public androidx.test.espresso.remote.InteractionRequest.Builder setRequestProto(byte[]); + method public androidx.test.espresso.remote.InteractionRequest.Builder setRootMatcher(org.hamcrest.Matcher); + method public androidx.test.espresso.remote.InteractionRequest.Builder setViewAction(androidx.test.espresso.ViewAction); + method public androidx.test.espresso.remote.InteractionRequest.Builder setViewAssertion(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.remote.InteractionRequest.Builder setViewMatcher(org.hamcrest.Matcher); + } + + public final class InteractionResponse implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public androidx.test.espresso.remote.InteractionResponse.RemoteError getRemoteError(); + method public androidx.test.espresso.remote.InteractionResponse.Status getStatus(); + method public boolean hasRemoteError(); + method public com.google.protobuf.MessageLite toProto(); + } + + public static class InteractionResponse.Builder { + ctor public Builder(); + method public androidx.test.espresso.remote.InteractionResponse build(); + method public androidx.test.espresso.remote.InteractionResponse.Builder setRemoteError(androidx.test.espresso.remote.InteractionResponse.RemoteError); + method public androidx.test.espresso.remote.InteractionResponse.Builder setResultProto(byte[]); + method public androidx.test.espresso.remote.InteractionResponse.Builder setStatus(androidx.test.espresso.remote.InteractionResponse.Status); + } + + public static final class InteractionResponse.RemoteError { + method public int getCode(); + method public java.lang.String getDescription(); + field public static final int REMOTE_ESPRESSO_ERROR_CODE = 0; // 0x0 + field public static final int REMOTE_PROTOCOL_ERROR_CODE = 1; // 0x1 + } + + public static final class InteractionResponse.Status extends java.lang.Enum { + method public static androidx.test.espresso.remote.InteractionResponse.Status valueOf(java.lang.String); + method public static final androidx.test.espresso.remote.InteractionResponse.Status[] values(); + enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Error; + enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Ok; + } + + public final class NoRemoteEspressoInstanceException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public NoRemoteEspressoInstanceException(java.lang.String); + } + + public class NoopRemoteInteraction implements androidx.test.espresso.remote.RemoteInteraction { + ctor public NoopRemoteInteraction(); + method public java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); + method public java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public boolean isRemoteProcess(); + } + + public final class ProtoUtils { + method public static java.lang.String capitalizeFirstChar(java.lang.String); + method public static T checkedGetEnumForProto(int, java.lang.Class); + method public static java.util.List getFilteredFieldList(java.lang.Class, java.util.List) throws java.lang.NoSuchFieldException; + } + + public final class RemoteDescriptor { + method public java.util.List getInstanceFieldDescriptorList(); + method public java.lang.Class getInstanceType(); + method public java.lang.String getInstanceTypeName(); + method public java.lang.Class getProtoBuilderClass(); + method public com.google.protobuf.Parser getProtoParser(); + method public java.lang.Class getProtoType(); + method public java.lang.Class[] getRemoteConstrTypes(); + method public java.lang.Class getRemoteType(); + } + + public static final class RemoteDescriptor.Builder { + ctor public Builder(); + method public androidx.test.espresso.remote.RemoteDescriptor build(); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setInstanceFieldDescriptors(androidx.test.espresso.remote.FieldDescriptor...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setInstanceType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoBuilderType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoParser(com.google.protobuf.Parser); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setRemoteConstrTypes(java.lang.Class...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setRemoteType(java.lang.Class); + } + + public final class RemoteDescriptorRegistry { + method public androidx.test.espresso.remote.RemoteDescriptor argForInstanceType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor argForMsgType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor argForRemoteTypeUrl(java.lang.String); + method public static androidx.test.espresso.remote.RemoteDescriptorRegistry getInstance(); + method public boolean hasArgForInstanceType(java.lang.Class); + method public boolean registerRemoteTypeArgs(java.util.List); + method public void unregisterRemoteTypeArgs(java.util.List); + } + + public class RemoteEspressoException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public RemoteEspressoException(java.lang.String); + ctor public RemoteEspressoException(java.lang.String, java.lang.Throwable); + } + + public abstract interface RemoteInteraction { + method public abstract java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); + method public abstract java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public abstract boolean isRemoteProcess(); + field public static final java.lang.String BUNDLE_EXECUTION_STATUS = "executionStatus"; + } + + public class RemoteInteractionRegistry { + method public static androidx.test.espresso.remote.RemoteInteraction getInstance(); + method public static void registerInstance(androidx.test.espresso.remote.RemoteInteraction); + } + + public class RemoteProtocolException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public RemoteProtocolException(java.lang.String); + ctor public RemoteProtocolException(java.lang.String, java.lang.Throwable); + } + + public final class TypeProtoConverters { + method public static T anyToType(com.google.protobuf.Any); + method public static android.os.Parcelable byteStringToParcelable(com.google.protobuf.ByteString, java.lang.Class); + method public static T byteStringToType(com.google.protobuf.ByteString); + method public static com.google.protobuf.ByteString parcelableToByteString(android.os.Parcelable); + method public static com.google.protobuf.Any typeToAny(T); + method public static com.google.protobuf.ByteString typeToByteString(java.lang.Object); + } + +} + diff --git a/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/3.4.0.txt b/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/3.4.0.txt new file mode 100644 index 000000000..1b6577bfa --- /dev/null +++ b/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/3.4.0.txt @@ -0,0 +1,21 @@ + +package androidx.test.espresso.idling.concurrent { + + public class IdlingScheduledThreadPoolExecutor extends java.util.concurrent.ScheduledThreadPoolExecutor implements androidx.test.espresso.IdlingResource { + ctor public IdlingScheduledThreadPoolExecutor(java.lang.String, int, java.util.concurrent.ThreadFactory); + ctor public IdlingScheduledThreadPoolExecutor(java.lang.String, int, java.util.concurrent.ThreadFactory, boolean); + method public java.lang.String getName(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + + public class IdlingThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor implements androidx.test.espresso.IdlingResource { + ctor public IdlingThreadPoolExecutor(java.lang.String, int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory); + method public synchronized void execute(java.lang.Runnable); + method public java.lang.String getName(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + +} + diff --git a/espresso/idling_resource/java/androidx/test/espresso/api/3.4.0.txt b/espresso/idling_resource/java/androidx/test/espresso/api/3.4.0.txt new file mode 100644 index 000000000..3a329e1f4 --- /dev/null +++ b/espresso/idling_resource/java/androidx/test/espresso/api/3.4.0.txt @@ -0,0 +1,16 @@ + +package androidx.test.espresso.idling { + + public final class CountingIdlingResource implements androidx.test.espresso.IdlingResource { + ctor public CountingIdlingResource(java.lang.String); + ctor public CountingIdlingResource(java.lang.String, boolean); + method public void decrement(); + method public void dumpStateToLogs(); + method public java.lang.String getName(); + method public void increment(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + +} + diff --git a/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/3.4.0.txt b/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/3.4.0.txt new file mode 100644 index 000000000..9686a21e1 --- /dev/null +++ b/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/3.4.0.txt @@ -0,0 +1,21 @@ + + +package androidx.test.espresso.idling.net { + + public class UriIdlingResource implements androidx.test.espresso.IdlingResource { + ctor public UriIdlingResource(java.lang.String, long); + method public void beginLoad(java.lang.String); + method public void endLoad(java.lang.String); + method public java.lang.String getName(); + method public void ignoreUri(java.util.regex.Pattern); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + + public static abstract interface UriIdlingResource.HandlerIntf { + method public abstract void postDelayed(java.lang.Runnable, long); + method public abstract void removeCallbacks(java.lang.Runnable); + } + +} + diff --git a/espresso/intents/java/androidx/test/espresso/intent/api/3.4.0.txt b/espresso/intents/java/androidx/test/espresso/intent/api/3.4.0.txt new file mode 100644 index 000000000..f0a4c79ae --- /dev/null +++ b/espresso/intents/java/androidx/test/espresso/intent/api/3.4.0.txt @@ -0,0 +1,153 @@ + +package androidx.test.espresso.intent { + + public abstract interface ActivityResultFunction { + method public abstract android.app.Instrumentation.ActivityResult apply(android.content.Intent); + } + + public final class Checks { + method public static void checkArgument(boolean); + method public static void checkArgument(boolean, java.lang.Object); + method public static void checkArgument(boolean, java.lang.String, java.lang.Object...); + method public static T checkNotNull(T); + method public static T checkNotNull(T, java.lang.Object); + method public static T checkNotNull(T, java.lang.String, java.lang.Object...); + method public static void checkState(boolean, java.lang.Object); + method public static void checkState(boolean, java.lang.String, java.lang.Object...); + } + + public final class Intents { + method public static void assertNoUnverifiedIntents(); + method public static java.util.List getIntents(); + method public static void init(); + method public static void intended(org.hamcrest.Matcher); + method public static void intended(org.hamcrest.Matcher, androidx.test.espresso.intent.VerificationMode); + method public static androidx.test.espresso.intent.OngoingStubbing intending(org.hamcrest.Matcher); + method public static void release(); + method public static androidx.test.espresso.intent.VerificationMode times(int); + } + + public final class OngoingStubbing { + method public void respondWith(android.app.Instrumentation.ActivityResult); + method public void respondWithFunction(androidx.test.espresso.intent.ActivityResultFunction); + } + + public abstract interface ResettingStubber implements androidx.test.runner.intent.IntentStubber { + method public abstract void initialize(); + method public abstract boolean isInitialized(); + method public abstract void reset(); + method public abstract void setActivityResultForIntent(org.hamcrest.Matcher, android.app.Instrumentation.ActivityResult); + method public abstract void setActivityResultFunctionForIntent(org.hamcrest.Matcher, androidx.test.espresso.intent.ActivityResultFunction); + } + + public final class ResettingStubberImpl implements androidx.test.espresso.intent.ResettingStubber { + ctor public ResettingStubberImpl(); + method public android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + method public void initialize(); + method public boolean isInitialized(); + method public void reset(); + method public void setActivityResultForIntent(org.hamcrest.Matcher, android.app.Instrumentation.ActivityResult); + method public void setActivityResultFunctionForIntent(org.hamcrest.Matcher, androidx.test.espresso.intent.ActivityResultFunction); + } + + public abstract interface ResolvedIntent { + method public abstract boolean canBeHandledBy(java.lang.String); + method public abstract android.content.Intent getIntent(); + } + + public abstract interface VerifiableIntent implements androidx.test.espresso.intent.ResolvedIntent { + method public abstract boolean hasBeenVerified(); + method public abstract void markAsVerified(); + } + + public abstract interface VerificationMode { + method public abstract void verify(org.hamcrest.Matcher, java.util.List); + } + + public final class VerificationModes { + method public static androidx.test.espresso.intent.VerificationMode noUnverifiedIntents(); + method public static androidx.test.espresso.intent.VerificationMode times(int); + } + +} + +package androidx.test.espresso.intent.matcher { + + public final class BundleMatchers { + method public static org.hamcrest.Matcher hasEntry(java.lang.String, T); + method public static org.hamcrest.Matcher hasEntry(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasEntry(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasKey(java.lang.String); + method public static org.hamcrest.Matcher hasKey(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasValue(T); + method public static org.hamcrest.Matcher hasValue(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher isEmpty(); + method public static org.hamcrest.Matcher isEmptyOrNull(); + } + + public final class ComponentNameMatchers { + method public static org.hamcrest.Matcher hasClassName(java.lang.String); + method public static org.hamcrest.Matcher hasClassName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasMyPackageName(); + method public static org.hamcrest.Matcher hasPackageName(java.lang.String); + method public static org.hamcrest.Matcher hasPackageName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasShortClassName(java.lang.String); + method public static org.hamcrest.Matcher hasShortClassName(org.hamcrest.Matcher); + } + + public final class IntentMatchers { + method public static org.hamcrest.Matcher anyIntent(); + method public static org.hamcrest.Matcher filterEquals(android.content.Intent); + method public static org.hamcrest.Matcher hasAction(java.lang.String); + method public static org.hamcrest.Matcher hasAction(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasCategories(java.util.Set); + method public static org.hamcrest.Matcher hasCategories(org.hamcrest.Matcher>); + method public static org.hamcrest.Matcher hasComponent(java.lang.String); + method public static org.hamcrest.Matcher hasComponent(android.content.ComponentName); + method public static org.hamcrest.Matcher hasComponent(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasData(java.lang.String); + method public static org.hamcrest.Matcher hasData(android.net.Uri); + method public static org.hamcrest.Matcher hasData(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasDataString(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasExtra(java.lang.String, T); + method public static org.hamcrest.Matcher hasExtra(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasExtraWithKey(java.lang.String); + method public static org.hamcrest.Matcher hasExtraWithKey(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasExtras(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasFlag(int); + method public static org.hamcrest.Matcher hasFlags(int...); + method public static org.hamcrest.Matcher hasFlags(int); + method public static org.hamcrest.Matcher hasPackage(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasPackage(java.lang.String); + method public static org.hamcrest.Matcher hasType(java.lang.String); + method public static org.hamcrest.Matcher hasType(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher isInternal(); + method public static org.hamcrest.Matcher toPackage(java.lang.String); + } + + public final class UriMatchers { + method public static org.hamcrest.Matcher hasHost(java.lang.String); + method public static org.hamcrest.Matcher hasHost(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasParamWithName(java.lang.String); + method public static org.hamcrest.Matcher hasParamWithName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasParamWithValue(java.lang.String, java.lang.String); + method public static org.hamcrest.Matcher hasParamWithValue(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasPath(java.lang.String); + method public static org.hamcrest.Matcher hasPath(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasScheme(java.lang.String); + method public static org.hamcrest.Matcher hasScheme(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasSchemeSpecificPart(java.lang.String, java.lang.String); + method public static org.hamcrest.Matcher hasSchemeSpecificPart(org.hamcrest.Matcher, org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.intent.rule { + + public deprecated class IntentsTestRule extends androidx.test.rule.ActivityTestRule { + ctor public IntentsTestRule(java.lang.Class); + ctor public IntentsTestRule(java.lang.Class, boolean); + ctor public IntentsTestRule(java.lang.Class, boolean, boolean); + } + +} diff --git a/espresso/web/java/androidx/test/espresso/web/api/3.4.0.txt b/espresso/web/java/androidx/test/espresso/web/api/3.4.0.txt new file mode 100644 index 000000000..bdfc36acc --- /dev/null +++ b/espresso/web/java/androidx/test/espresso/web/api/3.4.0.txt @@ -0,0 +1,228 @@ + + +package androidx.test.espresso.web.action { + + public final class AtomAction implements androidx.test.espresso.remote.Bindable androidx.test.espresso.ViewAction { + ctor public AtomAction(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.WindowReference, androidx.test.espresso.web.model.ElementReference); + method public E get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; + method public E get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public java.util.concurrent.Future getFuture(); + method public android.os.IBinder getIBinder(); + method public java.lang.String getId(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + method public void setIBinder(android.os.IBinder); + } + + public class EnableJavascriptAction implements androidx.test.espresso.ViewAction { + ctor public EnableJavascriptAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface IAtomActionResultPropagator implements android.os.IInterface { + method public abstract void setError(android.os.Bundle) throws android.os.RemoteException; + method public abstract void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + + public static abstract class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + ctor public Stub(); + method public static androidx.test.espresso.web.action.IAtomActionResultPropagator asInterface(android.os.IBinder); + } + + public static class IAtomActionResultPropagator.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + method public void setError(android.os.Bundle) throws android.os.RemoteException; + method public void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + +} + +package androidx.test.espresso.web.assertion { + + public final class TagSoupDocumentParser { + method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; + method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException; + } + + public abstract class WebAssertion { + ctor public WebAssertion(androidx.test.espresso.web.model.Atom); + method protected abstract void checkResult(android.webkit.WebView, E); + method public final androidx.test.espresso.web.model.Atom getAtom(); + method public final androidx.test.espresso.ViewAssertion toViewAssertion(E); + } + + public final class WebViewAssertions { + method public static androidx.test.espresso.web.assertion.WebAssertion webContent(org.hamcrest.Matcher); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher); + } + + public static abstract interface WebViewAssertions.ResultDescriber { + method public abstract java.lang.String apply(E); + } + +} + +package androidx.test.espresso.web.matcher { + + public final class AmbiguousElementMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public AmbiguousElementMatcherException(java.lang.String); + } + + public final class DomMatchers { + method public static org.hamcrest.Matcher containingTextInBody(java.lang.String); + method public static org.hamcrest.Matcher elementById(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher elementByXPath(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasElementWithId(java.lang.String); + method public static org.hamcrest.Matcher hasElementWithXpath(java.lang.String); + method public static org.hamcrest.Matcher withBody(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTextContent(java.lang.String); + method public static org.hamcrest.Matcher withTextContent(org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.web.model { + + public abstract interface Atom { + method public abstract java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public abstract java.lang.String getScript(); + method public abstract R transform(androidx.test.espresso.web.model.Evaluation); + } + + public final class Atoms { + method public static androidx.test.espresso.web.model.TransformingAtom.Transformer castOrDie(java.lang.Class); + method public static androidx.test.espresso.web.model.Atom getCurrentUrl(); + method public static androidx.test.espresso.web.model.Atom getTitle(); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String); + method public static androidx.test.espresso.web.model.Atom scriptWithArgs(java.lang.String, java.util.List); + method public static androidx.test.espresso.web.model.Atom transform(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + } + + public final class ElementReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + + public final class Evaluation implements androidx.test.espresso.web.model.JSONAble android.os.Parcelable { + ctor protected Evaluation(android.os.Parcel); + method public int describeContents(); + method public java.lang.String getMessage(); + method public int getStatus(); + method public java.lang.Object getValue(); + method public boolean hasMessage(); + method public void readFromParcel(android.os.Parcel); + method public java.lang.String toJSONString(); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; + } + + public abstract interface JSONAble { + method public abstract java.lang.String toJSONString(); + } + + public static abstract interface JSONAble.DeJSONFactory { + method public abstract java.lang.Object attemptDeJSONize(java.util.Map); + } + + public final class ModelCodec { + method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + method public static androidx.test.espresso.web.model.Evaluation decodeEvaluation(java.lang.String); + method public static java.lang.String encode(java.lang.Object); + method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + } + + public class SimpleAtom implements androidx.test.espresso.web.model.Atom { + ctor public SimpleAtom(java.lang.String); + ctor public SimpleAtom(java.lang.String, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement); + method public final java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method protected java.util.List getNonContextualArguments(); + method public final java.lang.String getScript(); + method protected androidx.test.espresso.web.model.Evaluation handleBadEvaluation(androidx.test.espresso.web.model.Evaluation); + method protected void handleNoElementReference(); + method public final androidx.test.espresso.web.model.Evaluation transform(androidx.test.espresso.web.model.Evaluation); + } + + public static final class SimpleAtom.ElementReferencePlacement extends java.lang.Enum { + method public static androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement valueOf(java.lang.String); + method public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement[] values(); + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement FIRST; + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement LAST; + } + + public class TransformingAtom implements androidx.test.espresso.web.model.Atom { + ctor public TransformingAtom(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public java.lang.String getScript(); + method public O transform(androidx.test.espresso.web.model.Evaluation); + } + + public static abstract interface TransformingAtom.Transformer { + method public abstract O apply(I); + } + + public final class WindowReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + +} + +package androidx.test.espresso.web.sugar { + + public final class Web { + ctor public Web(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(org.hamcrest.Matcher); + } + + public static class Web.WebInteraction { + method public androidx.test.espresso.web.sugar.Web.WebInteraction check(androidx.test.espresso.web.assertion.WebAssertion); + method public androidx.test.espresso.web.sugar.Web.WebInteraction forceJavascriptEnabled(); + method public R get(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.WindowReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction perform(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction reset(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withContextualElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.ElementReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withNoTimeout(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withTimeout(long, java.util.concurrent.TimeUnit); + } + +} + +package androidx.test.espresso.web.webdriver { + + public final class DriverAtoms { + method public static androidx.test.espresso.web.model.Atom clearElement(); + method public static androidx.test.espresso.web.model.Atom findElement(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom> findMultipleElements(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom getText(); + method public static androidx.test.espresso.web.model.Atom selectActiveElement(); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom webClick(); + method public static androidx.test.espresso.web.model.Atom webKeys(java.lang.String); + method public static androidx.test.espresso.web.model.Atom webScrollIntoView(); + } + + public final class Locator extends java.lang.Enum { + method public java.lang.String getType(); + method public static androidx.test.espresso.web.webdriver.Locator valueOf(java.lang.String); + method public static final androidx.test.espresso.web.webdriver.Locator[] values(); + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CLASS_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CSS_SELECTOR; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator ID; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator PARTIAL_LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator TAG_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator XPATH; + } + +} diff --git a/ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt b/ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt new file mode 100644 index 000000000..3c7431f48 --- /dev/null +++ b/ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt @@ -0,0 +1,25 @@ + +package androidx.test.ext.junit.rules { + + public final class ActivityScenarioRule extends org.junit.rules.ExternalResource { + ctor public ActivityScenarioRule(java.lang.Class); + ctor public ActivityScenarioRule(java.lang.Class, android.os.Bundle); + ctor public ActivityScenarioRule(android.content.Intent); + ctor public ActivityScenarioRule(android.content.Intent, android.os.Bundle); + method public androidx.test.core.app.ActivityScenario getScenario(); + } + +} + +package androidx.test.ext.junit.runners { + + public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + +} + diff --git a/ext/truth/java/androidx/test/ext/truth/api/1.4.0.txt b/ext/truth/java/androidx/test/ext/truth/api/1.4.0.txt new file mode 100644 index 000000000..80d4b4272 --- /dev/null +++ b/ext/truth/java/androidx/test/ext/truth/api/1.4.0.txt @@ -0,0 +1,211 @@ + + +package androidx.test.ext.truth.app { + + public class NotificationActionSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationActionSubject assertThat(android.app.Notification.Action); + method public static com.google.common.truth.Subject.Factory notificationActions(); + method public final com.google.common.truth.StringSubject title(); + } + + public class NotificationSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationSubject assertThat(android.app.Notification); + method public final androidx.test.ext.truth.app.PendingIntentSubject contentIntent(); + method public final androidx.test.ext.truth.app.PendingIntentSubject deleteIntent(); + method public final void doesNotHaveFlags(int); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public final void hasFlags(int); + method public static com.google.common.truth.Subject.Factory notifications(); + method public final com.google.common.truth.StringSubject tickerText(); + } + + public class PendingIntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.PendingIntentSubject assertThat(android.app.PendingIntent); + method public static com.google.common.truth.Subject.Factory pendingIntents(); + } + +} + +package androidx.test.ext.truth.content { + + public final class IntentCorrespondences { + method public static com.google.common.truth.Correspondence action(); + method public static com.google.common.truth.Correspondence all(com.google.common.truth.Correspondence...); + method public static com.google.common.truth.Correspondence data(); + } + + public final class IntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.content.IntentSubject assertThat(android.content.Intent); + method public com.google.common.truth.IterableSubject categories(); + method public androidx.test.ext.truth.os.BundleSubject extras(); + method public void filtersEquallyTo(android.content.Intent); + method public void hasAction(java.lang.String); + method public void hasComponent(java.lang.String, java.lang.String); + method public void hasComponent(android.content.ComponentName); + method public void hasComponentClass(java.lang.Class); + method public void hasComponentClass(java.lang.String); + method public void hasComponentPackage(java.lang.String); + method public void hasData(android.net.Uri); + method public void hasFlags(int); + method public void hasNoAction(); + method public void hasPackage(java.lang.String); + method public void hasType(java.lang.String); + method public static com.google.common.truth.Subject.Factory intents(); + } + +} + +package androidx.test.ext.truth.location { + + public final class LocationCorrespondences { + method public static com.google.common.truth.Correspondence at(); + method public static com.google.common.truth.Correspondence equality(); + method public static com.google.common.truth.Correspondence nearby(float); + } + + public class LocationSubject extends com.google.common.truth.Subject { + method public com.google.common.truth.FloatSubject accuracy(); + method public com.google.common.truth.DoubleSubject altitude(); + method public static androidx.test.ext.truth.location.LocationSubject assertThat(android.location.Location); + method public com.google.common.truth.FloatSubject bearing(); + method public com.google.common.truth.FloatSubject bearingAccuracy(); + method public com.google.common.truth.FloatSubject bearingTo(double, double); + method public com.google.common.truth.FloatSubject bearingTo(android.location.Location); + method public com.google.common.truth.FloatSubject distanceTo(double, double); + method public com.google.common.truth.FloatSubject distanceTo(android.location.Location); + method public void doesNotHaveProvider(java.lang.String); + method public com.google.common.truth.LongSubject elapsedRealtimeMillis(); + method public com.google.common.truth.LongSubject elapsedRealtimeNanos(); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public void hasAccuracy(); + method public void hasAltitude(); + method public void hasBearing(); + method public void hasBearingAccuracy(); + method public void hasProvider(java.lang.String); + method public void hasSpeed(); + method public void hasSpeedAccuracy(); + method public void hasVerticalAccuracy(); + method public void isAt(android.location.Location); + method public void isAt(double, double); + method public void isFaraway(android.location.Location, float); + method public void isMock(); + method public void isNearby(android.location.Location, float); + method public void isNotAt(android.location.Location); + method public void isNotAt(double, double); + method public void isNotMock(); + method public static com.google.common.truth.Subject.Factory locations(); + method public com.google.common.truth.FloatSubject speed(); + method public com.google.common.truth.FloatSubject speedAccuracy(); + method public com.google.common.truth.LongSubject time(); + method public com.google.common.truth.FloatSubject verticalAccuracy(); + } + +} + +package androidx.test.ext.truth.os { + + public final class BundleSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.BundleSubject assertThat(android.os.Bundle); + method public com.google.common.truth.BooleanSubject bool(java.lang.String); + method public static com.google.common.truth.Subject.Factory bundles(); + method public void containsKey(java.lang.String); + method public void doesNotContainKey(java.lang.String); + method public void hasSize(int); + method public com.google.common.truth.IntegerSubject integer(java.lang.String); + method public void isEmpty(); + method public void isNotEmpty(); + method public com.google.common.truth.LongSubject longInt(java.lang.String); + method public androidx.test.ext.truth.os.ParcelableSubject parcelable(java.lang.String); + method public com.google.common.truth.IterableSubject parcelableArrayList(java.lang.String); + method public SubjectT parcelableAsType(java.lang.String, com.google.common.truth.Subject.Factory); + method public com.google.common.truth.StringSubject string(java.lang.String); + method public com.google.common.truth.IterableSubject stringArrayList(java.lang.String); + } + + public final class ParcelableSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.ParcelableSubject assertThat(T); + method public static com.google.common.truth.Subject.Factory, T> parcelables(); + method public void recreatesEqual(android.os.Parcelable.Creator); + } + +} + +package androidx.test.ext.truth.view { + + public final class MotionEventSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.MotionEventSubject assertThat(android.view.MotionEvent); + method public void hasAction(int); + method public void hasActionButton(int); + method public void hasButtonState(int); + method public void hasDeviceId(int); + method public void hasDownTime(long); + method public void hasEdgeFlags(int); + method public void hasEventTime(long); + method public void hasFlags(int); + method public void hasHistorySize(int); + method public void hasMetaState(int); + method public void hasPointerCount(int); + method public com.google.common.truth.LongSubject historicalEventTime(int); + method public com.google.common.truth.FloatSubject historicalOrientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject historicalPointerCoords(int, int); + method public com.google.common.truth.FloatSubject historicalPressure(int); + method public com.google.common.truth.FloatSubject historicalSize(int); + method public com.google.common.truth.FloatSubject historicalToolMajor(int); + method public com.google.common.truth.FloatSubject historicalToolMinor(int); + method public com.google.common.truth.FloatSubject historicalTouchMajor(int); + method public com.google.common.truth.FloatSubject historicalTouchMinor(int); + method public com.google.common.truth.FloatSubject historicalX(int); + method public com.google.common.truth.FloatSubject historicalY(int); + method public static com.google.common.truth.Subject.Factory motionEvents(); + method public com.google.common.truth.FloatSubject orientation(); + method public com.google.common.truth.FloatSubject orientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject pointerCoords(int); + method public com.google.common.truth.IntegerSubject pointerId(int); + method public androidx.test.ext.truth.view.PointerPropertiesSubject pointerProperties(int); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject pressure(int); + method public com.google.common.truth.FloatSubject rawX(); + method public com.google.common.truth.FloatSubject rawY(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject size(int); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMajor(int); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject toolMinor(int); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMajor(int); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject touchMinor(int); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject x(int); + method public com.google.common.truth.FloatSubject xPrecision(); + method public com.google.common.truth.FloatSubject y(); + method public com.google.common.truth.FloatSubject y(int); + method public com.google.common.truth.FloatSubject yPrecision(); + } + + public final class PointerCoordsSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerCoordsSubject assertThat(android.view.MotionEvent.PointerCoords); + method public com.google.common.truth.FloatSubject axisValue(int); + method public com.google.common.truth.FloatSubject orientation(); + method public static com.google.common.truth.Subject.Factory pointerCoords(); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject y(); + } + + public final class PointerPropertiesSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerPropertiesSubject assertThat(android.view.MotionEvent.PointerProperties); + method public void hasId(int); + method public void hasToolType(int); + method public void isEqualTo(android.view.MotionEvent.PointerProperties); + method public static com.google.common.truth.Subject.Factory pointerProperties(); + } + +} + diff --git a/ktx/core/java/androidx/test/core/api/1.4.0.txt b/ktx/core/java/androidx/test/core/api/1.4.0.txt new file mode 100644 index 000000000..e69de29bb diff --git a/ktx/ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt b/ktx/ext/junit/java/androidx/test/ext/junit/api/1.1.3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/runner/android_junit_runner/java/androidx/test/api/1.4.0.txt b/runner/android_junit_runner/java/androidx/test/api/1.4.0.txt new file mode 100644 index 000000000..93082a191 --- /dev/null +++ b/runner/android_junit_runner/java/androidx/test/api/1.4.0.txt @@ -0,0 +1,90 @@ + +package androidx.test.runner { + + public final deprecated class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class, androidx.test.internal.util.AndroidRunnerParams) throws org.junit.runners.model.InitializationError; + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + + public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation implements androidx.test.internal.events.client.TestEventClientConnectListener { + ctor public AndroidJUnitRunner(); + method public void onTestEventClientConnect(); + } +} + + +package androidx.test.runner.permission { + + public class PermissionRequester implements androidx.test.internal.platform.content.PermissionGranter { + ctor public PermissionRequester(); + method public void addPermissions(java.lang.String...); + method public void requestPermissions(); + method protected void setAndroidRuntimeVersion(int); + } + + public abstract class RequestPermissionCallable implements java.util.concurrent.Callable { + ctor public RequestPermissionCallable(androidx.test.runner.permission.ShellCommand, android.content.Context, java.lang.String); + method protected java.lang.String getPermission(); + method protected androidx.test.runner.permission.ShellCommand getShellCommand(); + method protected boolean isPermissionGranted(); + } + + public static final class RequestPermissionCallable.Result extends java.lang.Enum { + method public static androidx.test.runner.permission.RequestPermissionCallable.Result valueOf(java.lang.String); + method public static final androidx.test.runner.permission.RequestPermissionCallable.Result[] values(); + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result FAILURE; + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result SUCCESS; + } + + public abstract class ShellCommand { + ctor public ShellCommand(); + } + +} + +package androidx.test.runner.screenshot { + + public class BasicScreenCaptureProcessor implements androidx.test.runner.screenshot.ScreenCaptureProcessor { + ctor public BasicScreenCaptureProcessor(); + method protected java.lang.String getDefaultFilename(); + method protected java.lang.String getFilename(java.lang.String); + method public java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + field protected java.lang.String mDefaultFilenamePrefix; + field protected java.io.File mDefaultScreenshotPath; + field protected java.lang.String mFileNameDelimiter; + field protected java.lang.String mTag; + } + + public final class ScreenCapture { + method public android.graphics.Bitmap getBitmap(); + method public android.graphics.Bitmap.CompressFormat getFormat(); + method public java.lang.String getName(); + method public void process() throws java.io.IOException; + method public void process(java.util.Set) throws java.io.IOException; + method public androidx.test.runner.screenshot.ScreenCapture setFormat(android.graphics.Bitmap.CompressFormat); + method public androidx.test.runner.screenshot.ScreenCapture setName(java.lang.String); + } + + public abstract interface ScreenCaptureProcessor { + method public abstract java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + } + + public final class Screenshot { + ctor public Screenshot(); + method public static void addScreenCaptureProcessors(java.util.Set); + method public static androidx.test.runner.screenshot.ScreenCapture capture() throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.app.Activity) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.view.View) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static void setScreenshotProcessors(java.util.Set); + } + + public class UiAutomationWrapper { + method public android.graphics.Bitmap takeScreenshot(); + } + +} + diff --git a/runner/monitor/java/androidx/test/api/1.4.0.txt b/runner/monitor/java/androidx/test/api/1.4.0.txt new file mode 100644 index 000000000..824520630 --- /dev/null +++ b/runner/monitor/java/androidx/test/api/1.4.0.txt @@ -0,0 +1,192 @@ +package androidx.test { + + public final deprecated class InstrumentationRegistry { + method public static deprecated android.os.Bundle getArguments(); + method public static deprecated android.content.Context getContext(); + method public static deprecated android.app.Instrumentation getInstrumentation(); + method public static deprecated android.content.Context getTargetContext(); + method public static deprecated void registerInstance(android.app.Instrumentation, android.os.Bundle); + } + +} + +package androidx.test.annotation { + + public abstract class Beta implements java.lang.annotation.Annotation { + } + +} + + +package androidx.test.platform { + + public abstract interface TestFrameworkException { + } + +} + +package androidx.test.platform.app { + + public final class InstrumentationRegistry { + method public static android.os.Bundle getArguments(); + method public static android.app.Instrumentation getInstrumentation(); + method public static void registerInstance(android.app.Instrumentation, android.os.Bundle); + } + +} + +package androidx.test.platform.ui { + + public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { + ctor public InjectEventSecurityException(java.lang.String); + ctor public InjectEventSecurityException(java.lang.Throwable); + ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + } + + public abstract interface UiController { + method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectString(java.lang.String) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract void loopMainThreadForAtLeast(long); + method public abstract void loopMainThreadUntilIdle(); + } + +} + + +package androidx.test.runner { + + + public class MonitoringInstrumentation extends androidx.test.internal.runner.hidden.ExposedInstrumentationApi { + ctor public MonitoringInstrumentation(); + method protected void dumpThreadStateToOutputs(java.lang.String); + method protected java.lang.String getThreadState(); + method protected void installMultidex(); + method protected void installOldMultiDex(java.lang.Class) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; + method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory); + method protected deprecated boolean isPrimaryInstrProcess(java.lang.String); + method protected final boolean isPrimaryInstrProcess(); + method protected void restoreUncaughtExceptionHandler(); + method protected final void setJsBridgeClassName(java.lang.String); + method protected boolean shouldWaitForActivitiesToComplete(); + method protected void specifyDexMakerCacheProperty(); + method public void useDefaultInterceptingActivityFactory(); + method protected void waitForActivitiesToComplete(); + } + + public class MonitoringInstrumentation.ActivityFinisher implements java.lang.Runnable { + ctor public ActivityFinisher(); + method public void run(); + } + + public class UsageTrackerFacilitator implements androidx.test.internal.runner.tracker.UsageTracker { + ctor public UsageTrackerFacilitator(androidx.test.internal.runner.RunnerArgs); + ctor public UsageTrackerFacilitator(boolean); + method public void registerUsageTracker(androidx.test.internal.runner.tracker.UsageTracker); + method public void sendUsages(); + method public boolean shouldTrackUsage(); + method public void trackUsage(java.lang.String, java.lang.String); + } + +} + +package androidx.test.runner.intent { + + public abstract interface IntentCallback { + method public abstract void onIntentSent(android.content.Intent); + } + + public abstract interface IntentMonitor { + method public abstract void addIntentCallback(androidx.test.runner.intent.IntentCallback); + method public abstract void removeIntentCallback(androidx.test.runner.intent.IntentCallback); + } + + public final class IntentMonitorRegistry { + method public static androidx.test.runner.intent.IntentMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.intent.IntentMonitor); + } + + public abstract interface IntentStubber { + method public abstract android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + } + + public final class IntentStubberRegistry { + method public static androidx.test.runner.intent.IntentStubber getInstance(); + method public static boolean isLoaded(); + method public static void load(androidx.test.runner.intent.IntentStubber); + method public static synchronized void reset(); + } + +} + +package androidx.test.runner.intercepting { + + public abstract interface InterceptingActivityFactory { + method public abstract android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method public abstract boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + + public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { + ctor public SingleActivityFactory(java.lang.Class); + method public final android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method protected abstract T create(android.content.Intent); + method public final java.lang.Class getActivityClassToIntercept(); + method public final boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + +} + +package androidx.test.runner.lifecycle { + + public abstract interface ActivityLifecycleCallback { + method public abstract void onActivityLifecycleChanged(android.app.Activity, androidx.test.runner.lifecycle.Stage); + } + + public abstract interface ActivityLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + method public abstract java.util.Collection getActivitiesInStage(androidx.test.runner.lifecycle.Stage); + method public abstract androidx.test.runner.lifecycle.Stage getLifecycleStageOf(android.app.Activity); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + } + + public final class ActivityLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + } + + public abstract interface ApplicationLifecycleCallback { + method public abstract void onApplicationLifecycleChanged(android.app.Application, androidx.test.runner.lifecycle.ApplicationStage); + } + + public abstract interface ApplicationLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + } + + public final class ApplicationLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor); + } + + public final class ApplicationStage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.ApplicationStage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.ApplicationStage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage PRE_ON_CREATE; + } + + public final class Stage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.Stage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.Stage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.Stage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.Stage DESTROYED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PAUSED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PRE_ON_CREATE; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESTARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESUMED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STOPPED; + } + +} + diff --git a/runner/rules/java/androidx/test/api/1.4.0.txt b/runner/rules/java/androidx/test/api/1.4.0.txt new file mode 100644 index 000000000..878c6dea8 --- /dev/null +++ b/runner/rules/java/androidx/test/api/1.4.0.txt @@ -0,0 +1,93 @@ +package androidx.test.annotation { + + public abstract class UiThreadTest implements java.lang.annotation.Annotation { + } + +} + +package androidx.test.rule { + + public deprecated class ActivityTestRule implements org.junit.rules.TestRule { + ctor public ActivityTestRule(java.lang.Class); + ctor public ActivityTestRule(java.lang.Class, boolean); + ctor public ActivityTestRule(java.lang.Class, boolean, boolean); + ctor public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory, boolean, boolean); + ctor public ActivityTestRule(java.lang.Class, java.lang.String, int, boolean, boolean); + method protected void afterActivityFinished(); + method protected void afterActivityLaunched(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeActivityLaunched(); + method public void finishActivity(); + method public T getActivity(); + method protected android.content.Intent getActivityIntent(); + method public android.app.Instrumentation.ActivityResult getActivityResult(); + method public T launchActivity(android.content.Intent); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + } + + public class DisableOnAndroidDebug implements org.junit.rules.TestRule { + ctor public DisableOnAndroidDebug(org.junit.rules.TestRule); + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public boolean isDebugging(); + } + + public class GrantPermissionRule implements org.junit.rules.TestRule { + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public static androidx.test.rule.GrantPermissionRule grant(java.lang.String...); + } + + public class ServiceTestRule implements org.junit.rules.TestRule { + ctor public ServiceTestRule(); + ctor protected ServiceTestRule(long, java.util.concurrent.TimeUnit); + method protected void afterService(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeService(); + method public android.os.IBinder bindService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public android.os.IBinder bindService(android.content.Intent, android.content.ServiceConnection, int) throws java.util.concurrent.TimeoutException; + method public void startService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public void unbindService(); + method public static androidx.test.rule.ServiceTestRule withTimeout(long, java.util.concurrent.TimeUnit); + } + + public deprecated class UiThreadTestRule implements org.junit.rules.TestRule { + ctor public UiThreadTestRule(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + method protected boolean shouldRunOnUiThread(org.junit.runner.Description); + } + +} + +package androidx.test.rule.logging { + + public class AtraceLogger { + method public void atraceStart(java.util.Set, int, int, java.io.File, java.lang.String) throws java.io.IOException; + method public void atraceStop() throws java.io.IOException, java.lang.InterruptedException; + method public static androidx.test.rule.logging.AtraceLogger getAtraceLoggerInstance(android.app.Instrumentation); + } + +} + +package androidx.test.rule.provider { + + public class ProviderTestRule implements org.junit.rules.TestRule { + method protected void afterProviderCleanedUp(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeProviderSetup(); + method public android.content.ContentResolver getResolver(); + method public void revokePermission(java.lang.String); + method public void runDatabaseCommands(java.lang.String, java.lang.String...); + } + + public static class ProviderTestRule.Builder { + ctor public Builder(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule.Builder addProvider(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule build(); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommands(java.lang.String, java.lang.String...); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommandsFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setPrefix(java.lang.String); + } + +} + diff --git a/services/storage/java/androidx/test/services/storage/api/1.4.0.txt b/services/storage/java/androidx/test/services/storage/api/1.4.0.txt new file mode 100644 index 000000000..e69de29bb From b3886c9bb8ec2b4d3cf9355a7fcc7c9dc9e346e1 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Thu, 2 Sep 2021 11:15:52 -0700 Subject: [PATCH 006/949] Temporarily baseline the current API definition to last stable release. This is done for ease of comparison once the new metalava generation is enabled. PiperOrigin-RevId: 394502872 --- .../espresso/accessibility/api/current.txt | 12 + .../test/espresso/contrib/api/current.txt | 68 + .../androidx/test/espresso/api/current.txt | 2086 +++++++++++++++++ .../test/espresso/remote/api/current.txt | 182 ++ .../idling/concurrent/api/current.txt | 21 + .../androidx/test/espresso/api/current.txt | 16 + .../test/espresso/idling/net/api/current.txt | 21 + .../test/espresso/intent/api/current.txt | 153 ++ .../test/espresso/web/api/current.txt | 228 ++ .../androidx/test/ext/junit/api/current.txt | 25 + .../androidx/test/ext/truth/api/current.txt | 211 ++ .../java/androidx/test/api/current.txt | 90 + .../java/androidx/test/api/current.txt | 192 ++ .../rules/java/androidx/test/api/current.txt | 93 + .../test/services/storage/api/current.txt | 0 15 files changed, 3398 insertions(+) create mode 100644 espresso/accessibility/java/androidx/test/espresso/accessibility/api/current.txt create mode 100644 espresso/contrib/java/androidx/test/espresso/contrib/api/current.txt create mode 100644 espresso/core/java/androidx/test/espresso/api/current.txt create mode 100644 espresso/core/java/androidx/test/espresso/remote/api/current.txt create mode 100644 espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt create mode 100644 espresso/idling_resource/java/androidx/test/espresso/api/current.txt create mode 100644 espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt create mode 100644 espresso/intents/java/androidx/test/espresso/intent/api/current.txt create mode 100644 espresso/web/java/androidx/test/espresso/web/api/current.txt create mode 100644 ext/junit/java/androidx/test/ext/junit/api/current.txt create mode 100644 ext/truth/java/androidx/test/ext/truth/api/current.txt create mode 100644 runner/android_junit_runner/java/androidx/test/api/current.txt create mode 100644 runner/monitor/java/androidx/test/api/current.txt create mode 100644 runner/rules/java/androidx/test/api/current.txt create mode 100644 services/storage/java/androidx/test/services/storage/api/current.txt diff --git a/espresso/accessibility/java/androidx/test/espresso/accessibility/api/current.txt b/espresso/accessibility/java/androidx/test/espresso/accessibility/api/current.txt new file mode 100644 index 000000000..accab6815 --- /dev/null +++ b/espresso/accessibility/java/androidx/test/espresso/accessibility/api/current.txt @@ -0,0 +1,12 @@ + + +package androidx.test.espresso.accessibility { + + public final class AccessibilityChecks { + method public static androidx.test.espresso.ViewAssertion accessibilityAssertion(); + method public static void disable(); + method public static com.google.android.apps.common.testing.accessibility.framework.integrations.espresso.AccessibilityValidator enable(); + } + +} + diff --git a/espresso/contrib/java/androidx/test/espresso/contrib/api/current.txt b/espresso/contrib/java/androidx/test/espresso/contrib/api/current.txt new file mode 100644 index 000000000..10da1c03e --- /dev/null +++ b/espresso/contrib/java/androidx/test/espresso/contrib/api/current.txt @@ -0,0 +1,68 @@ +package androidx.test.espresso.contrib { + + public final deprecated class AccessibilityChecks { + method public static androidx.test.espresso.ViewAssertion accessibilityAssertion(); + method public static com.google.android.apps.common.testing.accessibility.framework.integrations.espresso.AccessibilityValidator enable(); + } + + public final class ActivityResultMatchers { + method public static org.hamcrest.Matcher hasResultCode(int); + method public static org.hamcrest.Matcher hasResultData(org.hamcrest.Matcher); + } + + public final class DrawerActions { + method public static androidx.test.espresso.ViewAction close(); + method public static androidx.test.espresso.ViewAction close(int); + method public static deprecated void closeDrawer(int); + method public static deprecated void closeDrawer(int, int); + method public static androidx.test.espresso.ViewAction open(); + method public static androidx.test.espresso.ViewAction open(int); + method public static deprecated void openDrawer(int); + method public static deprecated void openDrawer(int, int); + } + + public final class DrawerMatchers { + method public static org.hamcrest.Matcher isClosed(int); + method public static org.hamcrest.Matcher isClosed(); + method public static org.hamcrest.Matcher isOpen(int); + method public static org.hamcrest.Matcher isOpen(); + } + + public final class NavigationViewActions { + method public static androidx.test.espresso.ViewAction navigateTo(int); + } + + public final class PickerActions { + method public static androidx.test.espresso.ViewAction setDate(int, int, int); + method public static androidx.test.espresso.ViewAction setTime(int, int); + } + + public final class RecyclerViewActions { + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction actionOnHolderItem(org.hamcrest.Matcher, androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction actionOnItem(org.hamcrest.Matcher, androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.ViewAction actionOnItemAtPosition(int, androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction scrollTo(org.hamcrest.Matcher); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction scrollToHolder(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction scrollToPosition(int); + } + + public static abstract interface RecyclerViewActions.PositionableRecyclerViewAction implements androidx.test.espresso.ViewAction { + method public abstract androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction atPosition(int); + } + + public final class ViewPagerActions { + method public static androidx.test.espresso.ViewAction clickBetweenTwoTitles(java.lang.String, java.lang.String); + method public static androidx.test.espresso.ViewAction scrollLeft(); + method public static androidx.test.espresso.ViewAction scrollLeft(boolean); + method public static androidx.test.espresso.ViewAction scrollRight(); + method public static androidx.test.espresso.ViewAction scrollRight(boolean); + method public static androidx.test.espresso.ViewAction scrollToFirst(); + method public static androidx.test.espresso.ViewAction scrollToFirst(boolean); + method public static androidx.test.espresso.ViewAction scrollToLast(); + method public static androidx.test.espresso.ViewAction scrollToLast(boolean); + method public static androidx.test.espresso.ViewAction scrollToPage(int); + method public static androidx.test.espresso.ViewAction scrollToPage(int, boolean); + } + +} + diff --git a/espresso/core/java/androidx/test/espresso/api/current.txt b/espresso/core/java/androidx/test/espresso/api/current.txt new file mode 100644 index 000000000..bbda40337 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/api/current.txt @@ -0,0 +1,2086 @@ + +package androidx.test.espresso { + + public final class AmbiguousViewMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + } + + public static class AmbiguousViewMatcherException.Builder { + ctor public Builder(); + method public androidx.test.espresso.AmbiguousViewMatcherException build(); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder from(androidx.test.espresso.AmbiguousViewMatcherException); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder includeViewHierarchy(boolean); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withOtherAmbiguousViews(android.view.View...); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withRootView(android.view.View); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withView1(android.view.View); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withView2(android.view.View); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withViewMatcher(org.hamcrest.Matcher); + } + + public final class AppNotIdleException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public static deprecated androidx.test.espresso.AppNotIdleException create(java.util.List, int, int); + method public static androidx.test.espresso.AppNotIdleException create(java.util.List, java.lang.String); + } + + public class DataInteraction { + method public androidx.test.espresso.DataInteraction atPosition(java.lang.Integer); + method public androidx.test.espresso.ViewInteraction check(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.DataInteraction inAdapterView(org.hamcrest.Matcher); + method public androidx.test.espresso.DataInteraction inRoot(org.hamcrest.Matcher); + method public androidx.test.espresso.DataInteraction onChildView(org.hamcrest.Matcher); + method public androidx.test.espresso.ViewInteraction perform(androidx.test.espresso.ViewAction...); + method public androidx.test.espresso.DataInteraction usingAdapterViewProtocol(androidx.test.espresso.action.AdapterViewProtocol); + } + + public static final class DataInteraction.DisplayDataMatcher extends org.hamcrest.TypeSafeMatcher { + method public void describeTo(org.hamcrest.Description); + method public static androidx.test.espresso.DataInteraction.DisplayDataMatcher displayDataMatcher(org.hamcrest.Matcher, org.hamcrest.Matcher, org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional, androidx.test.espresso.action.AdapterViewProtocol); + method public boolean matchesSafely(android.view.View); + } + + public final class Espresso { + method public static void closeSoftKeyboard(); + method public static deprecated java.util.List getIdlingResources(); + method public static androidx.test.espresso.DataInteraction onData(org.hamcrest.Matcher); + method public static T onIdle(java.util.concurrent.Callable); + method public static void onIdle(); + method public static androidx.test.espresso.ViewInteraction onView(org.hamcrest.Matcher); + method public static void openActionBarOverflowOrOptionsMenu(android.content.Context); + method public static void openContextualActionModeOverflowMenu(); + method public static void pressBack(); + method public static void pressBackUnconditionally(); + method public static deprecated boolean registerIdlingResources(androidx.test.espresso.IdlingResource...); + method public static deprecated void registerLooperAsIdlingResource(android.os.Looper); + method public static deprecated void registerLooperAsIdlingResource(android.os.Looper, boolean); + method public static void setFailureHandler(androidx.test.espresso.FailureHandler); + method public static deprecated boolean unregisterIdlingResources(androidx.test.espresso.IdlingResource...); + } + + public abstract interface EspressoException implements androidx.test.platform.TestFrameworkException { + } + + public abstract interface FailureHandler { + method public abstract void handle(java.lang.Throwable, org.hamcrest.Matcher); + } + + public final class IdlingPolicies { + method public static androidx.test.espresso.IdlingPolicy getDynamicIdlingResourceErrorPolicy(); + method public static androidx.test.espresso.IdlingPolicy getDynamicIdlingResourceWarningPolicy(); + method public static androidx.test.espresso.IdlingPolicy getMasterIdlingPolicy(); + method public static void setIdlingResourceTimeout(long, java.util.concurrent.TimeUnit); + method public static void setMasterPolicyTimeout(long, java.util.concurrent.TimeUnit); + method public static void setMasterPolicyTimeoutWhenDebuggerAttached(boolean); + } + + public final class IdlingPolicy { + method public boolean getDisableOnTimeout(); + method public long getIdleTimeout(); + method public java.util.concurrent.TimeUnit getIdleTimeoutUnit(); + method public boolean getTimeoutIfDebuggerAttached(); + method public void handleTimeout(java.util.List, java.lang.String); + } + + public final class IdlingRegistry { + method public static androidx.test.espresso.IdlingRegistry getInstance(); + method public java.util.Collection getLoopers(); + method public java.util.Collection getResources(); + method public boolean register(androidx.test.espresso.IdlingResource...); + method public void registerLooperAsIdlingResource(android.os.Looper); + method public boolean unregister(androidx.test.espresso.IdlingResource...); + method public boolean unregisterLooperAsIdlingResource(android.os.Looper); + } + + public abstract interface IdlingResource { + method public abstract java.lang.String getName(); + method public abstract boolean isIdleNow(); + method public abstract void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + + public static abstract interface IdlingResource.ResourceCallback { + method public abstract void onTransitionToIdle(); + } + + public final class IdlingResourceTimeoutException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public IdlingResourceTimeoutException(java.util.List); + } + + public final class InjectEventSecurityException extends androidx.test.platform.ui.InjectEventSecurityException implements androidx.test.espresso.EspressoException { + ctor public InjectEventSecurityException(java.lang.String); + ctor public InjectEventSecurityException(java.lang.Throwable); + ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + } + + public final class NoActivityResumedException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public NoActivityResumedException(java.lang.String); + ctor public NoActivityResumedException(java.lang.String, java.lang.Throwable); + } + + public final class NoMatchingRootException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public static androidx.test.espresso.NoMatchingRootException create(org.hamcrest.Matcher, java.util.List); + } + + public final class NoMatchingViewException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public java.lang.String getViewMatcherDescription(); + } + + public static class NoMatchingViewException.Builder { + ctor public Builder(); + method public androidx.test.espresso.NoMatchingViewException build(); + method public androidx.test.espresso.NoMatchingViewException.Builder from(androidx.test.espresso.NoMatchingViewException); + method public androidx.test.espresso.NoMatchingViewException.Builder includeViewHierarchy(boolean); + method public androidx.test.espresso.NoMatchingViewException.Builder withAdapterViewWarning(androidx.test.espresso.util.EspressoOptional); + method public androidx.test.espresso.NoMatchingViewException.Builder withAdapterViews(java.util.List); + method public androidx.test.espresso.NoMatchingViewException.Builder withCause(java.lang.Throwable); + method public androidx.test.espresso.NoMatchingViewException.Builder withRootView(android.view.View); + method public androidx.test.espresso.NoMatchingViewException.Builder withViewMatcher(org.hamcrest.Matcher); + } + + public final class PerformException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + method public java.lang.String getActionDescription(); + method public java.lang.String getViewDescription(); + } + + public static class PerformException.Builder { + ctor public Builder(); + method public androidx.test.espresso.PerformException build(); + method public androidx.test.espresso.PerformException.Builder from(androidx.test.espresso.PerformException); + method public androidx.test.espresso.PerformException.Builder withActionDescription(java.lang.String); + method public androidx.test.espresso.PerformException.Builder withCause(java.lang.Throwable); + method public androidx.test.espresso.PerformException.Builder withViewDescription(java.lang.String); + } + + public final class Root { + method public android.view.View getDecorView(); + method public androidx.test.espresso.util.EspressoOptional getWindowLayoutParams(); + method public boolean isReady(); + } + + public static class Root.Builder { + ctor public Builder(); + method public androidx.test.espresso.Root build(); + method public androidx.test.espresso.Root.Builder withDecorView(android.view.View); + method public androidx.test.espresso.Root.Builder withWindowLayoutParams(android.view.WindowManager.LayoutParams); + } + + public abstract interface UiController { + method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.espresso.InjectEventSecurityException; + method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.espresso.InjectEventSecurityException; + method public default boolean injectMotionEventSequence(java.lang.Iterable) throws androidx.test.espresso.InjectEventSecurityException; + method public abstract boolean injectString(java.lang.String) throws androidx.test.espresso.InjectEventSecurityException; + method public abstract void loopMainThreadForAtLeast(long); + method public abstract void loopMainThreadUntilIdle(); + } + + public abstract interface ViewAction { + method public abstract org.hamcrest.Matcher getConstraints(); + method public abstract java.lang.String getDescription(); + method public abstract void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface ViewAssertion { + method public abstract void check(android.view.View, androidx.test.espresso.NoMatchingViewException); + } + + public abstract interface ViewFinder { + method public abstract android.view.View getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; + } + + public final class ViewInteraction { + method public androidx.test.espresso.ViewInteraction check(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.ViewInteraction inRoot(org.hamcrest.Matcher); + method public androidx.test.espresso.ViewInteraction noActivity(); + method public androidx.test.espresso.ViewInteraction perform(androidx.test.espresso.ViewAction...); + method public androidx.test.espresso.ViewInteraction withFailureHandler(androidx.test.espresso.FailureHandler); + } + + public abstract interface ViewInteractionComponent { + method public abstract androidx.test.espresso.ViewInteraction viewInteraction(); + } + +} + +package androidx.test.espresso.action { + + public final class AdapterDataLoaderAction implements androidx.test.espresso.ViewAction { + ctor public AdapterDataLoaderAction(org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional, androidx.test.espresso.action.AdapterViewProtocol); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData getAdaptedData(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface AdapterViewProtocol { + method public abstract java.lang.Iterable getDataInAdapterView(android.widget.AdapterView); + method public abstract androidx.test.espresso.util.EspressoOptional getDataRenderedByView(android.widget.AdapterView, android.view.View); + method public abstract boolean isDataRenderedWithinAdapterView(android.widget.AdapterView, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData); + method public abstract void makeDataRenderedWithinAdapterView(android.widget.AdapterView, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData); + } + + public static class AdapterViewProtocol.AdaptedData { + method public java.lang.Object getData(); + field public final deprecated java.lang.Object data; + field public final java.lang.Object opaqueToken; + } + + public static class AdapterViewProtocol.AdaptedData.Builder { + ctor public Builder(); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData build(); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withData(java.lang.Object); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withDataFunction(androidx.test.espresso.action.AdapterViewProtocol.DataFunction); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withOpaqueToken(java.lang.Object); + } + + public static abstract interface AdapterViewProtocol.DataFunction { + method public abstract java.lang.Object getData(); + } + + public final class AdapterViewProtocols { + method public static androidx.test.espresso.action.AdapterViewProtocol standardProtocol(); + } + + public final class CloseKeyboardAction implements androidx.test.espresso.ViewAction { + ctor public CloseKeyboardAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface CoordinatesProvider { + method public abstract float[] calculateCoordinates(android.view.View); + } + + public final class EditorAction implements androidx.test.espresso.ViewAction { + ctor public EditorAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class EspressoKey { + method public int getKeyCode(); + method public int getMetaState(); + } + + public static class EspressoKey.Builder { + ctor public Builder(); + method public androidx.test.espresso.action.EspressoKey build(); + method public androidx.test.espresso.action.EspressoKey.Builder withAltPressed(boolean); + method public androidx.test.espresso.action.EspressoKey.Builder withCtrlPressed(boolean); + method public androidx.test.espresso.action.EspressoKey.Builder withKeyCode(int); + method public androidx.test.espresso.action.EspressoKey.Builder withShiftPressed(boolean); + } + + public final class GeneralClickAction implements androidx.test.espresso.ViewAction { + ctor public deprecated GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber); + ctor public GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, int, int); + ctor public deprecated GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, androidx.test.espresso.ViewAction); + ctor public GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, int, int, androidx.test.espresso.ViewAction); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public class GeneralLocation extends java.lang.Enum implements androidx.test.espresso.action.CoordinatesProvider { + method public static androidx.test.espresso.action.GeneralLocation valueOf(java.lang.String); + method public static final androidx.test.espresso.action.GeneralLocation[] values(); + enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_CENTER; + enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_LEFT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_RIGHT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation CENTER; + enum_constant public static final androidx.test.espresso.action.GeneralLocation CENTER_LEFT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation CENTER_RIGHT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation TOP_CENTER; + enum_constant public static final androidx.test.espresso.action.GeneralLocation TOP_LEFT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation TOP_RIGHT; + enum_constant public static final androidx.test.espresso.action.GeneralLocation VISIBLE_CENTER; + } + + public final class GeneralSwipeAction implements androidx.test.espresso.ViewAction { + ctor public GeneralSwipeAction(androidx.test.espresso.action.Swiper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class KeyEventAction implements androidx.test.espresso.ViewAction { + ctor public KeyEventAction(androidx.test.espresso.action.EspressoKey); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class MotionEvents { + method public static android.view.MotionEvent obtainDownEvent(float[], float[], int, int); + method public static android.view.MotionEvent obtainDownEvent(float[], float[]); + method public static android.view.MotionEvent obtainMovement(long, float[]); + method public static android.view.MotionEvent obtainMovement(long, long, float[]); + method public static android.view.MotionEvent obtainUpEvent(android.view.MotionEvent, float[]); + method public static void sendCancel(androidx.test.espresso.UiController, android.view.MotionEvent); + method public static androidx.test.espresso.action.MotionEvents.DownResultHolder sendDown(androidx.test.espresso.UiController, float[], float[]); + method public static androidx.test.espresso.action.MotionEvents.DownResultHolder sendDown(androidx.test.espresso.UiController, float[], float[], int, int); + method public static boolean sendMovement(androidx.test.espresso.UiController, android.view.MotionEvent, float[]); + method public static boolean sendUp(androidx.test.espresso.UiController, android.view.MotionEvent); + method public static boolean sendUp(androidx.test.espresso.UiController, android.view.MotionEvent, float[]); + } + + public static class MotionEvents.DownResultHolder { + field public final android.view.MotionEvent down; + field public final boolean longPress; + } + + public final class OpenLinkAction implements androidx.test.espresso.ViewAction { + ctor public OpenLinkAction(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface PrecisionDescriber { + method public abstract float[] describePrecision(); + } + + public class Press extends java.lang.Enum implements androidx.test.espresso.action.PrecisionDescriber { + method public static androidx.test.espresso.action.Press valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Press[] values(); + enum_constant public static final androidx.test.espresso.action.Press FINGER; + enum_constant public static final androidx.test.espresso.action.Press PINPOINT; + enum_constant public static final androidx.test.espresso.action.Press THUMB; + } + + public final class PressBackAction implements androidx.test.espresso.ViewAction { + ctor public PressBackAction(boolean); + ctor public PressBackAction(boolean, androidx.test.espresso.action.EspressoKey); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class RepeatActionUntilViewState implements androidx.test.espresso.ViewAction { + ctor protected RepeatActionUntilViewState(androidx.test.espresso.ViewAction, org.hamcrest.Matcher, int); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class ReplaceTextAction implements androidx.test.espresso.ViewAction { + ctor public ReplaceTextAction(java.lang.String); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class ScrollToAction implements androidx.test.espresso.ViewAction { + ctor public ScrollToAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public class Swipe extends java.lang.Enum implements androidx.test.espresso.action.Swiper { + method public static androidx.test.espresso.action.Swipe valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Swipe[] values(); + enum_constant public static final androidx.test.espresso.action.Swipe FAST; + enum_constant public static final androidx.test.espresso.action.Swipe SLOW; + } + + public abstract interface Swiper { + method public abstract androidx.test.espresso.action.Swiper.Status sendSwipe(androidx.test.espresso.UiController, float[], float[], float[]); + } + + public static final class Swiper.Status extends java.lang.Enum { + method public static androidx.test.espresso.action.Swiper.Status valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Swiper.Status[] values(); + enum_constant public static final androidx.test.espresso.action.Swiper.Status FAILURE; + enum_constant public static final androidx.test.espresso.action.Swiper.Status SUCCESS; + } + + public class Tap extends java.lang.Enum implements androidx.test.espresso.action.Tapper { + method public static androidx.test.espresso.action.Tap valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Tap[] values(); + enum_constant public static final androidx.test.espresso.action.Tap DOUBLE; + enum_constant public static final androidx.test.espresso.action.Tap LONG; + enum_constant public static final androidx.test.espresso.action.Tap SINGLE; + } + + public abstract interface Tapper { + method public abstract androidx.test.espresso.action.Tapper.Status sendTap(androidx.test.espresso.UiController, float[], float[], int, int); + method public abstract deprecated androidx.test.espresso.action.Tapper.Status sendTap(androidx.test.espresso.UiController, float[], float[]); + } + + public static final class Tapper.Status extends java.lang.Enum { + method public static androidx.test.espresso.action.Tapper.Status valueOf(java.lang.String); + method public static final androidx.test.espresso.action.Tapper.Status[] values(); + enum_constant public static final androidx.test.espresso.action.Tapper.Status FAILURE; + enum_constant public static final androidx.test.espresso.action.Tapper.Status SUCCESS; + enum_constant public static final androidx.test.espresso.action.Tapper.Status WARNING; + } + + public final class TypeTextAction implements androidx.test.espresso.ViewAction { + ctor public TypeTextAction(java.lang.String); + ctor public TypeTextAction(java.lang.String, boolean); + ctor public TypeTextAction(java.lang.String, boolean, androidx.test.espresso.action.GeneralClickAction); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public final class ViewActions { + method public static androidx.test.espresso.ViewAction actionWithAssertions(androidx.test.espresso.ViewAction); + method public static void addGlobalAssertion(java.lang.String, androidx.test.espresso.ViewAssertion); + method public static void clearGlobalAssertions(); + method public static androidx.test.espresso.ViewAction clearText(); + method public static androidx.test.espresso.ViewAction click(int, int); + method public static androidx.test.espresso.ViewAction click(); + method public static androidx.test.espresso.ViewAction click(androidx.test.espresso.ViewAction); + method public static androidx.test.espresso.ViewAction closeSoftKeyboard(); + method public static androidx.test.espresso.ViewAction doubleClick(); + method public static androidx.test.espresso.ViewAction longClick(); + method public static androidx.test.espresso.ViewAction openLink(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction openLinkWithText(java.lang.String); + method public static androidx.test.espresso.ViewAction openLinkWithText(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction openLinkWithUri(java.lang.String); + method public static androidx.test.espresso.ViewAction openLinkWithUri(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAction pressBack(); + method public static androidx.test.espresso.ViewAction pressBackUnconditionally(); + method public static androidx.test.espresso.ViewAction pressImeActionButton(); + method public static androidx.test.espresso.ViewAction pressKey(int); + method public static androidx.test.espresso.ViewAction pressKey(androidx.test.espresso.action.EspressoKey); + method public static androidx.test.espresso.ViewAction pressMenuKey(); + method public static void removeGlobalAssertion(androidx.test.espresso.ViewAssertion); + method public static androidx.test.espresso.ViewAction repeatedlyUntil(androidx.test.espresso.ViewAction, org.hamcrest.Matcher, int); + method public static androidx.test.espresso.ViewAction replaceText(java.lang.String); + method public static androidx.test.espresso.ViewAction scrollTo(); + method public static androidx.test.espresso.ViewAction swipeDown(); + method public static androidx.test.espresso.ViewAction swipeLeft(); + method public static androidx.test.espresso.ViewAction swipeRight(); + method public static androidx.test.espresso.ViewAction swipeUp(); + method public static androidx.test.espresso.ViewAction typeText(java.lang.String); + method public static androidx.test.espresso.ViewAction typeTextIntoFocusedView(java.lang.String); + } + +} + +package androidx.test.espresso.assertion { + + public final class LayoutAssertions { + method public static androidx.test.espresso.ViewAssertion noEllipsizedText(); + method public static androidx.test.espresso.ViewAssertion noMultilineButtons(); + method public static androidx.test.espresso.ViewAssertion noOverlaps(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion noOverlaps(); + } + + public final class PositionAssertions { + method public static deprecated androidx.test.espresso.ViewAssertion isAbove(org.hamcrest.Matcher); + method public static deprecated androidx.test.espresso.ViewAssertion isBelow(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isBottomAlignedWith(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyAbove(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyBelow(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyLeftOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isCompletelyRightOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isLeftAlignedWith(org.hamcrest.Matcher); + method public static deprecated androidx.test.espresso.ViewAssertion isLeftOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyAbove(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyBelow(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyLeftOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isPartiallyRightOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isRightAlignedWith(org.hamcrest.Matcher); + method public static deprecated androidx.test.espresso.ViewAssertion isRightOf(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion isTopAlignedWith(org.hamcrest.Matcher); + } + + public final class ViewAssertions { + method public static androidx.test.espresso.ViewAssertion doesNotExist(); + method public static androidx.test.espresso.ViewAssertion matches(org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion selectedDescendantsMatch(org.hamcrest.Matcher, org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.base { + + public abstract interface ActiveRootLister { + method public abstract java.util.List listActiveRoots(); + } + + public abstract class Default implements java.lang.annotation.Annotation { + } + + public final class DefaultFailureHandler implements androidx.test.espresso.FailureHandler { + ctor public DefaultFailureHandler(android.content.Context); + method public void handle(java.lang.Throwable, org.hamcrest.Matcher); + } + + public final class IdlingResourceRegistry { + ctor public IdlingResourceRegistry(android.os.Looper); + method public java.util.List getResources(); + method public void registerLooper(android.os.Looper, boolean); + method public boolean registerResources(java.util.List); + method public void sync(java.lang.Iterable, java.lang.Iterable); + method public boolean unregisterResources(java.util.List); + } + + public abstract interface IdlingUiController implements androidx.test.espresso.UiController { + method public abstract androidx.test.espresso.base.IdlingResourceRegistry getIdlingResourceRegistry(); + } + + public abstract interface InterruptableUiController implements androidx.test.espresso.UiController { + method public abstract void interruptEspressoTasks(); + } + + public abstract class MainThread implements java.lang.annotation.Annotation { + } + + public final class RootViewPicker implements javax.inject.Provider { + method public android.view.View get(); + } + + public abstract class RootViewPickerScope implements java.lang.annotation.Annotation { + } + + public final class ViewFinderImpl implements androidx.test.espresso.ViewFinder { + method public android.view.View getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; + } + +} + + +package androidx.test.espresso.matcher { + + public abstract class BoundedDiagnosingMatcher extends org.hamcrest.BaseMatcher { + ctor public BoundedDiagnosingMatcher(java.lang.Class); + ctor public BoundedDiagnosingMatcher(java.lang.Class, java.lang.Class, java.lang.Class...); + method public final void describeMismatch(java.lang.Object, org.hamcrest.Description); + method protected abstract void describeMoreTo(org.hamcrest.Description); + method public final void describeTo(org.hamcrest.Description); + method public final boolean matches(java.lang.Object); + method protected abstract boolean matchesSafely(T, org.hamcrest.Description); + } + + public abstract class BoundedMatcher extends org.hamcrest.BaseMatcher { + ctor public BoundedMatcher(java.lang.Class); + ctor public BoundedMatcher(java.lang.Class, java.lang.Class, java.lang.Class...); + method public final boolean matches(java.lang.Object); + method protected abstract boolean matchesSafely(S); + } + + public final class CursorMatchers { + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(int, byte[]); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(java.lang.String, byte[]); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(int, double); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(java.lang.String, double); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(int, float); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(java.lang.String, float); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(int, int); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(java.lang.String, int); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(int, long); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(java.lang.String, long); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(int, short); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(java.lang.String, short); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(int, java.lang.String); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(int, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(java.lang.String, java.lang.String); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(java.lang.String, org.hamcrest.Matcher); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(org.hamcrest.Matcher, org.hamcrest.Matcher); + } + + public static class CursorMatchers.CursorMatcher extends androidx.test.espresso.matcher.BoundedMatcher { + method public void describeTo(org.hamcrest.Description); + method public boolean matchesSafely(android.database.Cursor); + method public androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withStrictColumnChecks(boolean); + } + + public final class HasBackgroundMatcher extends org.hamcrest.TypeSafeMatcher { + ctor public HasBackgroundMatcher(int); + method public void describeTo(org.hamcrest.Description); + method protected boolean matchesSafely(android.view.View); + } + + public final class LayoutMatchers { + method public static org.hamcrest.Matcher hasEllipsizedText(); + method public static org.hamcrest.Matcher hasMultilineText(); + } + + public final class PreferenceMatchers { + method public static org.hamcrest.Matcher isEnabled(); + method public static org.hamcrest.Matcher withKey(java.lang.String); + method public static org.hamcrest.Matcher withKey(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withSummary(int); + method public static org.hamcrest.Matcher withSummaryText(java.lang.String); + method public static org.hamcrest.Matcher withSummaryText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTitle(int); + method public static org.hamcrest.Matcher withTitleText(java.lang.String); + method public static org.hamcrest.Matcher withTitleText(org.hamcrest.Matcher); + } + + public final class RootMatchers { + method public static org.hamcrest.Matcher hasWindowLayoutParams(); + method public static org.hamcrest.Matcher isDialog(); + method public static org.hamcrest.Matcher isFocusable(); + method public static org.hamcrest.Matcher isPlatformPopup(); + method public static org.hamcrest.Matcher isSystemAlertWindow(); + method public static org.hamcrest.Matcher isTouchable(); + method public static org.hamcrest.Matcher withDecorView(org.hamcrest.Matcher); + field public static final org.hamcrest.Matcher DEFAULT; + } + + public final class ViewMatchers { + method public static void assertThat(T, org.hamcrest.Matcher); + method public static void assertThat(java.lang.String, T, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher doesNotHaveFocus(); + method public static org.hamcrest.Matcher hasBackground(int); + method public static org.hamcrest.Matcher hasChildCount(int); + method public static org.hamcrest.Matcher hasContentDescription(); + method public static org.hamcrest.Matcher hasDescendant(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasErrorText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasErrorText(java.lang.String); + method public static org.hamcrest.Matcher hasFocus(); + method public static org.hamcrest.Matcher hasImeAction(int); + method public static org.hamcrest.Matcher hasImeAction(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasLinks(); + method public static org.hamcrest.Matcher hasMinimumChildCount(int); + method public static org.hamcrest.Matcher hasSibling(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasTextColor(int); + method public static org.hamcrest.Matcher isAssignableFrom(java.lang.Class); + method public static org.hamcrest.Matcher isChecked(); + method public static org.hamcrest.Matcher isClickable(); + method public static org.hamcrest.Matcher isCompletelyDisplayed(); + method public static org.hamcrest.Matcher isDescendantOfA(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher isDisplayed(); + method public static org.hamcrest.Matcher isDisplayingAtLeast(int); + method public static org.hamcrest.Matcher isEnabled(); + method public static org.hamcrest.Matcher isFocusable(); + method public static org.hamcrest.Matcher isFocused(); + method public static org.hamcrest.Matcher isJavascriptEnabled(); + method public static org.hamcrest.Matcher isNotChecked(); + method public static org.hamcrest.Matcher isNotClickable(); + method public static org.hamcrest.Matcher isNotEnabled(); + method public static org.hamcrest.Matcher isNotFocusable(); + method public static org.hamcrest.Matcher isNotFocused(); + method public static org.hamcrest.Matcher isNotSelected(); + method public static org.hamcrest.Matcher isRoot(); + method public static org.hamcrest.Matcher isSelected(); + method public static org.hamcrest.Matcher supportsInputMethods(); + method public static org.hamcrest.Matcher withAlpha(float); + method public static org.hamcrest.Matcher withChild(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withClassName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withContentDescription(int); + method public static org.hamcrest.Matcher withContentDescription(java.lang.String); + method public static org.hamcrest.Matcher withContentDescription(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withEffectiveVisibility(androidx.test.espresso.matcher.ViewMatchers.Visibility); + method public static org.hamcrest.Matcher withHint(java.lang.String); + method public static org.hamcrest.Matcher withHint(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withHint(int); + method public static org.hamcrest.Matcher withId(int); + method public static org.hamcrest.Matcher withId(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withInputType(int); + method public static org.hamcrest.Matcher withParent(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withParentIndex(int); + method public static org.hamcrest.Matcher withResourceName(java.lang.String); + method public static org.hamcrest.Matcher withResourceName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withSpinnerText(int); + method public static org.hamcrest.Matcher withSpinnerText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withSpinnerText(java.lang.String); + method public static org.hamcrest.Matcher withSubstring(java.lang.String); + method public static org.hamcrest.Matcher withTagKey(int); + method public static org.hamcrest.Matcher withTagKey(int, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTagValue(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withText(java.lang.String); + method public static org.hamcrest.Matcher withText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withText(int); + } + + public static final class ViewMatchers.Visibility extends java.lang.Enum { + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility forViewVisibility(android.view.View); + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility forViewVisibility(int); + method public int getValue(); + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility valueOf(java.lang.String); + method public static final androidx.test.espresso.matcher.ViewMatchers.Visibility[] values(); + enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility GONE; + enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility INVISIBLE; + enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility VISIBLE; + } + +} + +package androidx.test.espresso.util { + + public final class ActivityLifecycles { + method public static boolean hasForegroundActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + method public static boolean hasTransitioningActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + method public static boolean hasVisibleActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + } + + public final class EspressoOptional { + method public static androidx.test.espresso.util.EspressoOptional absent(); + method public java.util.Set asSet(); + method public static androidx.test.espresso.util.EspressoOptional fromNullable(T); + method public T get(); + method public boolean isPresent(); + method public static androidx.test.espresso.util.EspressoOptional of(T); + method public com.google.common.base.Optional or(com.google.common.base.Optional); + method public T or(com.google.common.base.Supplier); + method public T or(T); + method public T orNull(); + method public static java.lang.Iterable presentInstances(java.lang.Iterable>); + method public com.google.common.base.Optional transform(com.google.common.base.Function); + } + + public final class HumanReadables { + method public static java.lang.String describe(android.database.Cursor); + method public static java.lang.String describe(android.view.View); + method public static java.lang.String getViewHierarchyErrorMessage(android.view.View, java.util.List, java.lang.String, java.lang.String); + } + + public final class TreeIterables { + method public static java.lang.Iterable breadthFirstViewTraversal(android.view.View); + method public static java.lang.Iterable depthFirstViewTraversal(android.view.View); + method public static java.lang.Iterable depthFirstViewTraversalWithDistance(android.view.View); + } + + public static class TreeIterables.ViewAndDistance { + method public int getDistanceFromRoot(); + method public android.view.View getView(); + } + +} + + public final class AtomAction implements androidx.test.espresso.remote.Bindable androidx.test.espresso.ViewAction { + ctor public AtomAction(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.WindowReference, androidx.test.espresso.web.model.ElementReference); + method public E get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; + method public E get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public java.util.concurrent.Future getFuture(); + method public android.os.IBinder getIBinder(); + method public java.lang.String getId(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + method public void setIBinder(android.os.IBinder); + } + + public class EnableJavascriptAction implements androidx.test.espresso.ViewAction { + ctor public EnableJavascriptAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface IAtomActionResultPropagator implements android.os.IInterface { + method public abstract void setError(android.os.Bundle) throws android.os.RemoteException; + method public abstract void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + + public static abstract class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + ctor public Stub(); + method public static androidx.test.espresso.web.action.IAtomActionResultPropagator asInterface(android.os.IBinder); + } + + public static class IAtomActionResultPropagator.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + method public void setError(android.os.Bundle) throws android.os.RemoteException; + method public void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + +} + +package androidx.test.espresso.web.assertion { + + public final class TagSoupDocumentParser { + method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; + method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException; + } + + public abstract class WebAssertion { + ctor public WebAssertion(androidx.test.espresso.web.model.Atom); + method protected abstract void checkResult(android.webkit.WebView, E); + method public final androidx.test.espresso.web.model.Atom getAtom(); + method public final androidx.test.espresso.ViewAssertion toViewAssertion(E); + } + + public final class WebViewAssertions { + method public static androidx.test.espresso.web.assertion.WebAssertion webContent(org.hamcrest.Matcher); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher); + } + + public static abstract interface WebViewAssertions.ResultDescriber { + method public abstract java.lang.String apply(E); + } + +} + +package androidx.test.espresso.web.matcher { + + public final class AmbiguousElementMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public AmbiguousElementMatcherException(java.lang.String); + } + + public final class DomMatchers { + method public static org.hamcrest.Matcher containingTextInBody(java.lang.String); + method public static org.hamcrest.Matcher elementById(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher elementByXPath(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasElementWithId(java.lang.String); + method public static org.hamcrest.Matcher hasElementWithXpath(java.lang.String); + method public static org.hamcrest.Matcher withBody(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTextContent(java.lang.String); + method public static org.hamcrest.Matcher withTextContent(org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.web.model { + + public abstract interface Atom { + method public abstract java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public abstract java.lang.String getScript(); + method public abstract R transform(androidx.test.espresso.web.model.Evaluation); + } + + public final class Atoms { + method public static androidx.test.espresso.web.model.TransformingAtom.Transformer castOrDie(java.lang.Class); + method public static androidx.test.espresso.web.model.Atom getCurrentUrl(); + method public static androidx.test.espresso.web.model.Atom getTitle(); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String); + method public static androidx.test.espresso.web.model.Atom scriptWithArgs(java.lang.String, java.util.List); + method public static androidx.test.espresso.web.model.Atom transform(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + } + + public final class ElementReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + + public final class Evaluation implements androidx.test.espresso.web.model.JSONAble android.os.Parcelable { + ctor protected Evaluation(android.os.Parcel); + method public int describeContents(); + method public java.lang.String getMessage(); + method public int getStatus(); + method public java.lang.Object getValue(); + method public boolean hasMessage(); + method public void readFromParcel(android.os.Parcel); + method public java.lang.String toJSONString(); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; + } + + public abstract interface JSONAble { + method public abstract java.lang.String toJSONString(); + } + + public static abstract interface JSONAble.DeJSONFactory { + method public abstract java.lang.Object attemptDeJSONize(java.util.Map); + } + + public final class ModelCodec { + method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + method public static androidx.test.espresso.web.model.Evaluation decodeEvaluation(java.lang.String); + method public static java.lang.String encode(java.lang.Object); + method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + } + + public class SimpleAtom implements androidx.test.espresso.web.model.Atom { + ctor public SimpleAtom(java.lang.String); + ctor public SimpleAtom(java.lang.String, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement); + method public final java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method protected java.util.List getNonContextualArguments(); + method public final java.lang.String getScript(); + method protected androidx.test.espresso.web.model.Evaluation handleBadEvaluation(androidx.test.espresso.web.model.Evaluation); + method protected void handleNoElementReference(); + method public final androidx.test.espresso.web.model.Evaluation transform(androidx.test.espresso.web.model.Evaluation); + } + + public static final class SimpleAtom.ElementReferencePlacement extends java.lang.Enum { + method public static androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement valueOf(java.lang.String); + method public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement[] values(); + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement FIRST; + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement LAST; + } + + public class TransformingAtom implements androidx.test.espresso.web.model.Atom { + ctor public TransformingAtom(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public java.lang.String getScript(); + method public O transform(androidx.test.espresso.web.model.Evaluation); + } + + public static abstract interface TransformingAtom.Transformer { + method public abstract O apply(I); + } + + public final class WindowReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + +} + +package androidx.test.espresso.web.sugar { + + public final class Web { + ctor public Web(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(org.hamcrest.Matcher); + } + + public static class Web.WebInteraction { + method public androidx.test.espresso.web.sugar.Web.WebInteraction check(androidx.test.espresso.web.assertion.WebAssertion); + method public androidx.test.espresso.web.sugar.Web.WebInteraction forceJavascriptEnabled(); + method public R get(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.WindowReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction perform(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction reset(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withContextualElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.ElementReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withNoTimeout(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withTimeout(long, java.util.concurrent.TimeUnit); + } + +} + +package androidx.test.espresso.web.webdriver { + + public final class DriverAtoms { + method public static androidx.test.espresso.web.model.Atom clearElement(); + method public static androidx.test.espresso.web.model.Atom findElement(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom> findMultipleElements(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom getText(); + method public static androidx.test.espresso.web.model.Atom selectActiveElement(); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom webClick(); + method public static androidx.test.espresso.web.model.Atom webKeys(java.lang.String); + method public static androidx.test.espresso.web.model.Atom webScrollIntoView(); + } + + public final class Locator extends java.lang.Enum { + method public java.lang.String getType(); + method public static androidx.test.espresso.web.webdriver.Locator valueOf(java.lang.String); + method public static final androidx.test.espresso.web.webdriver.Locator[] values(); + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CLASS_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CSS_SELECTOR; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator ID; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator PARTIAL_LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator TAG_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator XPATH; + } + +} + +package androidx.test.ext.junit.rules { + + public final class ActivityScenarioRule extends org.junit.rules.ExternalResource { + ctor public ActivityScenarioRule(java.lang.Class); + ctor public ActivityScenarioRule(java.lang.Class, android.os.Bundle); + ctor public ActivityScenarioRule(android.content.Intent); + ctor public ActivityScenarioRule(android.content.Intent, android.os.Bundle); + method public androidx.test.core.app.ActivityScenario getScenario(); + } + +} + +package androidx.test.ext.junit.runners { + + public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + +} + +package androidx.test.ext.truth.app { + + public class NotificationActionSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationActionSubject assertThat(android.app.Notification.Action); + method public static com.google.common.truth.Subject.Factory notificationActions(); + method public final com.google.common.truth.StringSubject title(); + } + + public class NotificationSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationSubject assertThat(android.app.Notification); + method public final androidx.test.ext.truth.app.PendingIntentSubject contentIntent(); + method public final androidx.test.ext.truth.app.PendingIntentSubject deleteIntent(); + method public final void doesNotHaveFlags(int); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public final void hasFlags(int); + method public static com.google.common.truth.Subject.Factory notifications(); + method public final com.google.common.truth.StringSubject tickerText(); + } + + public class PendingIntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.PendingIntentSubject assertThat(android.app.PendingIntent); + method public static com.google.common.truth.Subject.Factory pendingIntents(); + } + +} + +package androidx.test.ext.truth.content { + + public final class IntentCorrespondences { + method public static com.google.common.truth.Correspondence action(); + method public static com.google.common.truth.Correspondence all(com.google.common.truth.Correspondence...); + method public static com.google.common.truth.Correspondence data(); + } + + public final class IntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.content.IntentSubject assertThat(android.content.Intent); + method public com.google.common.truth.IterableSubject categories(); + method public androidx.test.ext.truth.os.BundleSubject extras(); + method public void filtersEquallyTo(android.content.Intent); + method public void hasAction(java.lang.String); + method public void hasComponent(java.lang.String, java.lang.String); + method public void hasComponent(android.content.ComponentName); + method public void hasComponentClass(java.lang.Class); + method public void hasComponentClass(java.lang.String); + method public void hasComponentPackage(java.lang.String); + method public void hasData(android.net.Uri); + method public void hasFlags(int); + method public void hasNoAction(); + method public void hasPackage(java.lang.String); + method public void hasType(java.lang.String); + method public static com.google.common.truth.Subject.Factory intents(); + } + +} + +package androidx.test.ext.truth.location { + + public final class LocationCorrespondences { + method public static com.google.common.truth.Correspondence at(); + method public static com.google.common.truth.Correspondence equality(); + method public static com.google.common.truth.Correspondence nearby(float); + } + + public class LocationSubject extends com.google.common.truth.Subject { + method public com.google.common.truth.FloatSubject accuracy(); + method public com.google.common.truth.DoubleSubject altitude(); + method public static androidx.test.ext.truth.location.LocationSubject assertThat(android.location.Location); + method public com.google.common.truth.FloatSubject bearing(); + method public com.google.common.truth.FloatSubject bearingAccuracy(); + method public com.google.common.truth.FloatSubject bearingTo(double, double); + method public com.google.common.truth.FloatSubject bearingTo(android.location.Location); + method public com.google.common.truth.FloatSubject distanceTo(double, double); + method public com.google.common.truth.FloatSubject distanceTo(android.location.Location); + method public void doesNotHaveProvider(java.lang.String); + method public com.google.common.truth.LongSubject elapsedRealtimeMillis(); + method public com.google.common.truth.LongSubject elapsedRealtimeNanos(); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public void hasAccuracy(); + method public void hasAltitude(); + method public void hasBearing(); + method public void hasBearingAccuracy(); + method public void hasProvider(java.lang.String); + method public void hasSpeed(); + method public void hasSpeedAccuracy(); + method public void hasVerticalAccuracy(); + method public void isAt(android.location.Location); + method public void isAt(double, double); + method public void isFaraway(android.location.Location, float); + method public void isMock(); + method public void isNearby(android.location.Location, float); + method public void isNotAt(android.location.Location); + method public void isNotAt(double, double); + method public void isNotMock(); + method public static com.google.common.truth.Subject.Factory locations(); + method public com.google.common.truth.FloatSubject speed(); + method public com.google.common.truth.FloatSubject speedAccuracy(); + method public com.google.common.truth.LongSubject time(); + method public com.google.common.truth.FloatSubject verticalAccuracy(); + } + +} + +package androidx.test.ext.truth.os { + + public final class BundleSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.BundleSubject assertThat(android.os.Bundle); + method public com.google.common.truth.BooleanSubject bool(java.lang.String); + method public static com.google.common.truth.Subject.Factory bundles(); + method public void containsKey(java.lang.String); + method public void doesNotContainKey(java.lang.String); + method public void hasSize(int); + method public com.google.common.truth.IntegerSubject integer(java.lang.String); + method public void isEmpty(); + method public void isNotEmpty(); + method public com.google.common.truth.LongSubject longInt(java.lang.String); + method public androidx.test.ext.truth.os.ParcelableSubject parcelable(java.lang.String); + method public com.google.common.truth.IterableSubject parcelableArrayList(java.lang.String); + method public SubjectT parcelableAsType(java.lang.String, com.google.common.truth.Subject.Factory); + method public com.google.common.truth.StringSubject string(java.lang.String); + method public com.google.common.truth.IterableSubject stringArrayList(java.lang.String); + } + + public final class ParcelableSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.ParcelableSubject assertThat(T); + method public static com.google.common.truth.Subject.Factory, T> parcelables(); + method public void recreatesEqual(android.os.Parcelable.Creator); + } + +} + +package androidx.test.ext.truth.view { + + public final class MotionEventSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.MotionEventSubject assertThat(android.view.MotionEvent); + method public void hasAction(int); + method public void hasActionButton(int); + method public void hasButtonState(int); + method public void hasDeviceId(int); + method public void hasDownTime(long); + method public void hasEdgeFlags(int); + method public void hasEventTime(long); + method public void hasFlags(int); + method public void hasHistorySize(int); + method public void hasMetaState(int); + method public void hasPointerCount(int); + method public com.google.common.truth.LongSubject historicalEventTime(int); + method public com.google.common.truth.FloatSubject historicalOrientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject historicalPointerCoords(int, int); + method public com.google.common.truth.FloatSubject historicalPressure(int); + method public com.google.common.truth.FloatSubject historicalSize(int); + method public com.google.common.truth.FloatSubject historicalToolMajor(int); + method public com.google.common.truth.FloatSubject historicalToolMinor(int); + method public com.google.common.truth.FloatSubject historicalTouchMajor(int); + method public com.google.common.truth.FloatSubject historicalTouchMinor(int); + method public com.google.common.truth.FloatSubject historicalX(int); + method public com.google.common.truth.FloatSubject historicalY(int); + method public static com.google.common.truth.Subject.Factory motionEvents(); + method public com.google.common.truth.FloatSubject orientation(); + method public com.google.common.truth.FloatSubject orientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject pointerCoords(int); + method public com.google.common.truth.IntegerSubject pointerId(int); + method public androidx.test.ext.truth.view.PointerPropertiesSubject pointerProperties(int); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject pressure(int); + method public com.google.common.truth.FloatSubject rawX(); + method public com.google.common.truth.FloatSubject rawY(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject size(int); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMajor(int); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject toolMinor(int); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMajor(int); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject touchMinor(int); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject x(int); + method public com.google.common.truth.FloatSubject xPrecision(); + method public com.google.common.truth.FloatSubject y(); + method public com.google.common.truth.FloatSubject y(int); + method public com.google.common.truth.FloatSubject yPrecision(); + } + + public final class PointerCoordsSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerCoordsSubject assertThat(android.view.MotionEvent.PointerCoords); + method public com.google.common.truth.FloatSubject axisValue(int); + method public com.google.common.truth.FloatSubject orientation(); + method public static com.google.common.truth.Subject.Factory pointerCoords(); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject y(); + } + + public final class PointerPropertiesSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerPropertiesSubject assertThat(android.view.MotionEvent.PointerProperties); + method public void hasId(int); + method public void hasToolType(int); + method public void isEqualTo(android.view.MotionEvent.PointerProperties); + method public static com.google.common.truth.Subject.Factory pointerProperties(); + } + +} + +package androidx.test.filters { + + public abstract class FlakyTest implements java.lang.annotation.Annotation { + } + + public abstract class LargeTest implements java.lang.annotation.Annotation { + } + + public abstract class MediumTest implements java.lang.annotation.Annotation { + } + + public abstract class RequiresDevice implements java.lang.annotation.Annotation { + } + + public abstract class SdkSuppress implements java.lang.annotation.Annotation { + } + + public abstract class SmallTest implements java.lang.annotation.Annotation { + } + + public abstract class Suppress implements java.lang.annotation.Annotation { + } + +} + +package androidx.test.jank { + + public abstract class GfxFrameStatsMonitor implements java.lang.annotation.Annotation { + field public static final java.lang.String KEY_AVG_FPS = "framestats-fps"; + field public static final java.lang.String KEY_AVG_JANK_RATE = "framestats-jankrate"; + field public static final java.lang.String KEY_AVG_SLOW_RATE = "framestats-slowrate"; + field public static final java.lang.String KEY_FRAME_COUNT = "framestats-frame-count"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_90TH_PERCENTILE = "framestats-renderthread-90"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_95TH_PERCENTILE = "framestats-renderthread-95"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_99TH_PERCENTILE = "framestats-renderthread-99"; + field public static final java.lang.String KEY_RENDERTHREAD_TIME_MEDIAN = "framestats-renderthread-median"; + field public static final java.lang.String KEY_TOTAL_TIME_90TH_PERCENTILE = "framestats-totaltime-90"; + field public static final java.lang.String KEY_TOTAL_TIME_95TH_PERCENTILE = "framestats-totaltime-95"; + field public static final java.lang.String KEY_TOTAL_TIME_99TH_PERCENTILE = "framestats-totaltime-99"; + field public static final java.lang.String KEY_TOTAL_TIME_MEDIAN = "framestats-totaltime-median"; + field public static final java.lang.String KEY_UITHREAD_TIME_90TH_PERCENTILE = "framestats-uithread-90"; + field public static final java.lang.String KEY_UITHREAD_TIME_95TH_PERCENTILE = "framestats-uithread-95"; + field public static final java.lang.String KEY_UITHREAD_TIME_99TH_PERCENTILE = "framestats-uithread-99"; + field public static final java.lang.String KEY_UITHREAD_TIME_MEDIAN = "framestats-uithread-median"; + field public static final java.lang.String KEY_VSYNC_COUNT = "framestats-vsync-count"; + } + + public abstract class GfxMonitor implements java.lang.annotation.Annotation { + field public static final java.lang.String KEY_AVG_FRAME_TIME_50TH_PERCENTILE = "gfx-avg-frame-time-50"; + field public static final java.lang.String KEY_AVG_FRAME_TIME_90TH_PERCENTILE = "gfx-avg-frame-time-90"; + field public static final java.lang.String KEY_AVG_FRAME_TIME_95TH_PERCENTILE = "gfx-avg-frame-time-95"; + field public static final java.lang.String KEY_AVG_FRAME_TIME_99TH_PERCENTILE = "gfx-avg-frame-time-99"; + field public static final java.lang.String KEY_AVG_HIGH_INPUT_LATENCY = "gfx-avg-high-input-latency"; + field public static final java.lang.String KEY_AVG_MISSED_VSYNC = "gfx-avg-missed-vsync"; + field public static final java.lang.String KEY_AVG_NUM_FRAME_MISSED = "gfx-avg-num-frame-deadline-missed"; + field public static final java.lang.String KEY_AVG_NUM_JANKY = "gfx-avg-jank"; + field public static final java.lang.String KEY_AVG_SLOW_BITMAP_UPLOADS = "gfx-avg-slow-bitmap-uploads"; + field public static final java.lang.String KEY_AVG_SLOW_DRAW = "gfx-avg-slow-draw"; + field public static final java.lang.String KEY_AVG_SLOW_UI_THREAD = "gfx-avg-slow-ui-thread"; + field public static final java.lang.String KEY_AVG_TOTAL_FRAMES = "gfx-avg-total-frames"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_50TH_PERCENTILE = "gfx-max-frame-time-50"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_90TH_PERCENTILE = "gfx-max-frame-time-90"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_95TH_PERCENTILE = "gfx-max-frame-time-95"; + field public static final java.lang.String KEY_MAX_FRAME_TIME_99TH_PERCENTILE = "gfx-max-frame-time-99"; + field public static final java.lang.String KEY_MAX_HIGH_INPUT_LATENCY = "gfx-max-high-input-latency"; + field public static final java.lang.String KEY_MAX_MISSED_VSYNC = "gfx-max-missed-vsync"; + field public static final java.lang.String KEY_MAX_NUM_FRAME_MISSED = "gfx-max-num-frame-deadline-missed"; + field public static final java.lang.String KEY_MAX_NUM_JANKY = "gfx-max-jank"; + field public static final java.lang.String KEY_MAX_SLOW_BITMAP_UPLOADS = "gfx-max-slow-bitmap-uploads"; + field public static final java.lang.String KEY_MAX_SLOW_DRAW = "gfx-max-slow-draw"; + field public static final java.lang.String KEY_MAX_SLOW_UI_THREAD = "gfx-max-slow-ui-thread"; + field public static final java.lang.String KEY_MAX_TOTAL_FRAMES = "gfx-max-total-frames"; + field public static final java.lang.String KEY_MIN_TOTAL_FRAMES = "gfx-min-total-frames"; + } + + public abstract interface IMonitor { + method public abstract android.os.Bundle getMetrics(); + method public abstract void startIteration() throws java.lang.Throwable; + method public abstract android.os.Bundle stopIteration() throws java.lang.Throwable; + } + + public abstract interface IMonitorFactory { + method public abstract java.util.List getMonitors(java.lang.reflect.Method, java.lang.Object); + } + + public abstract class JankTest implements java.lang.annotation.Annotation { + } + + public class JankTestBase extends android.test.InstrumentationTestCase { + ctor public JankTestBase(); + method public void afterLoop() throws java.lang.Exception; + method public void afterTest(android.os.Bundle); + method public void beforeLoop() throws java.lang.Exception; + method public void beforeTest() throws java.lang.Exception; + method protected androidx.test.jank.IMonitorFactory createMonitorFactory(); + method protected final android.os.Bundle getArguments(); + method public final int getCurrentIteration(); + method protected androidx.test.jank.IMonitorFactory getMonitorFactory(); + method protected java.util.List getMonitors(java.lang.reflect.Method); + } + +} + +package androidx.test.jank.annotations { + + public abstract class UseMonitorFactory implements java.lang.annotation.Annotation { + } + +} + +package androidx.test.platform { + + public abstract interface TestFrameworkException { + } + +} + +package androidx.test.platform.app { + + public final class InstrumentationRegistry { + method public static android.os.Bundle getArguments(); + method public static android.app.Instrumentation getInstrumentation(); + method public static void registerInstance(android.app.Instrumentation, android.os.Bundle); + } + +} + +package androidx.test.platform.ui { + + public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { + ctor public InjectEventSecurityException(java.lang.String); + ctor public InjectEventSecurityException(java.lang.Throwable); + ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + } + + public abstract interface UiController { + method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectString(java.lang.String) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract void loopMainThreadForAtLeast(long); + method public abstract void loopMainThreadUntilIdle(); + } + +} + +package androidx.test.rule { + + public deprecated class ActivityTestRule implements org.junit.rules.TestRule { + ctor public ActivityTestRule(java.lang.Class); + ctor public ActivityTestRule(java.lang.Class, boolean); + ctor public ActivityTestRule(java.lang.Class, boolean, boolean); + ctor public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory, boolean, boolean); + ctor public ActivityTestRule(java.lang.Class, java.lang.String, int, boolean, boolean); + method protected void afterActivityFinished(); + method protected void afterActivityLaunched(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeActivityLaunched(); + method public void finishActivity(); + method public T getActivity(); + method protected android.content.Intent getActivityIntent(); + method public android.app.Instrumentation.ActivityResult getActivityResult(); + method public T launchActivity(android.content.Intent); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + } + + public class DisableOnAndroidDebug implements org.junit.rules.TestRule { + ctor public DisableOnAndroidDebug(org.junit.rules.TestRule); + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public boolean isDebugging(); + } + + public class GrantPermissionRule implements org.junit.rules.TestRule { + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public static androidx.test.rule.GrantPermissionRule grant(java.lang.String...); + } + + public class ServiceTestRule implements org.junit.rules.TestRule { + ctor public ServiceTestRule(); + ctor protected ServiceTestRule(long, java.util.concurrent.TimeUnit); + method protected void afterService(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeService(); + method public android.os.IBinder bindService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public android.os.IBinder bindService(android.content.Intent, android.content.ServiceConnection, int) throws java.util.concurrent.TimeoutException; + method public void startService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public void unbindService(); + method public static androidx.test.rule.ServiceTestRule withTimeout(long, java.util.concurrent.TimeUnit); + } + + public deprecated class UiThreadTestRule implements org.junit.rules.TestRule { + ctor public UiThreadTestRule(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + method protected boolean shouldRunOnUiThread(org.junit.runner.Description); + } + +} + +package androidx.test.rule.logging { + + public class AtraceLogger { + method public void atraceStart(java.util.Set, int, int, java.io.File, java.lang.String) throws java.io.IOException; + method public void atraceStop() throws java.io.IOException, java.lang.InterruptedException; + method public static androidx.test.rule.logging.AtraceLogger getAtraceLoggerInstance(android.app.Instrumentation); + } + +} + +package androidx.test.rule.provider { + + public class ProviderTestRule implements org.junit.rules.TestRule { + method protected void afterProviderCleanedUp(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeProviderSetup(); + method public android.content.ContentResolver getResolver(); + method public void revokePermission(java.lang.String); + method public void runDatabaseCommands(java.lang.String, java.lang.String...); + } + + public static class ProviderTestRule.Builder { + ctor public Builder(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule.Builder addProvider(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule build(); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommands(java.lang.String, java.lang.String...); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommandsFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setPrefix(java.lang.String); + } + +} + +package androidx.test.runner { + + public final deprecated class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class, androidx.test.internal.util.AndroidRunnerParams) throws org.junit.runners.model.InitializationError; + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + + public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation implements androidx.test.internal.events.client.TestEventClientConnectListener { + ctor public AndroidJUnitRunner(); + method public void onTestEventClientConnect(); + } + + public class MonitoringInstrumentation extends androidx.test.internal.runner.hidden.ExposedInstrumentationApi { + ctor public MonitoringInstrumentation(); + method protected void dumpThreadStateToOutputs(java.lang.String); + method protected java.lang.String getThreadState(); + method protected void installMultidex(); + method protected void installOldMultiDex(java.lang.Class) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; + method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory); + method protected deprecated boolean isPrimaryInstrProcess(java.lang.String); + method protected final boolean isPrimaryInstrProcess(); + method protected void restoreUncaughtExceptionHandler(); + method protected final void setJsBridgeClassName(java.lang.String); + method protected boolean shouldWaitForActivitiesToComplete(); + method protected void specifyDexMakerCacheProperty(); + method public void useDefaultInterceptingActivityFactory(); + method protected void waitForActivitiesToComplete(); + } + + public class MonitoringInstrumentation.ActivityFinisher implements java.lang.Runnable { + ctor public ActivityFinisher(); + method public void run(); + } + + public class UsageTrackerFacilitator implements androidx.test.internal.runner.tracker.UsageTracker { + ctor public UsageTrackerFacilitator(androidx.test.internal.runner.RunnerArgs); + ctor public UsageTrackerFacilitator(boolean); + method public void registerUsageTracker(androidx.test.internal.runner.tracker.UsageTracker); + method public void sendUsages(); + method public boolean shouldTrackUsage(); + method public void trackUsage(java.lang.String, java.lang.String); + } + +} + +package androidx.test.runner.intent { + + public abstract interface IntentCallback { + method public abstract void onIntentSent(android.content.Intent); + } + + public abstract interface IntentMonitor { + method public abstract void addIntentCallback(androidx.test.runner.intent.IntentCallback); + method public abstract void removeIntentCallback(androidx.test.runner.intent.IntentCallback); + } + + public final class IntentMonitorRegistry { + method public static androidx.test.runner.intent.IntentMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.intent.IntentMonitor); + } + + public abstract interface IntentStubber { + method public abstract android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + } + + public final class IntentStubberRegistry { + method public static androidx.test.runner.intent.IntentStubber getInstance(); + method public static boolean isLoaded(); + method public static void load(androidx.test.runner.intent.IntentStubber); + method public static synchronized void reset(); + } + +} + +package androidx.test.runner.intercepting { + + public abstract interface InterceptingActivityFactory { + method public abstract android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method public abstract boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + + public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { + ctor public SingleActivityFactory(java.lang.Class); + method public final android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method protected abstract T create(android.content.Intent); + method public final java.lang.Class getActivityClassToIntercept(); + method public final boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + +} + +package androidx.test.runner.lifecycle { + + public abstract interface ActivityLifecycleCallback { + method public abstract void onActivityLifecycleChanged(android.app.Activity, androidx.test.runner.lifecycle.Stage); + } + + public abstract interface ActivityLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + method public abstract java.util.Collection getActivitiesInStage(androidx.test.runner.lifecycle.Stage); + method public abstract androidx.test.runner.lifecycle.Stage getLifecycleStageOf(android.app.Activity); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + } + + public final class ActivityLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + } + + public abstract interface ApplicationLifecycleCallback { + method public abstract void onApplicationLifecycleChanged(android.app.Application, androidx.test.runner.lifecycle.ApplicationStage); + } + + public abstract interface ApplicationLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + } + + public final class ApplicationLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor); + } + + public final class ApplicationStage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.ApplicationStage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.ApplicationStage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage PRE_ON_CREATE; + } + + public final class Stage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.Stage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.Stage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.Stage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.Stage DESTROYED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PAUSED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PRE_ON_CREATE; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESTARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESUMED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STOPPED; + } + +} + +package androidx.test.runner.permission { + + public class PermissionRequester implements androidx.test.internal.platform.content.PermissionGranter { + ctor public PermissionRequester(); + method public void addPermissions(java.lang.String...); + method public void requestPermissions(); + method protected void setAndroidRuntimeVersion(int); + } + + public abstract class RequestPermissionCallable implements java.util.concurrent.Callable { + ctor public RequestPermissionCallable(androidx.test.runner.permission.ShellCommand, android.content.Context, java.lang.String); + method protected java.lang.String getPermission(); + method protected androidx.test.runner.permission.ShellCommand getShellCommand(); + method protected boolean isPermissionGranted(); + } + + public static final class RequestPermissionCallable.Result extends java.lang.Enum { + method public static androidx.test.runner.permission.RequestPermissionCallable.Result valueOf(java.lang.String); + method public static final androidx.test.runner.permission.RequestPermissionCallable.Result[] values(); + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result FAILURE; + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result SUCCESS; + } + + public abstract class ShellCommand { + ctor public ShellCommand(); + } + +} + +package androidx.test.runner.screenshot { + + public class BasicScreenCaptureProcessor implements androidx.test.runner.screenshot.ScreenCaptureProcessor { + ctor public BasicScreenCaptureProcessor(); + method protected java.lang.String getDefaultFilename(); + method protected java.lang.String getFilename(java.lang.String); + method public java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + field protected java.lang.String mDefaultFilenamePrefix; + field protected java.io.File mDefaultScreenshotPath; + field protected java.lang.String mFileNameDelimiter; + field protected java.lang.String mTag; + } + + public final class ScreenCapture { + method public android.graphics.Bitmap getBitmap(); + method public android.graphics.Bitmap.CompressFormat getFormat(); + method public java.lang.String getName(); + method public void process() throws java.io.IOException; + method public void process(java.util.Set) throws java.io.IOException; + method public androidx.test.runner.screenshot.ScreenCapture setFormat(android.graphics.Bitmap.CompressFormat); + method public androidx.test.runner.screenshot.ScreenCapture setName(java.lang.String); + } + + public abstract interface ScreenCaptureProcessor { + method public abstract java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + } + + public final class Screenshot { + ctor public Screenshot(); + method public static void addScreenCaptureProcessors(java.util.Set); + method public static androidx.test.runner.screenshot.ScreenCapture capture() throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.app.Activity) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.view.View) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static void setScreenshotProcessors(java.util.Set); + } + + public class UiAutomationWrapper { + method public android.graphics.Bitmap takeScreenshot(); + } + +} + +package androidx.test.uiautomator { + + public class By { + method public static androidx.test.uiautomator.BySelector checkable(boolean); + method public static androidx.test.uiautomator.BySelector checked(boolean); + method public static androidx.test.uiautomator.BySelector clazz(java.lang.String); + method public static androidx.test.uiautomator.BySelector clazz(java.lang.String, java.lang.String); + method public static androidx.test.uiautomator.BySelector clazz(java.lang.Class); + method public static androidx.test.uiautomator.BySelector clazz(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector clickable(boolean); + method public static androidx.test.uiautomator.BySelector copy(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.BySelector depth(int); + method public static androidx.test.uiautomator.BySelector desc(java.lang.String); + method public static androidx.test.uiautomator.BySelector desc(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector descContains(java.lang.String); + method public static androidx.test.uiautomator.BySelector descEndsWith(java.lang.String); + method public static androidx.test.uiautomator.BySelector descStartsWith(java.lang.String); + method public static androidx.test.uiautomator.BySelector enabled(boolean); + method public static androidx.test.uiautomator.BySelector focusable(boolean); + method public static androidx.test.uiautomator.BySelector focused(boolean); + method public static androidx.test.uiautomator.BySelector hasChild(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector, int); + method public static androidx.test.uiautomator.BySelector longClickable(boolean); + method public static androidx.test.uiautomator.BySelector pkg(java.lang.String); + method public static androidx.test.uiautomator.BySelector pkg(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector res(java.lang.String); + method public static androidx.test.uiautomator.BySelector res(java.lang.String, java.lang.String); + method public static androidx.test.uiautomator.BySelector res(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector scrollable(boolean); + method public static androidx.test.uiautomator.BySelector selected(boolean); + method public static androidx.test.uiautomator.BySelector text(java.lang.String); + method public static androidx.test.uiautomator.BySelector text(java.util.regex.Pattern); + method public static androidx.test.uiautomator.BySelector textContains(java.lang.String); + method public static androidx.test.uiautomator.BySelector textEndsWith(java.lang.String); + method public static androidx.test.uiautomator.BySelector textStartsWith(java.lang.String); + } + + public class BySelector { + method public androidx.test.uiautomator.BySelector checkable(boolean); + method public androidx.test.uiautomator.BySelector checked(boolean); + method public androidx.test.uiautomator.BySelector clazz(java.lang.String); + method public androidx.test.uiautomator.BySelector clazz(java.lang.String, java.lang.String); + method public androidx.test.uiautomator.BySelector clazz(java.lang.Class); + method public androidx.test.uiautomator.BySelector clazz(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector clickable(boolean); + method public androidx.test.uiautomator.BySelector depth(int); + method public androidx.test.uiautomator.BySelector depth(int, int); + method public androidx.test.uiautomator.BySelector desc(java.lang.String); + method public androidx.test.uiautomator.BySelector desc(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector descContains(java.lang.String); + method public androidx.test.uiautomator.BySelector descEndsWith(java.lang.String); + method public androidx.test.uiautomator.BySelector descStartsWith(java.lang.String); + method public androidx.test.uiautomator.BySelector enabled(boolean); + method public androidx.test.uiautomator.BySelector focusable(boolean); + method public androidx.test.uiautomator.BySelector focused(boolean); + method public androidx.test.uiautomator.BySelector hasChild(androidx.test.uiautomator.BySelector); + method public androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector); + method public androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector, int); + method public androidx.test.uiautomator.BySelector longClickable(boolean); + method public androidx.test.uiautomator.BySelector maxDepth(int); + method public androidx.test.uiautomator.BySelector minDepth(int); + method public androidx.test.uiautomator.BySelector pkg(java.lang.String); + method public androidx.test.uiautomator.BySelector pkg(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector res(java.lang.String); + method public androidx.test.uiautomator.BySelector res(java.lang.String, java.lang.String); + method public androidx.test.uiautomator.BySelector res(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector scrollable(boolean); + method public androidx.test.uiautomator.BySelector selected(boolean); + method public androidx.test.uiautomator.BySelector text(java.lang.String); + method public androidx.test.uiautomator.BySelector text(java.util.regex.Pattern); + method public androidx.test.uiautomator.BySelector textContains(java.lang.String); + method public androidx.test.uiautomator.BySelector textEndsWith(java.lang.String); + method public androidx.test.uiautomator.BySelector textStartsWith(java.lang.String); + } + + public final class Configurator { + method public long getActionAcknowledgmentTimeout(); + method public static androidx.test.uiautomator.Configurator getInstance(); + method public long getKeyInjectionDelay(); + method public long getScrollAcknowledgmentTimeout(); + method public int getToolType(); + method public int getUiAutomationFlags(); + method public long getWaitForIdleTimeout(); + method public long getWaitForSelectorTimeout(); + method public androidx.test.uiautomator.Configurator setActionAcknowledgmentTimeout(long); + method public androidx.test.uiautomator.Configurator setKeyInjectionDelay(long); + method public androidx.test.uiautomator.Configurator setScrollAcknowledgmentTimeout(long); + method public androidx.test.uiautomator.Configurator setToolType(int); + method public androidx.test.uiautomator.Configurator setUiAutomationFlags(int); + method public androidx.test.uiautomator.Configurator setWaitForIdleTimeout(long); + method public androidx.test.uiautomator.Configurator setWaitForSelectorTimeout(long); + } + + public final class Direction extends java.lang.Enum { + method public static androidx.test.uiautomator.Direction reverse(androidx.test.uiautomator.Direction); + method public static androidx.test.uiautomator.Direction valueOf(java.lang.String); + method public static final androidx.test.uiautomator.Direction[] values(); + enum_constant public static final androidx.test.uiautomator.Direction DOWN; + enum_constant public static final androidx.test.uiautomator.Direction LEFT; + enum_constant public static final androidx.test.uiautomator.Direction RIGHT; + enum_constant public static final androidx.test.uiautomator.Direction UP; + } + + public abstract class EventCondition { + ctor public EventCondition(); + } + + public abstract interface IAutomationSupport { + method public abstract void sendStatus(int, android.os.Bundle); + } + + public abstract class SearchCondition { + ctor public SearchCondition(); + } + + public class StaleObjectException extends java.lang.RuntimeException { + ctor public StaleObjectException(); + } + + public class UiAutomatorInstrumentationTestRunner extends android.test.InstrumentationTestRunner { + ctor public UiAutomatorInstrumentationTestRunner(); + method protected android.test.AndroidTestRunner getAndroidTestRunner(); + method protected void initializeUiAutomatorTest(androidx.test.uiautomator.UiAutomatorTestCase); + } + + public deprecated class UiAutomatorTestCase extends android.test.InstrumentationTestCase { + ctor public UiAutomatorTestCase(); + method public deprecated androidx.test.uiautomator.IAutomationSupport getAutomationSupport(); + method public android.os.Bundle getParams(); + method public androidx.test.uiautomator.UiDevice getUiDevice(); + method public deprecated void sleep(long); + } + + public class UiCollection extends androidx.test.uiautomator.UiObject { + ctor public UiCollection(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiObject getChildByDescription(androidx.test.uiautomator.UiSelector, java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByInstance(androidx.test.uiautomator.UiSelector, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByText(androidx.test.uiautomator.UiSelector, java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public int getChildCount(androidx.test.uiautomator.UiSelector); + } + + public class UiDevice { + method public void clearLastTraversedText(); + method public boolean click(int, int); + method public boolean drag(int, int, int, int, int); + method public deprecated void dumpWindowHierarchy(java.lang.String); + method public void dumpWindowHierarchy(java.io.File) throws java.io.IOException; + method public void dumpWindowHierarchy(java.io.OutputStream) throws java.io.IOException; + method public androidx.test.uiautomator.UiObject findObject(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiObject2 findObject(androidx.test.uiautomator.BySelector); + method public java.util.List findObjects(androidx.test.uiautomator.BySelector); + method public void freezeRotation() throws android.os.RemoteException; + method public deprecated java.lang.String getCurrentActivityName(); + method public java.lang.String getCurrentPackageName(); + method public int getDisplayHeight(); + method public int getDisplayRotation(); + method public android.graphics.Point getDisplaySizeDp(); + method public int getDisplayWidth(); + method public static deprecated androidx.test.uiautomator.UiDevice getInstance(); + method public static androidx.test.uiautomator.UiDevice getInstance(android.app.Instrumentation); + method public java.lang.String getLastTraversedText(); + method public java.lang.String getLauncherPackageName(); + method public java.lang.String getProductName(); + method public boolean hasAnyWatcherTriggered(); + method public boolean hasObject(androidx.test.uiautomator.BySelector); + method public boolean hasWatcherTriggered(java.lang.String); + method public boolean isNaturalOrientation(); + method public boolean isScreenOn() throws android.os.RemoteException; + method public boolean openNotification(); + method public boolean openQuickSettings(); + method public R performActionAndWait(java.lang.Runnable, androidx.test.uiautomator.EventCondition, long); + method public boolean pressBack(); + method public boolean pressDPadCenter(); + method public boolean pressDPadDown(); + method public boolean pressDPadLeft(); + method public boolean pressDPadRight(); + method public boolean pressDPadUp(); + method public boolean pressDelete(); + method public boolean pressEnter(); + method public boolean pressHome(); + method public boolean pressKeyCode(int); + method public boolean pressKeyCode(int, int); + method public boolean pressMenu(); + method public boolean pressRecentApps() throws android.os.RemoteException; + method public boolean pressSearch(); + method public void registerWatcher(java.lang.String, androidx.test.uiautomator.UiWatcher); + method public void removeWatcher(java.lang.String); + method public void resetWatcherTriggers(); + method public void runWatchers(); + method public void setCompressedLayoutHeirarchy(boolean); + method public void setOrientationLeft() throws android.os.RemoteException; + method public void setOrientationNatural() throws android.os.RemoteException; + method public void setOrientationRight() throws android.os.RemoteException; + method public void sleep() throws android.os.RemoteException; + method public boolean swipe(int, int, int, int, int); + method public boolean swipe(android.graphics.Point[], int); + method public boolean takeScreenshot(java.io.File); + method public boolean takeScreenshot(java.io.File, float, int); + method public void unfreezeRotation() throws android.os.RemoteException; + method public R wait(androidx.test.uiautomator.SearchCondition, long); + method public void waitForIdle(); + method public void waitForIdle(long); + method public boolean waitForWindowUpdate(java.lang.String, long); + method public void wakeUp() throws android.os.RemoteException; + } + + public class UiObject { + ctor public deprecated UiObject(androidx.test.uiautomator.UiSelector); + method public void clearTextField() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean click() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickAndWaitForNewWindow() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickAndWaitForNewWindow(long) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickBottomRight() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean clickTopLeft() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean dragTo(androidx.test.uiautomator.UiObject, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean dragTo(int, int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean exists(); + method protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long); + method public android.graphics.Rect getBounds() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChild(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public int getChildCount() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public java.lang.String getClassName() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public java.lang.String getContentDescription() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getFromParent(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public java.lang.String getPackageName() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public final androidx.test.uiautomator.UiSelector getSelector(); + method public java.lang.String getText() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public android.graphics.Rect getVisibleBounds() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isCheckable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isChecked() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isClickable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isEnabled() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isFocusable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isFocused() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isLongClickable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isScrollable() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean isSelected() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean longClick() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean longClickBottomRight() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean longClickTopLeft() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean performMultiPointerGesture(android.view.MotionEvent.PointerCoords...); + method public boolean performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int); + method public boolean pinchIn(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean pinchOut(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean setText(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeDown(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeLeft(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeRight(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean swipeUp(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean waitForExists(long); + method public boolean waitUntilGone(long); + field protected static final int FINGER_TOUCH_HALF_WIDTH = 20; // 0x14 + field protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5 + field protected static final deprecated long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L + field protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L + field protected static final deprecated long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L + field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL + } + + public class UiObject2 { + method public void clear(); + method public void click(); + method public void click(long); + method public R clickAndWait(androidx.test.uiautomator.EventCondition, long); + method public void drag(android.graphics.Point); + method public void drag(android.graphics.Point, int); + method public androidx.test.uiautomator.UiObject2 findObject(androidx.test.uiautomator.BySelector); + method public java.util.List findObjects(androidx.test.uiautomator.BySelector); + method public boolean fling(androidx.test.uiautomator.Direction); + method public boolean fling(androidx.test.uiautomator.Direction, int); + method public java.lang.String getApplicationPackage(); + method public int getChildCount(); + method public java.util.List getChildren(); + method public java.lang.String getClassName(); + method public java.lang.String getContentDescription(); + method public androidx.test.uiautomator.UiObject2 getParent(); + method public java.lang.String getResourceName(); + method public java.lang.String getText(); + method public android.graphics.Rect getVisibleBounds(); + method public android.graphics.Point getVisibleCenter(); + method public boolean hasObject(androidx.test.uiautomator.BySelector); + method public boolean isCheckable(); + method public boolean isChecked(); + method public boolean isClickable(); + method public boolean isEnabled(); + method public boolean isFocusable(); + method public boolean isFocused(); + method public boolean isLongClickable(); + method public boolean isScrollable(); + method public boolean isSelected(); + method public void longClick(); + method public void pinchClose(float); + method public void pinchClose(float, int); + method public void pinchOpen(float); + method public void pinchOpen(float, int); + method public void recycle(); + method public boolean scroll(androidx.test.uiautomator.Direction, float); + method public boolean scroll(androidx.test.uiautomator.Direction, float, int); + method public void setGestureMargin(int); + method public void setGestureMargins(int, int, int, int); + method public void setText(java.lang.String); + method public void swipe(androidx.test.uiautomator.Direction, float); + method public void swipe(androidx.test.uiautomator.Direction, float, int); + method public R wait(androidx.test.uiautomator.UiObject2Condition, long); + method public R wait(androidx.test.uiautomator.SearchCondition, long); + } + + public abstract class UiObject2Condition { + ctor public UiObject2Condition(); + } + + public class UiObjectNotFoundException extends java.lang.Exception { + ctor public UiObjectNotFoundException(java.lang.String); + ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable); + ctor public UiObjectNotFoundException(java.lang.Throwable); + } + + public class UiScrollable extends androidx.test.uiautomator.UiCollection { + ctor public UiScrollable(androidx.test.uiautomator.UiSelector); + method protected boolean exists(androidx.test.uiautomator.UiSelector); + method public boolean flingBackward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean flingForward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean flingToBeginning(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean flingToEnd(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByDescription(androidx.test.uiautomator.UiSelector, java.lang.String, boolean) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiObject getChildByText(androidx.test.uiautomator.UiSelector, java.lang.String, boolean) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public int getMaxSearchSwipes(); + method public double getSwipeDeadZonePercentage(); + method public boolean scrollBackward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollBackward(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollDescriptionIntoView(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollForward() throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollForward(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollIntoView(androidx.test.uiautomator.UiObject) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollIntoView(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollTextIntoView(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToBeginning(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToBeginning(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToEnd(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public boolean scrollToEnd(int) throws androidx.test.uiautomator.UiObjectNotFoundException; + method public androidx.test.uiautomator.UiScrollable setAsHorizontalList(); + method public androidx.test.uiautomator.UiScrollable setAsVerticalList(); + method public androidx.test.uiautomator.UiScrollable setMaxSearchSwipes(int); + method public androidx.test.uiautomator.UiScrollable setSwipeDeadZonePercentage(double); + } + + public class UiSelector { + ctor public UiSelector(); + method public androidx.test.uiautomator.UiSelector checkable(boolean); + method public androidx.test.uiautomator.UiSelector checked(boolean); + method public androidx.test.uiautomator.UiSelector childSelector(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiSelector className(java.lang.String); + method public androidx.test.uiautomator.UiSelector className(java.lang.Class); + method public androidx.test.uiautomator.UiSelector classNameMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector clickable(boolean); + method protected androidx.test.uiautomator.UiSelector cloneSelector(); + method public androidx.test.uiautomator.UiSelector description(java.lang.String); + method public androidx.test.uiautomator.UiSelector descriptionContains(java.lang.String); + method public androidx.test.uiautomator.UiSelector descriptionMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector descriptionStartsWith(java.lang.String); + method public androidx.test.uiautomator.UiSelector enabled(boolean); + method public androidx.test.uiautomator.UiSelector focusable(boolean); + method public androidx.test.uiautomator.UiSelector focused(boolean); + method public androidx.test.uiautomator.UiSelector fromParent(androidx.test.uiautomator.UiSelector); + method public androidx.test.uiautomator.UiSelector index(int); + method public androidx.test.uiautomator.UiSelector instance(int); + method public androidx.test.uiautomator.UiSelector longClickable(boolean); + method public androidx.test.uiautomator.UiSelector packageName(java.lang.String); + method public androidx.test.uiautomator.UiSelector packageNameMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector resourceId(java.lang.String); + method public androidx.test.uiautomator.UiSelector resourceIdMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector scrollable(boolean); + method public androidx.test.uiautomator.UiSelector selected(boolean); + method public androidx.test.uiautomator.UiSelector text(java.lang.String); + method public androidx.test.uiautomator.UiSelector textContains(java.lang.String); + method public androidx.test.uiautomator.UiSelector textMatches(java.lang.String); + method public androidx.test.uiautomator.UiSelector textStartsWith(java.lang.String); + } + + public abstract interface UiWatcher { + method public abstract boolean checkForCondition(); + } + + public class Until { + ctor public Until(); + method public static androidx.test.uiautomator.UiObject2Condition checkable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition checked(boolean); + method public static androidx.test.uiautomator.UiObject2Condition clickable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition descContains(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descEndsWith(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descEquals(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descMatches(java.util.regex.Pattern); + method public static androidx.test.uiautomator.UiObject2Condition descMatches(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition descStartsWith(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition enabled(boolean); + method public static androidx.test.uiautomator.SearchCondition findObject(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.SearchCondition> findObjects(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.UiObject2Condition focusable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition focused(boolean); + method public static androidx.test.uiautomator.SearchCondition gone(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.SearchCondition hasObject(androidx.test.uiautomator.BySelector); + method public static androidx.test.uiautomator.UiObject2Condition longClickable(boolean); + method public static androidx.test.uiautomator.EventCondition newWindow(); + method public static androidx.test.uiautomator.EventCondition scrollFinished(androidx.test.uiautomator.Direction); + method public static androidx.test.uiautomator.UiObject2Condition scrollable(boolean); + method public static androidx.test.uiautomator.UiObject2Condition selected(boolean); + method public static androidx.test.uiautomator.UiObject2Condition textContains(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textEndsWith(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textEquals(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textMatches(java.util.regex.Pattern); + method public static androidx.test.uiautomator.UiObject2Condition textMatches(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textNotEquals(java.lang.String); + method public static androidx.test.uiautomator.UiObject2Condition textStartsWith(java.lang.String); + } + +} + diff --git a/espresso/core/java/androidx/test/espresso/remote/api/current.txt b/espresso/core/java/androidx/test/espresso/remote/api/current.txt new file mode 100644 index 000000000..abae847aa --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/remote/api/current.txt @@ -0,0 +1,182 @@ + + +package androidx.test.espresso.remote { + + public abstract interface Bindable { + method public abstract android.os.IBinder getIBinder(); + method public abstract java.lang.String getId(); + method public abstract void setIBinder(android.os.IBinder); + } + + public final class ConstructorInvocation { + ctor public ConstructorInvocation(java.lang.Class, java.lang.Class, java.lang.Class...); + method public java.lang.Object invokeConstructor(java.lang.Object...); + } + + public abstract interface Converter { + method public abstract O convert(I); + } + + public final class EspressoRemote implements androidx.test.espresso.remote.RemoteInteraction { + method public synchronized java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); + method public synchronized java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public static androidx.test.espresso.remote.EspressoRemote getInstance(); + method public synchronized void init(); + method public synchronized boolean isRemoteProcess(); + method public synchronized void terminate(); + } + + public abstract interface EspressoRemoteMessage { + } + + public static abstract interface EspressoRemoteMessage.From { + method public abstract T fromProto(M); + } + + public static abstract interface EspressoRemoteMessage.To { + method public abstract M toProto(); + } + + public final class FieldDescriptor { + method public static androidx.test.espresso.remote.FieldDescriptor of(java.lang.Class, java.lang.String, int); + field public final java.lang.String fieldName; + field public final java.lang.Class fieldType; + field public final int order; + } + + public final class GenericRemoteMessage implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + ctor public GenericRemoteMessage(java.lang.Object); + method public com.google.protobuf.MessageLite toProto(); + field public static final androidx.test.espresso.remote.EspressoRemoteMessage.From FROM; + } + + public final class InteractionRequest implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public org.hamcrest.Matcher getRootMatcher(); + method public androidx.test.espresso.ViewAction getViewAction(); + method public androidx.test.espresso.ViewAssertion getViewAssertion(); + method public org.hamcrest.Matcher getViewMatcher(); + method public com.google.protobuf.MessageLite toProto(); + } + + public static class InteractionRequest.Builder { + ctor public Builder(); + method public androidx.test.espresso.remote.InteractionRequest build(); + method public androidx.test.espresso.remote.InteractionRequest.Builder setRequestProto(byte[]); + method public androidx.test.espresso.remote.InteractionRequest.Builder setRootMatcher(org.hamcrest.Matcher); + method public androidx.test.espresso.remote.InteractionRequest.Builder setViewAction(androidx.test.espresso.ViewAction); + method public androidx.test.espresso.remote.InteractionRequest.Builder setViewAssertion(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.remote.InteractionRequest.Builder setViewMatcher(org.hamcrest.Matcher); + } + + public final class InteractionResponse implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public androidx.test.espresso.remote.InteractionResponse.RemoteError getRemoteError(); + method public androidx.test.espresso.remote.InteractionResponse.Status getStatus(); + method public boolean hasRemoteError(); + method public com.google.protobuf.MessageLite toProto(); + } + + public static class InteractionResponse.Builder { + ctor public Builder(); + method public androidx.test.espresso.remote.InteractionResponse build(); + method public androidx.test.espresso.remote.InteractionResponse.Builder setRemoteError(androidx.test.espresso.remote.InteractionResponse.RemoteError); + method public androidx.test.espresso.remote.InteractionResponse.Builder setResultProto(byte[]); + method public androidx.test.espresso.remote.InteractionResponse.Builder setStatus(androidx.test.espresso.remote.InteractionResponse.Status); + } + + public static final class InteractionResponse.RemoteError { + method public int getCode(); + method public java.lang.String getDescription(); + field public static final int REMOTE_ESPRESSO_ERROR_CODE = 0; // 0x0 + field public static final int REMOTE_PROTOCOL_ERROR_CODE = 1; // 0x1 + } + + public static final class InteractionResponse.Status extends java.lang.Enum { + method public static androidx.test.espresso.remote.InteractionResponse.Status valueOf(java.lang.String); + method public static final androidx.test.espresso.remote.InteractionResponse.Status[] values(); + enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Error; + enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Ok; + } + + public final class NoRemoteEspressoInstanceException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public NoRemoteEspressoInstanceException(java.lang.String); + } + + public class NoopRemoteInteraction implements androidx.test.espresso.remote.RemoteInteraction { + ctor public NoopRemoteInteraction(); + method public java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); + method public java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public boolean isRemoteProcess(); + } + + public final class ProtoUtils { + method public static java.lang.String capitalizeFirstChar(java.lang.String); + method public static T checkedGetEnumForProto(int, java.lang.Class); + method public static java.util.List getFilteredFieldList(java.lang.Class, java.util.List) throws java.lang.NoSuchFieldException; + } + + public final class RemoteDescriptor { + method public java.util.List getInstanceFieldDescriptorList(); + method public java.lang.Class getInstanceType(); + method public java.lang.String getInstanceTypeName(); + method public java.lang.Class getProtoBuilderClass(); + method public com.google.protobuf.Parser getProtoParser(); + method public java.lang.Class getProtoType(); + method public java.lang.Class[] getRemoteConstrTypes(); + method public java.lang.Class getRemoteType(); + } + + public static final class RemoteDescriptor.Builder { + ctor public Builder(); + method public androidx.test.espresso.remote.RemoteDescriptor build(); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setInstanceFieldDescriptors(androidx.test.espresso.remote.FieldDescriptor...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setInstanceType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoBuilderType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoParser(com.google.protobuf.Parser); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setRemoteConstrTypes(java.lang.Class...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder setRemoteType(java.lang.Class); + } + + public final class RemoteDescriptorRegistry { + method public androidx.test.espresso.remote.RemoteDescriptor argForInstanceType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor argForMsgType(java.lang.Class); + method public androidx.test.espresso.remote.RemoteDescriptor argForRemoteTypeUrl(java.lang.String); + method public static androidx.test.espresso.remote.RemoteDescriptorRegistry getInstance(); + method public boolean hasArgForInstanceType(java.lang.Class); + method public boolean registerRemoteTypeArgs(java.util.List); + method public void unregisterRemoteTypeArgs(java.util.List); + } + + public class RemoteEspressoException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public RemoteEspressoException(java.lang.String); + ctor public RemoteEspressoException(java.lang.String, java.lang.Throwable); + } + + public abstract interface RemoteInteraction { + method public abstract java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); + method public abstract java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public abstract boolean isRemoteProcess(); + field public static final java.lang.String BUNDLE_EXECUTION_STATUS = "executionStatus"; + } + + public class RemoteInteractionRegistry { + method public static androidx.test.espresso.remote.RemoteInteraction getInstance(); + method public static void registerInstance(androidx.test.espresso.remote.RemoteInteraction); + } + + public class RemoteProtocolException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public RemoteProtocolException(java.lang.String); + ctor public RemoteProtocolException(java.lang.String, java.lang.Throwable); + } + + public final class TypeProtoConverters { + method public static T anyToType(com.google.protobuf.Any); + method public static android.os.Parcelable byteStringToParcelable(com.google.protobuf.ByteString, java.lang.Class); + method public static T byteStringToType(com.google.protobuf.ByteString); + method public static com.google.protobuf.ByteString parcelableToByteString(android.os.Parcelable); + method public static com.google.protobuf.Any typeToAny(T); + method public static com.google.protobuf.ByteString typeToByteString(java.lang.Object); + } + +} + diff --git a/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt b/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt new file mode 100644 index 000000000..1b6577bfa --- /dev/null +++ b/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt @@ -0,0 +1,21 @@ + +package androidx.test.espresso.idling.concurrent { + + public class IdlingScheduledThreadPoolExecutor extends java.util.concurrent.ScheduledThreadPoolExecutor implements androidx.test.espresso.IdlingResource { + ctor public IdlingScheduledThreadPoolExecutor(java.lang.String, int, java.util.concurrent.ThreadFactory); + ctor public IdlingScheduledThreadPoolExecutor(java.lang.String, int, java.util.concurrent.ThreadFactory, boolean); + method public java.lang.String getName(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + + public class IdlingThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor implements androidx.test.espresso.IdlingResource { + ctor public IdlingThreadPoolExecutor(java.lang.String, int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory); + method public synchronized void execute(java.lang.Runnable); + method public java.lang.String getName(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + +} + diff --git a/espresso/idling_resource/java/androidx/test/espresso/api/current.txt b/espresso/idling_resource/java/androidx/test/espresso/api/current.txt new file mode 100644 index 000000000..3a329e1f4 --- /dev/null +++ b/espresso/idling_resource/java/androidx/test/espresso/api/current.txt @@ -0,0 +1,16 @@ + +package androidx.test.espresso.idling { + + public final class CountingIdlingResource implements androidx.test.espresso.IdlingResource { + ctor public CountingIdlingResource(java.lang.String); + ctor public CountingIdlingResource(java.lang.String, boolean); + method public void decrement(); + method public void dumpStateToLogs(); + method public java.lang.String getName(); + method public void increment(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + +} + diff --git a/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt b/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt new file mode 100644 index 000000000..9686a21e1 --- /dev/null +++ b/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt @@ -0,0 +1,21 @@ + + +package androidx.test.espresso.idling.net { + + public class UriIdlingResource implements androidx.test.espresso.IdlingResource { + ctor public UriIdlingResource(java.lang.String, long); + method public void beginLoad(java.lang.String); + method public void endLoad(java.lang.String); + method public java.lang.String getName(); + method public void ignoreUri(java.util.regex.Pattern); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + } + + public static abstract interface UriIdlingResource.HandlerIntf { + method public abstract void postDelayed(java.lang.Runnable, long); + method public abstract void removeCallbacks(java.lang.Runnable); + } + +} + diff --git a/espresso/intents/java/androidx/test/espresso/intent/api/current.txt b/espresso/intents/java/androidx/test/espresso/intent/api/current.txt new file mode 100644 index 000000000..f0a4c79ae --- /dev/null +++ b/espresso/intents/java/androidx/test/espresso/intent/api/current.txt @@ -0,0 +1,153 @@ + +package androidx.test.espresso.intent { + + public abstract interface ActivityResultFunction { + method public abstract android.app.Instrumentation.ActivityResult apply(android.content.Intent); + } + + public final class Checks { + method public static void checkArgument(boolean); + method public static void checkArgument(boolean, java.lang.Object); + method public static void checkArgument(boolean, java.lang.String, java.lang.Object...); + method public static T checkNotNull(T); + method public static T checkNotNull(T, java.lang.Object); + method public static T checkNotNull(T, java.lang.String, java.lang.Object...); + method public static void checkState(boolean, java.lang.Object); + method public static void checkState(boolean, java.lang.String, java.lang.Object...); + } + + public final class Intents { + method public static void assertNoUnverifiedIntents(); + method public static java.util.List getIntents(); + method public static void init(); + method public static void intended(org.hamcrest.Matcher); + method public static void intended(org.hamcrest.Matcher, androidx.test.espresso.intent.VerificationMode); + method public static androidx.test.espresso.intent.OngoingStubbing intending(org.hamcrest.Matcher); + method public static void release(); + method public static androidx.test.espresso.intent.VerificationMode times(int); + } + + public final class OngoingStubbing { + method public void respondWith(android.app.Instrumentation.ActivityResult); + method public void respondWithFunction(androidx.test.espresso.intent.ActivityResultFunction); + } + + public abstract interface ResettingStubber implements androidx.test.runner.intent.IntentStubber { + method public abstract void initialize(); + method public abstract boolean isInitialized(); + method public abstract void reset(); + method public abstract void setActivityResultForIntent(org.hamcrest.Matcher, android.app.Instrumentation.ActivityResult); + method public abstract void setActivityResultFunctionForIntent(org.hamcrest.Matcher, androidx.test.espresso.intent.ActivityResultFunction); + } + + public final class ResettingStubberImpl implements androidx.test.espresso.intent.ResettingStubber { + ctor public ResettingStubberImpl(); + method public android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + method public void initialize(); + method public boolean isInitialized(); + method public void reset(); + method public void setActivityResultForIntent(org.hamcrest.Matcher, android.app.Instrumentation.ActivityResult); + method public void setActivityResultFunctionForIntent(org.hamcrest.Matcher, androidx.test.espresso.intent.ActivityResultFunction); + } + + public abstract interface ResolvedIntent { + method public abstract boolean canBeHandledBy(java.lang.String); + method public abstract android.content.Intent getIntent(); + } + + public abstract interface VerifiableIntent implements androidx.test.espresso.intent.ResolvedIntent { + method public abstract boolean hasBeenVerified(); + method public abstract void markAsVerified(); + } + + public abstract interface VerificationMode { + method public abstract void verify(org.hamcrest.Matcher, java.util.List); + } + + public final class VerificationModes { + method public static androidx.test.espresso.intent.VerificationMode noUnverifiedIntents(); + method public static androidx.test.espresso.intent.VerificationMode times(int); + } + +} + +package androidx.test.espresso.intent.matcher { + + public final class BundleMatchers { + method public static org.hamcrest.Matcher hasEntry(java.lang.String, T); + method public static org.hamcrest.Matcher hasEntry(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasEntry(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasKey(java.lang.String); + method public static org.hamcrest.Matcher hasKey(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasValue(T); + method public static org.hamcrest.Matcher hasValue(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher isEmpty(); + method public static org.hamcrest.Matcher isEmptyOrNull(); + } + + public final class ComponentNameMatchers { + method public static org.hamcrest.Matcher hasClassName(java.lang.String); + method public static org.hamcrest.Matcher hasClassName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasMyPackageName(); + method public static org.hamcrest.Matcher hasPackageName(java.lang.String); + method public static org.hamcrest.Matcher hasPackageName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasShortClassName(java.lang.String); + method public static org.hamcrest.Matcher hasShortClassName(org.hamcrest.Matcher); + } + + public final class IntentMatchers { + method public static org.hamcrest.Matcher anyIntent(); + method public static org.hamcrest.Matcher filterEquals(android.content.Intent); + method public static org.hamcrest.Matcher hasAction(java.lang.String); + method public static org.hamcrest.Matcher hasAction(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasCategories(java.util.Set); + method public static org.hamcrest.Matcher hasCategories(org.hamcrest.Matcher>); + method public static org.hamcrest.Matcher hasComponent(java.lang.String); + method public static org.hamcrest.Matcher hasComponent(android.content.ComponentName); + method public static org.hamcrest.Matcher hasComponent(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasData(java.lang.String); + method public static org.hamcrest.Matcher hasData(android.net.Uri); + method public static org.hamcrest.Matcher hasData(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasDataString(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasExtra(java.lang.String, T); + method public static org.hamcrest.Matcher hasExtra(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasExtraWithKey(java.lang.String); + method public static org.hamcrest.Matcher hasExtraWithKey(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasExtras(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasFlag(int); + method public static org.hamcrest.Matcher hasFlags(int...); + method public static org.hamcrest.Matcher hasFlags(int); + method public static org.hamcrest.Matcher hasPackage(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasPackage(java.lang.String); + method public static org.hamcrest.Matcher hasType(java.lang.String); + method public static org.hamcrest.Matcher hasType(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher isInternal(); + method public static org.hamcrest.Matcher toPackage(java.lang.String); + } + + public final class UriMatchers { + method public static org.hamcrest.Matcher hasHost(java.lang.String); + method public static org.hamcrest.Matcher hasHost(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasParamWithName(java.lang.String); + method public static org.hamcrest.Matcher hasParamWithName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasParamWithValue(java.lang.String, java.lang.String); + method public static org.hamcrest.Matcher hasParamWithValue(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasPath(java.lang.String); + method public static org.hamcrest.Matcher hasPath(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasScheme(java.lang.String); + method public static org.hamcrest.Matcher hasScheme(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasSchemeSpecificPart(java.lang.String, java.lang.String); + method public static org.hamcrest.Matcher hasSchemeSpecificPart(org.hamcrest.Matcher, org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.intent.rule { + + public deprecated class IntentsTestRule extends androidx.test.rule.ActivityTestRule { + ctor public IntentsTestRule(java.lang.Class); + ctor public IntentsTestRule(java.lang.Class, boolean); + ctor public IntentsTestRule(java.lang.Class, boolean, boolean); + } + +} diff --git a/espresso/web/java/androidx/test/espresso/web/api/current.txt b/espresso/web/java/androidx/test/espresso/web/api/current.txt new file mode 100644 index 000000000..bdfc36acc --- /dev/null +++ b/espresso/web/java/androidx/test/espresso/web/api/current.txt @@ -0,0 +1,228 @@ + + +package androidx.test.espresso.web.action { + + public final class AtomAction implements androidx.test.espresso.remote.Bindable androidx.test.espresso.ViewAction { + ctor public AtomAction(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.WindowReference, androidx.test.espresso.web.model.ElementReference); + method public E get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; + method public E get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public java.util.concurrent.Future getFuture(); + method public android.os.IBinder getIBinder(); + method public java.lang.String getId(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + method public void setIBinder(android.os.IBinder); + } + + public class EnableJavascriptAction implements androidx.test.espresso.ViewAction { + ctor public EnableJavascriptAction(); + method public org.hamcrest.Matcher getConstraints(); + method public java.lang.String getDescription(); + method public void perform(androidx.test.espresso.UiController, android.view.View); + } + + public abstract interface IAtomActionResultPropagator implements android.os.IInterface { + method public abstract void setError(android.os.Bundle) throws android.os.RemoteException; + method public abstract void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + + public static abstract class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + ctor public Stub(); + method public static androidx.test.espresso.web.action.IAtomActionResultPropagator asInterface(android.os.IBinder); + } + + public static class IAtomActionResultPropagator.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + method public void setError(android.os.Bundle) throws android.os.RemoteException; + method public void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + } + +} + +package androidx.test.espresso.web.assertion { + + public final class TagSoupDocumentParser { + method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; + method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException; + } + + public abstract class WebAssertion { + ctor public WebAssertion(androidx.test.espresso.web.model.Atom); + method protected abstract void checkResult(android.webkit.WebView, E); + method public final androidx.test.espresso.web.model.Atom getAtom(); + method public final androidx.test.espresso.ViewAssertion toViewAssertion(E); + } + + public final class WebViewAssertions { + method public static androidx.test.espresso.web.assertion.WebAssertion webContent(org.hamcrest.Matcher); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber); + method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher); + } + + public static abstract interface WebViewAssertions.ResultDescriber { + method public abstract java.lang.String apply(E); + } + +} + +package androidx.test.espresso.web.matcher { + + public final class AmbiguousElementMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public AmbiguousElementMatcherException(java.lang.String); + } + + public final class DomMatchers { + method public static org.hamcrest.Matcher containingTextInBody(java.lang.String); + method public static org.hamcrest.Matcher elementById(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher elementByXPath(java.lang.String, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher hasElementWithId(java.lang.String); + method public static org.hamcrest.Matcher hasElementWithXpath(java.lang.String); + method public static org.hamcrest.Matcher withBody(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher withTextContent(java.lang.String); + method public static org.hamcrest.Matcher withTextContent(org.hamcrest.Matcher); + } + +} + +package androidx.test.espresso.web.model { + + public abstract interface Atom { + method public abstract java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public abstract java.lang.String getScript(); + method public abstract R transform(androidx.test.espresso.web.model.Evaluation); + } + + public final class Atoms { + method public static androidx.test.espresso.web.model.TransformingAtom.Transformer castOrDie(java.lang.Class); + method public static androidx.test.espresso.web.model.Atom getCurrentUrl(); + method public static androidx.test.espresso.web.model.Atom getTitle(); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public static androidx.test.espresso.web.model.Atom script(java.lang.String); + method public static androidx.test.espresso.web.model.Atom scriptWithArgs(java.lang.String, java.util.List); + method public static androidx.test.espresso.web.model.Atom transform(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + } + + public final class ElementReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + + public final class Evaluation implements androidx.test.espresso.web.model.JSONAble android.os.Parcelable { + ctor protected Evaluation(android.os.Parcel); + method public int describeContents(); + method public java.lang.String getMessage(); + method public int getStatus(); + method public java.lang.Object getValue(); + method public boolean hasMessage(); + method public void readFromParcel(android.os.Parcel); + method public java.lang.String toJSONString(); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator CREATOR; + } + + public abstract interface JSONAble { + method public abstract java.lang.String toJSONString(); + } + + public static abstract interface JSONAble.DeJSONFactory { + method public abstract java.lang.Object attemptDeJSONize(java.util.Map); + } + + public final class ModelCodec { + method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + method public static androidx.test.espresso.web.model.Evaluation decodeEvaluation(java.lang.String); + method public static java.lang.String encode(java.lang.Object); + method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); + } + + public class SimpleAtom implements androidx.test.espresso.web.model.Atom { + ctor public SimpleAtom(java.lang.String); + ctor public SimpleAtom(java.lang.String, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement); + method public final java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method protected java.util.List getNonContextualArguments(); + method public final java.lang.String getScript(); + method protected androidx.test.espresso.web.model.Evaluation handleBadEvaluation(androidx.test.espresso.web.model.Evaluation); + method protected void handleNoElementReference(); + method public final androidx.test.espresso.web.model.Evaluation transform(androidx.test.espresso.web.model.Evaluation); + } + + public static final class SimpleAtom.ElementReferencePlacement extends java.lang.Enum { + method public static androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement valueOf(java.lang.String); + method public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement[] values(); + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement FIRST; + enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement LAST; + } + + public class TransformingAtom implements androidx.test.espresso.web.model.Atom { + ctor public TransformingAtom(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); + method public java.lang.String getScript(); + method public O transform(androidx.test.espresso.web.model.Evaluation); + } + + public static abstract interface TransformingAtom.Transformer { + method public abstract O apply(I); + } + + public final class WindowReference implements androidx.test.espresso.web.model.JSONAble { + method public java.lang.String toJSONString(); + } + +} + +package androidx.test.espresso.web.sugar { + + public final class Web { + ctor public Web(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(org.hamcrest.Matcher); + } + + public static class Web.WebInteraction { + method public androidx.test.espresso.web.sugar.Web.WebInteraction check(androidx.test.espresso.web.assertion.WebAssertion); + method public androidx.test.espresso.web.sugar.Web.WebInteraction forceJavascriptEnabled(); + method public R get(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.WindowReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction perform(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction reset(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withContextualElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.ElementReference); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.Atom); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withNoTimeout(); + method public androidx.test.espresso.web.sugar.Web.WebInteraction withTimeout(long, java.util.concurrent.TimeUnit); + } + +} + +package androidx.test.espresso.web.webdriver { + + public final class DriverAtoms { + method public static androidx.test.espresso.web.model.Atom clearElement(); + method public static androidx.test.espresso.web.model.Atom findElement(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom> findMultipleElements(androidx.test.espresso.web.webdriver.Locator, java.lang.String); + method public static androidx.test.espresso.web.model.Atom getText(); + method public static androidx.test.espresso.web.model.Atom selectActiveElement(); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int); + method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference); + method public static androidx.test.espresso.web.model.Atom webClick(); + method public static androidx.test.espresso.web.model.Atom webKeys(java.lang.String); + method public static androidx.test.espresso.web.model.Atom webScrollIntoView(); + } + + public final class Locator extends java.lang.Enum { + method public java.lang.String getType(); + method public static androidx.test.espresso.web.webdriver.Locator valueOf(java.lang.String); + method public static final androidx.test.espresso.web.webdriver.Locator[] values(); + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CLASS_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator CSS_SELECTOR; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator ID; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator PARTIAL_LINK_TEXT; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator TAG_NAME; + enum_constant public static final androidx.test.espresso.web.webdriver.Locator XPATH; + } + +} diff --git a/ext/junit/java/androidx/test/ext/junit/api/current.txt b/ext/junit/java/androidx/test/ext/junit/api/current.txt new file mode 100644 index 000000000..3c7431f48 --- /dev/null +++ b/ext/junit/java/androidx/test/ext/junit/api/current.txt @@ -0,0 +1,25 @@ + +package androidx.test.ext.junit.rules { + + public final class ActivityScenarioRule extends org.junit.rules.ExternalResource { + ctor public ActivityScenarioRule(java.lang.Class); + ctor public ActivityScenarioRule(java.lang.Class, android.os.Bundle); + ctor public ActivityScenarioRule(android.content.Intent); + ctor public ActivityScenarioRule(android.content.Intent, android.os.Bundle); + method public androidx.test.core.app.ActivityScenario getScenario(); + } + +} + +package androidx.test.ext.junit.runners { + + public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + +} + diff --git a/ext/truth/java/androidx/test/ext/truth/api/current.txt b/ext/truth/java/androidx/test/ext/truth/api/current.txt new file mode 100644 index 000000000..80d4b4272 --- /dev/null +++ b/ext/truth/java/androidx/test/ext/truth/api/current.txt @@ -0,0 +1,211 @@ + + +package androidx.test.ext.truth.app { + + public class NotificationActionSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationActionSubject assertThat(android.app.Notification.Action); + method public static com.google.common.truth.Subject.Factory notificationActions(); + method public final com.google.common.truth.StringSubject title(); + } + + public class NotificationSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.NotificationSubject assertThat(android.app.Notification); + method public final androidx.test.ext.truth.app.PendingIntentSubject contentIntent(); + method public final androidx.test.ext.truth.app.PendingIntentSubject deleteIntent(); + method public final void doesNotHaveFlags(int); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public final void hasFlags(int); + method public static com.google.common.truth.Subject.Factory notifications(); + method public final com.google.common.truth.StringSubject tickerText(); + } + + public class PendingIntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.app.PendingIntentSubject assertThat(android.app.PendingIntent); + method public static com.google.common.truth.Subject.Factory pendingIntents(); + } + +} + +package androidx.test.ext.truth.content { + + public final class IntentCorrespondences { + method public static com.google.common.truth.Correspondence action(); + method public static com.google.common.truth.Correspondence all(com.google.common.truth.Correspondence...); + method public static com.google.common.truth.Correspondence data(); + } + + public final class IntentSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.content.IntentSubject assertThat(android.content.Intent); + method public com.google.common.truth.IterableSubject categories(); + method public androidx.test.ext.truth.os.BundleSubject extras(); + method public void filtersEquallyTo(android.content.Intent); + method public void hasAction(java.lang.String); + method public void hasComponent(java.lang.String, java.lang.String); + method public void hasComponent(android.content.ComponentName); + method public void hasComponentClass(java.lang.Class); + method public void hasComponentClass(java.lang.String); + method public void hasComponentPackage(java.lang.String); + method public void hasData(android.net.Uri); + method public void hasFlags(int); + method public void hasNoAction(); + method public void hasPackage(java.lang.String); + method public void hasType(java.lang.String); + method public static com.google.common.truth.Subject.Factory intents(); + } + +} + +package androidx.test.ext.truth.location { + + public final class LocationCorrespondences { + method public static com.google.common.truth.Correspondence at(); + method public static com.google.common.truth.Correspondence equality(); + method public static com.google.common.truth.Correspondence nearby(float); + } + + public class LocationSubject extends com.google.common.truth.Subject { + method public com.google.common.truth.FloatSubject accuracy(); + method public com.google.common.truth.DoubleSubject altitude(); + method public static androidx.test.ext.truth.location.LocationSubject assertThat(android.location.Location); + method public com.google.common.truth.FloatSubject bearing(); + method public com.google.common.truth.FloatSubject bearingAccuracy(); + method public com.google.common.truth.FloatSubject bearingTo(double, double); + method public com.google.common.truth.FloatSubject bearingTo(android.location.Location); + method public com.google.common.truth.FloatSubject distanceTo(double, double); + method public com.google.common.truth.FloatSubject distanceTo(android.location.Location); + method public void doesNotHaveProvider(java.lang.String); + method public com.google.common.truth.LongSubject elapsedRealtimeMillis(); + method public com.google.common.truth.LongSubject elapsedRealtimeNanos(); + method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public void hasAccuracy(); + method public void hasAltitude(); + method public void hasBearing(); + method public void hasBearingAccuracy(); + method public void hasProvider(java.lang.String); + method public void hasSpeed(); + method public void hasSpeedAccuracy(); + method public void hasVerticalAccuracy(); + method public void isAt(android.location.Location); + method public void isAt(double, double); + method public void isFaraway(android.location.Location, float); + method public void isMock(); + method public void isNearby(android.location.Location, float); + method public void isNotAt(android.location.Location); + method public void isNotAt(double, double); + method public void isNotMock(); + method public static com.google.common.truth.Subject.Factory locations(); + method public com.google.common.truth.FloatSubject speed(); + method public com.google.common.truth.FloatSubject speedAccuracy(); + method public com.google.common.truth.LongSubject time(); + method public com.google.common.truth.FloatSubject verticalAccuracy(); + } + +} + +package androidx.test.ext.truth.os { + + public final class BundleSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.BundleSubject assertThat(android.os.Bundle); + method public com.google.common.truth.BooleanSubject bool(java.lang.String); + method public static com.google.common.truth.Subject.Factory bundles(); + method public void containsKey(java.lang.String); + method public void doesNotContainKey(java.lang.String); + method public void hasSize(int); + method public com.google.common.truth.IntegerSubject integer(java.lang.String); + method public void isEmpty(); + method public void isNotEmpty(); + method public com.google.common.truth.LongSubject longInt(java.lang.String); + method public androidx.test.ext.truth.os.ParcelableSubject parcelable(java.lang.String); + method public com.google.common.truth.IterableSubject parcelableArrayList(java.lang.String); + method public SubjectT parcelableAsType(java.lang.String, com.google.common.truth.Subject.Factory); + method public com.google.common.truth.StringSubject string(java.lang.String); + method public com.google.common.truth.IterableSubject stringArrayList(java.lang.String); + } + + public final class ParcelableSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.os.ParcelableSubject assertThat(T); + method public static com.google.common.truth.Subject.Factory, T> parcelables(); + method public void recreatesEqual(android.os.Parcelable.Creator); + } + +} + +package androidx.test.ext.truth.view { + + public final class MotionEventSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.MotionEventSubject assertThat(android.view.MotionEvent); + method public void hasAction(int); + method public void hasActionButton(int); + method public void hasButtonState(int); + method public void hasDeviceId(int); + method public void hasDownTime(long); + method public void hasEdgeFlags(int); + method public void hasEventTime(long); + method public void hasFlags(int); + method public void hasHistorySize(int); + method public void hasMetaState(int); + method public void hasPointerCount(int); + method public com.google.common.truth.LongSubject historicalEventTime(int); + method public com.google.common.truth.FloatSubject historicalOrientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject historicalPointerCoords(int, int); + method public com.google.common.truth.FloatSubject historicalPressure(int); + method public com.google.common.truth.FloatSubject historicalSize(int); + method public com.google.common.truth.FloatSubject historicalToolMajor(int); + method public com.google.common.truth.FloatSubject historicalToolMinor(int); + method public com.google.common.truth.FloatSubject historicalTouchMajor(int); + method public com.google.common.truth.FloatSubject historicalTouchMinor(int); + method public com.google.common.truth.FloatSubject historicalX(int); + method public com.google.common.truth.FloatSubject historicalY(int); + method public static com.google.common.truth.Subject.Factory motionEvents(); + method public com.google.common.truth.FloatSubject orientation(); + method public com.google.common.truth.FloatSubject orientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject pointerCoords(int); + method public com.google.common.truth.IntegerSubject pointerId(int); + method public androidx.test.ext.truth.view.PointerPropertiesSubject pointerProperties(int); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject pressure(int); + method public com.google.common.truth.FloatSubject rawX(); + method public com.google.common.truth.FloatSubject rawY(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject size(int); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMajor(int); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject toolMinor(int); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMajor(int); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject touchMinor(int); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject x(int); + method public com.google.common.truth.FloatSubject xPrecision(); + method public com.google.common.truth.FloatSubject y(); + method public com.google.common.truth.FloatSubject y(int); + method public com.google.common.truth.FloatSubject yPrecision(); + } + + public final class PointerCoordsSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerCoordsSubject assertThat(android.view.MotionEvent.PointerCoords); + method public com.google.common.truth.FloatSubject axisValue(int); + method public com.google.common.truth.FloatSubject orientation(); + method public static com.google.common.truth.Subject.Factory pointerCoords(); + method public com.google.common.truth.FloatSubject pressure(); + method public com.google.common.truth.FloatSubject size(); + method public com.google.common.truth.FloatSubject toolMajor(); + method public com.google.common.truth.FloatSubject toolMinor(); + method public com.google.common.truth.FloatSubject touchMajor(); + method public com.google.common.truth.FloatSubject touchMinor(); + method public com.google.common.truth.FloatSubject x(); + method public com.google.common.truth.FloatSubject y(); + } + + public final class PointerPropertiesSubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.view.PointerPropertiesSubject assertThat(android.view.MotionEvent.PointerProperties); + method public void hasId(int); + method public void hasToolType(int); + method public void isEqualTo(android.view.MotionEvent.PointerProperties); + method public static com.google.common.truth.Subject.Factory pointerProperties(); + } + +} + diff --git a/runner/android_junit_runner/java/androidx/test/api/current.txt b/runner/android_junit_runner/java/androidx/test/api/current.txt new file mode 100644 index 000000000..93082a191 --- /dev/null +++ b/runner/android_junit_runner/java/androidx/test/api/current.txt @@ -0,0 +1,90 @@ + +package androidx.test.runner { + + public final deprecated class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor public AndroidJUnit4(java.lang.Class, androidx.test.internal.util.AndroidRunnerParams) throws org.junit.runners.model.InitializationError; + ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description getDescription(); + method public void run(org.junit.runner.notification.RunNotifier); + method public void sort(org.junit.runner.manipulation.Sorter); + } + + public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation implements androidx.test.internal.events.client.TestEventClientConnectListener { + ctor public AndroidJUnitRunner(); + method public void onTestEventClientConnect(); + } +} + + +package androidx.test.runner.permission { + + public class PermissionRequester implements androidx.test.internal.platform.content.PermissionGranter { + ctor public PermissionRequester(); + method public void addPermissions(java.lang.String...); + method public void requestPermissions(); + method protected void setAndroidRuntimeVersion(int); + } + + public abstract class RequestPermissionCallable implements java.util.concurrent.Callable { + ctor public RequestPermissionCallable(androidx.test.runner.permission.ShellCommand, android.content.Context, java.lang.String); + method protected java.lang.String getPermission(); + method protected androidx.test.runner.permission.ShellCommand getShellCommand(); + method protected boolean isPermissionGranted(); + } + + public static final class RequestPermissionCallable.Result extends java.lang.Enum { + method public static androidx.test.runner.permission.RequestPermissionCallable.Result valueOf(java.lang.String); + method public static final androidx.test.runner.permission.RequestPermissionCallable.Result[] values(); + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result FAILURE; + enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result SUCCESS; + } + + public abstract class ShellCommand { + ctor public ShellCommand(); + } + +} + +package androidx.test.runner.screenshot { + + public class BasicScreenCaptureProcessor implements androidx.test.runner.screenshot.ScreenCaptureProcessor { + ctor public BasicScreenCaptureProcessor(); + method protected java.lang.String getDefaultFilename(); + method protected java.lang.String getFilename(java.lang.String); + method public java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + field protected java.lang.String mDefaultFilenamePrefix; + field protected java.io.File mDefaultScreenshotPath; + field protected java.lang.String mFileNameDelimiter; + field protected java.lang.String mTag; + } + + public final class ScreenCapture { + method public android.graphics.Bitmap getBitmap(); + method public android.graphics.Bitmap.CompressFormat getFormat(); + method public java.lang.String getName(); + method public void process() throws java.io.IOException; + method public void process(java.util.Set) throws java.io.IOException; + method public androidx.test.runner.screenshot.ScreenCapture setFormat(android.graphics.Bitmap.CompressFormat); + method public androidx.test.runner.screenshot.ScreenCapture setName(java.lang.String); + } + + public abstract interface ScreenCaptureProcessor { + method public abstract java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + } + + public final class Screenshot { + ctor public Screenshot(); + method public static void addScreenCaptureProcessors(java.util.Set); + method public static androidx.test.runner.screenshot.ScreenCapture capture() throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.app.Activity) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static androidx.test.runner.screenshot.ScreenCapture capture(android.view.View) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; + method public static void setScreenshotProcessors(java.util.Set); + } + + public class UiAutomationWrapper { + method public android.graphics.Bitmap takeScreenshot(); + } + +} + diff --git a/runner/monitor/java/androidx/test/api/current.txt b/runner/monitor/java/androidx/test/api/current.txt new file mode 100644 index 000000000..824520630 --- /dev/null +++ b/runner/monitor/java/androidx/test/api/current.txt @@ -0,0 +1,192 @@ +package androidx.test { + + public final deprecated class InstrumentationRegistry { + method public static deprecated android.os.Bundle getArguments(); + method public static deprecated android.content.Context getContext(); + method public static deprecated android.app.Instrumentation getInstrumentation(); + method public static deprecated android.content.Context getTargetContext(); + method public static deprecated void registerInstance(android.app.Instrumentation, android.os.Bundle); + } + +} + +package androidx.test.annotation { + + public abstract class Beta implements java.lang.annotation.Annotation { + } + +} + + +package androidx.test.platform { + + public abstract interface TestFrameworkException { + } + +} + +package androidx.test.platform.app { + + public final class InstrumentationRegistry { + method public static android.os.Bundle getArguments(); + method public static android.app.Instrumentation getInstrumentation(); + method public static void registerInstance(android.app.Instrumentation, android.os.Bundle); + } + +} + +package androidx.test.platform.ui { + + public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { + ctor public InjectEventSecurityException(java.lang.String); + ctor public InjectEventSecurityException(java.lang.Throwable); + ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + } + + public abstract interface UiController { + method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract boolean injectString(java.lang.String) throws androidx.test.platform.ui.InjectEventSecurityException; + method public abstract void loopMainThreadForAtLeast(long); + method public abstract void loopMainThreadUntilIdle(); + } + +} + + +package androidx.test.runner { + + + public class MonitoringInstrumentation extends androidx.test.internal.runner.hidden.ExposedInstrumentationApi { + ctor public MonitoringInstrumentation(); + method protected void dumpThreadStateToOutputs(java.lang.String); + method protected java.lang.String getThreadState(); + method protected void installMultidex(); + method protected void installOldMultiDex(java.lang.Class) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; + method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory); + method protected deprecated boolean isPrimaryInstrProcess(java.lang.String); + method protected final boolean isPrimaryInstrProcess(); + method protected void restoreUncaughtExceptionHandler(); + method protected final void setJsBridgeClassName(java.lang.String); + method protected boolean shouldWaitForActivitiesToComplete(); + method protected void specifyDexMakerCacheProperty(); + method public void useDefaultInterceptingActivityFactory(); + method protected void waitForActivitiesToComplete(); + } + + public class MonitoringInstrumentation.ActivityFinisher implements java.lang.Runnable { + ctor public ActivityFinisher(); + method public void run(); + } + + public class UsageTrackerFacilitator implements androidx.test.internal.runner.tracker.UsageTracker { + ctor public UsageTrackerFacilitator(androidx.test.internal.runner.RunnerArgs); + ctor public UsageTrackerFacilitator(boolean); + method public void registerUsageTracker(androidx.test.internal.runner.tracker.UsageTracker); + method public void sendUsages(); + method public boolean shouldTrackUsage(); + method public void trackUsage(java.lang.String, java.lang.String); + } + +} + +package androidx.test.runner.intent { + + public abstract interface IntentCallback { + method public abstract void onIntentSent(android.content.Intent); + } + + public abstract interface IntentMonitor { + method public abstract void addIntentCallback(androidx.test.runner.intent.IntentCallback); + method public abstract void removeIntentCallback(androidx.test.runner.intent.IntentCallback); + } + + public final class IntentMonitorRegistry { + method public static androidx.test.runner.intent.IntentMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.intent.IntentMonitor); + } + + public abstract interface IntentStubber { + method public abstract android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + } + + public final class IntentStubberRegistry { + method public static androidx.test.runner.intent.IntentStubber getInstance(); + method public static boolean isLoaded(); + method public static void load(androidx.test.runner.intent.IntentStubber); + method public static synchronized void reset(); + } + +} + +package androidx.test.runner.intercepting { + + public abstract interface InterceptingActivityFactory { + method public abstract android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method public abstract boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + + public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { + ctor public SingleActivityFactory(java.lang.Class); + method public final android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); + method protected abstract T create(android.content.Intent); + method public final java.lang.Class getActivityClassToIntercept(); + method public final boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + } + +} + +package androidx.test.runner.lifecycle { + + public abstract interface ActivityLifecycleCallback { + method public abstract void onActivityLifecycleChanged(android.app.Activity, androidx.test.runner.lifecycle.Stage); + } + + public abstract interface ActivityLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + method public abstract java.util.Collection getActivitiesInStage(androidx.test.runner.lifecycle.Stage); + method public abstract androidx.test.runner.lifecycle.Stage getLifecycleStageOf(android.app.Activity); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + } + + public final class ActivityLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + } + + public abstract interface ApplicationLifecycleCallback { + method public abstract void onApplicationLifecycleChanged(android.app.Application, androidx.test.runner.lifecycle.ApplicationStage); + } + + public abstract interface ApplicationLifecycleMonitor { + method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + } + + public final class ApplicationLifecycleMonitorRegistry { + method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor); + } + + public final class ApplicationStage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.ApplicationStage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.ApplicationStage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage PRE_ON_CREATE; + } + + public final class Stage extends java.lang.Enum { + method public static androidx.test.runner.lifecycle.Stage valueOf(java.lang.String); + method public static final androidx.test.runner.lifecycle.Stage[] values(); + enum_constant public static final androidx.test.runner.lifecycle.Stage CREATED; + enum_constant public static final androidx.test.runner.lifecycle.Stage DESTROYED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PAUSED; + enum_constant public static final androidx.test.runner.lifecycle.Stage PRE_ON_CREATE; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESTARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage RESUMED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STARTED; + enum_constant public static final androidx.test.runner.lifecycle.Stage STOPPED; + } + +} + diff --git a/runner/rules/java/androidx/test/api/current.txt b/runner/rules/java/androidx/test/api/current.txt new file mode 100644 index 000000000..878c6dea8 --- /dev/null +++ b/runner/rules/java/androidx/test/api/current.txt @@ -0,0 +1,93 @@ +package androidx.test.annotation { + + public abstract class UiThreadTest implements java.lang.annotation.Annotation { + } + +} + +package androidx.test.rule { + + public deprecated class ActivityTestRule implements org.junit.rules.TestRule { + ctor public ActivityTestRule(java.lang.Class); + ctor public ActivityTestRule(java.lang.Class, boolean); + ctor public ActivityTestRule(java.lang.Class, boolean, boolean); + ctor public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory, boolean, boolean); + ctor public ActivityTestRule(java.lang.Class, java.lang.String, int, boolean, boolean); + method protected void afterActivityFinished(); + method protected void afterActivityLaunched(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeActivityLaunched(); + method public void finishActivity(); + method public T getActivity(); + method protected android.content.Intent getActivityIntent(); + method public android.app.Instrumentation.ActivityResult getActivityResult(); + method public T launchActivity(android.content.Intent); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + } + + public class DisableOnAndroidDebug implements org.junit.rules.TestRule { + ctor public DisableOnAndroidDebug(org.junit.rules.TestRule); + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public boolean isDebugging(); + } + + public class GrantPermissionRule implements org.junit.rules.TestRule { + method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public static androidx.test.rule.GrantPermissionRule grant(java.lang.String...); + } + + public class ServiceTestRule implements org.junit.rules.TestRule { + ctor public ServiceTestRule(); + ctor protected ServiceTestRule(long, java.util.concurrent.TimeUnit); + method protected void afterService(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeService(); + method public android.os.IBinder bindService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public android.os.IBinder bindService(android.content.Intent, android.content.ServiceConnection, int) throws java.util.concurrent.TimeoutException; + method public void startService(android.content.Intent) throws java.util.concurrent.TimeoutException; + method public void unbindService(); + method public static androidx.test.rule.ServiceTestRule withTimeout(long, java.util.concurrent.TimeUnit); + } + + public deprecated class UiThreadTestRule implements org.junit.rules.TestRule { + ctor public UiThreadTestRule(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + method protected boolean shouldRunOnUiThread(org.junit.runner.Description); + } + +} + +package androidx.test.rule.logging { + + public class AtraceLogger { + method public void atraceStart(java.util.Set, int, int, java.io.File, java.lang.String) throws java.io.IOException; + method public void atraceStop() throws java.io.IOException, java.lang.InterruptedException; + method public static androidx.test.rule.logging.AtraceLogger getAtraceLoggerInstance(android.app.Instrumentation); + } + +} + +package androidx.test.rule.provider { + + public class ProviderTestRule implements org.junit.rules.TestRule { + method protected void afterProviderCleanedUp(); + method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + method protected void beforeProviderSetup(); + method public android.content.ContentResolver getResolver(); + method public void revokePermission(java.lang.String); + method public void runDatabaseCommands(java.lang.String, java.lang.String...); + } + + public static class ProviderTestRule.Builder { + ctor public Builder(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule.Builder addProvider(java.lang.Class, java.lang.String); + method public androidx.test.rule.provider.ProviderTestRule build(); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommands(java.lang.String, java.lang.String...); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommandsFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseFile(java.lang.String, java.io.File); + method public androidx.test.rule.provider.ProviderTestRule.Builder setPrefix(java.lang.String); + } + +} + diff --git a/services/storage/java/androidx/test/services/storage/api/current.txt b/services/storage/java/androidx/test/services/storage/api/current.txt new file mode 100644 index 000000000..e69de29bb From cc72fc8a21065a39a4514f0cb2d64dbfb421e88b Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Thu, 2 Sep 2021 12:37:00 -0700 Subject: [PATCH 007/949] Hidden API cleanup. PiperOrigin-RevId: 394519508 --- .../test/annotation/AndroidManifest.xml | 2 +- .../java/androidx/test/annotation/BUILD.bazel | 1 + .../androidx/test/annotation/api/current.txt | 8 + .../espresso/accessibility/api/current.txt | 7 +- .../test/espresso/contrib/api/current.txt | 79 +- .../espresso/action/GeneralClickAction.java | 16 +- .../androidx/test/espresso/api/current.txt | 2331 ++++------------- .../espresso/device/DeviceInteraction.java | 4 +- .../test/espresso/remote/api/current.txt | 203 +- .../idling/concurrent/api/current.txt | 17 +- .../test/espresso/idling/net/api/current.txt | 21 +- .../androidx/test/espresso/intent/BUILD.bazel | 8 +- .../test/espresso/intent/api/current.txt | 191 +- .../test/espresso/web/api/current.txt | 240 +- .../androidx/test/ext/junit/api/current.txt | 22 +- .../androidx/test/ext/truth/api/current.txt | 266 +- .../java/androidx/test/api/current.txt | 276 +- .../internal/events/client/package-info.java | 18 + .../androidx/test/internal/package-info.java | 18 + .../callback/OrchestratorV1Connection.java | 2 + .../androidx/test/runner/AndroidJUnit4.java | 6 +- .../test/runner/UsageTrackerFacilitator.java | 2 + .../permission/GrantPermissionCallable.java | 2 + .../permission/RequestPermissionCallable.java | 2 + .../test/runner/permission/ShellCommand.java | 2 + .../permission/UiAutomationShellCommand.java | 2 + .../screenshot/UiAutomationWrapper.java | 2 + .../java/androidx/test/api/current.txt | 154 +- .../androidx/test/internal/package-info.java | 18 + .../test/platform/io/FileTestStorage.java | 8 +- .../test/platform/io/PlatformTestStorage.java | 4 + .../io/PlatformTestStorageRegistry.java | 4 + .../rules/java/androidx/test/api/current.txt | 100 +- .../androidx/test/internal/package-info.java | 18 + .../test/internal/statement/package-info.java | 18 + .../storage/TestStorageException.java | 3 + .../test/services/storage/api/current.txt | 1 + .../storage/internal/package-info.java | 18 + 38 files changed, 1588 insertions(+), 2506 deletions(-) create mode 100644 annotation/java/androidx/test/annotation/api/current.txt create mode 100644 runner/android_junit_runner/java/androidx/test/internal/events/client/package-info.java create mode 100644 runner/android_junit_runner/java/androidx/test/internal/package-info.java create mode 100644 runner/monitor/java/androidx/test/internal/package-info.java create mode 100644 runner/rules/java/androidx/test/internal/package-info.java create mode 100644 runner/rules/java/androidx/test/internal/statement/package-info.java create mode 100644 services/storage/java/androidx/test/services/storage/internal/package-info.java diff --git a/annotation/java/androidx/test/annotation/AndroidManifest.xml b/annotation/java/androidx/test/annotation/AndroidManifest.xml index 929e9f72d..9cf89c15a 100644 --- a/annotation/java/androidx/test/annotation/AndroidManifest.xml +++ b/annotation/java/androidx/test/annotation/AndroidManifest.xml @@ -15,7 +15,7 @@ ~ limitations under the License. --> + package="androidx.test.annotation"> hasResultCode(int); - method public static org.hamcrest.Matcher hasResultData(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher! hasResultCode(int); + method public static org.hamcrest.Matcher! hasResultData(org.hamcrest.Matcher!); } public final class DrawerActions { - method public static androidx.test.espresso.ViewAction close(); - method public static androidx.test.espresso.ViewAction close(int); - method public static deprecated void closeDrawer(int); - method public static deprecated void closeDrawer(int, int); - method public static androidx.test.espresso.ViewAction open(); - method public static androidx.test.espresso.ViewAction open(int); - method public static deprecated void openDrawer(int); - method public static deprecated void openDrawer(int, int); + method public static androidx.test.espresso.ViewAction! close(); + method public static androidx.test.espresso.ViewAction! close(int); + method @Deprecated public static void closeDrawer(int); + method @Deprecated public static void closeDrawer(int, int); + method public static androidx.test.espresso.ViewAction! open(); + method public static androidx.test.espresso.ViewAction! open(int); + method @Deprecated public static void openDrawer(int); + method @Deprecated public static void openDrawer(int, int); } public final class DrawerMatchers { - method public static org.hamcrest.Matcher isClosed(int); - method public static org.hamcrest.Matcher isClosed(); - method public static org.hamcrest.Matcher isOpen(int); - method public static org.hamcrest.Matcher isOpen(); + method public static org.hamcrest.Matcher! isClosed(int); + method public static org.hamcrest.Matcher! isClosed(); + method public static org.hamcrest.Matcher! isOpen(int); + method public static org.hamcrest.Matcher! isOpen(); } public final class NavigationViewActions { - method public static androidx.test.espresso.ViewAction navigateTo(int); + method public static androidx.test.espresso.ViewAction! navigateTo(int); } public final class PickerActions { - method public static androidx.test.espresso.ViewAction setDate(int, int, int); - method public static androidx.test.espresso.ViewAction setTime(int, int); + method public static androidx.test.espresso.ViewAction! setDate(int, int, int); + method public static androidx.test.espresso.ViewAction! setTime(int, int); } public final class RecyclerViewActions { - method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction actionOnHolderItem(org.hamcrest.Matcher, androidx.test.espresso.ViewAction); - method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction actionOnItem(org.hamcrest.Matcher, androidx.test.espresso.ViewAction); - method public static androidx.test.espresso.ViewAction actionOnItemAtPosition(int, androidx.test.espresso.ViewAction); - method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction scrollTo(org.hamcrest.Matcher); - method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction scrollToHolder(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAction scrollToPosition(int); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction! actionOnHolderItem(org.hamcrest.Matcher!, androidx.test.espresso.ViewAction!); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction! actionOnItem(org.hamcrest.Matcher!, androidx.test.espresso.ViewAction!); + method public static androidx.test.espresso.ViewAction! actionOnItemAtPosition(int, androidx.test.espresso.ViewAction!); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction! scrollTo(org.hamcrest.Matcher!); + method public static androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction! scrollToHolder(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAction! scrollToPosition(int); } - public static abstract interface RecyclerViewActions.PositionableRecyclerViewAction implements androidx.test.espresso.ViewAction { - method public abstract androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction atPosition(int); + public static interface RecyclerViewActions.PositionableRecyclerViewAction extends androidx.test.espresso.ViewAction { + method public androidx.test.espresso.contrib.RecyclerViewActions.PositionableRecyclerViewAction! atPosition(int); } public final class ViewPagerActions { - method public static androidx.test.espresso.ViewAction clickBetweenTwoTitles(java.lang.String, java.lang.String); - method public static androidx.test.espresso.ViewAction scrollLeft(); - method public static androidx.test.espresso.ViewAction scrollLeft(boolean); - method public static androidx.test.espresso.ViewAction scrollRight(); - method public static androidx.test.espresso.ViewAction scrollRight(boolean); - method public static androidx.test.espresso.ViewAction scrollToFirst(); - method public static androidx.test.espresso.ViewAction scrollToFirst(boolean); - method public static androidx.test.espresso.ViewAction scrollToLast(); - method public static androidx.test.espresso.ViewAction scrollToLast(boolean); - method public static androidx.test.espresso.ViewAction scrollToPage(int); - method public static androidx.test.espresso.ViewAction scrollToPage(int, boolean); + method public static androidx.test.espresso.ViewAction! clickBetweenTwoTitles(String!, String!); + method public static androidx.test.espresso.ViewAction! scrollLeft(); + method public static androidx.test.espresso.ViewAction! scrollLeft(boolean); + method public static androidx.test.espresso.ViewAction! scrollRight(); + method public static androidx.test.espresso.ViewAction! scrollRight(boolean); + method public static androidx.test.espresso.ViewAction! scrollToFirst(); + method public static androidx.test.espresso.ViewAction! scrollToFirst(boolean); + method public static androidx.test.espresso.ViewAction! scrollToLast(); + method public static androidx.test.espresso.ViewAction! scrollToLast(boolean); + method public static androidx.test.espresso.ViewAction! scrollToPage(int); + method public static androidx.test.espresso.ViewAction! scrollToPage(int, boolean); } } diff --git a/espresso/core/java/androidx/test/espresso/action/GeneralClickAction.java b/espresso/core/java/androidx/test/espresso/action/GeneralClickAction.java index e69152b26..951901749 100644 --- a/espresso/core/java/androidx/test/espresso/action/GeneralClickAction.java +++ b/espresso/core/java/androidx/test/espresso/action/GeneralClickAction.java @@ -26,6 +26,7 @@ import androidx.test.espresso.PerformException; import androidx.test.espresso.UiController; import androidx.test.espresso.ViewAction; +import androidx.test.espresso.action.Tapper.Status; import androidx.test.espresso.util.HumanReadables; import com.google.common.base.Optional; import java.util.Locale; @@ -41,11 +42,11 @@ public final class GeneralClickAction implements ViewAction { private final Optional rollbackAction; private final int inputDevice; private final int buttonState; + private Status status; - /* - * @deprecated - * Use {@link #GeneralClickAction(Tapper, CoordinatesProvider, PrecisionDescriber, int, int)} - * instead + /** + * @deprecated Use {@link #GeneralClickAction(Tapper, CoordinatesProvider, PrecisionDescriber, + * int, int)} instead. */ @Deprecated public GeneralClickAction( @@ -64,10 +65,9 @@ public GeneralClickAction( this(tapper, coordinatesProvider, precisionDescriber, inputDevice, buttonState, null); } - /* - * @deprecated - * Use {@link #GeneralClickAction(Tapper, CoordinatesProvider, PrecisionDescriber, int, int, - * ViewAction)} instead + /** + * @deprecated Use {@link #GeneralClickAction(Tapper, CoordinatesProvider, PrecisionDescriber, + * int, int, ViewAction)} instead. */ @Deprecated public GeneralClickAction( diff --git a/espresso/core/java/androidx/test/espresso/api/current.txt b/espresso/core/java/androidx/test/espresso/api/current.txt index bbda40337..9e1b0ef07 100644 --- a/espresso/core/java/androidx/test/espresso/api/current.txt +++ b/espresso/core/java/androidx/test/espresso/api/current.txt @@ -1,199 +1,182 @@ - +// Signature format: 3.0 package androidx.test.espresso { public final class AmbiguousViewMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { } public static class AmbiguousViewMatcherException.Builder { - ctor public Builder(); - method public androidx.test.espresso.AmbiguousViewMatcherException build(); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder from(androidx.test.espresso.AmbiguousViewMatcherException); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder includeViewHierarchy(boolean); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withOtherAmbiguousViews(android.view.View...); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withRootView(android.view.View); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withView1(android.view.View); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withView2(android.view.View); - method public androidx.test.espresso.AmbiguousViewMatcherException.Builder withViewMatcher(org.hamcrest.Matcher); + ctor public AmbiguousViewMatcherException.Builder(); + method public androidx.test.espresso.AmbiguousViewMatcherException! build(); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! from(androidx.test.espresso.AmbiguousViewMatcherException!); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! includeViewHierarchy(boolean); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! withOtherAmbiguousViews(android.view.View!...); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! withRootView(android.view.View!); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! withView1(android.view.View!); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! withView2(android.view.View!); + method public androidx.test.espresso.AmbiguousViewMatcherException.Builder! withViewMatcher(org.hamcrest.Matcher!); } public final class AppNotIdleException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - method public static deprecated androidx.test.espresso.AppNotIdleException create(java.util.List, int, int); - method public static androidx.test.espresso.AppNotIdleException create(java.util.List, java.lang.String); + method @Deprecated public static androidx.test.espresso.AppNotIdleException! create(java.util.List!, int, int); + method public static androidx.test.espresso.AppNotIdleException! create(java.util.List!, String!); } public class DataInteraction { - method public androidx.test.espresso.DataInteraction atPosition(java.lang.Integer); - method public androidx.test.espresso.ViewInteraction check(androidx.test.espresso.ViewAssertion); - method public androidx.test.espresso.DataInteraction inAdapterView(org.hamcrest.Matcher); - method public androidx.test.espresso.DataInteraction inRoot(org.hamcrest.Matcher); - method public androidx.test.espresso.DataInteraction onChildView(org.hamcrest.Matcher); - method public androidx.test.espresso.ViewInteraction perform(androidx.test.espresso.ViewAction...); - method public androidx.test.espresso.DataInteraction usingAdapterViewProtocol(androidx.test.espresso.action.AdapterViewProtocol); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.DataInteraction! atPosition(Integer!); + method public androidx.test.espresso.ViewInteraction! check(androidx.test.espresso.ViewAssertion!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.DataInteraction! inAdapterView(org.hamcrest.Matcher!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.DataInteraction! inRoot(org.hamcrest.Matcher!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.DataInteraction! onChildView(org.hamcrest.Matcher!); + method public androidx.test.espresso.ViewInteraction! perform(androidx.test.espresso.ViewAction!...); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.DataInteraction! usingAdapterViewProtocol(androidx.test.espresso.action.AdapterViewProtocol!); } - public static final class DataInteraction.DisplayDataMatcher extends org.hamcrest.TypeSafeMatcher { - method public void describeTo(org.hamcrest.Description); - method public static androidx.test.espresso.DataInteraction.DisplayDataMatcher displayDataMatcher(org.hamcrest.Matcher, org.hamcrest.Matcher, org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional, androidx.test.espresso.action.AdapterViewProtocol); - method public boolean matchesSafely(android.view.View); + public static final class DataInteraction.DisplayDataMatcher extends org.hamcrest.TypeSafeMatcher { + method public void describeTo(org.hamcrest.Description!); + method public static androidx.test.espresso.DataInteraction.DisplayDataMatcher! displayDataMatcher(org.hamcrest.Matcher, org.hamcrest.Matcher, org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional!, androidx.test.espresso.action.AdapterViewProtocol); + method public boolean matchesSafely(android.view.View!); } public final class Espresso { method public static void closeSoftKeyboard(); - method public static deprecated java.util.List getIdlingResources(); - method public static androidx.test.espresso.DataInteraction onData(org.hamcrest.Matcher); - method public static T onIdle(java.util.concurrent.Callable); + method @Deprecated public static java.util.List! getIdlingResources(); + method @CheckResult @javax.annotation.CheckReturnValue public static androidx.test.espresso.DataInteraction! onData(org.hamcrest.Matcher!); + method public static T! onIdle(java.util.concurrent.Callable!); method public static void onIdle(); - method public static androidx.test.espresso.ViewInteraction onView(org.hamcrest.Matcher); - method public static void openActionBarOverflowOrOptionsMenu(android.content.Context); + method @CheckResult @javax.annotation.CheckReturnValue public static androidx.test.espresso.ViewInteraction! onView(org.hamcrest.Matcher!); + method public static void openActionBarOverflowOrOptionsMenu(android.content.Context!); method public static void openContextualActionModeOverflowMenu(); method public static void pressBack(); method public static void pressBackUnconditionally(); - method public static deprecated boolean registerIdlingResources(androidx.test.espresso.IdlingResource...); - method public static deprecated void registerLooperAsIdlingResource(android.os.Looper); - method public static deprecated void registerLooperAsIdlingResource(android.os.Looper, boolean); - method public static void setFailureHandler(androidx.test.espresso.FailureHandler); - method public static deprecated boolean unregisterIdlingResources(androidx.test.espresso.IdlingResource...); + method @Deprecated public static boolean registerIdlingResources(androidx.test.espresso.IdlingResource!...); + method @Deprecated public static void registerLooperAsIdlingResource(android.os.Looper!); + method @Deprecated public static void registerLooperAsIdlingResource(android.os.Looper!, boolean); + method public static void setFailureHandler(androidx.test.espresso.FailureHandler!); + method @Deprecated public static boolean unregisterIdlingResources(androidx.test.espresso.IdlingResource!...); } - public abstract interface EspressoException implements androidx.test.platform.TestFrameworkException { + public interface EspressoException extends androidx.test.platform.TestFrameworkException { } - public abstract interface FailureHandler { - method public abstract void handle(java.lang.Throwable, org.hamcrest.Matcher); + public interface FailureHandler { + method public void handle(Throwable!, org.hamcrest.Matcher!); } public final class IdlingPolicies { - method public static androidx.test.espresso.IdlingPolicy getDynamicIdlingResourceErrorPolicy(); - method public static androidx.test.espresso.IdlingPolicy getDynamicIdlingResourceWarningPolicy(); - method public static androidx.test.espresso.IdlingPolicy getMasterIdlingPolicy(); - method public static void setIdlingResourceTimeout(long, java.util.concurrent.TimeUnit); - method public static void setMasterPolicyTimeout(long, java.util.concurrent.TimeUnit); + method public static androidx.test.espresso.IdlingPolicy! getDynamicIdlingResourceErrorPolicy(); + method public static androidx.test.espresso.IdlingPolicy! getDynamicIdlingResourceWarningPolicy(); + method public static androidx.test.espresso.IdlingPolicy! getMasterIdlingPolicy(); + method public static void setIdlingResourceTimeout(long, java.util.concurrent.TimeUnit!); + method public static void setMasterPolicyTimeout(long, java.util.concurrent.TimeUnit!); method public static void setMasterPolicyTimeoutWhenDebuggerAttached(boolean); + method public static void unsafeMakeIdlingResourceErrorPolicyWarning(); + method public static void unsafeMakeMasterPolicyWarning(); } public final class IdlingPolicy { method public boolean getDisableOnTimeout(); method public long getIdleTimeout(); - method public java.util.concurrent.TimeUnit getIdleTimeoutUnit(); + method public java.util.concurrent.TimeUnit! getIdleTimeoutUnit(); method public boolean getTimeoutIfDebuggerAttached(); - method public void handleTimeout(java.util.List, java.lang.String); - } - - public final class IdlingRegistry { - method public static androidx.test.espresso.IdlingRegistry getInstance(); - method public java.util.Collection getLoopers(); - method public java.util.Collection getResources(); - method public boolean register(androidx.test.espresso.IdlingResource...); - method public void registerLooperAsIdlingResource(android.os.Looper); - method public boolean unregister(androidx.test.espresso.IdlingResource...); - method public boolean unregisterLooperAsIdlingResource(android.os.Looper); - } - - public abstract interface IdlingResource { - method public abstract java.lang.String getName(); - method public abstract boolean isIdleNow(); - method public abstract void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); - } - - public static abstract interface IdlingResource.ResourceCallback { - method public abstract void onTransitionToIdle(); + method public void handleTimeout(java.util.List!, String!); } public final class IdlingResourceTimeoutException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public IdlingResourceTimeoutException(java.util.List); + ctor public IdlingResourceTimeoutException(java.util.List!); } public final class InjectEventSecurityException extends androidx.test.platform.ui.InjectEventSecurityException implements androidx.test.espresso.EspressoException { - ctor public InjectEventSecurityException(java.lang.String); - ctor public InjectEventSecurityException(java.lang.Throwable); - ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + ctor public InjectEventSecurityException(String!); + ctor public InjectEventSecurityException(Throwable!); + ctor public InjectEventSecurityException(String!, Throwable!); } public final class NoActivityResumedException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public NoActivityResumedException(java.lang.String); - ctor public NoActivityResumedException(java.lang.String, java.lang.Throwable); + ctor public NoActivityResumedException(String!); + ctor public NoActivityResumedException(String!, Throwable!); } public final class NoMatchingRootException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - method public static androidx.test.espresso.NoMatchingRootException create(org.hamcrest.Matcher, java.util.List); + method public static androidx.test.espresso.NoMatchingRootException! create(org.hamcrest.Matcher!, java.util.List!); } public final class NoMatchingViewException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - method public java.lang.String getViewMatcherDescription(); + method public android.view.View! getRootView(); + method public String! getViewMatcherDescription(); } public static class NoMatchingViewException.Builder { - ctor public Builder(); - method public androidx.test.espresso.NoMatchingViewException build(); - method public androidx.test.espresso.NoMatchingViewException.Builder from(androidx.test.espresso.NoMatchingViewException); - method public androidx.test.espresso.NoMatchingViewException.Builder includeViewHierarchy(boolean); - method public androidx.test.espresso.NoMatchingViewException.Builder withAdapterViewWarning(androidx.test.espresso.util.EspressoOptional); - method public androidx.test.espresso.NoMatchingViewException.Builder withAdapterViews(java.util.List); - method public androidx.test.espresso.NoMatchingViewException.Builder withCause(java.lang.Throwable); - method public androidx.test.espresso.NoMatchingViewException.Builder withRootView(android.view.View); - method public androidx.test.espresso.NoMatchingViewException.Builder withViewMatcher(org.hamcrest.Matcher); + ctor public NoMatchingViewException.Builder(); + method public androidx.test.espresso.NoMatchingViewException! build(); + method public androidx.test.espresso.NoMatchingViewException.Builder! from(androidx.test.espresso.NoMatchingViewException!); + method public androidx.test.espresso.NoMatchingViewException.Builder! includeViewHierarchy(boolean); + method public androidx.test.espresso.NoMatchingViewException.Builder! withAdapterViewWarning(androidx.test.espresso.util.EspressoOptional!); + method public androidx.test.espresso.NoMatchingViewException.Builder! withAdapterViews(java.util.List!); + method public androidx.test.espresso.NoMatchingViewException.Builder! withCause(Throwable!); + method public androidx.test.espresso.NoMatchingViewException.Builder! withRootView(android.view.View!); + method public androidx.test.espresso.NoMatchingViewException.Builder! withViewMatcher(org.hamcrest.Matcher!); } public final class PerformException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - method public java.lang.String getActionDescription(); - method public java.lang.String getViewDescription(); + method public String! getActionDescription(); + method public String! getViewDescription(); } public static class PerformException.Builder { - ctor public Builder(); - method public androidx.test.espresso.PerformException build(); - method public androidx.test.espresso.PerformException.Builder from(androidx.test.espresso.PerformException); - method public androidx.test.espresso.PerformException.Builder withActionDescription(java.lang.String); - method public androidx.test.espresso.PerformException.Builder withCause(java.lang.Throwable); - method public androidx.test.espresso.PerformException.Builder withViewDescription(java.lang.String); + ctor public PerformException.Builder(); + method public androidx.test.espresso.PerformException! build(); + method public androidx.test.espresso.PerformException.Builder! from(androidx.test.espresso.PerformException!); + method public androidx.test.espresso.PerformException.Builder! withActionDescription(String!); + method public androidx.test.espresso.PerformException.Builder! withCause(Throwable!); + method public androidx.test.espresso.PerformException.Builder! withViewDescription(String!); } public final class Root { - method public android.view.View getDecorView(); - method public androidx.test.espresso.util.EspressoOptional getWindowLayoutParams(); + method public android.view.View! getDecorView(); + method public androidx.test.espresso.util.EspressoOptional! getWindowLayoutParams(); method public boolean isReady(); } public static class Root.Builder { - ctor public Builder(); - method public androidx.test.espresso.Root build(); - method public androidx.test.espresso.Root.Builder withDecorView(android.view.View); - method public androidx.test.espresso.Root.Builder withWindowLayoutParams(android.view.WindowManager.LayoutParams); + ctor public Root.Builder(); + method public androidx.test.espresso.Root! build(); + method public androidx.test.espresso.Root.Builder! withDecorView(android.view.View!); + method public androidx.test.espresso.Root.Builder! withWindowLayoutParams(android.view.WindowManager.LayoutParams!); } - public abstract interface UiController { - method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.espresso.InjectEventSecurityException; - method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.espresso.InjectEventSecurityException; - method public default boolean injectMotionEventSequence(java.lang.Iterable) throws androidx.test.espresso.InjectEventSecurityException; - method public abstract boolean injectString(java.lang.String) throws androidx.test.espresso.InjectEventSecurityException; - method public abstract void loopMainThreadForAtLeast(long); - method public abstract void loopMainThreadUntilIdle(); + public interface UiController { + method public boolean injectKeyEvent(android.view.KeyEvent!) throws androidx.test.espresso.InjectEventSecurityException; + method public boolean injectMotionEvent(android.view.MotionEvent!) throws androidx.test.espresso.InjectEventSecurityException; + method public default boolean injectMotionEventSequence(Iterable!) throws androidx.test.espresso.InjectEventSecurityException; + method public boolean injectString(String!) throws androidx.test.espresso.InjectEventSecurityException; + method public void loopMainThreadForAtLeast(long); + method public void loopMainThreadUntilIdle(); } - public abstract interface ViewAction { - method public abstract org.hamcrest.Matcher getConstraints(); - method public abstract java.lang.String getDescription(); - method public abstract void perform(androidx.test.espresso.UiController, android.view.View); + public interface ViewAction { + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } - public abstract interface ViewAssertion { - method public abstract void check(android.view.View, androidx.test.espresso.NoMatchingViewException); + public interface ViewAssertion { + method public void check(android.view.View!, androidx.test.espresso.NoMatchingViewException!); } - public abstract interface ViewFinder { - method public abstract android.view.View getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; + public interface ViewFinder { + method public android.view.View! getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; } public final class ViewInteraction { - method public androidx.test.espresso.ViewInteraction check(androidx.test.espresso.ViewAssertion); - method public androidx.test.espresso.ViewInteraction inRoot(org.hamcrest.Matcher); - method public androidx.test.espresso.ViewInteraction noActivity(); - method public androidx.test.espresso.ViewInteraction perform(androidx.test.espresso.ViewAction...); - method public androidx.test.espresso.ViewInteraction withFailureHandler(androidx.test.espresso.FailureHandler); + method public androidx.test.espresso.ViewInteraction! check(androidx.test.espresso.ViewAssertion!); + method public androidx.test.espresso.ViewInteraction! inRoot(org.hamcrest.Matcher!); + method public androidx.test.espresso.ViewInteraction! noActivity(); + method public androidx.test.espresso.ViewInteraction! perform(androidx.test.espresso.ViewAction!...); + method public androidx.test.espresso.ViewInteraction! withFailureHandler(androidx.test.espresso.FailureHandler!); } - public abstract interface ViewInteractionComponent { - method public abstract androidx.test.espresso.ViewInteraction viewInteraction(); + @androidx.test.espresso.base.RootViewPickerScope @dagger.Subcomponent(modules=ViewInteractionModule.class) public interface ViewInteractionComponent { + method public androidx.test.espresso.ViewInteraction! viewInteraction(); } } @@ -201,58 +184,58 @@ package androidx.test.espresso { package androidx.test.espresso.action { public final class AdapterDataLoaderAction implements androidx.test.espresso.ViewAction { - ctor public AdapterDataLoaderAction(org.hamcrest.Matcher, androidx.test.espresso.util.EspressoOptional, androidx.test.espresso.action.AdapterViewProtocol); - method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData getAdaptedData(); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor public AdapterDataLoaderAction(org.hamcrest.Matcher!, androidx.test.espresso.util.EspressoOptional!, androidx.test.espresso.action.AdapterViewProtocol!); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData! getAdaptedData(); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } - public abstract interface AdapterViewProtocol { - method public abstract java.lang.Iterable getDataInAdapterView(android.widget.AdapterView); - method public abstract androidx.test.espresso.util.EspressoOptional getDataRenderedByView(android.widget.AdapterView, android.view.View); - method public abstract boolean isDataRenderedWithinAdapterView(android.widget.AdapterView, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData); - method public abstract void makeDataRenderedWithinAdapterView(android.widget.AdapterView, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData); + public interface AdapterViewProtocol { + method public Iterable! getDataInAdapterView(android.widget.AdapterView!); + method public androidx.test.espresso.util.EspressoOptional! getDataRenderedByView(android.widget.AdapterView!, android.view.View!); + method public boolean isDataRenderedWithinAdapterView(android.widget.AdapterView!, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData!); + method public void makeDataRenderedWithinAdapterView(android.widget.AdapterView!, androidx.test.espresso.action.AdapterViewProtocol.AdaptedData!); } public static class AdapterViewProtocol.AdaptedData { - method public java.lang.Object getData(); - field public final deprecated java.lang.Object data; - field public final java.lang.Object opaqueToken; + method public Object! getData(); + field @Deprecated public final Object? data; + field public final Object! opaqueToken; } public static class AdapterViewProtocol.AdaptedData.Builder { - ctor public Builder(); - method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData build(); - method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withData(java.lang.Object); - method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withDataFunction(androidx.test.espresso.action.AdapterViewProtocol.DataFunction); - method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder withOpaqueToken(java.lang.Object); + ctor public AdapterViewProtocol.AdaptedData.Builder(); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData! build(); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder! withData(Object?); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder! withDataFunction(androidx.test.espresso.action.AdapterViewProtocol.DataFunction?); + method public androidx.test.espresso.action.AdapterViewProtocol.AdaptedData.Builder! withOpaqueToken(Object?); } - public static abstract interface AdapterViewProtocol.DataFunction { - method public abstract java.lang.Object getData(); + public static interface AdapterViewProtocol.DataFunction { + method public Object! getData(); } public final class AdapterViewProtocols { - method public static androidx.test.espresso.action.AdapterViewProtocol standardProtocol(); + method public static androidx.test.espresso.action.AdapterViewProtocol! standardProtocol(); } public final class CloseKeyboardAction implements androidx.test.espresso.ViewAction { - ctor public CloseKeyboardAction(); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor @androidx.test.espresso.remote.annotation.RemoteMsgConstructor public CloseKeyboardAction(); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } - public abstract interface CoordinatesProvider { - method public abstract float[] calculateCoordinates(android.view.View); + public interface CoordinatesProvider { + method public float[]! calculateCoordinates(android.view.View!); } public final class EditorAction implements androidx.test.espresso.ViewAction { - ctor public EditorAction(); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor @androidx.test.espresso.remote.annotation.RemoteMsgConstructor public EditorAction(); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } public final class EspressoKey { @@ -261,27 +244,25 @@ package androidx.test.espresso.action { } public static class EspressoKey.Builder { - ctor public Builder(); - method public androidx.test.espresso.action.EspressoKey build(); - method public androidx.test.espresso.action.EspressoKey.Builder withAltPressed(boolean); - method public androidx.test.espresso.action.EspressoKey.Builder withCtrlPressed(boolean); - method public androidx.test.espresso.action.EspressoKey.Builder withKeyCode(int); - method public androidx.test.espresso.action.EspressoKey.Builder withShiftPressed(boolean); + ctor public EspressoKey.Builder(); + method public androidx.test.espresso.action.EspressoKey! build(); + method public androidx.test.espresso.action.EspressoKey.Builder! withAltPressed(boolean); + method public androidx.test.espresso.action.EspressoKey.Builder! withCtrlPressed(boolean); + method public androidx.test.espresso.action.EspressoKey.Builder! withKeyCode(int); + method public androidx.test.espresso.action.EspressoKey.Builder! withShiftPressed(boolean); } public final class GeneralClickAction implements androidx.test.espresso.ViewAction { - ctor public deprecated GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber); - ctor public GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, int, int); - ctor public deprecated GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, androidx.test.espresso.ViewAction); - ctor public GeneralClickAction(androidx.test.espresso.action.Tapper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber, int, int, androidx.test.espresso.ViewAction); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); - } - - public class GeneralLocation extends java.lang.Enum implements androidx.test.espresso.action.CoordinatesProvider { - method public static androidx.test.espresso.action.GeneralLocation valueOf(java.lang.String); - method public static final androidx.test.espresso.action.GeneralLocation[] values(); + ctor @Deprecated public GeneralClickAction(androidx.test.espresso.action.Tapper!, androidx.test.espresso.action.CoordinatesProvider!, androidx.test.espresso.action.PrecisionDescriber!); + ctor public GeneralClickAction(androidx.test.espresso.action.Tapper!, androidx.test.espresso.action.CoordinatesProvider!, androidx.test.espresso.action.PrecisionDescriber!, int, int); + ctor @Deprecated public GeneralClickAction(androidx.test.espresso.action.Tapper!, androidx.test.espresso.action.CoordinatesProvider!, androidx.test.espresso.action.PrecisionDescriber!, androidx.test.espresso.ViewAction!); + ctor public GeneralClickAction(androidx.test.espresso.action.Tapper!, androidx.test.espresso.action.CoordinatesProvider!, androidx.test.espresso.action.PrecisionDescriber!, int, int, androidx.test.espresso.ViewAction!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); + } + + public enum GeneralLocation implements androidx.test.espresso.action.CoordinatesProvider { enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_CENTER; enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_LEFT; enum_constant public static final androidx.test.espresso.action.GeneralLocation BOTTOM_RIGHT; @@ -295,50 +276,53 @@ package androidx.test.espresso.action { } public final class GeneralSwipeAction implements androidx.test.espresso.ViewAction { - ctor public GeneralSwipeAction(androidx.test.espresso.action.Swiper, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.CoordinatesProvider, androidx.test.espresso.action.PrecisionDescriber); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor public GeneralSwipeAction(androidx.test.espresso.action.Swiper!, androidx.test.espresso.action.CoordinatesProvider!, androidx.test.espresso.action.CoordinatesProvider!, androidx.test.espresso.action.PrecisionDescriber!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } public final class KeyEventAction implements androidx.test.espresso.ViewAction { - ctor public KeyEventAction(androidx.test.espresso.action.EspressoKey); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor public KeyEventAction(androidx.test.espresso.action.EspressoKey!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); + field public static final int BACK_ACTIVITY_TRANSITION_MILLIS_DELAY = 150; // 0x96 + field public static final int CLEAR_TRANSITIONING_ACTIVITIES_ATTEMPTS = 4; // 0x4 + field public static final int CLEAR_TRANSITIONING_ACTIVITIES_MILLIS_DELAY = 150; // 0x96 } public final class MotionEvents { - method public static android.view.MotionEvent obtainDownEvent(float[], float[], int, int); - method public static android.view.MotionEvent obtainDownEvent(float[], float[]); - method public static android.view.MotionEvent obtainMovement(long, float[]); - method public static android.view.MotionEvent obtainMovement(long, long, float[]); - method public static android.view.MotionEvent obtainUpEvent(android.view.MotionEvent, float[]); - method public static void sendCancel(androidx.test.espresso.UiController, android.view.MotionEvent); - method public static androidx.test.espresso.action.MotionEvents.DownResultHolder sendDown(androidx.test.espresso.UiController, float[], float[]); - method public static androidx.test.espresso.action.MotionEvents.DownResultHolder sendDown(androidx.test.espresso.UiController, float[], float[], int, int); - method public static boolean sendMovement(androidx.test.espresso.UiController, android.view.MotionEvent, float[]); - method public static boolean sendUp(androidx.test.espresso.UiController, android.view.MotionEvent); - method public static boolean sendUp(androidx.test.espresso.UiController, android.view.MotionEvent, float[]); + method public static android.view.MotionEvent! obtainDownEvent(float[]!, float[]!, int, int); + method public static android.view.MotionEvent! obtainDownEvent(float[]!, float[]!); + method public static android.view.MotionEvent! obtainMovement(long, float[]!); + method public static android.view.MotionEvent! obtainMovement(long, long, float[]!); + method public static android.view.MotionEvent! obtainUpEvent(android.view.MotionEvent!, float[]!); + method public static void sendCancel(androidx.test.espresso.UiController!, android.view.MotionEvent!); + method public static androidx.test.espresso.action.MotionEvents.DownResultHolder! sendDown(androidx.test.espresso.UiController!, float[]!, float[]!); + method public static androidx.test.espresso.action.MotionEvents.DownResultHolder! sendDown(androidx.test.espresso.UiController!, float[]!, float[]!, int, int); + method public static boolean sendMovement(androidx.test.espresso.UiController!, android.view.MotionEvent!, float[]!); + method public static boolean sendUp(androidx.test.espresso.UiController!, android.view.MotionEvent!); + method public static boolean sendUp(androidx.test.espresso.UiController!, android.view.MotionEvent!, float[]!); } public static class MotionEvents.DownResultHolder { - field public final android.view.MotionEvent down; + field public final android.view.MotionEvent! down; field public final boolean longPress; } public final class OpenLinkAction implements androidx.test.espresso.ViewAction { - ctor public OpenLinkAction(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor public OpenLinkAction(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } - public abstract interface PrecisionDescriber { - method public abstract float[] describePrecision(); + public interface PrecisionDescriber { + method public float[]! describePrecision(); } - public class Press extends java.lang.Enum implements androidx.test.espresso.action.PrecisionDescriber { - method public static androidx.test.espresso.action.Press valueOf(java.lang.String); - method public static final androidx.test.espresso.action.Press[] values(); + public enum Press implements androidx.test.espresso.action.PrecisionDescriber { enum_constant public static final androidx.test.espresso.action.Press FINGER; enum_constant public static final androidx.test.espresso.action.Press PINPOINT; enum_constant public static final androidx.test.espresso.action.Press THUMB; @@ -346,111 +330,108 @@ package androidx.test.espresso.action { public final class PressBackAction implements androidx.test.espresso.ViewAction { ctor public PressBackAction(boolean); - ctor public PressBackAction(boolean, androidx.test.espresso.action.EspressoKey); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor public PressBackAction(boolean, androidx.test.espresso.action.EspressoKey!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); + field public static final int BACK_ACTIVITY_TRANSITION_MILLIS_DELAY = 150; // 0x96 + field public static final int CLEAR_TRANSITIONING_ACTIVITIES_ATTEMPTS = 4; // 0x4 + field public static final int CLEAR_TRANSITIONING_ACTIVITIES_MILLIS_DELAY = 150; // 0x96 } public final class RepeatActionUntilViewState implements androidx.test.espresso.ViewAction { - ctor protected RepeatActionUntilViewState(androidx.test.espresso.ViewAction, org.hamcrest.Matcher, int); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor protected RepeatActionUntilViewState(androidx.test.espresso.ViewAction!, org.hamcrest.Matcher!, int); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } public final class ReplaceTextAction implements androidx.test.espresso.ViewAction { - ctor public ReplaceTextAction(java.lang.String); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor @androidx.test.espresso.remote.annotation.RemoteMsgConstructor public ReplaceTextAction(String!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } public final class ScrollToAction implements androidx.test.espresso.ViewAction { ctor public ScrollToAction(); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } - public class Swipe extends java.lang.Enum implements androidx.test.espresso.action.Swiper { - method public static androidx.test.espresso.action.Swipe valueOf(java.lang.String); - method public static final androidx.test.espresso.action.Swipe[] values(); + public enum Swipe implements androidx.test.espresso.action.Swiper { enum_constant public static final androidx.test.espresso.action.Swipe FAST; enum_constant public static final androidx.test.espresso.action.Swipe SLOW; } - public abstract interface Swiper { - method public abstract androidx.test.espresso.action.Swiper.Status sendSwipe(androidx.test.espresso.UiController, float[], float[], float[]); + public interface Swiper { + method public androidx.test.espresso.action.Swiper.Status! sendSwipe(androidx.test.espresso.UiController!, float[]!, float[]!, float[]!); } - public static final class Swiper.Status extends java.lang.Enum { - method public static androidx.test.espresso.action.Swiper.Status valueOf(java.lang.String); - method public static final androidx.test.espresso.action.Swiper.Status[] values(); + public enum Swiper.Status { enum_constant public static final androidx.test.espresso.action.Swiper.Status FAILURE; enum_constant public static final androidx.test.espresso.action.Swiper.Status SUCCESS; } - public class Tap extends java.lang.Enum implements androidx.test.espresso.action.Tapper { - method public static androidx.test.espresso.action.Tap valueOf(java.lang.String); - method public static final androidx.test.espresso.action.Tap[] values(); + public enum Tap implements androidx.test.espresso.action.Tapper { enum_constant public static final androidx.test.espresso.action.Tap DOUBLE; enum_constant public static final androidx.test.espresso.action.Tap LONG; enum_constant public static final androidx.test.espresso.action.Tap SINGLE; } - public abstract interface Tapper { - method public abstract androidx.test.espresso.action.Tapper.Status sendTap(androidx.test.espresso.UiController, float[], float[], int, int); - method public abstract deprecated androidx.test.espresso.action.Tapper.Status sendTap(androidx.test.espresso.UiController, float[], float[]); + public interface Tapper { + method public androidx.test.espresso.action.Tapper.Status! sendTap(androidx.test.espresso.UiController!, float[]!, float[]!, int, int); + method @Deprecated public androidx.test.espresso.action.Tapper.Status! sendTap(androidx.test.espresso.UiController!, float[]!, float[]!); } - public static final class Tapper.Status extends java.lang.Enum { - method public static androidx.test.espresso.action.Tapper.Status valueOf(java.lang.String); - method public static final androidx.test.espresso.action.Tapper.Status[] values(); + public enum Tapper.Status { enum_constant public static final androidx.test.espresso.action.Tapper.Status FAILURE; enum_constant public static final androidx.test.espresso.action.Tapper.Status SUCCESS; enum_constant public static final androidx.test.espresso.action.Tapper.Status WARNING; } public final class TypeTextAction implements androidx.test.espresso.ViewAction { - ctor public TypeTextAction(java.lang.String); - ctor public TypeTextAction(java.lang.String, boolean); - ctor public TypeTextAction(java.lang.String, boolean, androidx.test.espresso.action.GeneralClickAction); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + ctor public TypeTextAction(String!); + ctor @androidx.test.espresso.remote.annotation.RemoteMsgConstructor public TypeTextAction(String!, boolean); + ctor public TypeTextAction(String!, boolean, androidx.test.espresso.action.GeneralClickAction!); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } public final class ViewActions { - method public static androidx.test.espresso.ViewAction actionWithAssertions(androidx.test.espresso.ViewAction); - method public static void addGlobalAssertion(java.lang.String, androidx.test.espresso.ViewAssertion); + method public static androidx.test.espresso.ViewAction! actionWithAssertions(androidx.test.espresso.ViewAction!); + method public static void addGlobalAssertion(String!, androidx.test.espresso.ViewAssertion!); method public static void clearGlobalAssertions(); - method public static androidx.test.espresso.ViewAction clearText(); - method public static androidx.test.espresso.ViewAction click(int, int); - method public static androidx.test.espresso.ViewAction click(); - method public static androidx.test.espresso.ViewAction click(androidx.test.espresso.ViewAction); - method public static androidx.test.espresso.ViewAction closeSoftKeyboard(); - method public static androidx.test.espresso.ViewAction doubleClick(); - method public static androidx.test.espresso.ViewAction longClick(); - method public static androidx.test.espresso.ViewAction openLink(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAction openLinkWithText(java.lang.String); - method public static androidx.test.espresso.ViewAction openLinkWithText(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAction openLinkWithUri(java.lang.String); - method public static androidx.test.espresso.ViewAction openLinkWithUri(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAction pressBack(); - method public static androidx.test.espresso.ViewAction pressBackUnconditionally(); - method public static androidx.test.espresso.ViewAction pressImeActionButton(); - method public static androidx.test.espresso.ViewAction pressKey(int); - method public static androidx.test.espresso.ViewAction pressKey(androidx.test.espresso.action.EspressoKey); - method public static androidx.test.espresso.ViewAction pressMenuKey(); - method public static void removeGlobalAssertion(androidx.test.espresso.ViewAssertion); - method public static androidx.test.espresso.ViewAction repeatedlyUntil(androidx.test.espresso.ViewAction, org.hamcrest.Matcher, int); - method public static androidx.test.espresso.ViewAction replaceText(java.lang.String); - method public static androidx.test.espresso.ViewAction scrollTo(); - method public static androidx.test.espresso.ViewAction swipeDown(); - method public static androidx.test.espresso.ViewAction swipeLeft(); - method public static androidx.test.espresso.ViewAction swipeRight(); - method public static androidx.test.espresso.ViewAction swipeUp(); - method public static androidx.test.espresso.ViewAction typeText(java.lang.String); - method public static androidx.test.espresso.ViewAction typeTextIntoFocusedView(java.lang.String); + method public static androidx.test.espresso.ViewAction! clearText(); + method public static androidx.test.espresso.ViewAction! click(int, int); + method public static androidx.test.espresso.ViewAction! click(); + method public static androidx.test.espresso.ViewAction! click(androidx.test.espresso.ViewAction!); + method public static androidx.test.espresso.ViewAction! closeSoftKeyboard(); + method public static androidx.test.espresso.ViewAction! doubleClick(); + method public static androidx.test.espresso.ViewAction! longClick(); + method public static androidx.test.espresso.ViewAction! openLink(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAction! openLinkWithText(String!); + method public static androidx.test.espresso.ViewAction! openLinkWithText(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAction! openLinkWithUri(String!); + method public static androidx.test.espresso.ViewAction! openLinkWithUri(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAction! pressBack(); + method public static androidx.test.espresso.ViewAction! pressBackUnconditionally(); + method public static androidx.test.espresso.ViewAction! pressImeActionButton(); + method public static androidx.test.espresso.ViewAction! pressKey(int); + method public static androidx.test.espresso.ViewAction! pressKey(androidx.test.espresso.action.EspressoKey!); + method public static androidx.test.espresso.ViewAction! pressMenuKey(); + method public static void removeGlobalAssertion(androidx.test.espresso.ViewAssertion!); + method public static androidx.test.espresso.ViewAction! repeatedlyUntil(androidx.test.espresso.ViewAction!, org.hamcrest.Matcher!, int); + method public static androidx.test.espresso.ViewAction! replaceText(String); + method public static androidx.test.espresso.ViewAction! scrollTo(); + method public static androidx.test.espresso.ViewAction! swipeDown(); + method public static androidx.test.espresso.ViewAction! swipeLeft(); + method public static androidx.test.espresso.ViewAction! swipeRight(); + method public static androidx.test.espresso.ViewAction! swipeUp(); + method public static androidx.test.espresso.ViewAction! typeText(String!); + method public static androidx.test.espresso.ViewAction! typeTextIntoFocusedView(String!); } } @@ -458,256 +439,249 @@ package androidx.test.espresso.action { package androidx.test.espresso.assertion { public final class LayoutAssertions { - method public static androidx.test.espresso.ViewAssertion noEllipsizedText(); - method public static androidx.test.espresso.ViewAssertion noMultilineButtons(); - method public static androidx.test.espresso.ViewAssertion noOverlaps(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion noOverlaps(); + method public static androidx.test.espresso.ViewAssertion! noEllipsizedText(); + method public static androidx.test.espresso.ViewAssertion! noMultilineButtons(); + method public static androidx.test.espresso.ViewAssertion! noOverlaps(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! noOverlaps(); } public final class PositionAssertions { - method public static deprecated androidx.test.espresso.ViewAssertion isAbove(org.hamcrest.Matcher); - method public static deprecated androidx.test.espresso.ViewAssertion isBelow(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isBottomAlignedWith(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isCompletelyAbove(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isCompletelyBelow(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isCompletelyLeftOf(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isCompletelyRightOf(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isLeftAlignedWith(org.hamcrest.Matcher); - method public static deprecated androidx.test.espresso.ViewAssertion isLeftOf(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isPartiallyAbove(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isPartiallyBelow(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isPartiallyLeftOf(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isPartiallyRightOf(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isRightAlignedWith(org.hamcrest.Matcher); - method public static deprecated androidx.test.espresso.ViewAssertion isRightOf(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion isTopAlignedWith(org.hamcrest.Matcher); + method @Deprecated public static androidx.test.espresso.ViewAssertion! isAbove(org.hamcrest.Matcher!); + method @Deprecated public static androidx.test.espresso.ViewAssertion! isBelow(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isBottomAlignedWith(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isCompletelyAbove(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isCompletelyBelow(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isCompletelyLeftOf(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isCompletelyRightOf(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isLeftAlignedWith(org.hamcrest.Matcher!); + method @Deprecated public static androidx.test.espresso.ViewAssertion! isLeftOf(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isPartiallyAbove(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isPartiallyBelow(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isPartiallyLeftOf(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isPartiallyRightOf(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isRightAlignedWith(org.hamcrest.Matcher!); + method @Deprecated public static androidx.test.espresso.ViewAssertion! isRightOf(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! isTopAlignedWith(org.hamcrest.Matcher!); } public final class ViewAssertions { - method public static androidx.test.espresso.ViewAssertion doesNotExist(); - method public static androidx.test.espresso.ViewAssertion matches(org.hamcrest.Matcher); - method public static androidx.test.espresso.ViewAssertion selectedDescendantsMatch(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static androidx.test.espresso.ViewAssertion! doesNotExist(); + method public static androidx.test.espresso.ViewAssertion! matches(org.hamcrest.Matcher!); + method public static androidx.test.espresso.ViewAssertion! selectedDescendantsMatch(org.hamcrest.Matcher!, org.hamcrest.Matcher!); } } package androidx.test.espresso.base { - public abstract interface ActiveRootLister { - method public abstract java.util.List listActiveRoots(); + public interface ActiveRootLister { + method public java.util.List! listActiveRoots(); } - public abstract class Default implements java.lang.annotation.Annotation { + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @javax.inject.Qualifier public @interface Default { } public final class DefaultFailureHandler implements androidx.test.espresso.FailureHandler { - ctor public DefaultFailureHandler(android.content.Context); - method public void handle(java.lang.Throwable, org.hamcrest.Matcher); + ctor public DefaultFailureHandler(@androidx.test.espresso.internal.inject.TargetContext android.content.Context!); + method public void handle(Throwable!, org.hamcrest.Matcher!); + } + + @javax.inject.Singleton public final class IdlingResourceRegistry { + ctor @javax.inject.Inject public IdlingResourceRegistry(android.os.Looper!); + method public java.util.List! getResources(); + method public void registerLooper(android.os.Looper!, boolean); + method public boolean registerResources(java.util.List!); + method public void sync(Iterable!, Iterable!); + method public boolean unregisterResources(java.util.List!); } - public final class IdlingResourceRegistry { - ctor public IdlingResourceRegistry(android.os.Looper); - method public java.util.List getResources(); - method public void registerLooper(android.os.Looper, boolean); - method public boolean registerResources(java.util.List); - method public void sync(java.lang.Iterable, java.lang.Iterable); - method public boolean unregisterResources(java.util.List); + public interface IdlingUiController extends androidx.test.espresso.UiController { + method public androidx.test.espresso.base.IdlingResourceRegistry! getIdlingResourceRegistry(); } - public abstract interface IdlingUiController implements androidx.test.espresso.UiController { - method public abstract androidx.test.espresso.base.IdlingResourceRegistry getIdlingResourceRegistry(); + public interface InterruptableUiController extends androidx.test.espresso.UiController { + method public void interruptEspressoTasks(); } - public abstract interface InterruptableUiController implements androidx.test.espresso.UiController { - method public abstract void interruptEspressoTasks(); + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @javax.inject.Qualifier public @interface MainThread { } - public abstract class MainThread implements java.lang.annotation.Annotation { + @dagger.Module public class PlatformTestStorageModule { + ctor public PlatformTestStorageModule(); } - public final class RootViewPicker implements javax.inject.Provider { - method public android.view.View get(); + @androidx.test.espresso.base.RootViewPickerScope public final class RootViewPicker implements javax.inject.Provider { + method public android.view.View! get(); } - public abstract class RootViewPickerScope implements java.lang.annotation.Annotation { + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @javax.inject.Scope public @interface RootViewPickerScope { } public final class ViewFinderImpl implements androidx.test.espresso.ViewFinder { - method public android.view.View getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; + method public android.view.View! getView() throws androidx.test.espresso.AmbiguousViewMatcherException, androidx.test.espresso.NoMatchingViewException; } } - package androidx.test.espresso.matcher { - public abstract class BoundedDiagnosingMatcher extends org.hamcrest.BaseMatcher { - ctor public BoundedDiagnosingMatcher(java.lang.Class); - ctor public BoundedDiagnosingMatcher(java.lang.Class, java.lang.Class, java.lang.Class...); - method public final void describeMismatch(java.lang.Object, org.hamcrest.Description); - method protected abstract void describeMoreTo(org.hamcrest.Description); - method public final void describeTo(org.hamcrest.Description); - method public final boolean matches(java.lang.Object); - method protected abstract boolean matchesSafely(T, org.hamcrest.Description); + public abstract class BoundedDiagnosingMatcher extends org.hamcrest.BaseMatcher { + ctor public BoundedDiagnosingMatcher(Class!); + ctor public BoundedDiagnosingMatcher(Class!, Class!, Class!...); + method public final void describeMismatch(Object!, org.hamcrest.Description!); + method protected abstract void describeMoreTo(org.hamcrest.Description!); + method public final void describeTo(org.hamcrest.Description!); + method public final boolean matches(Object!); + method protected abstract boolean matchesSafely(T!, org.hamcrest.Description!); } - public abstract class BoundedMatcher extends org.hamcrest.BaseMatcher { - ctor public BoundedMatcher(java.lang.Class); - ctor public BoundedMatcher(java.lang.Class, java.lang.Class, java.lang.Class...); - method public final boolean matches(java.lang.Object); - method protected abstract boolean matchesSafely(S); + public abstract class BoundedMatcher extends org.hamcrest.BaseMatcher { + ctor public BoundedMatcher(Class!); + ctor public BoundedMatcher(Class!, Class!, Class!...); + method public final boolean matches(Object!); + method protected abstract boolean matchesSafely(S!); } public final class CursorMatchers { - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(int, byte[]); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(java.lang.String, byte[]); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowBlob(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(int, double); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(java.lang.String, double); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowDouble(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(int, float); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(java.lang.String, float); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowFloat(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(int, int); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(java.lang.String, int); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowInt(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(int, long); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(java.lang.String, long); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowLong(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(int, short); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(java.lang.String, short); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowShort(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(int, java.lang.String); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(int, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(java.lang.String, java.lang.String); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(java.lang.String, org.hamcrest.Matcher); - method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withRowString(org.hamcrest.Matcher, org.hamcrest.Matcher); - } - - public static class CursorMatchers.CursorMatcher extends androidx.test.espresso.matcher.BoundedMatcher { - method public void describeTo(org.hamcrest.Description); - method public boolean matchesSafely(android.database.Cursor); - method public androidx.test.espresso.matcher.CursorMatchers.CursorMatcher withStrictColumnChecks(boolean); - } - - public final class HasBackgroundMatcher extends org.hamcrest.TypeSafeMatcher { - ctor public HasBackgroundMatcher(int); - method public void describeTo(org.hamcrest.Description); - method protected boolean matchesSafely(android.view.View); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowBlob(int, byte[]!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowBlob(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowBlob(String!, byte[]!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowBlob(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowBlob(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowDouble(int, double); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowDouble(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowDouble(String!, double); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowDouble(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowDouble(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowFloat(int, float); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowFloat(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowFloat(String!, float); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowFloat(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowFloat(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowInt(int, int); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowInt(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowInt(String!, int); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowInt(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowInt(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowLong(int, long); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowLong(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowLong(String!, long); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowLong(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowLong(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowShort(int, short); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowShort(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowShort(String!, short); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowShort(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowShort(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowString(int, String!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowString(int, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowString(String!, String!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowString(String!, org.hamcrest.Matcher!); + method public static androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withRowString(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + } + + public static class CursorMatchers.CursorMatcher extends androidx.test.espresso.matcher.BoundedMatcher { + method public void describeTo(org.hamcrest.Description!); + method public boolean matchesSafely(android.database.Cursor!); + method public androidx.test.espresso.matcher.CursorMatchers.CursorMatcher! withStrictColumnChecks(boolean); } public final class LayoutMatchers { - method public static org.hamcrest.Matcher hasEllipsizedText(); - method public static org.hamcrest.Matcher hasMultilineText(); + method public static org.hamcrest.Matcher! hasEllipsizedText(); + method public static org.hamcrest.Matcher! hasMultilineText(); } public final class PreferenceMatchers { - method public static org.hamcrest.Matcher isEnabled(); - method public static org.hamcrest.Matcher withKey(java.lang.String); - method public static org.hamcrest.Matcher withKey(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withSummary(int); - method public static org.hamcrest.Matcher withSummaryText(java.lang.String); - method public static org.hamcrest.Matcher withSummaryText(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withTitle(int); - method public static org.hamcrest.Matcher withTitleText(java.lang.String); - method public static org.hamcrest.Matcher withTitleText(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher! isEnabled(); + method public static org.hamcrest.Matcher! withKey(String!); + method public static org.hamcrest.Matcher! withKey(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withSummary(int); + method public static org.hamcrest.Matcher! withSummaryText(String!); + method public static org.hamcrest.Matcher! withSummaryText(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withTitle(int); + method public static org.hamcrest.Matcher! withTitleText(String!); + method public static org.hamcrest.Matcher! withTitleText(org.hamcrest.Matcher!); } public final class RootMatchers { - method public static org.hamcrest.Matcher hasWindowLayoutParams(); - method public static org.hamcrest.Matcher isDialog(); - method public static org.hamcrest.Matcher isFocusable(); - method public static org.hamcrest.Matcher isPlatformPopup(); - method public static org.hamcrest.Matcher isSystemAlertWindow(); - method public static org.hamcrest.Matcher isTouchable(); - method public static org.hamcrest.Matcher withDecorView(org.hamcrest.Matcher); - field public static final org.hamcrest.Matcher DEFAULT; + method public static org.hamcrest.Matcher! hasWindowLayoutParams(); + method public static org.hamcrest.Matcher! isDialog(); + method public static org.hamcrest.Matcher! isFocusable(); + method public static org.hamcrest.Matcher! isPlatformPopup(); + method public static org.hamcrest.Matcher! isSystemAlertWindow(); + method public static org.hamcrest.Matcher! isTouchable(); + method public static org.hamcrest.Matcher! withDecorView(org.hamcrest.Matcher!); + field public static final org.hamcrest.Matcher! DEFAULT; } public final class ViewMatchers { - method public static void assertThat(T, org.hamcrest.Matcher); - method public static void assertThat(java.lang.String, T, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher doesNotHaveFocus(); - method public static org.hamcrest.Matcher hasBackground(int); - method public static org.hamcrest.Matcher hasChildCount(int); - method public static org.hamcrest.Matcher hasContentDescription(); - method public static org.hamcrest.Matcher hasDescendant(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasErrorText(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasErrorText(java.lang.String); - method public static org.hamcrest.Matcher hasFocus(); - method public static org.hamcrest.Matcher hasImeAction(int); - method public static org.hamcrest.Matcher hasImeAction(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasLinks(); - method public static org.hamcrest.Matcher hasMinimumChildCount(int); - method public static org.hamcrest.Matcher hasSibling(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasTextColor(int); - method public static org.hamcrest.Matcher isAssignableFrom(java.lang.Class); - method public static org.hamcrest.Matcher isChecked(); - method public static org.hamcrest.Matcher isClickable(); - method public static org.hamcrest.Matcher isCompletelyDisplayed(); - method public static org.hamcrest.Matcher isDescendantOfA(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher isDisplayed(); - method public static org.hamcrest.Matcher isDisplayingAtLeast(int); - method public static org.hamcrest.Matcher isEnabled(); - method public static org.hamcrest.Matcher isFocusable(); - method public static org.hamcrest.Matcher isFocused(); - method public static org.hamcrest.Matcher isJavascriptEnabled(); - method public static org.hamcrest.Matcher isNotChecked(); - method public static org.hamcrest.Matcher isNotClickable(); - method public static org.hamcrest.Matcher isNotEnabled(); - method public static org.hamcrest.Matcher isNotFocusable(); - method public static org.hamcrest.Matcher isNotFocused(); - method public static org.hamcrest.Matcher isNotSelected(); - method public static org.hamcrest.Matcher isRoot(); - method public static org.hamcrest.Matcher isSelected(); - method public static org.hamcrest.Matcher supportsInputMethods(); - method public static org.hamcrest.Matcher withAlpha(float); - method public static org.hamcrest.Matcher withChild(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withClassName(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withContentDescription(int); - method public static org.hamcrest.Matcher withContentDescription(java.lang.String); - method public static org.hamcrest.Matcher withContentDescription(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withEffectiveVisibility(androidx.test.espresso.matcher.ViewMatchers.Visibility); - method public static org.hamcrest.Matcher withHint(java.lang.String); - method public static org.hamcrest.Matcher withHint(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withHint(int); - method public static org.hamcrest.Matcher withId(int); - method public static org.hamcrest.Matcher withId(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withInputType(int); - method public static org.hamcrest.Matcher withParent(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withParentIndex(int); - method public static org.hamcrest.Matcher withResourceName(java.lang.String); - method public static org.hamcrest.Matcher withResourceName(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withSpinnerText(int); - method public static org.hamcrest.Matcher withSpinnerText(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withSpinnerText(java.lang.String); - method public static org.hamcrest.Matcher withSubstring(java.lang.String); - method public static org.hamcrest.Matcher withTagKey(int); - method public static org.hamcrest.Matcher withTagKey(int, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withTagValue(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withText(java.lang.String); - method public static org.hamcrest.Matcher withText(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withText(int); - } - - public static final class ViewMatchers.Visibility extends java.lang.Enum { - method public static androidx.test.espresso.matcher.ViewMatchers.Visibility forViewVisibility(android.view.View); - method public static androidx.test.espresso.matcher.ViewMatchers.Visibility forViewVisibility(int); + method public static void assertThat(T!, org.hamcrest.Matcher!); + method public static void assertThat(String!, T!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! doesNotHaveFocus(); + method public static org.hamcrest.Matcher! hasChildCount(int); + method public static org.hamcrest.Matcher! hasContentDescription(); + method public static org.hamcrest.Matcher! hasDescendant(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasErrorText(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasErrorText(String!); + method public static org.hamcrest.Matcher! hasFocus(); + method public static org.hamcrest.Matcher! hasImeAction(int); + method public static org.hamcrest.Matcher! hasImeAction(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasLinks(); + method public static org.hamcrest.Matcher! hasMinimumChildCount(int); + method public static org.hamcrest.Matcher! hasSibling(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! isAssignableFrom(Class!); + method public static org.hamcrest.Matcher! isChecked(); + method public static org.hamcrest.Matcher! isClickable(); + method public static org.hamcrest.Matcher! isCompletelyDisplayed(); + method public static org.hamcrest.Matcher! isDescendantOfA(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! isDisplayed(); + method public static org.hamcrest.Matcher! isDisplayingAtLeast(int); + method public static org.hamcrest.Matcher! isEnabled(); + method public static org.hamcrest.Matcher! isFocusable(); + method public static org.hamcrest.Matcher! isFocused(); + method public static org.hamcrest.Matcher! isJavascriptEnabled(); + method public static org.hamcrest.Matcher! isNotChecked(); + method public static org.hamcrest.Matcher! isNotClickable(); + method public static org.hamcrest.Matcher! isNotEnabled(); + method public static org.hamcrest.Matcher! isNotFocusable(); + method public static org.hamcrest.Matcher! isNotFocused(); + method public static org.hamcrest.Matcher! isNotSelected(); + method public static org.hamcrest.Matcher! isRoot(); + method public static org.hamcrest.Matcher! isSelected(); + method public static org.hamcrest.Matcher! supportsInputMethods(); + method public static org.hamcrest.Matcher! withAlpha(float); + method public static org.hamcrest.Matcher! withChild(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withClassName(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withContentDescription(int); + method public static org.hamcrest.Matcher! withContentDescription(String!); + method public static org.hamcrest.Matcher! withContentDescription(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withEffectiveVisibility(androidx.test.espresso.matcher.ViewMatchers.Visibility!); + method public static org.hamcrest.Matcher! withHint(String!); + method public static org.hamcrest.Matcher! withHint(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withHint(int); + method public static org.hamcrest.Matcher! withId(int); + method public static org.hamcrest.Matcher! withId(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withInputType(int); + method public static org.hamcrest.Matcher! withParent(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withParentIndex(int); + method public static org.hamcrest.Matcher! withResourceName(String!); + method public static org.hamcrest.Matcher! withResourceName(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withSpinnerText(int); + method public static org.hamcrest.Matcher! withSpinnerText(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withSpinnerText(String!); + method public static org.hamcrest.Matcher! withSubstring(String!); + method public static org.hamcrest.Matcher! withTagKey(int); + method public static org.hamcrest.Matcher! withTagKey(int, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withTagValue(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withText(String!); + method public static org.hamcrest.Matcher! withText(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withText(int); + } + + public enum ViewMatchers.Visibility { + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility! forViewVisibility(android.view.View!); + method public static androidx.test.espresso.matcher.ViewMatchers.Visibility! forViewVisibility(int); method public int getValue(); - method public static androidx.test.espresso.matcher.ViewMatchers.Visibility valueOf(java.lang.String); - method public static final androidx.test.espresso.matcher.ViewMatchers.Visibility[] values(); enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility GONE; enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility INVISIBLE; enum_constant public static final androidx.test.espresso.matcher.ViewMatchers.Visibility VISIBLE; @@ -715,1371 +689,222 @@ package androidx.test.espresso.matcher { } -package androidx.test.espresso.util { - - public final class ActivityLifecycles { - method public static boolean hasForegroundActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); - method public static boolean hasTransitioningActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); - method public static boolean hasVisibleActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); - } - - public final class EspressoOptional { - method public static androidx.test.espresso.util.EspressoOptional absent(); - method public java.util.Set asSet(); - method public static androidx.test.espresso.util.EspressoOptional fromNullable(T); - method public T get(); - method public boolean isPresent(); - method public static androidx.test.espresso.util.EspressoOptional of(T); - method public com.google.common.base.Optional or(com.google.common.base.Optional); - method public T or(com.google.common.base.Supplier); - method public T or(T); - method public T orNull(); - method public static java.lang.Iterable presentInstances(java.lang.Iterable>); - method public com.google.common.base.Optional transform(com.google.common.base.Function); - } - - public final class HumanReadables { - method public static java.lang.String describe(android.database.Cursor); - method public static java.lang.String describe(android.view.View); - method public static java.lang.String getViewHierarchyErrorMessage(android.view.View, java.util.List, java.lang.String, java.lang.String); - } - - public final class TreeIterables { - method public static java.lang.Iterable breadthFirstViewTraversal(android.view.View); - method public static java.lang.Iterable depthFirstViewTraversal(android.view.View); - method public static java.lang.Iterable depthFirstViewTraversalWithDistance(android.view.View); - } - - public static class TreeIterables.ViewAndDistance { - method public int getDistanceFromRoot(); - method public android.view.View getView(); - } - -} - - public final class AtomAction implements androidx.test.espresso.remote.Bindable androidx.test.espresso.ViewAction { - ctor public AtomAction(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.WindowReference, androidx.test.espresso.web.model.ElementReference); - method public E get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; - method public E get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public java.util.concurrent.Future getFuture(); - method public android.os.IBinder getIBinder(); - method public java.lang.String getId(); - method public void perform(androidx.test.espresso.UiController, android.view.View); - method public void setIBinder(android.os.IBinder); - } - - public class EnableJavascriptAction implements androidx.test.espresso.ViewAction { - ctor public EnableJavascriptAction(); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); - } - - public abstract interface IAtomActionResultPropagator implements android.os.IInterface { - method public abstract void setError(android.os.Bundle) throws android.os.RemoteException; - method public abstract void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; - } - - public static abstract class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { - ctor public Stub(); - method public static androidx.test.espresso.web.action.IAtomActionResultPropagator asInterface(android.os.IBinder); - } - - public static class IAtomActionResultPropagator.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.espresso.web.action.IAtomActionResultPropagator { - method public void setError(android.os.Bundle) throws android.os.RemoteException; - method public void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; - } - -} - -package androidx.test.espresso.web.assertion { - - public final class TagSoupDocumentParser { - method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; - method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException; - } - - public abstract class WebAssertion { - ctor public WebAssertion(androidx.test.espresso.web.model.Atom); - method protected abstract void checkResult(android.webkit.WebView, E); - method public final androidx.test.espresso.web.model.Atom getAtom(); - method public final androidx.test.espresso.ViewAssertion toViewAssertion(E); - } - - public final class WebViewAssertions { - method public static androidx.test.espresso.web.assertion.WebAssertion webContent(org.hamcrest.Matcher); - method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber); - method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher); - } - - public static abstract interface WebViewAssertions.ResultDescriber { - method public abstract java.lang.String apply(E); - } - -} - -package androidx.test.espresso.web.matcher { - - public final class AmbiguousElementMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public AmbiguousElementMatcherException(java.lang.String); - } - - public final class DomMatchers { - method public static org.hamcrest.Matcher containingTextInBody(java.lang.String); - method public static org.hamcrest.Matcher elementById(java.lang.String, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher elementByXPath(java.lang.String, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasElementWithId(java.lang.String); - method public static org.hamcrest.Matcher hasElementWithXpath(java.lang.String); - method public static org.hamcrest.Matcher withBody(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withTextContent(java.lang.String); - method public static org.hamcrest.Matcher withTextContent(org.hamcrest.Matcher); - } - -} - -package androidx.test.espresso.web.model { - - public abstract interface Atom { - method public abstract java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); - method public abstract java.lang.String getScript(); - method public abstract R transform(androidx.test.espresso.web.model.Evaluation); - } - - public final class Atoms { - method public static androidx.test.espresso.web.model.TransformingAtom.Transformer castOrDie(java.lang.Class); - method public static androidx.test.espresso.web.model.Atom getCurrentUrl(); - method public static androidx.test.espresso.web.model.Atom getTitle(); - method public static androidx.test.espresso.web.model.Atom script(java.lang.String, androidx.test.espresso.web.model.TransformingAtom.Transformer); - method public static androidx.test.espresso.web.model.Atom script(java.lang.String); - method public static androidx.test.espresso.web.model.Atom scriptWithArgs(java.lang.String, java.util.List); - method public static androidx.test.espresso.web.model.Atom transform(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); - } - - public final class ElementReference implements androidx.test.espresso.web.model.JSONAble { - method public java.lang.String toJSONString(); - } - - public final class Evaluation implements androidx.test.espresso.web.model.JSONAble android.os.Parcelable { - ctor protected Evaluation(android.os.Parcel); - method public int describeContents(); - method public java.lang.String getMessage(); - method public int getStatus(); - method public java.lang.Object getValue(); - method public boolean hasMessage(); - method public void readFromParcel(android.os.Parcel); - method public java.lang.String toJSONString(); - method public void writeToParcel(android.os.Parcel, int); - field public static final android.os.Parcelable.Creator CREATOR; - } - - public abstract interface JSONAble { - method public abstract java.lang.String toJSONString(); - } - - public static abstract interface JSONAble.DeJSONFactory { - method public abstract java.lang.Object attemptDeJSONize(java.util.Map); - } - - public final class ModelCodec { - method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); - method public static androidx.test.espresso.web.model.Evaluation decodeEvaluation(java.lang.String); - method public static java.lang.String encode(java.lang.Object); - method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); - } - - public class SimpleAtom implements androidx.test.espresso.web.model.Atom { - ctor public SimpleAtom(java.lang.String); - ctor public SimpleAtom(java.lang.String, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement); - method public final java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); - method protected java.util.List getNonContextualArguments(); - method public final java.lang.String getScript(); - method protected androidx.test.espresso.web.model.Evaluation handleBadEvaluation(androidx.test.espresso.web.model.Evaluation); - method protected void handleNoElementReference(); - method public final androidx.test.espresso.web.model.Evaluation transform(androidx.test.espresso.web.model.Evaluation); - } - - public static final class SimpleAtom.ElementReferencePlacement extends java.lang.Enum { - method public static androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement valueOf(java.lang.String); - method public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement[] values(); - enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement FIRST; - enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement LAST; - } - - public class TransformingAtom implements androidx.test.espresso.web.model.Atom { - ctor public TransformingAtom(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); - method public java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); - method public java.lang.String getScript(); - method public O transform(androidx.test.espresso.web.model.Evaluation); - } - - public static abstract interface TransformingAtom.Transformer { - method public abstract O apply(I); - } - - public final class WindowReference implements androidx.test.espresso.web.model.JSONAble { - method public java.lang.String toJSONString(); - } - -} - -package androidx.test.espresso.web.sugar { - - public final class Web { - ctor public Web(); - method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(); - method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(org.hamcrest.Matcher); - } - - public static class Web.WebInteraction { - method public androidx.test.espresso.web.sugar.Web.WebInteraction check(androidx.test.espresso.web.assertion.WebAssertion); - method public androidx.test.espresso.web.sugar.Web.WebInteraction forceJavascriptEnabled(); - method public R get(); - method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.WindowReference); - method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction perform(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction reset(); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withContextualElement(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.ElementReference); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withNoTimeout(); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withTimeout(long, java.util.concurrent.TimeUnit); - } - -} - -package androidx.test.espresso.web.webdriver { - - public final class DriverAtoms { - method public static androidx.test.espresso.web.model.Atom clearElement(); - method public static androidx.test.espresso.web.model.Atom findElement(androidx.test.espresso.web.webdriver.Locator, java.lang.String); - method public static androidx.test.espresso.web.model.Atom> findMultipleElements(androidx.test.espresso.web.webdriver.Locator, java.lang.String); - method public static androidx.test.espresso.web.model.Atom getText(); - method public static androidx.test.espresso.web.model.Atom selectActiveElement(); - method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String, androidx.test.espresso.web.model.WindowReference); - method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String); - method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int); - method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference); - method public static androidx.test.espresso.web.model.Atom webClick(); - method public static androidx.test.espresso.web.model.Atom webKeys(java.lang.String); - method public static androidx.test.espresso.web.model.Atom webScrollIntoView(); - } - - public final class Locator extends java.lang.Enum { - method public java.lang.String getType(); - method public static androidx.test.espresso.web.webdriver.Locator valueOf(java.lang.String); - method public static final androidx.test.espresso.web.webdriver.Locator[] values(); - enum_constant public static final androidx.test.espresso.web.webdriver.Locator CLASS_NAME; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator CSS_SELECTOR; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator ID; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator LINK_TEXT; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator NAME; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator PARTIAL_LINK_TEXT; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator TAG_NAME; - enum_constant public static final androidx.test.espresso.web.webdriver.Locator XPATH; - } - -} - -package androidx.test.ext.junit.rules { - - public final class ActivityScenarioRule extends org.junit.rules.ExternalResource { - ctor public ActivityScenarioRule(java.lang.Class); - ctor public ActivityScenarioRule(java.lang.Class, android.os.Bundle); - ctor public ActivityScenarioRule(android.content.Intent); - ctor public ActivityScenarioRule(android.content.Intent, android.os.Bundle); - method public androidx.test.core.app.ActivityScenario getScenario(); - } - -} - -package androidx.test.ext.junit.runners { - - public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { - ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; - method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; - method public org.junit.runner.Description getDescription(); - method public void run(org.junit.runner.notification.RunNotifier); - method public void sort(org.junit.runner.manipulation.Sorter); - } - -} - -package androidx.test.ext.truth.app { +package androidx.test.espresso.remote { - public class NotificationActionSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.app.NotificationActionSubject assertThat(android.app.Notification.Action); - method public static com.google.common.truth.Subject.Factory notificationActions(); - method public final com.google.common.truth.StringSubject title(); + public interface Bindable { + method public android.os.IBinder! getIBinder(); + method public String! getId(); + method public void setIBinder(android.os.IBinder!); } - public class NotificationSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.app.NotificationSubject assertThat(android.app.Notification); - method public final androidx.test.ext.truth.app.PendingIntentSubject contentIntent(); - method public final androidx.test.ext.truth.app.PendingIntentSubject deleteIntent(); - method public final void doesNotHaveFlags(int); - method public final androidx.test.ext.truth.os.BundleSubject extras(); - method public final void hasFlags(int); - method public static com.google.common.truth.Subject.Factory notifications(); - method public final com.google.common.truth.StringSubject tickerText(); + public final class ConstructorInvocation { + ctor public ConstructorInvocation(Class, Class?, Class!...); + method public Object! invokeConstructor(java.lang.Object!...); } - public class PendingIntentSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.app.PendingIntentSubject assertThat(android.app.PendingIntent); - method public static com.google.common.truth.Subject.Factory pendingIntents(); + public interface Converter { + method public O! convert(I); } -} - -package androidx.test.ext.truth.content { - - public final class IntentCorrespondences { - method public static com.google.common.truth.Correspondence action(); - method public static com.google.common.truth.Correspondence all(com.google.common.truth.Correspondence...); - method public static com.google.common.truth.Correspondence data(); - } - - public final class IntentSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.content.IntentSubject assertThat(android.content.Intent); - method public com.google.common.truth.IterableSubject categories(); - method public androidx.test.ext.truth.os.BundleSubject extras(); - method public void filtersEquallyTo(android.content.Intent); - method public void hasAction(java.lang.String); - method public void hasComponent(java.lang.String, java.lang.String); - method public void hasComponent(android.content.ComponentName); - method public void hasComponentClass(java.lang.Class); - method public void hasComponentClass(java.lang.String); - method public void hasComponentPackage(java.lang.String); - method public void hasData(android.net.Uri); - method public void hasFlags(int); - method public void hasNoAction(); - method public void hasPackage(java.lang.String); - method public void hasType(java.lang.String); - method public static com.google.common.truth.Subject.Factory intents(); + public final class EspressoRemote implements androidx.test.espresso.remote.RemoteInteraction { + method public java.util.concurrent.Callable! createRemoteCheckCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAssertion!); + method public java.util.concurrent.Callable! createRemotePerformCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAction!...); + method public static androidx.test.espresso.remote.EspressoRemote! getInstance(); + method public void init(); + method public boolean isRemoteProcess(); + method public void terminate(); } -} - -package androidx.test.ext.truth.location { - - public final class LocationCorrespondences { - method public static com.google.common.truth.Correspondence at(); - method public static com.google.common.truth.Correspondence equality(); - method public static com.google.common.truth.Correspondence nearby(float); - } - - public class LocationSubject extends com.google.common.truth.Subject { - method public com.google.common.truth.FloatSubject accuracy(); - method public com.google.common.truth.DoubleSubject altitude(); - method public static androidx.test.ext.truth.location.LocationSubject assertThat(android.location.Location); - method public com.google.common.truth.FloatSubject bearing(); - method public com.google.common.truth.FloatSubject bearingAccuracy(); - method public com.google.common.truth.FloatSubject bearingTo(double, double); - method public com.google.common.truth.FloatSubject bearingTo(android.location.Location); - method public com.google.common.truth.FloatSubject distanceTo(double, double); - method public com.google.common.truth.FloatSubject distanceTo(android.location.Location); - method public void doesNotHaveProvider(java.lang.String); - method public com.google.common.truth.LongSubject elapsedRealtimeMillis(); - method public com.google.common.truth.LongSubject elapsedRealtimeNanos(); - method public final androidx.test.ext.truth.os.BundleSubject extras(); - method public void hasAccuracy(); - method public void hasAltitude(); - method public void hasBearing(); - method public void hasBearingAccuracy(); - method public void hasProvider(java.lang.String); - method public void hasSpeed(); - method public void hasSpeedAccuracy(); - method public void hasVerticalAccuracy(); - method public void isAt(android.location.Location); - method public void isAt(double, double); - method public void isFaraway(android.location.Location, float); - method public void isMock(); - method public void isNearby(android.location.Location, float); - method public void isNotAt(android.location.Location); - method public void isNotAt(double, double); - method public void isNotMock(); - method public static com.google.common.truth.Subject.Factory locations(); - method public com.google.common.truth.FloatSubject speed(); - method public com.google.common.truth.FloatSubject speedAccuracy(); - method public com.google.common.truth.LongSubject time(); - method public com.google.common.truth.FloatSubject verticalAccuracy(); + public interface EspressoRemoteMessage { } -} - -package androidx.test.ext.truth.os { - - public final class BundleSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.os.BundleSubject assertThat(android.os.Bundle); - method public com.google.common.truth.BooleanSubject bool(java.lang.String); - method public static com.google.common.truth.Subject.Factory bundles(); - method public void containsKey(java.lang.String); - method public void doesNotContainKey(java.lang.String); - method public void hasSize(int); - method public com.google.common.truth.IntegerSubject integer(java.lang.String); - method public void isEmpty(); - method public void isNotEmpty(); - method public com.google.common.truth.LongSubject longInt(java.lang.String); - method public androidx.test.ext.truth.os.ParcelableSubject parcelable(java.lang.String); - method public com.google.common.truth.IterableSubject parcelableArrayList(java.lang.String); - method public SubjectT parcelableAsType(java.lang.String, com.google.common.truth.Subject.Factory); - method public com.google.common.truth.StringSubject string(java.lang.String); - method public com.google.common.truth.IterableSubject stringArrayList(java.lang.String); + public static interface EspressoRemoteMessage.From { + method public T! fromProto(M!); } - public final class ParcelableSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.os.ParcelableSubject assertThat(T); - method public static com.google.common.truth.Subject.Factory, T> parcelables(); - method public void recreatesEqual(android.os.Parcelable.Creator); + public static interface EspressoRemoteMessage.To { + method public M! toProto(); } -} - -package androidx.test.ext.truth.view { - - public final class MotionEventSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.view.MotionEventSubject assertThat(android.view.MotionEvent); - method public void hasAction(int); - method public void hasActionButton(int); - method public void hasButtonState(int); - method public void hasDeviceId(int); - method public void hasDownTime(long); - method public void hasEdgeFlags(int); - method public void hasEventTime(long); - method public void hasFlags(int); - method public void hasHistorySize(int); - method public void hasMetaState(int); - method public void hasPointerCount(int); - method public com.google.common.truth.LongSubject historicalEventTime(int); - method public com.google.common.truth.FloatSubject historicalOrientation(int); - method public androidx.test.ext.truth.view.PointerCoordsSubject historicalPointerCoords(int, int); - method public com.google.common.truth.FloatSubject historicalPressure(int); - method public com.google.common.truth.FloatSubject historicalSize(int); - method public com.google.common.truth.FloatSubject historicalToolMajor(int); - method public com.google.common.truth.FloatSubject historicalToolMinor(int); - method public com.google.common.truth.FloatSubject historicalTouchMajor(int); - method public com.google.common.truth.FloatSubject historicalTouchMinor(int); - method public com.google.common.truth.FloatSubject historicalX(int); - method public com.google.common.truth.FloatSubject historicalY(int); - method public static com.google.common.truth.Subject.Factory motionEvents(); - method public com.google.common.truth.FloatSubject orientation(); - method public com.google.common.truth.FloatSubject orientation(int); - method public androidx.test.ext.truth.view.PointerCoordsSubject pointerCoords(int); - method public com.google.common.truth.IntegerSubject pointerId(int); - method public androidx.test.ext.truth.view.PointerPropertiesSubject pointerProperties(int); - method public com.google.common.truth.FloatSubject pressure(); - method public com.google.common.truth.FloatSubject pressure(int); - method public com.google.common.truth.FloatSubject rawX(); - method public com.google.common.truth.FloatSubject rawY(); - method public com.google.common.truth.FloatSubject size(); - method public com.google.common.truth.FloatSubject size(int); - method public com.google.common.truth.FloatSubject toolMajor(); - method public com.google.common.truth.FloatSubject toolMajor(int); - method public com.google.common.truth.FloatSubject toolMinor(); - method public com.google.common.truth.FloatSubject toolMinor(int); - method public com.google.common.truth.FloatSubject touchMajor(); - method public com.google.common.truth.FloatSubject touchMajor(int); - method public com.google.common.truth.FloatSubject touchMinor(); - method public com.google.common.truth.FloatSubject touchMinor(int); - method public com.google.common.truth.FloatSubject x(); - method public com.google.common.truth.FloatSubject x(int); - method public com.google.common.truth.FloatSubject xPrecision(); - method public com.google.common.truth.FloatSubject y(); - method public com.google.common.truth.FloatSubject y(int); - method public com.google.common.truth.FloatSubject yPrecision(); - } - - public final class PointerCoordsSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.view.PointerCoordsSubject assertThat(android.view.MotionEvent.PointerCoords); - method public com.google.common.truth.FloatSubject axisValue(int); - method public com.google.common.truth.FloatSubject orientation(); - method public static com.google.common.truth.Subject.Factory pointerCoords(); - method public com.google.common.truth.FloatSubject pressure(); - method public com.google.common.truth.FloatSubject size(); - method public com.google.common.truth.FloatSubject toolMajor(); - method public com.google.common.truth.FloatSubject toolMinor(); - method public com.google.common.truth.FloatSubject touchMajor(); - method public com.google.common.truth.FloatSubject touchMinor(); - method public com.google.common.truth.FloatSubject x(); - method public com.google.common.truth.FloatSubject y(); - } - - public final class PointerPropertiesSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.view.PointerPropertiesSubject assertThat(android.view.MotionEvent.PointerProperties); - method public void hasId(int); - method public void hasToolType(int); - method public void isEqualTo(android.view.MotionEvent.PointerProperties); - method public static com.google.common.truth.Subject.Factory pointerProperties(); + public final class FieldDescriptor { + method public static androidx.test.espresso.remote.FieldDescriptor! of(Class, String, int); + field public final String! fieldName; + field public final Class! fieldType; + field public final int order; } -} - -package androidx.test.filters { - - public abstract class FlakyTest implements java.lang.annotation.Annotation { + public final class GenericRemoteMessage implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + ctor public GenericRemoteMessage(Object); + method public MessageLite toProto(); + field public static final androidx.test.espresso.remote.EspressoRemoteMessage.From! FROM; } - public abstract class LargeTest implements java.lang.annotation.Annotation { + public final class InteractionRequest implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public org.hamcrest.Matcher! getRootMatcher(); + method public androidx.test.espresso.ViewAction! getViewAction(); + method public androidx.test.espresso.ViewAssertion! getViewAssertion(); + method public org.hamcrest.Matcher! getViewMatcher(); + method public MessageLite toProto(); } - public abstract class MediumTest implements java.lang.annotation.Annotation { + public static class InteractionRequest.Builder { + ctor public InteractionRequest.Builder(); + method public androidx.test.espresso.remote.InteractionRequest! build(); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setRequestProto(byte[]); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setRootMatcher(org.hamcrest.Matcher); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setViewAction(androidx.test.espresso.ViewAction); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setViewAssertion(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setViewMatcher(org.hamcrest.Matcher); } - public abstract class RequiresDevice implements java.lang.annotation.Annotation { + public final class InteractionResponse implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public androidx.test.espresso.remote.InteractionResponse.RemoteError! getRemoteError(); + method public androidx.test.espresso.remote.InteractionResponse.Status! getStatus(); + method public boolean hasRemoteError(); + method public MessageLite toProto(); } - public abstract class SdkSuppress implements java.lang.annotation.Annotation { + public static class InteractionResponse.Builder { + ctor public InteractionResponse.Builder(); + method public androidx.test.espresso.remote.InteractionResponse! build(); + method public androidx.test.espresso.remote.InteractionResponse.Builder! setRemoteError(androidx.test.espresso.remote.InteractionResponse.RemoteError?); + method public androidx.test.espresso.remote.InteractionResponse.Builder! setResultProto(byte[]); + method public androidx.test.espresso.remote.InteractionResponse.Builder! setStatus(androidx.test.espresso.remote.InteractionResponse.Status); } - public abstract class SmallTest implements java.lang.annotation.Annotation { + public static final class InteractionResponse.RemoteError { + method public int getCode(); + method public String! getDescription(); + field public static final int REMOTE_ESPRESSO_ERROR_CODE = 0; // 0x0 + field public static final int REMOTE_PROTOCOL_ERROR_CODE = 1; // 0x1 } - public abstract class Suppress implements java.lang.annotation.Annotation { + public enum InteractionResponse.Status { + enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Error; + enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Ok; } -} - -package androidx.test.jank { - - public abstract class GfxFrameStatsMonitor implements java.lang.annotation.Annotation { - field public static final java.lang.String KEY_AVG_FPS = "framestats-fps"; - field public static final java.lang.String KEY_AVG_JANK_RATE = "framestats-jankrate"; - field public static final java.lang.String KEY_AVG_SLOW_RATE = "framestats-slowrate"; - field public static final java.lang.String KEY_FRAME_COUNT = "framestats-frame-count"; - field public static final java.lang.String KEY_RENDERTHREAD_TIME_90TH_PERCENTILE = "framestats-renderthread-90"; - field public static final java.lang.String KEY_RENDERTHREAD_TIME_95TH_PERCENTILE = "framestats-renderthread-95"; - field public static final java.lang.String KEY_RENDERTHREAD_TIME_99TH_PERCENTILE = "framestats-renderthread-99"; - field public static final java.lang.String KEY_RENDERTHREAD_TIME_MEDIAN = "framestats-renderthread-median"; - field public static final java.lang.String KEY_TOTAL_TIME_90TH_PERCENTILE = "framestats-totaltime-90"; - field public static final java.lang.String KEY_TOTAL_TIME_95TH_PERCENTILE = "framestats-totaltime-95"; - field public static final java.lang.String KEY_TOTAL_TIME_99TH_PERCENTILE = "framestats-totaltime-99"; - field public static final java.lang.String KEY_TOTAL_TIME_MEDIAN = "framestats-totaltime-median"; - field public static final java.lang.String KEY_UITHREAD_TIME_90TH_PERCENTILE = "framestats-uithread-90"; - field public static final java.lang.String KEY_UITHREAD_TIME_95TH_PERCENTILE = "framestats-uithread-95"; - field public static final java.lang.String KEY_UITHREAD_TIME_99TH_PERCENTILE = "framestats-uithread-99"; - field public static final java.lang.String KEY_UITHREAD_TIME_MEDIAN = "framestats-uithread-median"; - field public static final java.lang.String KEY_VSYNC_COUNT = "framestats-vsync-count"; - } - - public abstract class GfxMonitor implements java.lang.annotation.Annotation { - field public static final java.lang.String KEY_AVG_FRAME_TIME_50TH_PERCENTILE = "gfx-avg-frame-time-50"; - field public static final java.lang.String KEY_AVG_FRAME_TIME_90TH_PERCENTILE = "gfx-avg-frame-time-90"; - field public static final java.lang.String KEY_AVG_FRAME_TIME_95TH_PERCENTILE = "gfx-avg-frame-time-95"; - field public static final java.lang.String KEY_AVG_FRAME_TIME_99TH_PERCENTILE = "gfx-avg-frame-time-99"; - field public static final java.lang.String KEY_AVG_HIGH_INPUT_LATENCY = "gfx-avg-high-input-latency"; - field public static final java.lang.String KEY_AVG_MISSED_VSYNC = "gfx-avg-missed-vsync"; - field public static final java.lang.String KEY_AVG_NUM_FRAME_MISSED = "gfx-avg-num-frame-deadline-missed"; - field public static final java.lang.String KEY_AVG_NUM_JANKY = "gfx-avg-jank"; - field public static final java.lang.String KEY_AVG_SLOW_BITMAP_UPLOADS = "gfx-avg-slow-bitmap-uploads"; - field public static final java.lang.String KEY_AVG_SLOW_DRAW = "gfx-avg-slow-draw"; - field public static final java.lang.String KEY_AVG_SLOW_UI_THREAD = "gfx-avg-slow-ui-thread"; - field public static final java.lang.String KEY_AVG_TOTAL_FRAMES = "gfx-avg-total-frames"; - field public static final java.lang.String KEY_MAX_FRAME_TIME_50TH_PERCENTILE = "gfx-max-frame-time-50"; - field public static final java.lang.String KEY_MAX_FRAME_TIME_90TH_PERCENTILE = "gfx-max-frame-time-90"; - field public static final java.lang.String KEY_MAX_FRAME_TIME_95TH_PERCENTILE = "gfx-max-frame-time-95"; - field public static final java.lang.String KEY_MAX_FRAME_TIME_99TH_PERCENTILE = "gfx-max-frame-time-99"; - field public static final java.lang.String KEY_MAX_HIGH_INPUT_LATENCY = "gfx-max-high-input-latency"; - field public static final java.lang.String KEY_MAX_MISSED_VSYNC = "gfx-max-missed-vsync"; - field public static final java.lang.String KEY_MAX_NUM_FRAME_MISSED = "gfx-max-num-frame-deadline-missed"; - field public static final java.lang.String KEY_MAX_NUM_JANKY = "gfx-max-jank"; - field public static final java.lang.String KEY_MAX_SLOW_BITMAP_UPLOADS = "gfx-max-slow-bitmap-uploads"; - field public static final java.lang.String KEY_MAX_SLOW_DRAW = "gfx-max-slow-draw"; - field public static final java.lang.String KEY_MAX_SLOW_UI_THREAD = "gfx-max-slow-ui-thread"; - field public static final java.lang.String KEY_MAX_TOTAL_FRAMES = "gfx-max-total-frames"; - field public static final java.lang.String KEY_MIN_TOTAL_FRAMES = "gfx-min-total-frames"; - } - - public abstract interface IMonitor { - method public abstract android.os.Bundle getMetrics(); - method public abstract void startIteration() throws java.lang.Throwable; - method public abstract android.os.Bundle stopIteration() throws java.lang.Throwable; - } - - public abstract interface IMonitorFactory { - method public abstract java.util.List getMonitors(java.lang.reflect.Method, java.lang.Object); - } - - public abstract class JankTest implements java.lang.annotation.Annotation { - } - - public class JankTestBase extends android.test.InstrumentationTestCase { - ctor public JankTestBase(); - method public void afterLoop() throws java.lang.Exception; - method public void afterTest(android.os.Bundle); - method public void beforeLoop() throws java.lang.Exception; - method public void beforeTest() throws java.lang.Exception; - method protected androidx.test.jank.IMonitorFactory createMonitorFactory(); - method protected final android.os.Bundle getArguments(); - method public final int getCurrentIteration(); - method protected androidx.test.jank.IMonitorFactory getMonitorFactory(); - method protected java.util.List getMonitors(java.lang.reflect.Method); + public final class NoRemoteEspressoInstanceException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public NoRemoteEspressoInstanceException(String!); } -} - -package androidx.test.jank.annotations { - - public abstract class UseMonitorFactory implements java.lang.annotation.Annotation { + public class NoopRemoteInteraction implements androidx.test.espresso.remote.RemoteInteraction { + ctor public NoopRemoteInteraction(); + method public java.util.concurrent.Callable! createRemoteCheckCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAssertion!); + method public java.util.concurrent.Callable! createRemotePerformCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAction!...); + method public boolean isRemoteProcess(); } -} - -package androidx.test.platform { - - public abstract interface TestFrameworkException { + public final class ProtoUtils { + method public static String! capitalizeFirstChar(String!); + method public static T! checkedGetEnumForProto(int, Class!); + method public static java.util.List! getFilteredFieldList(Class!, java.util.List!) throws java.lang.NoSuchFieldException; } -} - -package androidx.test.platform.app { - - public final class InstrumentationRegistry { - method public static android.os.Bundle getArguments(); - method public static android.app.Instrumentation getInstrumentation(); - method public static void registerInstance(android.app.Instrumentation, android.os.Bundle); + public final class RemoteDescriptor { + method public java.util.List! getInstanceFieldDescriptorList(); + method public Class! getInstanceType(); + method public String! getInstanceTypeName(); + method public Class! getProtoBuilderClass(); + method public Parser getProtoParser(); + method public Class! getProtoType(); + method public Class![]! getRemoteConstrTypes(); + method public Class! getRemoteType(); } -} - -package androidx.test.platform.ui { - - public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { - ctor public InjectEventSecurityException(java.lang.String); - ctor public InjectEventSecurityException(java.lang.Throwable); - ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + public static final class RemoteDescriptor.Builder { + ctor public RemoteDescriptor.Builder(); + method public androidx.test.espresso.remote.RemoteDescriptor! build(); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setInstanceFieldDescriptors(androidx.test.espresso.remote.FieldDescriptor!...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setInstanceType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setProtoBuilderType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setProtoParser(Parser); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setProtoType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setRemoteConstrTypes(Class!...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setRemoteType(Class); } - public abstract interface UiController { - method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.platform.ui.InjectEventSecurityException; - method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.platform.ui.InjectEventSecurityException; - method public abstract boolean injectString(java.lang.String) throws androidx.test.platform.ui.InjectEventSecurityException; - method public abstract void loopMainThreadForAtLeast(long); - method public abstract void loopMainThreadUntilIdle(); + public final class RemoteDescriptorRegistry { + method public androidx.test.espresso.remote.RemoteDescriptor! argForInstanceType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor! argForMsgType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor! argForRemoteTypeUrl(String); + method public static androidx.test.espresso.remote.RemoteDescriptorRegistry! getInstance(); + method public boolean hasArgForInstanceType(Class); + method public boolean registerRemoteTypeArgs(java.util.List); + method public void unregisterRemoteTypeArgs(java.util.List); } -} - -package androidx.test.rule { - - public deprecated class ActivityTestRule implements org.junit.rules.TestRule { - ctor public ActivityTestRule(java.lang.Class); - ctor public ActivityTestRule(java.lang.Class, boolean); - ctor public ActivityTestRule(java.lang.Class, boolean, boolean); - ctor public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory, boolean, boolean); - ctor public ActivityTestRule(java.lang.Class, java.lang.String, int, boolean, boolean); - method protected void afterActivityFinished(); - method protected void afterActivityLaunched(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method protected void beforeActivityLaunched(); - method public void finishActivity(); - method public T getActivity(); - method protected android.content.Intent getActivityIntent(); - method public android.app.Instrumentation.ActivityResult getActivityResult(); - method public T launchActivity(android.content.Intent); - method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; - } - - public class DisableOnAndroidDebug implements org.junit.rules.TestRule { - ctor public DisableOnAndroidDebug(org.junit.rules.TestRule); - method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method public boolean isDebugging(); - } - - public class GrantPermissionRule implements org.junit.rules.TestRule { - method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method public static androidx.test.rule.GrantPermissionRule grant(java.lang.String...); - } - - public class ServiceTestRule implements org.junit.rules.TestRule { - ctor public ServiceTestRule(); - ctor protected ServiceTestRule(long, java.util.concurrent.TimeUnit); - method protected void afterService(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method protected void beforeService(); - method public android.os.IBinder bindService(android.content.Intent) throws java.util.concurrent.TimeoutException; - method public android.os.IBinder bindService(android.content.Intent, android.content.ServiceConnection, int) throws java.util.concurrent.TimeoutException; - method public void startService(android.content.Intent) throws java.util.concurrent.TimeoutException; - method public void unbindService(); - method public static androidx.test.rule.ServiceTestRule withTimeout(long, java.util.concurrent.TimeUnit); - } - - public deprecated class UiThreadTestRule implements org.junit.rules.TestRule { - ctor public UiThreadTestRule(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; - method protected boolean shouldRunOnUiThread(org.junit.runner.Description); - } - -} - -package androidx.test.rule.logging { - - public class AtraceLogger { - method public void atraceStart(java.util.Set, int, int, java.io.File, java.lang.String) throws java.io.IOException; - method public void atraceStop() throws java.io.IOException, java.lang.InterruptedException; - method public static androidx.test.rule.logging.AtraceLogger getAtraceLoggerInstance(android.app.Instrumentation); + public class RemoteEspressoException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public RemoteEspressoException(String!); + ctor public RemoteEspressoException(String!, Throwable!); } -} - -package androidx.test.rule.provider { - - public class ProviderTestRule implements org.junit.rules.TestRule { - method protected void afterProviderCleanedUp(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method protected void beforeProviderSetup(); - method public android.content.ContentResolver getResolver(); - method public void revokePermission(java.lang.String); - method public void runDatabaseCommands(java.lang.String, java.lang.String...); + public interface RemoteInteraction { + method public java.util.concurrent.Callable! createRemoteCheckCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAssertion!); + method public java.util.concurrent.Callable! createRemotePerformCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAction!...); + method public boolean isRemoteProcess(); + field public static final String BUNDLE_EXECUTION_STATUS = "executionStatus"; } - public static class ProviderTestRule.Builder { - ctor public Builder(java.lang.Class, java.lang.String); - method public androidx.test.rule.provider.ProviderTestRule.Builder addProvider(java.lang.Class, java.lang.String); - method public androidx.test.rule.provider.ProviderTestRule build(); - method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommands(java.lang.String, java.lang.String...); - method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommandsFile(java.lang.String, java.io.File); - method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseFile(java.lang.String, java.io.File); - method public androidx.test.rule.provider.ProviderTestRule.Builder setPrefix(java.lang.String); + public class RemoteInteractionRegistry { + method public static androidx.test.espresso.remote.RemoteInteraction! getInstance(); + method public static void registerInstance(androidx.test.espresso.remote.RemoteInteraction!); } -} - -package androidx.test.runner { - - public final deprecated class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { - ctor public AndroidJUnit4(java.lang.Class, androidx.test.internal.util.AndroidRunnerParams) throws org.junit.runners.model.InitializationError; - ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; - method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; - method public org.junit.runner.Description getDescription(); - method public void run(org.junit.runner.notification.RunNotifier); - method public void sort(org.junit.runner.manipulation.Sorter); + public class RemoteProtocolException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { + ctor public RemoteProtocolException(String!); + ctor public RemoteProtocolException(String!, Throwable!); } - public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation implements androidx.test.internal.events.client.TestEventClientConnectListener { - ctor public AndroidJUnitRunner(); - method public void onTestEventClientConnect(); - } - - public class MonitoringInstrumentation extends androidx.test.internal.runner.hidden.ExposedInstrumentationApi { - ctor public MonitoringInstrumentation(); - method protected void dumpThreadStateToOutputs(java.lang.String); - method protected java.lang.String getThreadState(); - method protected void installMultidex(); - method protected void installOldMultiDex(java.lang.Class) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; - method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory); - method protected deprecated boolean isPrimaryInstrProcess(java.lang.String); - method protected final boolean isPrimaryInstrProcess(); - method protected void restoreUncaughtExceptionHandler(); - method protected final void setJsBridgeClassName(java.lang.String); - method protected boolean shouldWaitForActivitiesToComplete(); - method protected void specifyDexMakerCacheProperty(); - method public void useDefaultInterceptingActivityFactory(); - method protected void waitForActivitiesToComplete(); - } - - public class MonitoringInstrumentation.ActivityFinisher implements java.lang.Runnable { - ctor public ActivityFinisher(); - method public void run(); - } - - public class UsageTrackerFacilitator implements androidx.test.internal.runner.tracker.UsageTracker { - ctor public UsageTrackerFacilitator(androidx.test.internal.runner.RunnerArgs); - ctor public UsageTrackerFacilitator(boolean); - method public void registerUsageTracker(androidx.test.internal.runner.tracker.UsageTracker); - method public void sendUsages(); - method public boolean shouldTrackUsage(); - method public void trackUsage(java.lang.String, java.lang.String); + public final class TypeProtoConverters { + method public static T! anyToType(Any); + method public static android.os.Parcelable! byteStringToParcelable(ByteString, Class); + method public static T! byteStringToType(ByteString); + method public static ByteString parcelableToByteString(android.os.Parcelable); + method public static Any typeToAny(T); + method public static ByteString typeToByteString(Object); } } -package androidx.test.runner.intent { - - public abstract interface IntentCallback { - method public abstract void onIntentSent(android.content.Intent); - } - - public abstract interface IntentMonitor { - method public abstract void addIntentCallback(androidx.test.runner.intent.IntentCallback); - method public abstract void removeIntentCallback(androidx.test.runner.intent.IntentCallback); - } - - public final class IntentMonitorRegistry { - method public static androidx.test.runner.intent.IntentMonitor getInstance(); - method public static void registerInstance(androidx.test.runner.intent.IntentMonitor); - } - - public abstract interface IntentStubber { - method public abstract android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); - } - - public final class IntentStubberRegistry { - method public static androidx.test.runner.intent.IntentStubber getInstance(); - method public static boolean isLoaded(); - method public static void load(androidx.test.runner.intent.IntentStubber); - method public static synchronized void reset(); - } - -} - -package androidx.test.runner.intercepting { - - public abstract interface InterceptingActivityFactory { - method public abstract android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); - method public abstract boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); - } - - public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { - ctor public SingleActivityFactory(java.lang.Class); - method public final android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); - method protected abstract T create(android.content.Intent); - method public final java.lang.Class getActivityClassToIntercept(); - method public final boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); - } - -} - -package androidx.test.runner.lifecycle { - - public abstract interface ActivityLifecycleCallback { - method public abstract void onActivityLifecycleChanged(android.app.Activity, androidx.test.runner.lifecycle.Stage); - } - - public abstract interface ActivityLifecycleMonitor { - method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); - method public abstract java.util.Collection getActivitiesInStage(androidx.test.runner.lifecycle.Stage); - method public abstract androidx.test.runner.lifecycle.Stage getLifecycleStageOf(android.app.Activity); - method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); - } - - public final class ActivityLifecycleMonitorRegistry { - method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor getInstance(); - method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); - } - - public abstract interface ApplicationLifecycleCallback { - method public abstract void onApplicationLifecycleChanged(android.app.Application, androidx.test.runner.lifecycle.ApplicationStage); - } - - public abstract interface ApplicationLifecycleMonitor { - method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); - method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); - } - - public final class ApplicationLifecycleMonitorRegistry { - method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor getInstance(); - method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor); - } - - public final class ApplicationStage extends java.lang.Enum { - method public static androidx.test.runner.lifecycle.ApplicationStage valueOf(java.lang.String); - method public static final androidx.test.runner.lifecycle.ApplicationStage[] values(); - enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage CREATED; - enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage PRE_ON_CREATE; - } - - public final class Stage extends java.lang.Enum { - method public static androidx.test.runner.lifecycle.Stage valueOf(java.lang.String); - method public static final androidx.test.runner.lifecycle.Stage[] values(); - enum_constant public static final androidx.test.runner.lifecycle.Stage CREATED; - enum_constant public static final androidx.test.runner.lifecycle.Stage DESTROYED; - enum_constant public static final androidx.test.runner.lifecycle.Stage PAUSED; - enum_constant public static final androidx.test.runner.lifecycle.Stage PRE_ON_CREATE; - enum_constant public static final androidx.test.runner.lifecycle.Stage RESTARTED; - enum_constant public static final androidx.test.runner.lifecycle.Stage RESUMED; - enum_constant public static final androidx.test.runner.lifecycle.Stage STARTED; - enum_constant public static final androidx.test.runner.lifecycle.Stage STOPPED; - } - -} - -package androidx.test.runner.permission { - - public class PermissionRequester implements androidx.test.internal.platform.content.PermissionGranter { - ctor public PermissionRequester(); - method public void addPermissions(java.lang.String...); - method public void requestPermissions(); - method protected void setAndroidRuntimeVersion(int); - } - - public abstract class RequestPermissionCallable implements java.util.concurrent.Callable { - ctor public RequestPermissionCallable(androidx.test.runner.permission.ShellCommand, android.content.Context, java.lang.String); - method protected java.lang.String getPermission(); - method protected androidx.test.runner.permission.ShellCommand getShellCommand(); - method protected boolean isPermissionGranted(); - } - - public static final class RequestPermissionCallable.Result extends java.lang.Enum { - method public static androidx.test.runner.permission.RequestPermissionCallable.Result valueOf(java.lang.String); - method public static final androidx.test.runner.permission.RequestPermissionCallable.Result[] values(); - enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result FAILURE; - enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result SUCCESS; - } - - public abstract class ShellCommand { - ctor public ShellCommand(); - } - -} - -package androidx.test.runner.screenshot { - - public class BasicScreenCaptureProcessor implements androidx.test.runner.screenshot.ScreenCaptureProcessor { - ctor public BasicScreenCaptureProcessor(); - method protected java.lang.String getDefaultFilename(); - method protected java.lang.String getFilename(java.lang.String); - method public java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; - field protected java.lang.String mDefaultFilenamePrefix; - field protected java.io.File mDefaultScreenshotPath; - field protected java.lang.String mFileNameDelimiter; - field protected java.lang.String mTag; - } +package androidx.test.espresso.util { - public final class ScreenCapture { - method public android.graphics.Bitmap getBitmap(); - method public android.graphics.Bitmap.CompressFormat getFormat(); - method public java.lang.String getName(); - method public void process() throws java.io.IOException; - method public void process(java.util.Set) throws java.io.IOException; - method public androidx.test.runner.screenshot.ScreenCapture setFormat(android.graphics.Bitmap.CompressFormat); - method public androidx.test.runner.screenshot.ScreenCapture setName(java.lang.String); + public final class ActivityLifecycles { + method public static boolean hasForegroundActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor!); + method public static boolean hasTransitioningActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor!); + method public static boolean hasVisibleActivities(androidx.test.runner.lifecycle.ActivityLifecycleMonitor!); } - public abstract interface ScreenCaptureProcessor { - method public abstract java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + public final class EspressoOptional { + method public static androidx.test.espresso.util.EspressoOptional! absent(); + method public java.util.Set! asSet(); + method public static androidx.test.espresso.util.EspressoOptional! fromNullable(T!); + method public T! get(); + method public boolean isPresent(); + method public static androidx.test.espresso.util.EspressoOptional! of(T!); + method public com.google.common.base.Optional! or(com.google.common.base.Optional!); + method public T! or(com.google.common.base.Supplier!); + method public T! or(T!); + method public T! orNull(); + method @com.google.common.annotations.Beta public static Iterable! presentInstances(Iterable>!); + method public com.google.common.base.Optional! transform(com.google.common.base.Function!); } - public final class Screenshot { - ctor public Screenshot(); - method public static void addScreenCaptureProcessors(java.util.Set); - method public static androidx.test.runner.screenshot.ScreenCapture capture() throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; - method public static androidx.test.runner.screenshot.ScreenCapture capture(android.app.Activity) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; - method public static androidx.test.runner.screenshot.ScreenCapture capture(android.view.View) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; - method public static void setScreenshotProcessors(java.util.Set); + public final class HumanReadables { + method public static String! describe(android.database.Cursor!); + method public static String! describe(android.view.View!); + method public static String! getViewHierarchyErrorMessage(android.view.View!, java.util.List!, String!, String!); } - public class UiAutomationWrapper { - method public android.graphics.Bitmap takeScreenshot(); + public final class TreeIterables { + method public static Iterable! breadthFirstViewTraversal(android.view.View!); + method public static Iterable! depthFirstViewTraversal(android.view.View!); + method public static Iterable! depthFirstViewTraversalWithDistance(android.view.View!); } -} - -package androidx.test.uiautomator { - - public class By { - method public static androidx.test.uiautomator.BySelector checkable(boolean); - method public static androidx.test.uiautomator.BySelector checked(boolean); - method public static androidx.test.uiautomator.BySelector clazz(java.lang.String); - method public static androidx.test.uiautomator.BySelector clazz(java.lang.String, java.lang.String); - method public static androidx.test.uiautomator.BySelector clazz(java.lang.Class); - method public static androidx.test.uiautomator.BySelector clazz(java.util.regex.Pattern); - method public static androidx.test.uiautomator.BySelector clickable(boolean); - method public static androidx.test.uiautomator.BySelector copy(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.BySelector depth(int); - method public static androidx.test.uiautomator.BySelector desc(java.lang.String); - method public static androidx.test.uiautomator.BySelector desc(java.util.regex.Pattern); - method public static androidx.test.uiautomator.BySelector descContains(java.lang.String); - method public static androidx.test.uiautomator.BySelector descEndsWith(java.lang.String); - method public static androidx.test.uiautomator.BySelector descStartsWith(java.lang.String); - method public static androidx.test.uiautomator.BySelector enabled(boolean); - method public static androidx.test.uiautomator.BySelector focusable(boolean); - method public static androidx.test.uiautomator.BySelector focused(boolean); - method public static androidx.test.uiautomator.BySelector hasChild(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector, int); - method public static androidx.test.uiautomator.BySelector longClickable(boolean); - method public static androidx.test.uiautomator.BySelector pkg(java.lang.String); - method public static androidx.test.uiautomator.BySelector pkg(java.util.regex.Pattern); - method public static androidx.test.uiautomator.BySelector res(java.lang.String); - method public static androidx.test.uiautomator.BySelector res(java.lang.String, java.lang.String); - method public static androidx.test.uiautomator.BySelector res(java.util.regex.Pattern); - method public static androidx.test.uiautomator.BySelector scrollable(boolean); - method public static androidx.test.uiautomator.BySelector selected(boolean); - method public static androidx.test.uiautomator.BySelector text(java.lang.String); - method public static androidx.test.uiautomator.BySelector text(java.util.regex.Pattern); - method public static androidx.test.uiautomator.BySelector textContains(java.lang.String); - method public static androidx.test.uiautomator.BySelector textEndsWith(java.lang.String); - method public static androidx.test.uiautomator.BySelector textStartsWith(java.lang.String); - } - - public class BySelector { - method public androidx.test.uiautomator.BySelector checkable(boolean); - method public androidx.test.uiautomator.BySelector checked(boolean); - method public androidx.test.uiautomator.BySelector clazz(java.lang.String); - method public androidx.test.uiautomator.BySelector clazz(java.lang.String, java.lang.String); - method public androidx.test.uiautomator.BySelector clazz(java.lang.Class); - method public androidx.test.uiautomator.BySelector clazz(java.util.regex.Pattern); - method public androidx.test.uiautomator.BySelector clickable(boolean); - method public androidx.test.uiautomator.BySelector depth(int); - method public androidx.test.uiautomator.BySelector depth(int, int); - method public androidx.test.uiautomator.BySelector desc(java.lang.String); - method public androidx.test.uiautomator.BySelector desc(java.util.regex.Pattern); - method public androidx.test.uiautomator.BySelector descContains(java.lang.String); - method public androidx.test.uiautomator.BySelector descEndsWith(java.lang.String); - method public androidx.test.uiautomator.BySelector descStartsWith(java.lang.String); - method public androidx.test.uiautomator.BySelector enabled(boolean); - method public androidx.test.uiautomator.BySelector focusable(boolean); - method public androidx.test.uiautomator.BySelector focused(boolean); - method public androidx.test.uiautomator.BySelector hasChild(androidx.test.uiautomator.BySelector); - method public androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector); - method public androidx.test.uiautomator.BySelector hasDescendant(androidx.test.uiautomator.BySelector, int); - method public androidx.test.uiautomator.BySelector longClickable(boolean); - method public androidx.test.uiautomator.BySelector maxDepth(int); - method public androidx.test.uiautomator.BySelector minDepth(int); - method public androidx.test.uiautomator.BySelector pkg(java.lang.String); - method public androidx.test.uiautomator.BySelector pkg(java.util.regex.Pattern); - method public androidx.test.uiautomator.BySelector res(java.lang.String); - method public androidx.test.uiautomator.BySelector res(java.lang.String, java.lang.String); - method public androidx.test.uiautomator.BySelector res(java.util.regex.Pattern); - method public androidx.test.uiautomator.BySelector scrollable(boolean); - method public androidx.test.uiautomator.BySelector selected(boolean); - method public androidx.test.uiautomator.BySelector text(java.lang.String); - method public androidx.test.uiautomator.BySelector text(java.util.regex.Pattern); - method public androidx.test.uiautomator.BySelector textContains(java.lang.String); - method public androidx.test.uiautomator.BySelector textEndsWith(java.lang.String); - method public androidx.test.uiautomator.BySelector textStartsWith(java.lang.String); - } - - public final class Configurator { - method public long getActionAcknowledgmentTimeout(); - method public static androidx.test.uiautomator.Configurator getInstance(); - method public long getKeyInjectionDelay(); - method public long getScrollAcknowledgmentTimeout(); - method public int getToolType(); - method public int getUiAutomationFlags(); - method public long getWaitForIdleTimeout(); - method public long getWaitForSelectorTimeout(); - method public androidx.test.uiautomator.Configurator setActionAcknowledgmentTimeout(long); - method public androidx.test.uiautomator.Configurator setKeyInjectionDelay(long); - method public androidx.test.uiautomator.Configurator setScrollAcknowledgmentTimeout(long); - method public androidx.test.uiautomator.Configurator setToolType(int); - method public androidx.test.uiautomator.Configurator setUiAutomationFlags(int); - method public androidx.test.uiautomator.Configurator setWaitForIdleTimeout(long); - method public androidx.test.uiautomator.Configurator setWaitForSelectorTimeout(long); - } - - public final class Direction extends java.lang.Enum { - method public static androidx.test.uiautomator.Direction reverse(androidx.test.uiautomator.Direction); - method public static androidx.test.uiautomator.Direction valueOf(java.lang.String); - method public static final androidx.test.uiautomator.Direction[] values(); - enum_constant public static final androidx.test.uiautomator.Direction DOWN; - enum_constant public static final androidx.test.uiautomator.Direction LEFT; - enum_constant public static final androidx.test.uiautomator.Direction RIGHT; - enum_constant public static final androidx.test.uiautomator.Direction UP; - } - - public abstract class EventCondition { - ctor public EventCondition(); - } - - public abstract interface IAutomationSupport { - method public abstract void sendStatus(int, android.os.Bundle); - } - - public abstract class SearchCondition { - ctor public SearchCondition(); - } - - public class StaleObjectException extends java.lang.RuntimeException { - ctor public StaleObjectException(); - } - - public class UiAutomatorInstrumentationTestRunner extends android.test.InstrumentationTestRunner { - ctor public UiAutomatorInstrumentationTestRunner(); - method protected android.test.AndroidTestRunner getAndroidTestRunner(); - method protected void initializeUiAutomatorTest(androidx.test.uiautomator.UiAutomatorTestCase); - } - - public deprecated class UiAutomatorTestCase extends android.test.InstrumentationTestCase { - ctor public UiAutomatorTestCase(); - method public deprecated androidx.test.uiautomator.IAutomationSupport getAutomationSupport(); - method public android.os.Bundle getParams(); - method public androidx.test.uiautomator.UiDevice getUiDevice(); - method public deprecated void sleep(long); - } - - public class UiCollection extends androidx.test.uiautomator.UiObject { - ctor public UiCollection(androidx.test.uiautomator.UiSelector); - method public androidx.test.uiautomator.UiObject getChildByDescription(androidx.test.uiautomator.UiSelector, java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiObject getChildByInstance(androidx.test.uiautomator.UiSelector, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiObject getChildByText(androidx.test.uiautomator.UiSelector, java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public int getChildCount(androidx.test.uiautomator.UiSelector); - } - - public class UiDevice { - method public void clearLastTraversedText(); - method public boolean click(int, int); - method public boolean drag(int, int, int, int, int); - method public deprecated void dumpWindowHierarchy(java.lang.String); - method public void dumpWindowHierarchy(java.io.File) throws java.io.IOException; - method public void dumpWindowHierarchy(java.io.OutputStream) throws java.io.IOException; - method public androidx.test.uiautomator.UiObject findObject(androidx.test.uiautomator.UiSelector); - method public androidx.test.uiautomator.UiObject2 findObject(androidx.test.uiautomator.BySelector); - method public java.util.List findObjects(androidx.test.uiautomator.BySelector); - method public void freezeRotation() throws android.os.RemoteException; - method public deprecated java.lang.String getCurrentActivityName(); - method public java.lang.String getCurrentPackageName(); - method public int getDisplayHeight(); - method public int getDisplayRotation(); - method public android.graphics.Point getDisplaySizeDp(); - method public int getDisplayWidth(); - method public static deprecated androidx.test.uiautomator.UiDevice getInstance(); - method public static androidx.test.uiautomator.UiDevice getInstance(android.app.Instrumentation); - method public java.lang.String getLastTraversedText(); - method public java.lang.String getLauncherPackageName(); - method public java.lang.String getProductName(); - method public boolean hasAnyWatcherTriggered(); - method public boolean hasObject(androidx.test.uiautomator.BySelector); - method public boolean hasWatcherTriggered(java.lang.String); - method public boolean isNaturalOrientation(); - method public boolean isScreenOn() throws android.os.RemoteException; - method public boolean openNotification(); - method public boolean openQuickSettings(); - method public R performActionAndWait(java.lang.Runnable, androidx.test.uiautomator.EventCondition, long); - method public boolean pressBack(); - method public boolean pressDPadCenter(); - method public boolean pressDPadDown(); - method public boolean pressDPadLeft(); - method public boolean pressDPadRight(); - method public boolean pressDPadUp(); - method public boolean pressDelete(); - method public boolean pressEnter(); - method public boolean pressHome(); - method public boolean pressKeyCode(int); - method public boolean pressKeyCode(int, int); - method public boolean pressMenu(); - method public boolean pressRecentApps() throws android.os.RemoteException; - method public boolean pressSearch(); - method public void registerWatcher(java.lang.String, androidx.test.uiautomator.UiWatcher); - method public void removeWatcher(java.lang.String); - method public void resetWatcherTriggers(); - method public void runWatchers(); - method public void setCompressedLayoutHeirarchy(boolean); - method public void setOrientationLeft() throws android.os.RemoteException; - method public void setOrientationNatural() throws android.os.RemoteException; - method public void setOrientationRight() throws android.os.RemoteException; - method public void sleep() throws android.os.RemoteException; - method public boolean swipe(int, int, int, int, int); - method public boolean swipe(android.graphics.Point[], int); - method public boolean takeScreenshot(java.io.File); - method public boolean takeScreenshot(java.io.File, float, int); - method public void unfreezeRotation() throws android.os.RemoteException; - method public R wait(androidx.test.uiautomator.SearchCondition, long); - method public void waitForIdle(); - method public void waitForIdle(long); - method public boolean waitForWindowUpdate(java.lang.String, long); - method public void wakeUp() throws android.os.RemoteException; - } - - public class UiObject { - ctor public deprecated UiObject(androidx.test.uiautomator.UiSelector); - method public void clearTextField() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean click() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean clickAndWaitForNewWindow() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean clickAndWaitForNewWindow(long) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean clickBottomRight() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean clickTopLeft() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean dragTo(androidx.test.uiautomator.UiObject, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean dragTo(int, int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean exists(); - method protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long); - method public android.graphics.Rect getBounds() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiObject getChild(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public int getChildCount() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public java.lang.String getClassName() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public java.lang.String getContentDescription() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiObject getFromParent(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public java.lang.String getPackageName() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public final androidx.test.uiautomator.UiSelector getSelector(); - method public java.lang.String getText() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public android.graphics.Rect getVisibleBounds() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isCheckable() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isChecked() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isClickable() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isEnabled() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isFocusable() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isFocused() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isLongClickable() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isScrollable() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean isSelected() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean longClick() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean longClickBottomRight() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean longClickTopLeft() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean performMultiPointerGesture(android.view.MotionEvent.PointerCoords...); - method public boolean performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int); - method public boolean pinchIn(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean pinchOut(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean setText(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean swipeDown(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean swipeLeft(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean swipeRight(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean swipeUp(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean waitForExists(long); - method public boolean waitUntilGone(long); - field protected static final int FINGER_TOUCH_HALF_WIDTH = 20; // 0x14 - field protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5 - field protected static final deprecated long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L - field protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L - field protected static final deprecated long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L - field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL - } - - public class UiObject2 { - method public void clear(); - method public void click(); - method public void click(long); - method public R clickAndWait(androidx.test.uiautomator.EventCondition, long); - method public void drag(android.graphics.Point); - method public void drag(android.graphics.Point, int); - method public androidx.test.uiautomator.UiObject2 findObject(androidx.test.uiautomator.BySelector); - method public java.util.List findObjects(androidx.test.uiautomator.BySelector); - method public boolean fling(androidx.test.uiautomator.Direction); - method public boolean fling(androidx.test.uiautomator.Direction, int); - method public java.lang.String getApplicationPackage(); - method public int getChildCount(); - method public java.util.List getChildren(); - method public java.lang.String getClassName(); - method public java.lang.String getContentDescription(); - method public androidx.test.uiautomator.UiObject2 getParent(); - method public java.lang.String getResourceName(); - method public java.lang.String getText(); - method public android.graphics.Rect getVisibleBounds(); - method public android.graphics.Point getVisibleCenter(); - method public boolean hasObject(androidx.test.uiautomator.BySelector); - method public boolean isCheckable(); - method public boolean isChecked(); - method public boolean isClickable(); - method public boolean isEnabled(); - method public boolean isFocusable(); - method public boolean isFocused(); - method public boolean isLongClickable(); - method public boolean isScrollable(); - method public boolean isSelected(); - method public void longClick(); - method public void pinchClose(float); - method public void pinchClose(float, int); - method public void pinchOpen(float); - method public void pinchOpen(float, int); - method public void recycle(); - method public boolean scroll(androidx.test.uiautomator.Direction, float); - method public boolean scroll(androidx.test.uiautomator.Direction, float, int); - method public void setGestureMargin(int); - method public void setGestureMargins(int, int, int, int); - method public void setText(java.lang.String); - method public void swipe(androidx.test.uiautomator.Direction, float); - method public void swipe(androidx.test.uiautomator.Direction, float, int); - method public R wait(androidx.test.uiautomator.UiObject2Condition, long); - method public R wait(androidx.test.uiautomator.SearchCondition, long); - } - - public abstract class UiObject2Condition { - ctor public UiObject2Condition(); - } - - public class UiObjectNotFoundException extends java.lang.Exception { - ctor public UiObjectNotFoundException(java.lang.String); - ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable); - ctor public UiObjectNotFoundException(java.lang.Throwable); - } - - public class UiScrollable extends androidx.test.uiautomator.UiCollection { - ctor public UiScrollable(androidx.test.uiautomator.UiSelector); - method protected boolean exists(androidx.test.uiautomator.UiSelector); - method public boolean flingBackward() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean flingForward() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean flingToBeginning(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean flingToEnd(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiObject getChildByDescription(androidx.test.uiautomator.UiSelector, java.lang.String, boolean) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiObject getChildByText(androidx.test.uiautomator.UiSelector, java.lang.String, boolean) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public int getMaxSearchSwipes(); - method public double getSwipeDeadZonePercentage(); - method public boolean scrollBackward() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollBackward(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollDescriptionIntoView(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollForward() throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollForward(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollIntoView(androidx.test.uiautomator.UiObject) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollIntoView(androidx.test.uiautomator.UiSelector) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollTextIntoView(java.lang.String) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollToBeginning(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollToBeginning(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollToEnd(int, int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public boolean scrollToEnd(int) throws androidx.test.uiautomator.UiObjectNotFoundException; - method public androidx.test.uiautomator.UiScrollable setAsHorizontalList(); - method public androidx.test.uiautomator.UiScrollable setAsVerticalList(); - method public androidx.test.uiautomator.UiScrollable setMaxSearchSwipes(int); - method public androidx.test.uiautomator.UiScrollable setSwipeDeadZonePercentage(double); - } - - public class UiSelector { - ctor public UiSelector(); - method public androidx.test.uiautomator.UiSelector checkable(boolean); - method public androidx.test.uiautomator.UiSelector checked(boolean); - method public androidx.test.uiautomator.UiSelector childSelector(androidx.test.uiautomator.UiSelector); - method public androidx.test.uiautomator.UiSelector className(java.lang.String); - method public androidx.test.uiautomator.UiSelector className(java.lang.Class); - method public androidx.test.uiautomator.UiSelector classNameMatches(java.lang.String); - method public androidx.test.uiautomator.UiSelector clickable(boolean); - method protected androidx.test.uiautomator.UiSelector cloneSelector(); - method public androidx.test.uiautomator.UiSelector description(java.lang.String); - method public androidx.test.uiautomator.UiSelector descriptionContains(java.lang.String); - method public androidx.test.uiautomator.UiSelector descriptionMatches(java.lang.String); - method public androidx.test.uiautomator.UiSelector descriptionStartsWith(java.lang.String); - method public androidx.test.uiautomator.UiSelector enabled(boolean); - method public androidx.test.uiautomator.UiSelector focusable(boolean); - method public androidx.test.uiautomator.UiSelector focused(boolean); - method public androidx.test.uiautomator.UiSelector fromParent(androidx.test.uiautomator.UiSelector); - method public androidx.test.uiautomator.UiSelector index(int); - method public androidx.test.uiautomator.UiSelector instance(int); - method public androidx.test.uiautomator.UiSelector longClickable(boolean); - method public androidx.test.uiautomator.UiSelector packageName(java.lang.String); - method public androidx.test.uiautomator.UiSelector packageNameMatches(java.lang.String); - method public androidx.test.uiautomator.UiSelector resourceId(java.lang.String); - method public androidx.test.uiautomator.UiSelector resourceIdMatches(java.lang.String); - method public androidx.test.uiautomator.UiSelector scrollable(boolean); - method public androidx.test.uiautomator.UiSelector selected(boolean); - method public androidx.test.uiautomator.UiSelector text(java.lang.String); - method public androidx.test.uiautomator.UiSelector textContains(java.lang.String); - method public androidx.test.uiautomator.UiSelector textMatches(java.lang.String); - method public androidx.test.uiautomator.UiSelector textStartsWith(java.lang.String); - } - - public abstract interface UiWatcher { - method public abstract boolean checkForCondition(); - } - - public class Until { - ctor public Until(); - method public static androidx.test.uiautomator.UiObject2Condition checkable(boolean); - method public static androidx.test.uiautomator.UiObject2Condition checked(boolean); - method public static androidx.test.uiautomator.UiObject2Condition clickable(boolean); - method public static androidx.test.uiautomator.UiObject2Condition descContains(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition descEndsWith(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition descEquals(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition descMatches(java.util.regex.Pattern); - method public static androidx.test.uiautomator.UiObject2Condition descMatches(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition descStartsWith(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition enabled(boolean); - method public static androidx.test.uiautomator.SearchCondition findObject(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.SearchCondition> findObjects(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.UiObject2Condition focusable(boolean); - method public static androidx.test.uiautomator.UiObject2Condition focused(boolean); - method public static androidx.test.uiautomator.SearchCondition gone(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.SearchCondition hasObject(androidx.test.uiautomator.BySelector); - method public static androidx.test.uiautomator.UiObject2Condition longClickable(boolean); - method public static androidx.test.uiautomator.EventCondition newWindow(); - method public static androidx.test.uiautomator.EventCondition scrollFinished(androidx.test.uiautomator.Direction); - method public static androidx.test.uiautomator.UiObject2Condition scrollable(boolean); - method public static androidx.test.uiautomator.UiObject2Condition selected(boolean); - method public static androidx.test.uiautomator.UiObject2Condition textContains(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition textEndsWith(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition textEquals(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition textMatches(java.util.regex.Pattern); - method public static androidx.test.uiautomator.UiObject2Condition textMatches(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition textNotEquals(java.lang.String); - method public static androidx.test.uiautomator.UiObject2Condition textStartsWith(java.lang.String); + public static class TreeIterables.ViewAndDistance { + method public int getDistanceFromRoot(); + method public android.view.View! getView(); } } diff --git a/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java b/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java index fe3b09976..d4f547e92 100644 --- a/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java +++ b/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java @@ -15,12 +15,12 @@ */ package androidx.test.espresso.device; -import androidx.test.annotation.ExperimentalDeviceInteraction; +import androidx.test.annotation.ExperimentalTestApi; /** * API surface for performing device-centric operations. * *

This API is experimental and subject to change. */ -@ExperimentalDeviceInteraction +@ExperimentalTestApi public class DeviceInteraction {} diff --git a/espresso/core/java/androidx/test/espresso/remote/api/current.txt b/espresso/core/java/androidx/test/espresso/remote/api/current.txt index abae847aa..e0bbc4f1c 100644 --- a/espresso/core/java/androidx/test/espresso/remote/api/current.txt +++ b/espresso/core/java/androidx/test/espresso/remote/api/current.txt @@ -1,181 +1,178 @@ - - +// Signature format: 3.0 package androidx.test.espresso.remote { - public abstract interface Bindable { - method public abstract android.os.IBinder getIBinder(); - method public abstract java.lang.String getId(); - method public abstract void setIBinder(android.os.IBinder); + public interface Bindable { + method public android.os.IBinder! getIBinder(); + method public String! getId(); + method public void setIBinder(android.os.IBinder!); } public final class ConstructorInvocation { - ctor public ConstructorInvocation(java.lang.Class, java.lang.Class, java.lang.Class...); - method public java.lang.Object invokeConstructor(java.lang.Object...); + ctor public ConstructorInvocation(Class, Class?, Class!...); + method public Object! invokeConstructor(java.lang.Object!...); } - public abstract interface Converter { - method public abstract O convert(I); + public interface Converter { + method public O! convert(I); } public final class EspressoRemote implements androidx.test.espresso.remote.RemoteInteraction { - method public synchronized java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); - method public synchronized java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); - method public static androidx.test.espresso.remote.EspressoRemote getInstance(); - method public synchronized void init(); - method public synchronized boolean isRemoteProcess(); - method public synchronized void terminate(); + method public java.util.concurrent.Callable! createRemoteCheckCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAssertion!); + method public java.util.concurrent.Callable! createRemotePerformCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAction!...); + method public static androidx.test.espresso.remote.EspressoRemote! getInstance(); + method public void init(); + method public boolean isRemoteProcess(); + method public void terminate(); } - public abstract interface EspressoRemoteMessage { + public interface EspressoRemoteMessage { } - public static abstract interface EspressoRemoteMessage.From { - method public abstract T fromProto(M); + public static interface EspressoRemoteMessage.From { + method public T! fromProto(M!); } - public static abstract interface EspressoRemoteMessage.To { - method public abstract M toProto(); + public static interface EspressoRemoteMessage.To { + method public M! toProto(); } public final class FieldDescriptor { - method public static androidx.test.espresso.remote.FieldDescriptor of(java.lang.Class, java.lang.String, int); - field public final java.lang.String fieldName; - field public final java.lang.Class fieldType; + method public static androidx.test.espresso.remote.FieldDescriptor! of(Class, String, int); + field public final String! fieldName; + field public final Class! fieldType; field public final int order; } - public final class GenericRemoteMessage implements androidx.test.espresso.remote.EspressoRemoteMessage.To { - ctor public GenericRemoteMessage(java.lang.Object); - method public com.google.protobuf.MessageLite toProto(); - field public static final androidx.test.espresso.remote.EspressoRemoteMessage.From FROM; + public final class GenericRemoteMessage implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + ctor public GenericRemoteMessage(Object); + method public com.google.protobuf.MessageLite! toProto(); + field public static final androidx.test.espresso.remote.EspressoRemoteMessage.From! FROM; } - public final class InteractionRequest implements androidx.test.espresso.remote.EspressoRemoteMessage.To { - method public org.hamcrest.Matcher getRootMatcher(); - method public androidx.test.espresso.ViewAction getViewAction(); - method public androidx.test.espresso.ViewAssertion getViewAssertion(); - method public org.hamcrest.Matcher getViewMatcher(); - method public com.google.protobuf.MessageLite toProto(); + public final class InteractionRequest implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public org.hamcrest.Matcher! getRootMatcher(); + method public androidx.test.espresso.ViewAction! getViewAction(); + method public androidx.test.espresso.ViewAssertion! getViewAssertion(); + method public org.hamcrest.Matcher! getViewMatcher(); + method public com.google.protobuf.MessageLite! toProto(); } public static class InteractionRequest.Builder { - ctor public Builder(); - method public androidx.test.espresso.remote.InteractionRequest build(); - method public androidx.test.espresso.remote.InteractionRequest.Builder setRequestProto(byte[]); - method public androidx.test.espresso.remote.InteractionRequest.Builder setRootMatcher(org.hamcrest.Matcher); - method public androidx.test.espresso.remote.InteractionRequest.Builder setViewAction(androidx.test.espresso.ViewAction); - method public androidx.test.espresso.remote.InteractionRequest.Builder setViewAssertion(androidx.test.espresso.ViewAssertion); - method public androidx.test.espresso.remote.InteractionRequest.Builder setViewMatcher(org.hamcrest.Matcher); - } - - public final class InteractionResponse implements androidx.test.espresso.remote.EspressoRemoteMessage.To { - method public androidx.test.espresso.remote.InteractionResponse.RemoteError getRemoteError(); - method public androidx.test.espresso.remote.InteractionResponse.Status getStatus(); + ctor public InteractionRequest.Builder(); + method public androidx.test.espresso.remote.InteractionRequest! build(); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setRequestProto(byte[]); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setRootMatcher(org.hamcrest.Matcher); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setViewAction(androidx.test.espresso.ViewAction); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setViewAssertion(androidx.test.espresso.ViewAssertion); + method public androidx.test.espresso.remote.InteractionRequest.Builder! setViewMatcher(org.hamcrest.Matcher); + } + + public final class InteractionResponse implements androidx.test.espresso.remote.EspressoRemoteMessage.To { + method public androidx.test.espresso.remote.InteractionResponse.RemoteError! getRemoteError(); + method public androidx.test.espresso.remote.InteractionResponse.Status! getStatus(); method public boolean hasRemoteError(); - method public com.google.protobuf.MessageLite toProto(); + method public com.google.protobuf.MessageLite! toProto(); } public static class InteractionResponse.Builder { - ctor public Builder(); - method public androidx.test.espresso.remote.InteractionResponse build(); - method public androidx.test.espresso.remote.InteractionResponse.Builder setRemoteError(androidx.test.espresso.remote.InteractionResponse.RemoteError); - method public androidx.test.espresso.remote.InteractionResponse.Builder setResultProto(byte[]); - method public androidx.test.espresso.remote.InteractionResponse.Builder setStatus(androidx.test.espresso.remote.InteractionResponse.Status); + ctor public InteractionResponse.Builder(); + method public androidx.test.espresso.remote.InteractionResponse! build(); + method public androidx.test.espresso.remote.InteractionResponse.Builder! setRemoteError(androidx.test.espresso.remote.InteractionResponse.RemoteError?); + method public androidx.test.espresso.remote.InteractionResponse.Builder! setResultProto(byte[]); + method public androidx.test.espresso.remote.InteractionResponse.Builder! setStatus(androidx.test.espresso.remote.InteractionResponse.Status); } public static final class InteractionResponse.RemoteError { method public int getCode(); - method public java.lang.String getDescription(); + method public String! getDescription(); field public static final int REMOTE_ESPRESSO_ERROR_CODE = 0; // 0x0 field public static final int REMOTE_PROTOCOL_ERROR_CODE = 1; // 0x1 } - public static final class InteractionResponse.Status extends java.lang.Enum { - method public static androidx.test.espresso.remote.InteractionResponse.Status valueOf(java.lang.String); - method public static final androidx.test.espresso.remote.InteractionResponse.Status[] values(); + public enum InteractionResponse.Status { enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Error; enum_constant public static final androidx.test.espresso.remote.InteractionResponse.Status Ok; } public final class NoRemoteEspressoInstanceException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public NoRemoteEspressoInstanceException(java.lang.String); + ctor public NoRemoteEspressoInstanceException(String!); } public class NoopRemoteInteraction implements androidx.test.espresso.remote.RemoteInteraction { ctor public NoopRemoteInteraction(); - method public java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); - method public java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); + method public java.util.concurrent.Callable! createRemoteCheckCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAssertion!); + method public java.util.concurrent.Callable! createRemotePerformCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAction!...); method public boolean isRemoteProcess(); } public final class ProtoUtils { - method public static java.lang.String capitalizeFirstChar(java.lang.String); - method public static T checkedGetEnumForProto(int, java.lang.Class); - method public static java.util.List getFilteredFieldList(java.lang.Class, java.util.List) throws java.lang.NoSuchFieldException; + method public static String! capitalizeFirstChar(String!); + method public static T! checkedGetEnumForProto(int, Class!); + method public static java.util.List! getFilteredFieldList(Class!, java.util.List!) throws java.lang.NoSuchFieldException; } public final class RemoteDescriptor { - method public java.util.List getInstanceFieldDescriptorList(); - method public java.lang.Class getInstanceType(); - method public java.lang.String getInstanceTypeName(); - method public java.lang.Class getProtoBuilderClass(); - method public com.google.protobuf.Parser getProtoParser(); - method public java.lang.Class getProtoType(); - method public java.lang.Class[] getRemoteConstrTypes(); - method public java.lang.Class getRemoteType(); + method public java.util.List! getInstanceFieldDescriptorList(); + method public Class! getInstanceType(); + method public String! getInstanceTypeName(); + method public Class! getProtoBuilderClass(); + method public com.google.protobuf.Parser! getProtoParser(); + method public Class! getProtoType(); + method public Class![]! getRemoteConstrTypes(); + method public Class! getRemoteType(); } public static final class RemoteDescriptor.Builder { - ctor public Builder(); - method public androidx.test.espresso.remote.RemoteDescriptor build(); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setInstanceFieldDescriptors(androidx.test.espresso.remote.FieldDescriptor...); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setInstanceType(java.lang.Class); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoBuilderType(java.lang.Class); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoParser(com.google.protobuf.Parser); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setProtoType(java.lang.Class); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setRemoteConstrTypes(java.lang.Class...); - method public androidx.test.espresso.remote.RemoteDescriptor.Builder setRemoteType(java.lang.Class); + ctor public RemoteDescriptor.Builder(); + method public androidx.test.espresso.remote.RemoteDescriptor! build(); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setInstanceFieldDescriptors(androidx.test.espresso.remote.FieldDescriptor!...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setInstanceType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setProtoBuilderType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setProtoParser(com.google.protobuf.Parser); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setProtoType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setRemoteConstrTypes(Class!...); + method public androidx.test.espresso.remote.RemoteDescriptor.Builder! setRemoteType(Class); } public final class RemoteDescriptorRegistry { - method public androidx.test.espresso.remote.RemoteDescriptor argForInstanceType(java.lang.Class); - method public androidx.test.espresso.remote.RemoteDescriptor argForMsgType(java.lang.Class); - method public androidx.test.espresso.remote.RemoteDescriptor argForRemoteTypeUrl(java.lang.String); - method public static androidx.test.espresso.remote.RemoteDescriptorRegistry getInstance(); - method public boolean hasArgForInstanceType(java.lang.Class); - method public boolean registerRemoteTypeArgs(java.util.List); - method public void unregisterRemoteTypeArgs(java.util.List); + method public androidx.test.espresso.remote.RemoteDescriptor! argForInstanceType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor! argForMsgType(Class); + method public androidx.test.espresso.remote.RemoteDescriptor! argForRemoteTypeUrl(String); + method public static androidx.test.espresso.remote.RemoteDescriptorRegistry! getInstance(); + method public boolean hasArgForInstanceType(Class); + method public boolean registerRemoteTypeArgs(java.util.List); + method public void unregisterRemoteTypeArgs(java.util.List); } public class RemoteEspressoException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public RemoteEspressoException(java.lang.String); - ctor public RemoteEspressoException(java.lang.String, java.lang.Throwable); + ctor public RemoteEspressoException(String!); + ctor public RemoteEspressoException(String!, Throwable!); } - public abstract interface RemoteInteraction { - method public abstract java.util.concurrent.Callable createRemoteCheckCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAssertion); - method public abstract java.util.concurrent.Callable createRemotePerformCallable(org.hamcrest.Matcher, org.hamcrest.Matcher, java.util.Map, androidx.test.espresso.ViewAction...); - method public abstract boolean isRemoteProcess(); - field public static final java.lang.String BUNDLE_EXECUTION_STATUS = "executionStatus"; + public interface RemoteInteraction { + method public java.util.concurrent.Callable! createRemoteCheckCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAssertion!); + method public java.util.concurrent.Callable! createRemotePerformCallable(org.hamcrest.Matcher!, org.hamcrest.Matcher!, java.util.Map!, androidx.test.espresso.ViewAction!...); + method public boolean isRemoteProcess(); + field public static final String BUNDLE_EXECUTION_STATUS = "executionStatus"; } public class RemoteInteractionRegistry { - method public static androidx.test.espresso.remote.RemoteInteraction getInstance(); - method public static void registerInstance(androidx.test.espresso.remote.RemoteInteraction); + method public static androidx.test.espresso.remote.RemoteInteraction! getInstance(); + method public static void registerInstance(androidx.test.espresso.remote.RemoteInteraction!); } public class RemoteProtocolException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public RemoteProtocolException(java.lang.String); - ctor public RemoteProtocolException(java.lang.String, java.lang.Throwable); + ctor public RemoteProtocolException(String!); + ctor public RemoteProtocolException(String!, Throwable!); } public final class TypeProtoConverters { - method public static T anyToType(com.google.protobuf.Any); - method public static android.os.Parcelable byteStringToParcelable(com.google.protobuf.ByteString, java.lang.Class); - method public static T byteStringToType(com.google.protobuf.ByteString); - method public static com.google.protobuf.ByteString parcelableToByteString(android.os.Parcelable); - method public static com.google.protobuf.Any typeToAny(T); - method public static com.google.protobuf.ByteString typeToByteString(java.lang.Object); + method public static T! anyToType(com.google.protobuf.Any); + method public static android.os.Parcelable! byteStringToParcelable(com.google.protobuf.ByteString, Class); + method public static T! byteStringToType(com.google.protobuf.ByteString); + method public static com.google.protobuf.ByteString! parcelableToByteString(android.os.Parcelable); + method public static com.google.protobuf.Any! typeToAny(T); + method public static com.google.protobuf.ByteString! typeToByteString(Object); } } diff --git a/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt b/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt index 1b6577bfa..b3c49576d 100644 --- a/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt +++ b/espresso/idling_resource/concurrent/java/androidx/test/espresso/idling/concurrent/api/current.txt @@ -1,20 +1,19 @@ - +// Signature format: 3.0 package androidx.test.espresso.idling.concurrent { public class IdlingScheduledThreadPoolExecutor extends java.util.concurrent.ScheduledThreadPoolExecutor implements androidx.test.espresso.IdlingResource { - ctor public IdlingScheduledThreadPoolExecutor(java.lang.String, int, java.util.concurrent.ThreadFactory); - ctor public IdlingScheduledThreadPoolExecutor(java.lang.String, int, java.util.concurrent.ThreadFactory, boolean); - method public java.lang.String getName(); + ctor public IdlingScheduledThreadPoolExecutor(String!, int, java.util.concurrent.ThreadFactory!); + ctor public IdlingScheduledThreadPoolExecutor(String!, int, java.util.concurrent.ThreadFactory!, boolean); + method public String! getName(); method public boolean isIdleNow(); - method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback!); } public class IdlingThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor implements androidx.test.espresso.IdlingResource { - ctor public IdlingThreadPoolExecutor(java.lang.String, int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory); - method public synchronized void execute(java.lang.Runnable); - method public java.lang.String getName(); + ctor public IdlingThreadPoolExecutor(String!, int, int, long, java.util.concurrent.TimeUnit!, java.util.concurrent.BlockingQueue!, java.util.concurrent.ThreadFactory!); + method public String! getName(); method public boolean isIdleNow(); - method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback!); } } diff --git a/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt b/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt index 9686a21e1..c271533c5 100644 --- a/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt +++ b/espresso/idling_resource/net/java/androidx/test/espresso/idling/net/api/current.txt @@ -1,20 +1,19 @@ - - +// Signature format: 3.0 package androidx.test.espresso.idling.net { public class UriIdlingResource implements androidx.test.espresso.IdlingResource { - ctor public UriIdlingResource(java.lang.String, long); - method public void beginLoad(java.lang.String); - method public void endLoad(java.lang.String); - method public java.lang.String getName(); - method public void ignoreUri(java.util.regex.Pattern); + ctor public UriIdlingResource(String!, long); + method public void beginLoad(String!); + method public void endLoad(String!); + method public String! getName(); + method public void ignoreUri(java.util.regex.Pattern!); method public boolean isIdleNow(); - method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback!); } - public static abstract interface UriIdlingResource.HandlerIntf { - method public abstract void postDelayed(java.lang.Runnable, long); - method public abstract void removeCallbacks(java.lang.Runnable); + public static interface UriIdlingResource.HandlerIntf { + method public void postDelayed(Runnable!, long); + method public void removeCallbacks(Runnable!); } } diff --git a/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel b/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel index 64ec279db..692f09be5 100644 --- a/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel +++ b/espresso/intents/java/androidx/test/espresso/intent/BUILD.bazel @@ -3,7 +3,7 @@ load("//build_extensions:release.bzl", "axt_release_lib") load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ESPRESSO_VERSION", "RUNNER_VERSION", "CORE_VERSION", "ANNOTATION_VERSION") +load("//build_extensions:axt_versions.bzl", "ANNOTATION_VERSION", "CORE_VERSION", "ESPRESSO_VERSION", "RUNNER_VERSION") load("//build_extensions:combine_jars.bzl", "combine_jars") licenses(["notice"]) # Apache License 2.0 @@ -26,15 +26,15 @@ android_library( deps = [ ":resolved_intent_interface", "//:androidx_annotation", + "//annotation", "//espresso/core/java/androidx/test/espresso", "//espresso/core/java/androidx/test/espresso:framework", "//espresso/core/java/androidx/test/espresso:interface", "//espresso/core/java/androidx/test/espresso/matcher", "//espresso/intents/java/androidx/test/espresso/intent/matcher", "//runner/android_junit_runner", - "//annotation" - "@maven//:org_hamcrest_hamcrest_all", "@maven//:junit_junit", + "@maven//:org_hamcrest_hamcrest_all", ], ) @@ -63,7 +63,7 @@ android_library( axt_release_lib( name = "espresso_intents_release", keep_spec = "androidx/test/espresso/intent", - remove_spec = "androidx/test/espresso/intent/R[$$\.]", + remove_spec = "androidx/test/espresso/intent/R[$$\\.]", deps = [ ":espresso_intents_release_lib", ], diff --git a/espresso/intents/java/androidx/test/espresso/intent/api/current.txt b/espresso/intents/java/androidx/test/espresso/intent/api/current.txt index f0a4c79ae..3a855250c 100644 --- a/espresso/intents/java/androidx/test/espresso/intent/api/current.txt +++ b/espresso/intents/java/androidx/test/espresso/intent/api/current.txt @@ -1,72 +1,71 @@ - +// Signature format: 3.0 package androidx.test.espresso.intent { - public abstract interface ActivityResultFunction { - method public abstract android.app.Instrumentation.ActivityResult apply(android.content.Intent); + public interface ActivityResultFunction { + method public android.app.Instrumentation.ActivityResult! apply(android.content.Intent!); } public final class Checks { method public static void checkArgument(boolean); - method public static void checkArgument(boolean, java.lang.Object); - method public static void checkArgument(boolean, java.lang.String, java.lang.Object...); - method public static T checkNotNull(T); - method public static T checkNotNull(T, java.lang.Object); - method public static T checkNotNull(T, java.lang.String, java.lang.Object...); - method public static void checkState(boolean, java.lang.Object); - method public static void checkState(boolean, java.lang.String, java.lang.Object...); + method public static void checkArgument(boolean, Object!); + method public static void checkArgument(boolean, String!, java.lang.Object!...); + method public static T! checkNotNull(T!); + method public static T! checkNotNull(T!, Object!); + method public static T! checkNotNull(T!, String!, java.lang.Object!...); + method public static void checkState(boolean, Object!); + method public static void checkState(boolean, String!, java.lang.Object!...); } public final class Intents { method public static void assertNoUnverifiedIntents(); - method public static java.util.List getIntents(); method public static void init(); - method public static void intended(org.hamcrest.Matcher); - method public static void intended(org.hamcrest.Matcher, androidx.test.espresso.intent.VerificationMode); - method public static androidx.test.espresso.intent.OngoingStubbing intending(org.hamcrest.Matcher); + method public static void intended(org.hamcrest.Matcher!); + method public static void intended(org.hamcrest.Matcher!, androidx.test.espresso.intent.VerificationMode!); + method public static androidx.test.espresso.intent.OngoingStubbing! intending(org.hamcrest.Matcher!); method public static void release(); - method public static androidx.test.espresso.intent.VerificationMode times(int); + method public static androidx.test.espresso.intent.VerificationMode! times(int); } public final class OngoingStubbing { - method public void respondWith(android.app.Instrumentation.ActivityResult); - method public void respondWithFunction(androidx.test.espresso.intent.ActivityResultFunction); + method public void respondWith(android.app.Instrumentation.ActivityResult!); + method public void respondWithFunction(androidx.test.espresso.intent.ActivityResultFunction!); } - public abstract interface ResettingStubber implements androidx.test.runner.intent.IntentStubber { - method public abstract void initialize(); - method public abstract boolean isInitialized(); - method public abstract void reset(); - method public abstract void setActivityResultForIntent(org.hamcrest.Matcher, android.app.Instrumentation.ActivityResult); - method public abstract void setActivityResultFunctionForIntent(org.hamcrest.Matcher, androidx.test.espresso.intent.ActivityResultFunction); + public interface ResettingStubber extends androidx.test.runner.intent.IntentStubber { + method public void initialize(); + method public boolean isInitialized(); + method public void reset(); + method public void setActivityResultForIntent(org.hamcrest.Matcher!, android.app.Instrumentation.ActivityResult!); + method public void setActivityResultFunctionForIntent(org.hamcrest.Matcher!, androidx.test.espresso.intent.ActivityResultFunction!); } public final class ResettingStubberImpl implements androidx.test.espresso.intent.ResettingStubber { ctor public ResettingStubberImpl(); - method public android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + method public android.app.Instrumentation.ActivityResult! getActivityResultForIntent(android.content.Intent!); method public void initialize(); method public boolean isInitialized(); method public void reset(); - method public void setActivityResultForIntent(org.hamcrest.Matcher, android.app.Instrumentation.ActivityResult); - method public void setActivityResultFunctionForIntent(org.hamcrest.Matcher, androidx.test.espresso.intent.ActivityResultFunction); + method public void setActivityResultForIntent(org.hamcrest.Matcher!, android.app.Instrumentation.ActivityResult!); + method public void setActivityResultFunctionForIntent(org.hamcrest.Matcher!, androidx.test.espresso.intent.ActivityResultFunction!); } - public abstract interface ResolvedIntent { - method public abstract boolean canBeHandledBy(java.lang.String); - method public abstract android.content.Intent getIntent(); + public interface ResolvedIntent { + method public boolean canBeHandledBy(String!); + method public android.content.Intent! getIntent(); } - public abstract interface VerifiableIntent implements androidx.test.espresso.intent.ResolvedIntent { - method public abstract boolean hasBeenVerified(); - method public abstract void markAsVerified(); + public interface VerifiableIntent extends androidx.test.espresso.intent.ResolvedIntent { + method public boolean hasBeenVerified(); + method public void markAsVerified(); } - public abstract interface VerificationMode { - method public abstract void verify(org.hamcrest.Matcher, java.util.List); + public interface VerificationMode { + method public void verify(org.hamcrest.Matcher!, java.util.List!); } public final class VerificationModes { - method public static androidx.test.espresso.intent.VerificationMode noUnverifiedIntents(); - method public static androidx.test.espresso.intent.VerificationMode times(int); + method public static androidx.test.espresso.intent.VerificationMode! noUnverifiedIntents(); + method public static androidx.test.espresso.intent.VerificationMode! times(int); } } @@ -74,80 +73,82 @@ package androidx.test.espresso.intent { package androidx.test.espresso.intent.matcher { public final class BundleMatchers { - method public static org.hamcrest.Matcher hasEntry(java.lang.String, T); - method public static org.hamcrest.Matcher hasEntry(java.lang.String, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasEntry(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasKey(java.lang.String); - method public static org.hamcrest.Matcher hasKey(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasValue(T); - method public static org.hamcrest.Matcher hasValue(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher isEmpty(); - method public static org.hamcrest.Matcher isEmptyOrNull(); + method public static org.hamcrest.Matcher! hasEntry(String!, T!); + method public static org.hamcrest.Matcher! hasEntry(String!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasEntry(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasKey(String!); + method public static org.hamcrest.Matcher! hasKey(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasValue(T!); + method public static org.hamcrest.Matcher! hasValue(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! isEmpty(); + method public static org.hamcrest.Matcher! isEmptyOrNull(); } public final class ComponentNameMatchers { - method public static org.hamcrest.Matcher hasClassName(java.lang.String); - method public static org.hamcrest.Matcher hasClassName(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasMyPackageName(); - method public static org.hamcrest.Matcher hasPackageName(java.lang.String); - method public static org.hamcrest.Matcher hasPackageName(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasShortClassName(java.lang.String); - method public static org.hamcrest.Matcher hasShortClassName(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher! hasClassName(String!); + method public static org.hamcrest.Matcher! hasClassName(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasMyPackageName(); + method public static org.hamcrest.Matcher! hasPackageName(String!); + method public static org.hamcrest.Matcher! hasPackageName(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasShortClassName(String!); + method public static org.hamcrest.Matcher! hasShortClassName(org.hamcrest.Matcher!); } public final class IntentMatchers { - method public static org.hamcrest.Matcher anyIntent(); - method public static org.hamcrest.Matcher filterEquals(android.content.Intent); - method public static org.hamcrest.Matcher hasAction(java.lang.String); - method public static org.hamcrest.Matcher hasAction(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasCategories(java.util.Set); - method public static org.hamcrest.Matcher hasCategories(org.hamcrest.Matcher>); - method public static org.hamcrest.Matcher hasComponent(java.lang.String); - method public static org.hamcrest.Matcher hasComponent(android.content.ComponentName); - method public static org.hamcrest.Matcher hasComponent(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasData(java.lang.String); - method public static org.hamcrest.Matcher hasData(android.net.Uri); - method public static org.hamcrest.Matcher hasData(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasDataString(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasExtra(java.lang.String, T); - method public static org.hamcrest.Matcher hasExtra(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasExtraWithKey(java.lang.String); - method public static org.hamcrest.Matcher hasExtraWithKey(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasExtras(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasFlag(int); - method public static org.hamcrest.Matcher hasFlags(int...); - method public static org.hamcrest.Matcher hasFlags(int); - method public static org.hamcrest.Matcher hasPackage(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasPackage(java.lang.String); - method public static org.hamcrest.Matcher hasType(java.lang.String); - method public static org.hamcrest.Matcher hasType(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher isInternal(); - method public static org.hamcrest.Matcher toPackage(java.lang.String); + method public static org.hamcrest.Matcher! anyIntent(); + method public static org.hamcrest.Matcher! filterEquals(android.content.Intent!); + method public static org.hamcrest.Matcher! hasAction(String!); + method public static org.hamcrest.Matcher! hasAction(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasCategories(java.util.Set!); + method public static org.hamcrest.Matcher! hasCategories(org.hamcrest.Matcher>!); + method public static org.hamcrest.Matcher! hasComponent(String!); + method public static org.hamcrest.Matcher! hasComponent(android.content.ComponentName!); + method public static org.hamcrest.Matcher! hasComponent(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasData(String!); + method public static org.hamcrest.Matcher! hasData(android.net.Uri!); + method public static org.hamcrest.Matcher! hasData(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasDataString(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasExtra(String!, T!); + method public static org.hamcrest.Matcher! hasExtra(String!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasExtra(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasExtraWithKey(String!); + method public static org.hamcrest.Matcher! hasExtraWithKey(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasExtras(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasFlag(int); + method public static org.hamcrest.Matcher! hasFlags(int...); + method public static org.hamcrest.Matcher! hasFlags(int); + method public static org.hamcrest.Matcher! hasPackage(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasPackage(String!); + method public static org.hamcrest.Matcher! hasType(String!); + method public static org.hamcrest.Matcher! hasType(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! isInternal(); + method public static org.hamcrest.Matcher! toPackage(String!); } public final class UriMatchers { - method public static org.hamcrest.Matcher hasHost(java.lang.String); - method public static org.hamcrest.Matcher hasHost(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasParamWithName(java.lang.String); - method public static org.hamcrest.Matcher hasParamWithName(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasParamWithValue(java.lang.String, java.lang.String); - method public static org.hamcrest.Matcher hasParamWithValue(org.hamcrest.Matcher, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasPath(java.lang.String); - method public static org.hamcrest.Matcher hasPath(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasScheme(java.lang.String); - method public static org.hamcrest.Matcher hasScheme(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasSchemeSpecificPart(java.lang.String, java.lang.String); - method public static org.hamcrest.Matcher hasSchemeSpecificPart(org.hamcrest.Matcher, org.hamcrest.Matcher); + method public static org.hamcrest.Matcher! hasHost(String!); + method public static org.hamcrest.Matcher! hasHost(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasParamWithName(String!); + method public static org.hamcrest.Matcher! hasParamWithName(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasParamWithValue(String!, String!); + method public static org.hamcrest.Matcher! hasParamWithValue(org.hamcrest.Matcher!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasPath(String!); + method public static org.hamcrest.Matcher! hasPath(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasScheme(String!); + method public static org.hamcrest.Matcher! hasScheme(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasSchemeSpecificPart(String!, String!); + method public static org.hamcrest.Matcher! hasSchemeSpecificPart(org.hamcrest.Matcher!, org.hamcrest.Matcher!); } } package androidx.test.espresso.intent.rule { - public deprecated class IntentsTestRule extends androidx.test.rule.ActivityTestRule { - ctor public IntentsTestRule(java.lang.Class); - ctor public IntentsTestRule(java.lang.Class, boolean); - ctor public IntentsTestRule(java.lang.Class, boolean, boolean); + @Deprecated public class IntentsTestRule extends androidx.test.rule.ActivityTestRule { + ctor @Deprecated public IntentsTestRule(Class!); + ctor @Deprecated public IntentsTestRule(Class!, boolean); + ctor @Deprecated public IntentsTestRule(Class!, boolean, boolean); } } + diff --git a/espresso/web/java/androidx/test/espresso/web/api/current.txt b/espresso/web/java/androidx/test/espresso/web/api/current.txt index bdfc36acc..457a8a571 100644 --- a/espresso/web/java/androidx/test/espresso/web/api/current.txt +++ b/espresso/web/java/androidx/test/espresso/web/api/current.txt @@ -1,40 +1,39 @@ - - +// Signature format: 3.0 package androidx.test.espresso.web.action { public final class AtomAction implements androidx.test.espresso.remote.Bindable androidx.test.espresso.ViewAction { - ctor public AtomAction(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.WindowReference, androidx.test.espresso.web.model.ElementReference); - method public E get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; - method public E get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public java.util.concurrent.Future getFuture(); - method public android.os.IBinder getIBinder(); - method public java.lang.String getId(); - method public void perform(androidx.test.espresso.UiController, android.view.View); - method public void setIBinder(android.os.IBinder); + ctor public AtomAction(androidx.test.espresso.web.model.Atom!, androidx.test.espresso.web.model.WindowReference?, androidx.test.espresso.web.model.ElementReference?); + method public E! get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException; + method public E! get(long, java.util.concurrent.TimeUnit!) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException; + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public java.util.concurrent.Future! getFuture(); + method public android.os.IBinder! getIBinder(); + method public String! getId(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); + method public void setIBinder(android.os.IBinder!); } public class EnableJavascriptAction implements androidx.test.espresso.ViewAction { ctor public EnableJavascriptAction(); - method public org.hamcrest.Matcher getConstraints(); - method public java.lang.String getDescription(); - method public void perform(androidx.test.espresso.UiController, android.view.View); + method public org.hamcrest.Matcher! getConstraints(); + method public String! getDescription(); + method public void perform(androidx.test.espresso.UiController!, android.view.View!); } - public abstract interface IAtomActionResultPropagator implements android.os.IInterface { - method public abstract void setError(android.os.Bundle) throws android.os.RemoteException; - method public abstract void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + public interface IAtomActionResultPropagator extends android.os.IInterface { + method public void setError(android.os.Bundle!) throws android.os.RemoteException; + method public void setResult(androidx.test.espresso.web.model.Evaluation!) throws android.os.RemoteException; } - public static abstract class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { - ctor public Stub(); - method public static androidx.test.espresso.web.action.IAtomActionResultPropagator asInterface(android.os.IBinder); + public abstract static class IAtomActionResultPropagator.Stub extends com.google.android.aidl.BaseStub implements androidx.test.espresso.web.action.IAtomActionResultPropagator { + ctor public IAtomActionResultPropagator.Stub(); + method public static androidx.test.espresso.web.action.IAtomActionResultPropagator! asInterface(android.os.IBinder!); } public static class IAtomActionResultPropagator.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.espresso.web.action.IAtomActionResultPropagator { - method public void setError(android.os.Bundle) throws android.os.RemoteException; - method public void setResult(androidx.test.espresso.web.model.Evaluation) throws android.os.RemoteException; + method public void setError(android.os.Bundle!) throws android.os.RemoteException; + method public void setResult(androidx.test.espresso.web.model.Evaluation!) throws android.os.RemoteException; } } @@ -42,25 +41,25 @@ package androidx.test.espresso.web.action { package androidx.test.espresso.web.assertion { public final class TagSoupDocumentParser { - method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; - method public org.w3c.dom.Document parse(java.lang.String) throws java.io.IOException, org.xml.sax.SAXException; + method public static androidx.test.espresso.web.assertion.TagSoupDocumentParser! newInstance() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException; + method public org.w3c.dom.Document! parse(String!) throws java.io.IOException, org.xml.sax.SAXException; } public abstract class WebAssertion { - ctor public WebAssertion(androidx.test.espresso.web.model.Atom); - method protected abstract void checkResult(android.webkit.WebView, E); - method public final androidx.test.espresso.web.model.Atom getAtom(); - method public final androidx.test.espresso.ViewAssertion toViewAssertion(E); + ctor @androidx.test.espresso.remote.annotation.RemoteMsgConstructor public WebAssertion(androidx.test.espresso.web.model.Atom!); + method protected abstract void checkResult(android.webkit.WebView!, E!); + method public final androidx.test.espresso.web.model.Atom! getAtom(); + method public final androidx.test.espresso.ViewAssertion! toViewAssertion(E!); } public final class WebViewAssertions { - method public static androidx.test.espresso.web.assertion.WebAssertion webContent(org.hamcrest.Matcher); - method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber); - method public static androidx.test.espresso.web.assertion.WebAssertion webMatches(androidx.test.espresso.web.model.Atom, org.hamcrest.Matcher); + method public static androidx.test.espresso.web.assertion.WebAssertion! webContent(org.hamcrest.Matcher!); + method public static androidx.test.espresso.web.assertion.WebAssertion! webMatches(androidx.test.espresso.web.model.Atom!, org.hamcrest.Matcher!, androidx.test.espresso.web.assertion.WebViewAssertions.ResultDescriber!); + method public static androidx.test.espresso.web.assertion.WebAssertion! webMatches(androidx.test.espresso.web.model.Atom!, org.hamcrest.Matcher!); } - public static abstract interface WebViewAssertions.ResultDescriber { - method public abstract java.lang.String apply(E); + public static interface WebViewAssertions.ResultDescriber { + method public String! apply(E!); } } @@ -68,103 +67,101 @@ package androidx.test.espresso.web.assertion { package androidx.test.espresso.web.matcher { public final class AmbiguousElementMatcherException extends java.lang.RuntimeException implements androidx.test.espresso.EspressoException { - ctor public AmbiguousElementMatcherException(java.lang.String); + ctor public AmbiguousElementMatcherException(String!); } public final class DomMatchers { - method public static org.hamcrest.Matcher containingTextInBody(java.lang.String); - method public static org.hamcrest.Matcher elementById(java.lang.String, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher elementByXPath(java.lang.String, org.hamcrest.Matcher); - method public static org.hamcrest.Matcher hasElementWithId(java.lang.String); - method public static org.hamcrest.Matcher hasElementWithXpath(java.lang.String); - method public static org.hamcrest.Matcher withBody(org.hamcrest.Matcher); - method public static org.hamcrest.Matcher withTextContent(java.lang.String); - method public static org.hamcrest.Matcher withTextContent(org.hamcrest.Matcher); + method public static org.hamcrest.Matcher! containingTextInBody(String!); + method public static org.hamcrest.Matcher! elementById(String!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! elementByXPath(String!, org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! hasElementWithId(String!); + method public static org.hamcrest.Matcher! hasElementWithXpath(String!); + method public static org.hamcrest.Matcher! withBody(org.hamcrest.Matcher!); + method public static org.hamcrest.Matcher! withTextContent(String!); + method public static org.hamcrest.Matcher! withTextContent(org.hamcrest.Matcher!); } } package androidx.test.espresso.web.model { - public abstract interface Atom { - method public abstract java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); - method public abstract java.lang.String getScript(); - method public abstract R transform(androidx.test.espresso.web.model.Evaluation); + public interface Atom { + method public java.util.List! getArguments(androidx.test.espresso.web.model.ElementReference?); + method public String! getScript(); + method public R! transform(androidx.test.espresso.web.model.Evaluation!); } public final class Atoms { - method public static androidx.test.espresso.web.model.TransformingAtom.Transformer castOrDie(java.lang.Class); - method public static androidx.test.espresso.web.model.Atom getCurrentUrl(); - method public static androidx.test.espresso.web.model.Atom getTitle(); - method public static androidx.test.espresso.web.model.Atom script(java.lang.String, androidx.test.espresso.web.model.TransformingAtom.Transformer); - method public static androidx.test.espresso.web.model.Atom script(java.lang.String); - method public static androidx.test.espresso.web.model.Atom scriptWithArgs(java.lang.String, java.util.List); - method public static androidx.test.espresso.web.model.Atom transform(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); + method public static androidx.test.espresso.web.model.TransformingAtom.Transformer! castOrDie(Class!); + method public static androidx.test.espresso.web.model.Atom! getCurrentUrl(); + method public static androidx.test.espresso.web.model.Atom! getTitle(); + method public static androidx.test.espresso.web.model.Atom! script(String!, androidx.test.espresso.web.model.TransformingAtom.Transformer!); + method public static androidx.test.espresso.web.model.Atom! script(String!); + method public static androidx.test.espresso.web.model.Atom! scriptWithArgs(String!, java.util.List!); + method public static androidx.test.espresso.web.model.Atom! transform(androidx.test.espresso.web.model.Atom!, androidx.test.espresso.web.model.TransformingAtom.Transformer!); } public final class ElementReference implements androidx.test.espresso.web.model.JSONAble { - method public java.lang.String toJSONString(); + method public String! toJSONString(); } public final class Evaluation implements androidx.test.espresso.web.model.JSONAble android.os.Parcelable { - ctor protected Evaluation(android.os.Parcel); + ctor protected Evaluation(android.os.Parcel!); method public int describeContents(); - method public java.lang.String getMessage(); + method public String! getMessage(); method public int getStatus(); - method public java.lang.Object getValue(); + method public Object? getValue(); method public boolean hasMessage(); - method public void readFromParcel(android.os.Parcel); - method public java.lang.String toJSONString(); + method public void readFromParcel(android.os.Parcel!); + method public String! toJSONString(); method public void writeToParcel(android.os.Parcel, int); - field public static final android.os.Parcelable.Creator CREATOR; + field public static final android.os.Parcelable.Creator! CREATOR; } - public abstract interface JSONAble { - method public abstract java.lang.String toJSONString(); + public interface JSONAble { + method public String! toJSONString(); } - public static abstract interface JSONAble.DeJSONFactory { - method public abstract java.lang.Object attemptDeJSONize(java.util.Map); + public static interface JSONAble.DeJSONFactory { + method public Object! attemptDeJSONize(java.util.Map!); } public final class ModelCodec { - method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); - method public static androidx.test.espresso.web.model.Evaluation decodeEvaluation(java.lang.String); - method public static java.lang.String encode(java.lang.Object); - method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory); - } - - public class SimpleAtom implements androidx.test.espresso.web.model.Atom { - ctor public SimpleAtom(java.lang.String); - ctor public SimpleAtom(java.lang.String, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement); - method public final java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); - method protected java.util.List getNonContextualArguments(); - method public final java.lang.String getScript(); - method protected androidx.test.espresso.web.model.Evaluation handleBadEvaluation(androidx.test.espresso.web.model.Evaluation); + method public static void addDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory!); + method public static androidx.test.espresso.web.model.Evaluation! decodeEvaluation(String!); + method public static String! encode(Object!); + method public static void removeDeJSONFactory(androidx.test.espresso.web.model.JSONAble.DeJSONFactory!); + } + + public class SimpleAtom implements androidx.test.espresso.web.model.Atom { + ctor public SimpleAtom(String!); + ctor public SimpleAtom(String!, androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement!); + method public final java.util.List! getArguments(androidx.test.espresso.web.model.ElementReference?); + method protected java.util.List! getNonContextualArguments(); + method public final String! getScript(); + method protected androidx.test.espresso.web.model.Evaluation! handleBadEvaluation(androidx.test.espresso.web.model.Evaluation!); method protected void handleNoElementReference(); - method public final androidx.test.espresso.web.model.Evaluation transform(androidx.test.espresso.web.model.Evaluation); + method public final androidx.test.espresso.web.model.Evaluation! transform(androidx.test.espresso.web.model.Evaluation!); } - public static final class SimpleAtom.ElementReferencePlacement extends java.lang.Enum { - method public static androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement valueOf(java.lang.String); - method public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement[] values(); + public enum SimpleAtom.ElementReferencePlacement { enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement FIRST; enum_constant public static final androidx.test.espresso.web.model.SimpleAtom.ElementReferencePlacement LAST; } - public class TransformingAtom implements androidx.test.espresso.web.model.Atom { - ctor public TransformingAtom(androidx.test.espresso.web.model.Atom, androidx.test.espresso.web.model.TransformingAtom.Transformer); - method public java.util.List getArguments(androidx.test.espresso.web.model.ElementReference); - method public java.lang.String getScript(); - method public O transform(androidx.test.espresso.web.model.Evaluation); + public class TransformingAtom implements androidx.test.espresso.web.model.Atom { + ctor @androidx.test.espresso.remote.annotation.RemoteMsgConstructor public TransformingAtom(androidx.test.espresso.web.model.Atom!, androidx.test.espresso.web.model.TransformingAtom.Transformer!); + method public java.util.List! getArguments(androidx.test.espresso.web.model.ElementReference?); + method public String! getScript(); + method public O! transform(androidx.test.espresso.web.model.Evaluation!); } - public static abstract interface TransformingAtom.Transformer { - method public abstract O apply(I); + public static interface TransformingAtom.Transformer { + method public O! apply(I!); } public final class WindowReference implements androidx.test.espresso.web.model.JSONAble { - method public java.lang.String toJSONString(); + method public String! toJSONString(); } } @@ -173,23 +170,23 @@ package androidx.test.espresso.web.sugar { public final class Web { ctor public Web(); - method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(); - method public static androidx.test.espresso.web.sugar.Web.WebInteraction onWebView(org.hamcrest.Matcher); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction! onWebView(); + method public static androidx.test.espresso.web.sugar.Web.WebInteraction! onWebView(org.hamcrest.Matcher!); } public static class Web.WebInteraction { - method public androidx.test.espresso.web.sugar.Web.WebInteraction check(androidx.test.espresso.web.assertion.WebAssertion); - method public androidx.test.espresso.web.sugar.Web.WebInteraction forceJavascriptEnabled(); - method public R get(); - method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.WindowReference); - method public androidx.test.espresso.web.sugar.Web.WebInteraction inWindow(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction perform(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction reset(); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withContextualElement(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.ElementReference); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withElement(androidx.test.espresso.web.model.Atom); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withNoTimeout(); - method public androidx.test.espresso.web.sugar.Web.WebInteraction withTimeout(long, java.util.concurrent.TimeUnit); + method public androidx.test.espresso.web.sugar.Web.WebInteraction! check(androidx.test.espresso.web.assertion.WebAssertion!); + method public androidx.test.espresso.web.sugar.Web.WebInteraction! forceJavascriptEnabled(); + method public R! get(); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! inWindow(androidx.test.espresso.web.model.WindowReference!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! inWindow(androidx.test.espresso.web.model.Atom!); + method public androidx.test.espresso.web.sugar.Web.WebInteraction! perform(androidx.test.espresso.web.model.Atom!); + method public androidx.test.espresso.web.sugar.Web.WebInteraction! reset(); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! withContextualElement(androidx.test.espresso.web.model.Atom!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! withElement(androidx.test.espresso.web.model.ElementReference!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! withElement(androidx.test.espresso.web.model.Atom!); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! withNoTimeout(); + method @CheckResult @javax.annotation.CheckReturnValue public androidx.test.espresso.web.sugar.Web.WebInteraction! withTimeout(long, java.util.concurrent.TimeUnit!); } } @@ -197,24 +194,22 @@ package androidx.test.espresso.web.sugar { package androidx.test.espresso.web.webdriver { public final class DriverAtoms { - method public static androidx.test.espresso.web.model.Atom clearElement(); - method public static androidx.test.espresso.web.model.Atom findElement(androidx.test.espresso.web.webdriver.Locator, java.lang.String); - method public static androidx.test.espresso.web.model.Atom> findMultipleElements(androidx.test.espresso.web.webdriver.Locator, java.lang.String); - method public static androidx.test.espresso.web.model.Atom getText(); - method public static androidx.test.espresso.web.model.Atom selectActiveElement(); - method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String, androidx.test.espresso.web.model.WindowReference); - method public static androidx.test.espresso.web.model.Atom selectFrameByIdOrName(java.lang.String); - method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int); - method public static androidx.test.espresso.web.model.Atom selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference); - method public static androidx.test.espresso.web.model.Atom webClick(); - method public static androidx.test.espresso.web.model.Atom webKeys(java.lang.String); - method public static androidx.test.espresso.web.model.Atom webScrollIntoView(); - } - - public final class Locator extends java.lang.Enum { - method public java.lang.String getType(); - method public static androidx.test.espresso.web.webdriver.Locator valueOf(java.lang.String); - method public static final androidx.test.espresso.web.webdriver.Locator[] values(); + method public static androidx.test.espresso.web.model.Atom! clearElement(); + method public static androidx.test.espresso.web.model.Atom! findElement(androidx.test.espresso.web.webdriver.Locator!, String!); + method public static androidx.test.espresso.web.model.Atom!>! findMultipleElements(androidx.test.espresso.web.webdriver.Locator!, String!); + method public static androidx.test.espresso.web.model.Atom! getText(); + method public static androidx.test.espresso.web.model.Atom! selectActiveElement(); + method public static androidx.test.espresso.web.model.Atom! selectFrameByIdOrName(String!, androidx.test.espresso.web.model.WindowReference!); + method public static androidx.test.espresso.web.model.Atom! selectFrameByIdOrName(String!); + method public static androidx.test.espresso.web.model.Atom! selectFrameByIndex(int); + method public static androidx.test.espresso.web.model.Atom! selectFrameByIndex(int, androidx.test.espresso.web.model.WindowReference!); + method public static androidx.test.espresso.web.model.Atom! webClick(); + method public static androidx.test.espresso.web.model.Atom! webKeys(String!); + method public static androidx.test.espresso.web.model.Atom! webScrollIntoView(); + } + + public enum Locator { + method public String! getType(); enum_constant public static final androidx.test.espresso.web.webdriver.Locator CLASS_NAME; enum_constant public static final androidx.test.espresso.web.webdriver.Locator CSS_SELECTOR; enum_constant public static final androidx.test.espresso.web.webdriver.Locator ID; @@ -226,3 +221,4 @@ package androidx.test.espresso.web.webdriver { } } + diff --git a/ext/junit/java/androidx/test/ext/junit/api/current.txt b/ext/junit/java/androidx/test/ext/junit/api/current.txt index 3c7431f48..aa17dbf1d 100644 --- a/ext/junit/java/androidx/test/ext/junit/api/current.txt +++ b/ext/junit/java/androidx/test/ext/junit/api/current.txt @@ -1,12 +1,12 @@ - +// Signature format: 3.0 package androidx.test.ext.junit.rules { public final class ActivityScenarioRule extends org.junit.rules.ExternalResource { - ctor public ActivityScenarioRule(java.lang.Class); - ctor public ActivityScenarioRule(java.lang.Class, android.os.Bundle); - ctor public ActivityScenarioRule(android.content.Intent); - ctor public ActivityScenarioRule(android.content.Intent, android.os.Bundle); - method public androidx.test.core.app.ActivityScenario getScenario(); + ctor public ActivityScenarioRule(Class!); + ctor public ActivityScenarioRule(Class!, android.os.Bundle?); + ctor public ActivityScenarioRule(android.content.Intent!); + ctor public ActivityScenarioRule(android.content.Intent!, android.os.Bundle?); + method public androidx.test.core.app.ActivityScenario! getScenario(); } } @@ -14,11 +14,11 @@ package androidx.test.ext.junit.rules { package androidx.test.ext.junit.runners { public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { - ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; - method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; - method public org.junit.runner.Description getDescription(); - method public void run(org.junit.runner.notification.RunNotifier); - method public void sort(org.junit.runner.manipulation.Sorter); + ctor public AndroidJUnit4(Class!) throws org.junit.runners.model.InitializationError; + method public void filter(org.junit.runner.manipulation.Filter!) throws org.junit.runner.manipulation.NoTestsRemainException; + method public org.junit.runner.Description! getDescription(); + method public void run(org.junit.runner.notification.RunNotifier!); + method public void sort(org.junit.runner.manipulation.Sorter!); } } diff --git a/ext/truth/java/androidx/test/ext/truth/api/current.txt b/ext/truth/java/androidx/test/ext/truth/api/current.txt index 80d4b4272..3ce9edc2d 100644 --- a/ext/truth/java/androidx/test/ext/truth/api/current.txt +++ b/ext/truth/java/androidx/test/ext/truth/api/current.txt @@ -1,27 +1,26 @@ - - +// Signature format: 3.0 package androidx.test.ext.truth.app { public class NotificationActionSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.app.NotificationActionSubject assertThat(android.app.Notification.Action); - method public static com.google.common.truth.Subject.Factory notificationActions(); - method public final com.google.common.truth.StringSubject title(); + method public static androidx.test.ext.truth.app.NotificationActionSubject! assertThat(android.app.Notification.Action!); + method public static com.google.common.truth.Subject.Factory! notificationActions(); + method public final com.google.common.truth.StringSubject! title(); } public class NotificationSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.app.NotificationSubject assertThat(android.app.Notification); - method public final androidx.test.ext.truth.app.PendingIntentSubject contentIntent(); - method public final androidx.test.ext.truth.app.PendingIntentSubject deleteIntent(); + method public static androidx.test.ext.truth.app.NotificationSubject! assertThat(android.app.Notification!); + method public final androidx.test.ext.truth.app.PendingIntentSubject! contentIntent(); + method public final androidx.test.ext.truth.app.PendingIntentSubject! deleteIntent(); method public final void doesNotHaveFlags(int); - method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public final androidx.test.ext.truth.os.BundleSubject! extras(); method public final void hasFlags(int); - method public static com.google.common.truth.Subject.Factory notifications(); - method public final com.google.common.truth.StringSubject tickerText(); + method public static com.google.common.truth.Subject.Factory! notifications(); + method public final com.google.common.truth.StringSubject! tickerText(); } public class PendingIntentSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.app.PendingIntentSubject assertThat(android.app.PendingIntent); - method public static com.google.common.truth.Subject.Factory pendingIntents(); + method public static androidx.test.ext.truth.app.PendingIntentSubject! assertThat(android.app.PendingIntent!); + method public static com.google.common.truth.Subject.Factory! pendingIntents(); } } @@ -29,28 +28,28 @@ package androidx.test.ext.truth.app { package androidx.test.ext.truth.content { public final class IntentCorrespondences { - method public static com.google.common.truth.Correspondence action(); - method public static com.google.common.truth.Correspondence all(com.google.common.truth.Correspondence...); - method public static com.google.common.truth.Correspondence data(); + method public static com.google.common.truth.Correspondence! action(); + method @com.google.common.annotations.Beta public static com.google.common.truth.Correspondence! all(com.google.common.truth.Correspondence!...); + method public static com.google.common.truth.Correspondence! data(); } public final class IntentSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.content.IntentSubject assertThat(android.content.Intent); - method public com.google.common.truth.IterableSubject categories(); - method public androidx.test.ext.truth.os.BundleSubject extras(); - method public void filtersEquallyTo(android.content.Intent); - method public void hasAction(java.lang.String); - method public void hasComponent(java.lang.String, java.lang.String); - method public void hasComponent(android.content.ComponentName); - method public void hasComponentClass(java.lang.Class); - method public void hasComponentClass(java.lang.String); - method public void hasComponentPackage(java.lang.String); - method public void hasData(android.net.Uri); + method public static androidx.test.ext.truth.content.IntentSubject! assertThat(android.content.Intent!); + method public com.google.common.truth.IterableSubject! categories(); + method public androidx.test.ext.truth.os.BundleSubject! extras(); + method public void filtersEquallyTo(android.content.Intent!); + method public void hasAction(String!); + method public void hasComponent(String!, String!); + method public void hasComponent(android.content.ComponentName!); + method public void hasComponentClass(Class!); + method public void hasComponentClass(String!); + method public void hasComponentPackage(String!); + method public void hasData(android.net.Uri!); method public void hasFlags(int); method public void hasNoAction(); - method public void hasPackage(java.lang.String); - method public void hasType(java.lang.String); - method public static com.google.common.truth.Subject.Factory intents(); + method public void hasPackage(String!); + method public void hasType(String!); + method public static com.google.common.truth.Subject.Factory! intents(); } } @@ -58,46 +57,46 @@ package androidx.test.ext.truth.content { package androidx.test.ext.truth.location { public final class LocationCorrespondences { - method public static com.google.common.truth.Correspondence at(); - method public static com.google.common.truth.Correspondence equality(); - method public static com.google.common.truth.Correspondence nearby(float); + method public static com.google.common.truth.Correspondence! at(); + method public static com.google.common.truth.Correspondence! equality(); + method public static com.google.common.truth.Correspondence! nearby(float); } public class LocationSubject extends com.google.common.truth.Subject { - method public com.google.common.truth.FloatSubject accuracy(); - method public com.google.common.truth.DoubleSubject altitude(); - method public static androidx.test.ext.truth.location.LocationSubject assertThat(android.location.Location); - method public com.google.common.truth.FloatSubject bearing(); - method public com.google.common.truth.FloatSubject bearingAccuracy(); - method public com.google.common.truth.FloatSubject bearingTo(double, double); - method public com.google.common.truth.FloatSubject bearingTo(android.location.Location); - method public com.google.common.truth.FloatSubject distanceTo(double, double); - method public com.google.common.truth.FloatSubject distanceTo(android.location.Location); - method public void doesNotHaveProvider(java.lang.String); - method public com.google.common.truth.LongSubject elapsedRealtimeMillis(); - method public com.google.common.truth.LongSubject elapsedRealtimeNanos(); - method public final androidx.test.ext.truth.os.BundleSubject extras(); + method public com.google.common.truth.FloatSubject! accuracy(); + method public com.google.common.truth.DoubleSubject! altitude(); + method public static androidx.test.ext.truth.location.LocationSubject! assertThat(android.location.Location!); + method public com.google.common.truth.FloatSubject! bearing(); + method public com.google.common.truth.FloatSubject! bearingAccuracy(); + method public com.google.common.truth.FloatSubject! bearingTo(double, double); + method public com.google.common.truth.FloatSubject! bearingTo(android.location.Location!); + method public com.google.common.truth.FloatSubject! distanceTo(double, double); + method public com.google.common.truth.FloatSubject! distanceTo(android.location.Location!); + method public void doesNotHaveProvider(String!); + method public com.google.common.truth.LongSubject! elapsedRealtimeMillis(); + method public com.google.common.truth.LongSubject! elapsedRealtimeNanos(); + method public final androidx.test.ext.truth.os.BundleSubject! extras(); method public void hasAccuracy(); method public void hasAltitude(); method public void hasBearing(); method public void hasBearingAccuracy(); - method public void hasProvider(java.lang.String); + method public void hasProvider(String!); method public void hasSpeed(); method public void hasSpeedAccuracy(); method public void hasVerticalAccuracy(); - method public void isAt(android.location.Location); + method public void isAt(android.location.Location!); method public void isAt(double, double); - method public void isFaraway(android.location.Location, float); + method public void isFaraway(android.location.Location!, float); method public void isMock(); - method public void isNearby(android.location.Location, float); - method public void isNotAt(android.location.Location); + method public void isNearby(android.location.Location!, float); + method public void isNotAt(android.location.Location!); method public void isNotAt(double, double); method public void isNotMock(); - method public static com.google.common.truth.Subject.Factory locations(); - method public com.google.common.truth.FloatSubject speed(); - method public com.google.common.truth.FloatSubject speedAccuracy(); - method public com.google.common.truth.LongSubject time(); - method public com.google.common.truth.FloatSubject verticalAccuracy(); + method public static com.google.common.truth.Subject.Factory! locations(); + method public com.google.common.truth.FloatSubject! speed(); + method public com.google.common.truth.FloatSubject! speedAccuracy(); + method public com.google.common.truth.LongSubject! time(); + method public com.google.common.truth.FloatSubject! verticalAccuracy(); } } @@ -105,27 +104,46 @@ package androidx.test.ext.truth.location { package androidx.test.ext.truth.os { public final class BundleSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.os.BundleSubject assertThat(android.os.Bundle); - method public com.google.common.truth.BooleanSubject bool(java.lang.String); - method public static com.google.common.truth.Subject.Factory bundles(); - method public void containsKey(java.lang.String); - method public void doesNotContainKey(java.lang.String); + method public static androidx.test.ext.truth.os.BundleSubject! assertThat(android.os.Bundle!); + method public com.google.common.truth.BooleanSubject! bool(String!); + method public static com.google.common.truth.Subject.Factory! bundles(); + method public void containsKey(String!); + method public void doesNotContainKey(String!); + method public com.google.common.truth.DoubleSubject! doubleFloat(String!); method public void hasSize(int); - method public com.google.common.truth.IntegerSubject integer(java.lang.String); + method public com.google.common.truth.IntegerSubject! integer(String!); method public void isEmpty(); method public void isNotEmpty(); - method public com.google.common.truth.LongSubject longInt(java.lang.String); - method public androidx.test.ext.truth.os.ParcelableSubject parcelable(java.lang.String); - method public com.google.common.truth.IterableSubject parcelableArrayList(java.lang.String); - method public SubjectT parcelableAsType(java.lang.String, com.google.common.truth.Subject.Factory); - method public com.google.common.truth.StringSubject string(java.lang.String); - method public com.google.common.truth.IterableSubject stringArrayList(java.lang.String); + method public com.google.common.truth.LongSubject! longInt(String!); + method public androidx.test.ext.truth.os.ParcelableSubject! parcelable(String!); + method public com.google.common.truth.IterableSubject! parcelableArrayList(String!); + method public SubjectT! parcelableAsType(String!, com.google.common.truth.Subject.Factory!); + method public com.google.common.truth.Subject! serializable(String!); + method public com.google.common.truth.StringSubject! string(String!); + method public com.google.common.truth.IterableSubject! stringArrayList(String!); } public final class ParcelableSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.os.ParcelableSubject assertThat(T); - method public static com.google.common.truth.Subject.Factory, T> parcelables(); - method public void recreatesEqual(android.os.Parcelable.Creator); + method public static androidx.test.ext.truth.os.ParcelableSubject! assertThat(T!); + method public void marshallsEquallyTo(android.os.Parcelable!); + method public static com.google.common.truth.Subject.Factory!,T!>! parcelables(); + method public void recreatesEqual(android.os.Parcelable.Creator!); + } + +} + +package androidx.test.ext.truth.util { + + public final class SparseBooleanArraySubject extends com.google.common.truth.Subject { + method public static androidx.test.ext.truth.util.SparseBooleanArraySubject! assertThat(android.util.SparseBooleanArray!); + method public void containsKey(int); + method public void doesNotContainKey(int); + method public static AssertionError! expectFailure(com.google.common.truth.ExpectFailure.SimpleSubjectBuilderCallback!); + method public void hasFalseValueAt(int); + method public void hasSize(int); + method public void hasTrueValueAt(int); + method public void isEmpty(); + method public void isNotEmpty(); } } @@ -133,7 +151,7 @@ package androidx.test.ext.truth.os { package androidx.test.ext.truth.view { public final class MotionEventSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.view.MotionEventSubject assertThat(android.view.MotionEvent); + method public static androidx.test.ext.truth.view.MotionEventSubject! assertThat(android.view.MotionEvent!); method public void hasAction(int); method public void hasActionButton(int); method public void hasButtonState(int); @@ -145,66 +163,66 @@ package androidx.test.ext.truth.view { method public void hasHistorySize(int); method public void hasMetaState(int); method public void hasPointerCount(int); - method public com.google.common.truth.LongSubject historicalEventTime(int); - method public com.google.common.truth.FloatSubject historicalOrientation(int); - method public androidx.test.ext.truth.view.PointerCoordsSubject historicalPointerCoords(int, int); - method public com.google.common.truth.FloatSubject historicalPressure(int); - method public com.google.common.truth.FloatSubject historicalSize(int); - method public com.google.common.truth.FloatSubject historicalToolMajor(int); - method public com.google.common.truth.FloatSubject historicalToolMinor(int); - method public com.google.common.truth.FloatSubject historicalTouchMajor(int); - method public com.google.common.truth.FloatSubject historicalTouchMinor(int); - method public com.google.common.truth.FloatSubject historicalX(int); - method public com.google.common.truth.FloatSubject historicalY(int); - method public static com.google.common.truth.Subject.Factory motionEvents(); - method public com.google.common.truth.FloatSubject orientation(); - method public com.google.common.truth.FloatSubject orientation(int); - method public androidx.test.ext.truth.view.PointerCoordsSubject pointerCoords(int); - method public com.google.common.truth.IntegerSubject pointerId(int); - method public androidx.test.ext.truth.view.PointerPropertiesSubject pointerProperties(int); - method public com.google.common.truth.FloatSubject pressure(); - method public com.google.common.truth.FloatSubject pressure(int); - method public com.google.common.truth.FloatSubject rawX(); - method public com.google.common.truth.FloatSubject rawY(); - method public com.google.common.truth.FloatSubject size(); - method public com.google.common.truth.FloatSubject size(int); - method public com.google.common.truth.FloatSubject toolMajor(); - method public com.google.common.truth.FloatSubject toolMajor(int); - method public com.google.common.truth.FloatSubject toolMinor(); - method public com.google.common.truth.FloatSubject toolMinor(int); - method public com.google.common.truth.FloatSubject touchMajor(); - method public com.google.common.truth.FloatSubject touchMajor(int); - method public com.google.common.truth.FloatSubject touchMinor(); - method public com.google.common.truth.FloatSubject touchMinor(int); - method public com.google.common.truth.FloatSubject x(); - method public com.google.common.truth.FloatSubject x(int); - method public com.google.common.truth.FloatSubject xPrecision(); - method public com.google.common.truth.FloatSubject y(); - method public com.google.common.truth.FloatSubject y(int); - method public com.google.common.truth.FloatSubject yPrecision(); + method public com.google.common.truth.LongSubject! historicalEventTime(int); + method public com.google.common.truth.FloatSubject! historicalOrientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject! historicalPointerCoords(int, int); + method public com.google.common.truth.FloatSubject! historicalPressure(int); + method public com.google.common.truth.FloatSubject! historicalSize(int); + method public com.google.common.truth.FloatSubject! historicalToolMajor(int); + method public com.google.common.truth.FloatSubject! historicalToolMinor(int); + method public com.google.common.truth.FloatSubject! historicalTouchMajor(int); + method public com.google.common.truth.FloatSubject! historicalTouchMinor(int); + method public com.google.common.truth.FloatSubject! historicalX(int); + method public com.google.common.truth.FloatSubject! historicalY(int); + method public static com.google.common.truth.Subject.Factory! motionEvents(); + method public com.google.common.truth.FloatSubject! orientation(); + method public com.google.common.truth.FloatSubject! orientation(int); + method public androidx.test.ext.truth.view.PointerCoordsSubject! pointerCoords(int); + method public com.google.common.truth.IntegerSubject! pointerId(int); + method public androidx.test.ext.truth.view.PointerPropertiesSubject! pointerProperties(int); + method public com.google.common.truth.FloatSubject! pressure(); + method public com.google.common.truth.FloatSubject! pressure(int); + method public com.google.common.truth.FloatSubject! rawX(); + method public com.google.common.truth.FloatSubject! rawY(); + method public com.google.common.truth.FloatSubject! size(); + method public com.google.common.truth.FloatSubject! size(int); + method public com.google.common.truth.FloatSubject! toolMajor(); + method public com.google.common.truth.FloatSubject! toolMajor(int); + method public com.google.common.truth.FloatSubject! toolMinor(); + method public com.google.common.truth.FloatSubject! toolMinor(int); + method public com.google.common.truth.FloatSubject! touchMajor(); + method public com.google.common.truth.FloatSubject! touchMajor(int); + method public com.google.common.truth.FloatSubject! touchMinor(); + method public com.google.common.truth.FloatSubject! touchMinor(int); + method public com.google.common.truth.FloatSubject! x(); + method public com.google.common.truth.FloatSubject! x(int); + method public com.google.common.truth.FloatSubject! xPrecision(); + method public com.google.common.truth.FloatSubject! y(); + method public com.google.common.truth.FloatSubject! y(int); + method public com.google.common.truth.FloatSubject! yPrecision(); } public final class PointerCoordsSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.view.PointerCoordsSubject assertThat(android.view.MotionEvent.PointerCoords); - method public com.google.common.truth.FloatSubject axisValue(int); - method public com.google.common.truth.FloatSubject orientation(); - method public static com.google.common.truth.Subject.Factory pointerCoords(); - method public com.google.common.truth.FloatSubject pressure(); - method public com.google.common.truth.FloatSubject size(); - method public com.google.common.truth.FloatSubject toolMajor(); - method public com.google.common.truth.FloatSubject toolMinor(); - method public com.google.common.truth.FloatSubject touchMajor(); - method public com.google.common.truth.FloatSubject touchMinor(); - method public com.google.common.truth.FloatSubject x(); - method public com.google.common.truth.FloatSubject y(); + method public static androidx.test.ext.truth.view.PointerCoordsSubject! assertThat(android.view.MotionEvent.PointerCoords!); + method public com.google.common.truth.FloatSubject! axisValue(int); + method public com.google.common.truth.FloatSubject! orientation(); + method public static com.google.common.truth.Subject.Factory! pointerCoords(); + method public com.google.common.truth.FloatSubject! pressure(); + method public com.google.common.truth.FloatSubject! size(); + method public com.google.common.truth.FloatSubject! toolMajor(); + method public com.google.common.truth.FloatSubject! toolMinor(); + method public com.google.common.truth.FloatSubject! touchMajor(); + method public com.google.common.truth.FloatSubject! touchMinor(); + method public com.google.common.truth.FloatSubject! x(); + method public com.google.common.truth.FloatSubject! y(); } public final class PointerPropertiesSubject extends com.google.common.truth.Subject { - method public static androidx.test.ext.truth.view.PointerPropertiesSubject assertThat(android.view.MotionEvent.PointerProperties); + method public static androidx.test.ext.truth.view.PointerPropertiesSubject! assertThat(android.view.MotionEvent.PointerProperties!); method public void hasId(int); method public void hasToolType(int); - method public void isEqualTo(android.view.MotionEvent.PointerProperties); - method public static com.google.common.truth.Subject.Factory pointerProperties(); + method public void isEqualTo(android.view.MotionEvent.PointerProperties!); + method public static com.google.common.truth.Subject.Factory! pointerProperties(); } } diff --git a/runner/android_junit_runner/java/androidx/test/api/current.txt b/runner/android_junit_runner/java/androidx/test/api/current.txt index 93082a191..37a59dfe9 100644 --- a/runner/android_junit_runner/java/androidx/test/api/current.txt +++ b/runner/android_junit_runner/java/androidx/test/api/current.txt @@ -1,89 +1,249 @@ +// Signature format: 3.0 +package androidx.test.filters { -package androidx.test.runner { + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface FlakyTest { + method public abstract int bugId() default -1; + method public abstract String detail() default ""; + } - public final deprecated class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { - ctor public AndroidJUnit4(java.lang.Class, androidx.test.internal.util.AndroidRunnerParams) throws org.junit.runners.model.InitializationError; - ctor public AndroidJUnit4(java.lang.Class) throws org.junit.runners.model.InitializationError; - method public void filter(org.junit.runner.manipulation.Filter) throws org.junit.runner.manipulation.NoTestsRemainException; - method public org.junit.runner.Description getDescription(); - method public void run(org.junit.runner.notification.RunNotifier); - method public void sort(org.junit.runner.manipulation.Sorter); + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface LargeTest { } - public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation implements androidx.test.internal.events.client.TestEventClientConnectListener { - ctor public AndroidJUnitRunner(); - method public void onTestEventClientConnect(); + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface MediumTest { + } + + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD}) public @interface RequiresDevice { + } + + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD}) public @interface SdkSuppress { + method public abstract String codeName() default "unset"; + method public abstract int maxSdkVersion() default java.lang.Integer.MAX_VALUE; + method public abstract int minSdkVersion() default 1; + } + + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface SmallTest { } + + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Suppress { + } + +} + +package androidx.test.orchestrator.callback { + + public class NoOpOrchestratorConnection { + ctor public NoOpOrchestratorConnection(); + method public void connect(android.content.Context!); + method public void send(androidx.test.services.events.discovery.TestDiscoveryEvent!); + method public void send(androidx.test.services.events.run.TestRunEvent!); + } + + public interface OrchestratorCallback extends android.os.IInterface { + method public void addTest(String!) throws android.os.RemoteException; + method public void sendTestNotification(android.os.Bundle!) throws android.os.RemoteException; + } + + public abstract static class OrchestratorCallback.Stub extends com.google.android.aidl.BaseStub implements androidx.test.orchestrator.callback.OrchestratorCallback { + ctor public OrchestratorCallback.Stub(); + method public static androidx.test.orchestrator.callback.OrchestratorCallback! asInterface(android.os.IBinder!); + } + + public static class OrchestratorCallback.Stub.Proxy extends com.google.android.aidl.BaseProxy implements androidx.test.orchestrator.callback.OrchestratorCallback { + method public void addTest(String!) throws android.os.RemoteException; + method public void sendTestNotification(android.os.Bundle!) throws android.os.RemoteException; + } + } +package androidx.test.orchestrator.junit { -package androidx.test.runner.permission { + public final class BundleJUnitUtils { + method public static android.os.Bundle! getBundleFromDescription(org.junit.runner.Description!); + method public static android.os.Bundle! getBundleFromFailure(org.junit.runner.notification.Failure!); + method public static android.os.Bundle! getBundleFromResult(org.junit.runner.Result!); + method public static android.os.Bundle! getBundleFromThrowable(org.junit.runner.Description!, Throwable!); + method public static androidx.test.orchestrator.junit.ParcelableDescription! getDescription(android.os.Bundle!); + method public static androidx.test.orchestrator.junit.ParcelableFailure! getFailure(android.os.Bundle!); + method public static androidx.test.orchestrator.junit.ParcelableResult! getResult(android.os.Bundle!); + } + + public final class ParcelableDescription implements android.os.Parcelable { + ctor public ParcelableDescription(org.junit.runner.Description!); + ctor public ParcelableDescription(String!); + method public int describeContents(); + method public String! getClassName(); + method public String! getDisplayName(); + method public String! getMethodName(); + method public void writeToParcel(android.os.Parcel!, int); + field public static final android.os.Parcelable.Creator! CREATOR; + } - public class PermissionRequester implements androidx.test.internal.platform.content.PermissionGranter { - ctor public PermissionRequester(); - method public void addPermissions(java.lang.String...); - method public void requestPermissions(); - method protected void setAndroidRuntimeVersion(int); + public final class ParcelableFailure implements android.os.Parcelable { + ctor public ParcelableFailure(org.junit.runner.notification.Failure!); + ctor public ParcelableFailure(androidx.test.orchestrator.junit.ParcelableDescription!, Throwable!); + ctor public ParcelableFailure(androidx.test.orchestrator.junit.ParcelableDescription!, String!); + method public int describeContents(); + method public androidx.test.orchestrator.junit.ParcelableDescription! getDescription(); + method public String! getTrace(); + method public void writeToParcel(android.os.Parcel!, int); + field public static final android.os.Parcelable.Creator! CREATOR; } - public abstract class RequestPermissionCallable implements java.util.concurrent.Callable { - ctor public RequestPermissionCallable(androidx.test.runner.permission.ShellCommand, android.content.Context, java.lang.String); - method protected java.lang.String getPermission(); - method protected androidx.test.runner.permission.ShellCommand getShellCommand(); - method protected boolean isPermissionGranted(); + public final class ParcelableResult implements android.os.Parcelable { + ctor public ParcelableResult(java.util.List!); + ctor public ParcelableResult(org.junit.runner.Result!); + method public int describeContents(); + method public int getFailureCount(); + method public java.util.List! getFailures(); + method public boolean wasSuccessful(); + method public void writeToParcel(android.os.Parcel!, int); + field public static final android.os.Parcelable.Creator! CREATOR; + } + +} + +package androidx.test.orchestrator.listeners { + + public final class OrchestrationListenerManager { + ctor public OrchestrationListenerManager(android.app.Instrumentation!); + method public void addListener(androidx.test.orchestrator.listeners.OrchestrationRunListener!); + method public void handleNotification(android.os.Bundle!); + method public void orchestrationRunStarted(int); + method public void testProcessFinished(String!); + method public void testProcessStarted(androidx.test.orchestrator.junit.ParcelableDescription!); + field public static final String KEY_TEST_EVENT = "TestEvent"; } - public static final class RequestPermissionCallable.Result extends java.lang.Enum { - method public static androidx.test.runner.permission.RequestPermissionCallable.Result valueOf(java.lang.String); - method public static final androidx.test.runner.permission.RequestPermissionCallable.Result[] values(); - enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result FAILURE; - enum_constant public static final androidx.test.runner.permission.RequestPermissionCallable.Result SUCCESS; + public enum OrchestrationListenerManager.TestEvent { + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_ASSUMPTION_FAILURE; + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_FAILURE; + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_FINISHED; + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_IGNORED; + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_RUN_FINISHED; + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_RUN_STARTED; + enum_constant public static final androidx.test.orchestrator.listeners.OrchestrationListenerManager.TestEvent TEST_STARTED; } - public abstract class ShellCommand { - ctor public ShellCommand(); + public abstract class OrchestrationRunListener { + ctor public OrchestrationRunListener(); + method public android.app.Instrumentation! getInstrumentation(); + method public void orchestrationRunStarted(int); + method public void setInstrumentation(android.app.Instrumentation!); + method public void testAssumptionFailure(androidx.test.orchestrator.junit.ParcelableFailure!); + method public void testFailure(androidx.test.orchestrator.junit.ParcelableFailure!); + method public void testFinished(androidx.test.orchestrator.junit.ParcelableDescription!); + method public void testIgnored(androidx.test.orchestrator.junit.ParcelableDescription!); + method public void testProcessFinished(String!); + method public void testRunFinished(androidx.test.orchestrator.junit.ParcelableResult!); + method public void testRunStarted(androidx.test.orchestrator.junit.ParcelableDescription!); + method public void testStarted(androidx.test.orchestrator.junit.ParcelableDescription!); } } -package androidx.test.runner.screenshot { +package androidx.test.orchestrator.listeners.result { + + public interface ITestRunListener { + method public void testAssumptionFailure(androidx.test.orchestrator.listeners.result.TestIdentifier!, String!); + method public void testEnded(androidx.test.orchestrator.listeners.result.TestIdentifier!, java.util.Map!); + method public void testFailed(androidx.test.orchestrator.listeners.result.TestIdentifier!, String!); + method public void testIgnored(androidx.test.orchestrator.listeners.result.TestIdentifier!); + method public void testRunEnded(long, java.util.Map!); + method public void testRunFailed(String!); + method public void testRunStarted(String!, int); + method public void testRunStopped(long); + method public void testStarted(androidx.test.orchestrator.listeners.result.TestIdentifier!); + } - public class BasicScreenCaptureProcessor implements androidx.test.runner.screenshot.ScreenCaptureProcessor { - ctor public BasicScreenCaptureProcessor(); - method protected java.lang.String getDefaultFilename(); - method protected java.lang.String getFilename(java.lang.String); - method public java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; - field protected java.lang.String mDefaultFilenamePrefix; - field protected java.io.File mDefaultScreenshotPath; - field protected java.lang.String mFileNameDelimiter; - field protected java.lang.String mTag; + public class TestIdentifier { + ctor public TestIdentifier(String!, String!); + method public String! getClassName(); + method public String! getTestName(); } - public final class ScreenCapture { - method public android.graphics.Bitmap getBitmap(); - method public android.graphics.Bitmap.CompressFormat getFormat(); - method public java.lang.String getName(); - method public void process() throws java.io.IOException; - method public void process(java.util.Set) throws java.io.IOException; - method public androidx.test.runner.screenshot.ScreenCapture setFormat(android.graphics.Bitmap.CompressFormat); - method public androidx.test.runner.screenshot.ScreenCapture setName(java.lang.String); + public class TestResult { + ctor public TestResult(); + method public long getEndTime(); + method public java.util.Map! getMetrics(); + method public String! getStackTrace(); + method public long getStartTime(); + method public androidx.test.orchestrator.listeners.result.TestResult.TestStatus! getStatus(); + method public void setEndTime(long); + method public void setMetrics(java.util.Map!); + method public void setStackTrace(String!); + method public androidx.test.orchestrator.listeners.result.TestResult! setStatus(androidx.test.orchestrator.listeners.result.TestResult.TestStatus!); } - public abstract interface ScreenCaptureProcessor { - method public abstract java.lang.String process(androidx.test.runner.screenshot.ScreenCapture) throws java.io.IOException; + public enum TestResult.TestStatus { + enum_constant public static final androidx.test.orchestrator.listeners.result.TestResult.TestStatus ASSUMPTION_FAILURE; + enum_constant public static final androidx.test.orchestrator.listeners.result.TestResult.TestStatus FAILURE; + enum_constant public static final androidx.test.orchestrator.listeners.result.TestResult.TestStatus IGNORED; + enum_constant public static final androidx.test.orchestrator.listeners.result.TestResult.TestStatus INCOMPLETE; + enum_constant public static final androidx.test.orchestrator.listeners.result.TestResult.TestStatus PASSED; } - public final class Screenshot { - ctor public Screenshot(); - method public static void addScreenCaptureProcessors(java.util.Set); - method public static androidx.test.runner.screenshot.ScreenCapture capture() throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; - method public static androidx.test.runner.screenshot.ScreenCapture capture(android.app.Activity) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; - method public static androidx.test.runner.screenshot.ScreenCapture capture(android.view.View) throws androidx.test.runner.screenshot.Screenshot.ScreenShotException; - method public static void setScreenshotProcessors(java.util.Set); + public class TestRunResult implements androidx.test.orchestrator.listeners.result.ITestRunListener { + ctor public TestRunResult(); + method public java.util.Set! getCompletedTests(); + method public long getElapsedTime(); + method public String! getName(); + method public int getNumAllFailedTests(); + method public int getNumCompleteTests(); + method public int getNumTests(); + method public int getNumTestsInState(androidx.test.orchestrator.listeners.result.TestResult.TestStatus!); + method public String! getRunFailureMessage(); + method public java.util.Map! getRunMetrics(); + method public java.util.Map! getTestResults(); + method public String! getTextSummary(); + method public boolean hasFailedTests(); + method public boolean isRunComplete(); + method public boolean isRunFailure(); + method public void setAggregateMetrics(boolean); + method public void setRunComplete(boolean); + method public void testAssumptionFailure(androidx.test.orchestrator.listeners.result.TestIdentifier!, String!); + method public void testEnded(androidx.test.orchestrator.listeners.result.TestIdentifier!, java.util.Map!); + method public void testFailed(androidx.test.orchestrator.listeners.result.TestIdentifier!, String!); + method public void testIgnored(androidx.test.orchestrator.listeners.result.TestIdentifier!); + method public void testRunEnded(long, java.util.Map!); + method public void testRunFailed(String!); + method public void testRunStarted(String!, int); + method public void testRunStopped(long); + method public void testStarted(androidx.test.orchestrator.listeners.result.TestIdentifier!); } - public class UiAutomationWrapper { - method public android.graphics.Bitmap takeScreenshot(); +} + +package androidx.test.runner { + + @Deprecated public final class AndroidJUnit4 extends org.junit.runner.Runner implements org.junit.runner.manipulation.Filterable org.junit.runner.manipulation.Sortable { + ctor @Deprecated public AndroidJUnit4(Class!) throws org.junit.runners.model.InitializationError; + method @Deprecated public void filter(org.junit.runner.manipulation.Filter!) throws org.junit.runner.manipulation.NoTestsRemainException; + method @Deprecated public org.junit.runner.Description! getDescription(); + method @Deprecated public void run(org.junit.runner.notification.RunNotifier!); + method @Deprecated public void sort(org.junit.runner.manipulation.Sorter!); + } + + public class AndroidJUnitRunner extends androidx.test.runner.MonitoringInstrumentation { + ctor public AndroidJUnitRunner(); + } + + @Deprecated public class UsageTrackerFacilitator { + ctor @Deprecated public UsageTrackerFacilitator(boolean); + method @Deprecated public void sendUsages(); + method @Deprecated public boolean shouldTrackUsage(); + method @Deprecated public void trackUsage(String!, String!); + } + +} + +package androidx.test.runner.intercepting { + + public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { + ctor public SingleActivityFactory(Class!); + method public final android.app.Activity! create(ClassLoader!, String!, android.content.Intent!); + method protected abstract T! create(android.content.Intent!); + method public final Class! getActivityClassToIntercept(); + method public final boolean shouldIntercept(ClassLoader!, String!, android.content.Intent!); } } diff --git a/runner/android_junit_runner/java/androidx/test/internal/events/client/package-info.java b/runner/android_junit_runner/java/androidx/test/internal/events/client/package-info.java new file mode 100644 index 000000000..a73d78c0b --- /dev/null +++ b/runner/android_junit_runner/java/androidx/test/internal/events/client/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @hide */ +package androidx.test.internal.events.client; diff --git a/runner/android_junit_runner/java/androidx/test/internal/package-info.java b/runner/android_junit_runner/java/androidx/test/internal/package-info.java new file mode 100644 index 000000000..7a7ad4b06 --- /dev/null +++ b/runner/android_junit_runner/java/androidx/test/internal/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @hide */ +package androidx.test.internal; diff --git a/runner/android_junit_runner/java/androidx/test/orchestrator/callback/OrchestratorV1Connection.java b/runner/android_junit_runner/java/androidx/test/orchestrator/callback/OrchestratorV1Connection.java index ef0fac338..cd71fc7f8 100644 --- a/runner/android_junit_runner/java/androidx/test/orchestrator/callback/OrchestratorV1Connection.java +++ b/runner/android_junit_runner/java/androidx/test/orchestrator/callback/OrchestratorV1Connection.java @@ -34,6 +34,8 @@ * Handles the communication with the remote {@code androidx.test.orchestrator.OrchestratorService}. * The Orchestrator v1 service supports both test discovery notifications and test run event * notifications. + * + * @hide */ public final class OrchestratorV1Connection extends TestEventServiceConnectionBase diff --git a/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnit4.java b/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnit4.java index f2e4c6d38..16fa1fb02 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnit4.java +++ b/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnit4.java @@ -45,7 +45,11 @@ public final class AndroidJUnit4 extends Runner implements Filterable, Sortable private final Runner delegate; - /** Constructs a new instance of the default runner */ + /** + * Constructs a new instance of the default runner + * + * @hide + */ public AndroidJUnit4(Class klass, AndroidRunnerParams runnerParams) throws InitializationError { // this is expected to be called when in Android environment. diff --git a/runner/android_junit_runner/java/androidx/test/runner/UsageTrackerFacilitator.java b/runner/android_junit_runner/java/androidx/test/runner/UsageTrackerFacilitator.java index d334cac6a..4751ef96c 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/UsageTrackerFacilitator.java +++ b/runner/android_junit_runner/java/androidx/test/runner/UsageTrackerFacilitator.java @@ -32,6 +32,7 @@ public class UsageTrackerFacilitator implements UsageTracker { private final boolean shouldTrackUsage; + /** @hide */ public UsageTrackerFacilitator(@NonNull RunnerArgs runnerArgs) { checkNotNull(runnerArgs, "runnerArgs cannot be null!"); @@ -51,6 +52,7 @@ public boolean shouldTrackUsage() { return shouldTrackUsage; } + /** @hide */ public void registerUsageTracker(@Nullable UsageTracker usageTracker) { if (usageTracker != null && shouldTrackUsage()) { Log.i(TAG, "Usage tracking enabled"); diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java b/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java index 79bb88f6f..fef151185 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java @@ -19,8 +19,10 @@ import android.content.Context; import androidx.annotation.NonNull; import android.util.Log; +import androidx.test.annotation.ExperimentalTestApi; /** Grants a permission at runtime using a @{link ShellCommand} */ +@ExperimentalTestApi class GrantPermissionCallable extends RequestPermissionCallable { private static final String TAG = "GrantPermissionCallable"; diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java b/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java index 0224ad5e9..a79f3c566 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java @@ -24,6 +24,7 @@ import androidx.annotation.NonNull; import android.text.TextUtils; import androidx.annotation.VisibleForTesting; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.runner.permission.RequestPermissionCallable.Result; import java.util.Objects; import java.util.concurrent.Callable; @@ -34,6 +35,7 @@ *

Note: This class is visible only for testing. Please do not use it directly. */ @VisibleForTesting +@ExperimentalTestApi public abstract class RequestPermissionCallable implements Callable { private final ShellCommand shellCommand; diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java b/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java index c0a8db1e5..6e1ff739a 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java @@ -18,6 +18,7 @@ import android.app.UiAutomation; import androidx.annotation.VisibleForTesting; +import androidx.test.annotation.ExperimentalTestApi; /** * Ideally we wouldn't need this abstraction but since {@link UiAutomation} is final we need an @@ -25,6 +26,7 @@ * another implementation in the future. */ @VisibleForTesting +@ExperimentalTestApi public abstract class ShellCommand { /** Characters that have no special meaning to the shell. */ diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/UiAutomationShellCommand.java b/runner/android_junit_runner/java/androidx/test/runner/permission/UiAutomationShellCommand.java index 453ce6cf0..98e163acd 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/UiAutomationShellCommand.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/UiAutomationShellCommand.java @@ -24,6 +24,7 @@ import android.util.Log; import androidx.annotation.VisibleForTesting; import androidx.test.InstrumentationRegistry; +import androidx.test.annotation.ExperimentalTestApi; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; @@ -35,6 +36,7 @@ * runtime. */ @TargetApi(value = 23) +@ExperimentalTestApi class UiAutomationShellCommand extends ShellCommand { private static final String TAG = "UiAutomationShellCmd"; diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/UiAutomationWrapper.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/UiAutomationWrapper.java index df56c89fc..40b445a2a 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/UiAutomationWrapper.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/UiAutomationWrapper.java @@ -18,6 +18,7 @@ import android.graphics.Bitmap; import androidx.annotation.VisibleForTesting; import androidx.test.InstrumentationRegistry; +import androidx.test.annotation.ExperimentalTestApi; /** * Wrapper for UiAutomation object. @@ -25,6 +26,7 @@ *

Ideally we wouldn't need this abstraction but since {@link android.app.UiAutomation} is final * we need an abstraction on top to be able to mock it in tests. */ +@ExperimentalTestApi public class UiAutomationWrapper { @VisibleForTesting diff --git a/runner/monitor/java/androidx/test/api/current.txt b/runner/monitor/java/androidx/test/api/current.txt index 824520630..7a769243a 100644 --- a/runner/monitor/java/androidx/test/api/current.txt +++ b/runner/monitor/java/androidx/test/api/current.txt @@ -1,26 +1,26 @@ +// Signature format: 3.0 package androidx.test { - public final deprecated class InstrumentationRegistry { - method public static deprecated android.os.Bundle getArguments(); - method public static deprecated android.content.Context getContext(); - method public static deprecated android.app.Instrumentation getInstrumentation(); - method public static deprecated android.content.Context getTargetContext(); - method public static deprecated void registerInstance(android.app.Instrumentation, android.os.Bundle); + @Deprecated public final class InstrumentationRegistry { + method @Deprecated public static android.os.Bundle! getArguments(); + method @Deprecated public static android.content.Context! getContext(); + method @Deprecated public static android.app.Instrumentation! getInstrumentation(); + method @Deprecated public static android.content.Context! getTargetContext(); + method @Deprecated public static void registerInstance(android.app.Instrumentation!, android.os.Bundle!); } } package androidx.test.annotation { - public abstract class Beta implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Beta { } } - package androidx.test.platform { - public abstract interface TestFrameworkException { + public interface TestFrameworkException { } } @@ -28,9 +28,9 @@ package androidx.test.platform { package androidx.test.platform.app { public final class InstrumentationRegistry { - method public static android.os.Bundle getArguments(); - method public static android.app.Instrumentation getInstrumentation(); - method public static void registerInstance(android.app.Instrumentation, android.os.Bundle); + method public static android.os.Bundle! getArguments(); + method public static android.app.Instrumentation! getInstrumentation(); + method public static void registerInstance(android.app.Instrumentation!, android.os.Bundle!); } } @@ -38,146 +38,130 @@ package androidx.test.platform.app { package androidx.test.platform.ui { public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { - ctor public InjectEventSecurityException(java.lang.String); - ctor public InjectEventSecurityException(java.lang.Throwable); - ctor public InjectEventSecurityException(java.lang.String, java.lang.Throwable); + ctor public InjectEventSecurityException(String!); + ctor public InjectEventSecurityException(Throwable!); + ctor public InjectEventSecurityException(String!, Throwable!); } - public abstract interface UiController { - method public abstract boolean injectKeyEvent(android.view.KeyEvent) throws androidx.test.platform.ui.InjectEventSecurityException; - method public abstract boolean injectMotionEvent(android.view.MotionEvent) throws androidx.test.platform.ui.InjectEventSecurityException; - method public abstract boolean injectString(java.lang.String) throws androidx.test.platform.ui.InjectEventSecurityException; - method public abstract void loopMainThreadForAtLeast(long); - method public abstract void loopMainThreadUntilIdle(); + public interface UiController { + method public boolean injectKeyEvent(android.view.KeyEvent!) throws androidx.test.platform.ui.InjectEventSecurityException; + method public boolean injectMotionEvent(android.view.MotionEvent!) throws androidx.test.platform.ui.InjectEventSecurityException; + method public boolean injectString(String!) throws androidx.test.platform.ui.InjectEventSecurityException; + method public void loopMainThreadForAtLeast(long); + method public void loopMainThreadUntilIdle(); } } - package androidx.test.runner { - - public class MonitoringInstrumentation extends androidx.test.internal.runner.hidden.ExposedInstrumentationApi { + public class MonitoringInstrumentation extends android.app.Instrumentation { ctor public MonitoringInstrumentation(); - method protected void dumpThreadStateToOutputs(java.lang.String); - method protected java.lang.String getThreadState(); + method protected void dumpThreadStateToOutputs(String!); + method public void execStartActivities(android.content.Context!, android.os.IBinder!, android.os.IBinder!, android.app.Activity!, android.content.Intent![]!, android.os.Bundle!); + method public android.app.Instrumentation.ActivityResult! execStartActivity(android.content.Context!, android.os.IBinder!, android.os.IBinder!, android.app.Activity!, android.content.Intent!, int); + method public android.app.Instrumentation.ActivityResult! execStartActivity(android.content.Context!, android.os.IBinder!, android.os.IBinder!, android.app.Activity!, android.content.Intent!, int, android.os.Bundle!); + method public android.app.Instrumentation.ActivityResult! execStartActivity(android.content.Context!, android.os.IBinder!, android.os.IBinder!, String!, android.content.Intent!, int, android.os.Bundle!); + method public android.app.Instrumentation.ActivityResult! execStartActivity(android.content.Context!, android.os.IBinder!, android.os.IBinder!, android.app.Activity!, android.content.Intent!, int, android.os.Bundle!, android.os.UserHandle!); + method public android.app.Instrumentation.ActivityResult! execStartActivity(android.content.Context!, android.os.IBinder!, android.os.IBinder!, android.app.Fragment!, android.content.Intent!, int, android.os.Bundle!); + method protected String! getThreadState(); method protected void installMultidex(); - method protected void installOldMultiDex(java.lang.Class) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; - method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory); - method protected deprecated boolean isPrimaryInstrProcess(java.lang.String); + method protected void installOldMultiDex(Class!) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException; + method public void interceptActivityUsing(androidx.test.runner.intercepting.InterceptingActivityFactory!); + method @Deprecated protected boolean isPrimaryInstrProcess(String?); method protected final boolean isPrimaryInstrProcess(); method protected void restoreUncaughtExceptionHandler(); - method protected final void setJsBridgeClassName(java.lang.String); + method protected final void setJsBridgeClassName(String!); method protected boolean shouldWaitForActivitiesToComplete(); method protected void specifyDexMakerCacheProperty(); + method protected Throwable! unwrapException(Throwable!); method public void useDefaultInterceptingActivityFactory(); method protected void waitForActivitiesToComplete(); } public class MonitoringInstrumentation.ActivityFinisher implements java.lang.Runnable { - ctor public ActivityFinisher(); + ctor public MonitoringInstrumentation.ActivityFinisher(); method public void run(); } - public class UsageTrackerFacilitator implements androidx.test.internal.runner.tracker.UsageTracker { - ctor public UsageTrackerFacilitator(androidx.test.internal.runner.RunnerArgs); - ctor public UsageTrackerFacilitator(boolean); - method public void registerUsageTracker(androidx.test.internal.runner.tracker.UsageTracker); - method public void sendUsages(); - method public boolean shouldTrackUsage(); - method public void trackUsage(java.lang.String, java.lang.String); - } - } package androidx.test.runner.intent { - public abstract interface IntentCallback { - method public abstract void onIntentSent(android.content.Intent); + public interface IntentCallback { + method public void onIntentSent(android.content.Intent!); } - public abstract interface IntentMonitor { - method public abstract void addIntentCallback(androidx.test.runner.intent.IntentCallback); - method public abstract void removeIntentCallback(androidx.test.runner.intent.IntentCallback); + public interface IntentMonitor { + method public void addIntentCallback(androidx.test.runner.intent.IntentCallback!); + method public void removeIntentCallback(androidx.test.runner.intent.IntentCallback!); } public final class IntentMonitorRegistry { - method public static androidx.test.runner.intent.IntentMonitor getInstance(); - method public static void registerInstance(androidx.test.runner.intent.IntentMonitor); + method public static androidx.test.runner.intent.IntentMonitor! getInstance(); + method public static void registerInstance(androidx.test.runner.intent.IntentMonitor!); } - public abstract interface IntentStubber { - method public abstract android.app.Instrumentation.ActivityResult getActivityResultForIntent(android.content.Intent); + public interface IntentStubber { + method public android.app.Instrumentation.ActivityResult! getActivityResultForIntent(android.content.Intent!); } public final class IntentStubberRegistry { - method public static androidx.test.runner.intent.IntentStubber getInstance(); + method public static androidx.test.runner.intent.IntentStubber! getInstance(); method public static boolean isLoaded(); - method public static void load(androidx.test.runner.intent.IntentStubber); - method public static synchronized void reset(); + method public static void load(androidx.test.runner.intent.IntentStubber!); + method public static void reset(); } } package androidx.test.runner.intercepting { - public abstract interface InterceptingActivityFactory { - method public abstract android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); - method public abstract boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); - } - - public abstract class SingleActivityFactory implements androidx.test.runner.intercepting.InterceptingActivityFactory { - ctor public SingleActivityFactory(java.lang.Class); - method public final android.app.Activity create(java.lang.ClassLoader, java.lang.String, android.content.Intent); - method protected abstract T create(android.content.Intent); - method public final java.lang.Class getActivityClassToIntercept(); - method public final boolean shouldIntercept(java.lang.ClassLoader, java.lang.String, android.content.Intent); + public interface InterceptingActivityFactory { + method public android.app.Activity! create(ClassLoader!, String!, android.content.Intent!); + method public boolean shouldIntercept(ClassLoader!, String!, android.content.Intent!); } } package androidx.test.runner.lifecycle { - public abstract interface ActivityLifecycleCallback { - method public abstract void onActivityLifecycleChanged(android.app.Activity, androidx.test.runner.lifecycle.Stage); + public interface ActivityLifecycleCallback { + method public void onActivityLifecycleChanged(android.app.Activity!, androidx.test.runner.lifecycle.Stage!); } - public abstract interface ActivityLifecycleMonitor { - method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); - method public abstract java.util.Collection getActivitiesInStage(androidx.test.runner.lifecycle.Stage); - method public abstract androidx.test.runner.lifecycle.Stage getLifecycleStageOf(android.app.Activity); - method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback); + public interface ActivityLifecycleMonitor { + method public void addLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback!); + method public java.util.Collection! getActivitiesInStage(androidx.test.runner.lifecycle.Stage!); + method public androidx.test.runner.lifecycle.Stage! getLifecycleStageOf(android.app.Activity!); + method public void removeLifecycleCallback(androidx.test.runner.lifecycle.ActivityLifecycleCallback!); } public final class ActivityLifecycleMonitorRegistry { - method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor getInstance(); - method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor); + method public static androidx.test.runner.lifecycle.ActivityLifecycleMonitor! getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ActivityLifecycleMonitor!); } - public abstract interface ApplicationLifecycleCallback { - method public abstract void onApplicationLifecycleChanged(android.app.Application, androidx.test.runner.lifecycle.ApplicationStage); + public interface ApplicationLifecycleCallback { + method public void onApplicationLifecycleChanged(android.app.Application!, androidx.test.runner.lifecycle.ApplicationStage!); } - public abstract interface ApplicationLifecycleMonitor { - method public abstract void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); - method public abstract void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback); + public interface ApplicationLifecycleMonitor { + method public void addLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback!); + method public void removeLifecycleCallback(androidx.test.runner.lifecycle.ApplicationLifecycleCallback!); } public final class ApplicationLifecycleMonitorRegistry { - method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor getInstance(); - method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor); + method public static androidx.test.runner.lifecycle.ApplicationLifecycleMonitor! getInstance(); + method public static void registerInstance(androidx.test.runner.lifecycle.ApplicationLifecycleMonitor!); } - public final class ApplicationStage extends java.lang.Enum { - method public static androidx.test.runner.lifecycle.ApplicationStage valueOf(java.lang.String); - method public static final androidx.test.runner.lifecycle.ApplicationStage[] values(); + public enum ApplicationStage { enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage CREATED; enum_constant public static final androidx.test.runner.lifecycle.ApplicationStage PRE_ON_CREATE; } - public final class Stage extends java.lang.Enum { - method public static androidx.test.runner.lifecycle.Stage valueOf(java.lang.String); - method public static final androidx.test.runner.lifecycle.Stage[] values(); + public enum Stage { enum_constant public static final androidx.test.runner.lifecycle.Stage CREATED; enum_constant public static final androidx.test.runner.lifecycle.Stage DESTROYED; enum_constant public static final androidx.test.runner.lifecycle.Stage PAUSED; diff --git a/runner/monitor/java/androidx/test/internal/package-info.java b/runner/monitor/java/androidx/test/internal/package-info.java new file mode 100644 index 000000000..7a7ad4b06 --- /dev/null +++ b/runner/monitor/java/androidx/test/internal/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @hide */ +package androidx.test.internal; diff --git a/runner/monitor/java/androidx/test/platform/io/FileTestStorage.java b/runner/monitor/java/androidx/test/platform/io/FileTestStorage.java index 277b21355..06bad02fe 100644 --- a/runner/monitor/java/androidx/test/platform/io/FileTestStorage.java +++ b/runner/monitor/java/androidx/test/platform/io/FileTestStorage.java @@ -16,6 +16,7 @@ package androidx.test.platform.io; import android.util.Log; +import androidx.test.annotation.ExperimentalTestApi; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; @@ -25,7 +26,12 @@ import java.util.HashMap; import java.util.Map; -/** A class that reads/writes the runner data using the raw file system. */ +/** + * A class that reads/writes the runner data using the raw file system. + * + *

This API is experimental and is subject to change or removal in future releases. + */ +@ExperimentalTestApi public final class FileTestStorage implements PlatformTestStorage { private static final String TAG = FileTestStorage.class.getSimpleName(); diff --git a/runner/monitor/java/androidx/test/platform/io/PlatformTestStorage.java b/runner/monitor/java/androidx/test/platform/io/PlatformTestStorage.java index fabd9f8fa..e9c8fdc9d 100644 --- a/runner/monitor/java/androidx/test/platform/io/PlatformTestStorage.java +++ b/runner/monitor/java/androidx/test/platform/io/PlatformTestStorage.java @@ -15,6 +15,7 @@ */ package androidx.test.platform.io; +import androidx.test.annotation.ExperimentalTestApi; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -30,7 +31,10 @@ *

Use a concrete implementation class of this interface if you need to read/write files in your * tests. For example, in an Android Instrumentation test, use {@code * androidx.test.services.storage.TestStorage} when the test services is installed on the device. + * + *

This API is experimental and is subject to change or removal in future releases. */ +@ExperimentalTestApi public interface PlatformTestStorage { /** * Provides an InputStream to a test file dependency. diff --git a/runner/monitor/java/androidx/test/platform/io/PlatformTestStorageRegistry.java b/runner/monitor/java/androidx/test/platform/io/PlatformTestStorageRegistry.java index 11126f20b..ff7f908ee 100644 --- a/runner/monitor/java/androidx/test/platform/io/PlatformTestStorageRegistry.java +++ b/runner/monitor/java/androidx/test/platform/io/PlatformTestStorageRegistry.java @@ -17,6 +17,7 @@ import static androidx.test.internal.util.Checks.checkNotNull; +import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.platform.ServiceLoaderWrapper; import java.io.IOException; import java.io.InputStream; @@ -31,7 +32,10 @@ *

{@code PlatformTestStorage} and {@code PlatformTestStorageRegistry} are low level APIs, * typically used by higher level test frameworks. It is generally not recommended for direct use by * most tests. + * + *

This API is experimental and is subject to change or removal in future releases. */ +@ExperimentalTestApi public final class PlatformTestStorageRegistry { private static PlatformTestStorage testStorageInstance; diff --git a/runner/rules/java/androidx/test/api/current.txt b/runner/rules/java/androidx/test/api/current.txt index 878c6dea8..b3f155992 100644 --- a/runner/rules/java/androidx/test/api/current.txt +++ b/runner/rules/java/androidx/test/api/current.txt @@ -1,92 +1,42 @@ +// Signature format: 3.0 package androidx.test.annotation { - public abstract class UiThreadTest implements java.lang.annotation.Annotation { + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface UiThreadTest { } } package androidx.test.rule { - public deprecated class ActivityTestRule implements org.junit.rules.TestRule { - ctor public ActivityTestRule(java.lang.Class); - ctor public ActivityTestRule(java.lang.Class, boolean); - ctor public ActivityTestRule(java.lang.Class, boolean, boolean); - ctor public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory, boolean, boolean); - ctor public ActivityTestRule(java.lang.Class, java.lang.String, int, boolean, boolean); - method protected void afterActivityFinished(); - method protected void afterActivityLaunched(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method protected void beforeActivityLaunched(); - method public void finishActivity(); - method public T getActivity(); - method protected android.content.Intent getActivityIntent(); - method public android.app.Instrumentation.ActivityResult getActivityResult(); - method public T launchActivity(android.content.Intent); - method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; + @Deprecated public class ActivityTestRule implements org.junit.rules.TestRule { + ctor @Deprecated public ActivityTestRule(Class!); + ctor @Deprecated public ActivityTestRule(Class!, boolean); + ctor @Deprecated public ActivityTestRule(Class!, boolean, boolean); + ctor @Deprecated public ActivityTestRule(androidx.test.runner.intercepting.SingleActivityFactory!, boolean, boolean); + ctor @Deprecated public ActivityTestRule(Class!, String, int, boolean, boolean); + method @Deprecated protected void afterActivityFinished(); + method @Deprecated protected void afterActivityLaunched(); + method @Deprecated public org.junit.runners.model.Statement! apply(org.junit.runners.model.Statement!, org.junit.runner.Description!); + method @Deprecated protected void beforeActivityLaunched(); + method @Deprecated public void finishActivity(); + method @Deprecated public T! getActivity(); + method @Deprecated protected android.content.Intent! getActivityIntent(); + method @Deprecated public android.app.Instrumentation.ActivityResult! getActivityResult(); + method @Deprecated public T! launchActivity(android.content.Intent?); + method @Deprecated public void runOnUiThread(Runnable!) throws java.lang.Throwable; } public class DisableOnAndroidDebug implements org.junit.rules.TestRule { - ctor public DisableOnAndroidDebug(org.junit.rules.TestRule); - method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); + ctor public DisableOnAndroidDebug(org.junit.rules.TestRule!); + method public final org.junit.runners.model.Statement! apply(org.junit.runners.model.Statement!, org.junit.runner.Description!); method public boolean isDebugging(); } - public class GrantPermissionRule implements org.junit.rules.TestRule { - method public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method public static androidx.test.rule.GrantPermissionRule grant(java.lang.String...); - } - - public class ServiceTestRule implements org.junit.rules.TestRule { - ctor public ServiceTestRule(); - ctor protected ServiceTestRule(long, java.util.concurrent.TimeUnit); - method protected void afterService(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method protected void beforeService(); - method public android.os.IBinder bindService(android.content.Intent) throws java.util.concurrent.TimeoutException; - method public android.os.IBinder bindService(android.content.Intent, android.content.ServiceConnection, int) throws java.util.concurrent.TimeoutException; - method public void startService(android.content.Intent) throws java.util.concurrent.TimeoutException; - method public void unbindService(); - method public static androidx.test.rule.ServiceTestRule withTimeout(long, java.util.concurrent.TimeUnit); - } - - public deprecated class UiThreadTestRule implements org.junit.rules.TestRule { - ctor public UiThreadTestRule(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method public void runOnUiThread(java.lang.Runnable) throws java.lang.Throwable; - method protected boolean shouldRunOnUiThread(org.junit.runner.Description); - } - -} - -package androidx.test.rule.logging { - - public class AtraceLogger { - method public void atraceStart(java.util.Set, int, int, java.io.File, java.lang.String) throws java.io.IOException; - method public void atraceStop() throws java.io.IOException, java.lang.InterruptedException; - method public static androidx.test.rule.logging.AtraceLogger getAtraceLoggerInstance(android.app.Instrumentation); - } - -} - -package androidx.test.rule.provider { - - public class ProviderTestRule implements org.junit.rules.TestRule { - method protected void afterProviderCleanedUp(); - method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement, org.junit.runner.Description); - method protected void beforeProviderSetup(); - method public android.content.ContentResolver getResolver(); - method public void revokePermission(java.lang.String); - method public void runDatabaseCommands(java.lang.String, java.lang.String...); - } - - public static class ProviderTestRule.Builder { - ctor public Builder(java.lang.Class, java.lang.String); - method public androidx.test.rule.provider.ProviderTestRule.Builder addProvider(java.lang.Class, java.lang.String); - method public androidx.test.rule.provider.ProviderTestRule build(); - method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommands(java.lang.String, java.lang.String...); - method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseCommandsFile(java.lang.String, java.io.File); - method public androidx.test.rule.provider.ProviderTestRule.Builder setDatabaseFile(java.lang.String, java.io.File); - method public androidx.test.rule.provider.ProviderTestRule.Builder setPrefix(java.lang.String); + @Deprecated public class UiThreadTestRule implements org.junit.rules.TestRule { + ctor @Deprecated public UiThreadTestRule(); + method @Deprecated public org.junit.runners.model.Statement! apply(org.junit.runners.model.Statement!, org.junit.runner.Description!); + method @Deprecated public void runOnUiThread(Runnable!) throws java.lang.Throwable; + method @Deprecated protected boolean shouldRunOnUiThread(org.junit.runner.Description!); } } diff --git a/runner/rules/java/androidx/test/internal/package-info.java b/runner/rules/java/androidx/test/internal/package-info.java new file mode 100644 index 000000000..7a7ad4b06 --- /dev/null +++ b/runner/rules/java/androidx/test/internal/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @hide */ +package androidx.test.internal; diff --git a/runner/rules/java/androidx/test/internal/statement/package-info.java b/runner/rules/java/androidx/test/internal/statement/package-info.java new file mode 100644 index 000000000..337f260f6 --- /dev/null +++ b/runner/rules/java/androidx/test/internal/statement/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @hide */ +package androidx.test.internal.statement; diff --git a/services/storage/java/androidx/test/services/storage/TestStorageException.java b/services/storage/java/androidx/test/services/storage/TestStorageException.java index 3f16509dc..8a54069e6 100644 --- a/services/storage/java/androidx/test/services/storage/TestStorageException.java +++ b/services/storage/java/androidx/test/services/storage/TestStorageException.java @@ -15,7 +15,10 @@ */ package androidx.test.services.storage; +import androidx.test.annotation.ExperimentalTestApi; + /** A RuntimeException thrown out of the test storage service. */ +@ExperimentalTestApi public class TestStorageException extends RuntimeException { public TestStorageException(String message) { diff --git a/services/storage/java/androidx/test/services/storage/api/current.txt b/services/storage/java/androidx/test/services/storage/api/current.txt index e69de29bb..da4f6cc18 100644 --- a/services/storage/java/androidx/test/services/storage/api/current.txt +++ b/services/storage/java/androidx/test/services/storage/api/current.txt @@ -0,0 +1 @@ +// Signature format: 3.0 diff --git a/services/storage/java/androidx/test/services/storage/internal/package-info.java b/services/storage/java/androidx/test/services/storage/internal/package-info.java new file mode 100644 index 000000000..e9e514002 --- /dev/null +++ b/services/storage/java/androidx/test/services/storage/internal/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @hide */ +package androidx.test.services.storage.internal; From 7a10447ff6d3efa772b7aa1bb6de47d1be91debd Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Tue, 7 Sep 2021 14:33:09 -0700 Subject: [PATCH 008/949] Internal PiperOrigin-RevId: 395331448 --- build_extensions/droiddoc.bzl | 120 +++++++++++++++++++++++++++ build_extensions/droiddoc.sh | 150 ++++++++++++++++++++++++++++++++++ 2 files changed, 270 insertions(+) create mode 100644 build_extensions/droiddoc.bzl create mode 100755 build_extensions/droiddoc.sh diff --git a/build_extensions/droiddoc.bzl b/build_extensions/droiddoc.bzl new file mode 100644 index 000000000..0f3d42382 --- /dev/null +++ b/build_extensions/droiddoc.bzl @@ -0,0 +1,120 @@ +"""Skylark rule for generation of docs and API TXT for an android_library.""" + +def _transitive_deps(java): + """Returns a list of the transitive java dependencies.""" + return java.transitive_deps.to_list() + +def _basename(filename): + return filename.split("/")[-1] + +def _dirname(filename): + return filename.rsplit("/", 1)[0] if "/" in filename else "." + +def _droiddoc_impl(ctx): + """Generates javadoc and API txt for android_library.""" + src_jars = [] + dep_jars = [] + + for src_jar in ctx.attr.src_jars: + src_jars.extend(src_jar.files.to_list()) + + for dep in ctx.attr.deps: + dep_jars.extend(_transitive_deps(dep.java)) + + dep_jars += ctx.files._android_jar + + src_jar_paths = [src_jar.path for src_jar in src_jars] + + extra_flags = [] + extra_inputs = [] + if ctx.attr.packages: + extra_flags.append("--packages=%s" % " ".join(ctx.attr.packages)) + + if ctx.attr.federation_project: + if not ctx.attr.federation_url: + fail("federation_url must be set when federation_project set") + if not ctx.attr.federation_api_txt: + fail("federation_api_txt must be set when federation_project set") + + extra_flags.append("--federation_project=%s" % ctx.attr.federation_project) + extra_flags.append("--federation_url=%s" % ctx.attr.federation_url) + extra_flags.append( + "--federation_api_txt=%s" % ctx.file.federation_api_txt.path, + ) + extra_inputs.append(ctx.file.federation_api_txt) + else: + if ctx.attr.federation_url: + fail("federation_project must be set when federation_url set") + if not ctx.attr.federation_api_txt: + fail("federation_project must be set when federation_api_txt set") + + if ctx.attr.devsite: + extra_flags.append("--devsite=true") + extra_flags.append("--yamlV2=true") + + ctx.actions.run( + inputs = src_jars + dep_jars + extra_inputs + [ctx.executable._droiddoc], + outputs = [ctx.outputs.docs, ctx.outputs.api], + arguments = [ + "--classpath=%s" % cmd_helper.join_paths(":", depset(dep_jars)), + "--output=%s" % ctx.outputs.docs.path, + "--api_output=%s" % ctx.outputs.api.path, + "--dirname=%s" % ctx.label.name, + ] + extra_flags + src_jar_paths, + executable = ctx.executable._droiddoc, + progress_message = "Generating javadoc: %s" % ctx.outputs.docs.short_path, + ) + +droiddoc = rule( + implementation = _droiddoc_impl, + attrs = { + # List of source jars to document. + "src_jars": attr.label_list( + mandatory = True, + allow_empty = False, + allow_files = [".jar"], + ), + # List of targets to add to classpath when generating javadoc + "deps": attr.label_list( + mandatory = True, + allow_empty = False, + allow_rules = ["android_library", "java_library"], + ), + # List of packages to document. If not specified then all packages + # which have classes in "srcs" will be included. + "packages": attr.string_list(), + # Name of project for documentation federation. + "federation_project": attr.string( + default = "Android", + ), + # URL for federated documentation. + "federation_url": attr.string( + default = "https://developer.android.com", + ), + # TXT file containing definition of API we are federated with. + "federation_api_txt": attr.label( + default = Label("//third_party/android/sdk:api/24.txt"), + allow_single_file = [".txt"], + ), + "devsite": attr.bool( + default = False, + ), + "yamlV2": attr.bool( + default = False, + ), + "_droiddoc": attr.label( + default = Label("//third_party/android/androidx_test/build_extensions:droiddoc"), + executable = True, + allow_files = True, + cfg = "host", + ), + "_android_jar": attr.label( + default = Label("//third_party/java/android/android_sdk_linux:android"), + allow_files = True, + ), + }, + outputs = { + "docs": "%{name}.zip", + "api": "%{name}_api.txt", + }, +) diff --git a/build_extensions/droiddoc.sh b/build_extensions/droiddoc.sh new file mode 100755 index 000000000..4d868bd4a --- /dev/null +++ b/build_extensions/droiddoc.sh @@ -0,0 +1,150 @@ +#!/bin/bash +# Copyright 2018 The Android Open Source Project. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Shell script to invoke javadoc, used by droiddoc.bzl. +# +# Usage: droiddoc.sh [arguments] source.jar ... + +#source ${BASH_SOURCE[0]}.runfiles/google3/util/gbash.sh || exit + +set -o errexit +set -o pipefail + +# When running from a skylark action a simple "source gbash.sh" will not work. +# However once we manage to source gbash we can safely rely on the $RUNFILES +# variable it sets for resolving all other dependencies. +source "${BASH_SOURCE[0]}.runfiles/google3/util/shell/gbash/gbash.sh" || exit 1 + +DEFINE_string classpath --required "" "Classpath to supply to javadoc command" +DEFINE_string output --required "" "Path to output zip file" +DEFINE_string api_output --required "" "Path to output API TXT" +DEFINE_string dirname --required "" \ + "Name of top level directory inside zip file" +DEFINE_string packages "" \ + "Space separated list of top level packages to restrict docs to" +DEFINE_string federation_project "" "Project to federate docs with" +DEFINE_string federation_url "" "URL of docs to federate with" +DEFINE_string federation_api_txt "" "Path to API TXT of federated docs" +DEFINE_string devsite "" "Generate docs for devsite" +DEFINE_string yamlV2 "" "Generate docs for devsite" + + +readonly JAVADOC="$RUNFILES/google3/third_party/java/jdk/jdk-64/bin/javadoc" +readonly ZIP="$RUNFILES/google3/third_party/zip/zip" +readonly UNZIP="$RUNFILES/google3/third_party/unzip/unzip" +readonly DOCLAVA="$RUNFILES/google3/third_party/java/doclava/current/doclava.jar" +readonly JSILVER="$RUNFILES/google3/third_party/java/jsilver/v1_0_0/jsilver.jar" + +# Reorganize directory of java files by their java packages. +# javadoc -sourcepath only works if source files are in paths matching +# their java package. +function organize_srcs { + local -r src_dir="$1"; shift || gbash::die "Missing argument: src_dir" + (( $# == 0 )) || gbash::die "Too many arguments" + + for f in $(find "$src_dir" -name '*.java'); do + pkg="$(sed -En 's/^package ([a-zA-Z0-9\.]+)\;/\1/p' "$f" | sed 's!\.!/!g')" + mkdir -p "$src_dir/$pkg" + if [[ $(dirname "$f") != $src_dir/$pkg ]]; then + mv "$f" "$src_dir/$pkg" + fi + done +} + +# Outputs the list of packages containing classes for a well-organized +# (post organize_srcs) directory of .java files. +function all_src_packages { + local -r src_dir="$1"; shift || gbash::die "Missing argument: src_dir" + (( $# == 0 )) || gbash::die "Too many arguments" + + ( cd "$src_dir" ; find . -name '*.java' -exec dirname \{\} \; | + sed -e 's!^\./!!' -e 's!/!.!g' | sort | uniq ) +} + +# Joins paramaters $2 onwards using $1 as separator. +# Usage: join ":" "${my_array[@]" +function join { + local delim=$1; shift + echo -n "$1"; shift + printf "%s" "${@/#/$delim}" +} + +function main { + local -r src_tmp="$(mktemp -d --suffix=_sources)" + for srcjar in "$@"; do + echo "extracting $srcjar" + "$UNZIP" -qo "$srcjar" -d "$src_tmp" + done + organize_srcs "$src_tmp" + + if [[ -z $FLAGS_packages ]] ; then + # No package list specified, document all packages. + packages=($(all_src_packages "$src_tmp")) + else + packages=($FLAGS_packages) + fi + + local extra_args=() + + if [[ -n $FLAGS_federation_project ]] ; then + [[ -n $FLAGS_federation_url ]] || gbash::die "federation_url not set" + [[ -n $FLAGS_federation_api_txt ]] || + gbash::die "federation_api_txt not set" + + extra_args+=( + "-federate" "$FLAGS_federation_project" "$FLAGS_federation_url" + "-federationapi" "$FLAGS_federation_project" "$FLAGS_federation_api_txt" + ) + fi + if [[ -n $FLAGS_devsite ]] ; then + extra_args+=("-devsite") + fi + + if [[ -n $FLAGS_yamlV2 ]] ; then + extra_args+=("-yamlV2") + fi + + local -r docs_tmp="$(mktemp -d --suffix=_sources)" + mkdir -p "$docs_tmp/$FLAGS_dirname" + "$JAVADOC" \ + -quiet \ + -encoding "UTF-8" \ + -XDignore.symbol.file \ + -classpath "$FLAGS_classpath" \ + -doclet "com.google.doclava.Doclava" \ + -docletpath "$DOCLAVA:$JSILVER" \ + -protected \ + -yaml "_book.yaml" \ + -hdf dac true \ + -dac_libraryroot "androidx/test" \ + -dac_dataname "SUPPORT_TEST_DATA" \ + -toroot "/" \ + -stubpackages "$(join ":" "${packages[@]}")" \ + -api "$FLAGS_api_output" \ + -d "$docs_tmp/$FLAGS_dirname" \ + -sourcepath "$src_tmp" \ + "${extra_args[@]}" \ + "${packages[@]}" + ( + root_dir="$(pwd)" + cd "$docs_tmp/$FLAGS_dirname" + # Rare zip options: + # -jt sets the timestamp of all entries to zero + # -X no extra file attributes + "$ZIP" -jt -X -q -r "$root_dir/$FLAGS_output" . + ) +} + +gbash::main "$@" From fab5613612fbf750e613bae7ae256cc9dd8986a6 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Wed, 8 Sep 2021 14:20:53 -0700 Subject: [PATCH 009/949] Javadoc cleanup PiperOrigin-RevId: 395557098 --- build_extensions/droiddoc.bzl | 120 -------------- build_extensions/droiddoc.sh | 150 ------------------ build_extensions/zipmerge.bzl | 20 +++ .../test/core/app/ApplicationProvider.java | 4 +- .../espresso/remote/InteractionRequest.java | 2 - .../espresso/remote/RemoteInteraction.java | 1 - .../java/androidx/test/espresso/BUILD.bazel | 2 +- .../androidx/test/espresso/api/current.txt | 32 +++- .../{ => idling}/CountingIdlingResource.java | 0 .../listener/InstrumentationRunListener.java | 4 +- .../test/runner/permission/ShellCommand.java | 2 +- .../test/runner/screenshot/Screenshot.java | 3 +- .../test/orchestrator/TestRunnable.java | 6 +- 13 files changed, 59 insertions(+), 287 deletions(-) delete mode 100644 build_extensions/droiddoc.bzl delete mode 100755 build_extensions/droiddoc.sh create mode 100644 build_extensions/zipmerge.bzl rename espresso/idling_resource/java/androidx/test/espresso/{ => idling}/CountingIdlingResource.java (100%) diff --git a/build_extensions/droiddoc.bzl b/build_extensions/droiddoc.bzl deleted file mode 100644 index 0f3d42382..000000000 --- a/build_extensions/droiddoc.bzl +++ /dev/null @@ -1,120 +0,0 @@ -"""Skylark rule for generation of docs and API TXT for an android_library.""" - -def _transitive_deps(java): - """Returns a list of the transitive java dependencies.""" - return java.transitive_deps.to_list() - -def _basename(filename): - return filename.split("/")[-1] - -def _dirname(filename): - return filename.rsplit("/", 1)[0] if "/" in filename else "." - -def _droiddoc_impl(ctx): - """Generates javadoc and API txt for android_library.""" - src_jars = [] - dep_jars = [] - - for src_jar in ctx.attr.src_jars: - src_jars.extend(src_jar.files.to_list()) - - for dep in ctx.attr.deps: - dep_jars.extend(_transitive_deps(dep.java)) - - dep_jars += ctx.files._android_jar - - src_jar_paths = [src_jar.path for src_jar in src_jars] - - extra_flags = [] - extra_inputs = [] - if ctx.attr.packages: - extra_flags.append("--packages=%s" % " ".join(ctx.attr.packages)) - - if ctx.attr.federation_project: - if not ctx.attr.federation_url: - fail("federation_url must be set when federation_project set") - if not ctx.attr.federation_api_txt: - fail("federation_api_txt must be set when federation_project set") - - extra_flags.append("--federation_project=%s" % ctx.attr.federation_project) - extra_flags.append("--federation_url=%s" % ctx.attr.federation_url) - extra_flags.append( - "--federation_api_txt=%s" % ctx.file.federation_api_txt.path, - ) - extra_inputs.append(ctx.file.federation_api_txt) - else: - if ctx.attr.federation_url: - fail("federation_project must be set when federation_url set") - if not ctx.attr.federation_api_txt: - fail("federation_project must be set when federation_api_txt set") - - if ctx.attr.devsite: - extra_flags.append("--devsite=true") - extra_flags.append("--yamlV2=true") - - ctx.actions.run( - inputs = src_jars + dep_jars + extra_inputs + [ctx.executable._droiddoc], - outputs = [ctx.outputs.docs, ctx.outputs.api], - arguments = [ - "--classpath=%s" % cmd_helper.join_paths(":", depset(dep_jars)), - "--output=%s" % ctx.outputs.docs.path, - "--api_output=%s" % ctx.outputs.api.path, - "--dirname=%s" % ctx.label.name, - ] + extra_flags + src_jar_paths, - executable = ctx.executable._droiddoc, - progress_message = "Generating javadoc: %s" % ctx.outputs.docs.short_path, - ) - -droiddoc = rule( - implementation = _droiddoc_impl, - attrs = { - # List of source jars to document. - "src_jars": attr.label_list( - mandatory = True, - allow_empty = False, - allow_files = [".jar"], - ), - # List of targets to add to classpath when generating javadoc - "deps": attr.label_list( - mandatory = True, - allow_empty = False, - allow_rules = ["android_library", "java_library"], - ), - # List of packages to document. If not specified then all packages - # which have classes in "srcs" will be included. - "packages": attr.string_list(), - # Name of project for documentation federation. - "federation_project": attr.string( - default = "Android", - ), - # URL for federated documentation. - "federation_url": attr.string( - default = "https://developer.android.com", - ), - # TXT file containing definition of API we are federated with. - "federation_api_txt": attr.label( - default = Label("//third_party/android/sdk:api/24.txt"), - allow_single_file = [".txt"], - ), - "devsite": attr.bool( - default = False, - ), - "yamlV2": attr.bool( - default = False, - ), - "_droiddoc": attr.label( - default = Label("//third_party/android/androidx_test/build_extensions:droiddoc"), - executable = True, - allow_files = True, - cfg = "host", - ), - "_android_jar": attr.label( - default = Label("//third_party/java/android/android_sdk_linux:android"), - allow_files = True, - ), - }, - outputs = { - "docs": "%{name}.zip", - "api": "%{name}_api.txt", - }, -) diff --git a/build_extensions/droiddoc.sh b/build_extensions/droiddoc.sh deleted file mode 100755 index 4d868bd4a..000000000 --- a/build_extensions/droiddoc.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/bash -# Copyright 2018 The Android Open Source Project. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Shell script to invoke javadoc, used by droiddoc.bzl. -# -# Usage: droiddoc.sh [arguments] source.jar ... - -#source ${BASH_SOURCE[0]}.runfiles/google3/util/gbash.sh || exit - -set -o errexit -set -o pipefail - -# When running from a skylark action a simple "source gbash.sh" will not work. -# However once we manage to source gbash we can safely rely on the $RUNFILES -# variable it sets for resolving all other dependencies. -source "${BASH_SOURCE[0]}.runfiles/google3/util/shell/gbash/gbash.sh" || exit 1 - -DEFINE_string classpath --required "" "Classpath to supply to javadoc command" -DEFINE_string output --required "" "Path to output zip file" -DEFINE_string api_output --required "" "Path to output API TXT" -DEFINE_string dirname --required "" \ - "Name of top level directory inside zip file" -DEFINE_string packages "" \ - "Space separated list of top level packages to restrict docs to" -DEFINE_string federation_project "" "Project to federate docs with" -DEFINE_string federation_url "" "URL of docs to federate with" -DEFINE_string federation_api_txt "" "Path to API TXT of federated docs" -DEFINE_string devsite "" "Generate docs for devsite" -DEFINE_string yamlV2 "" "Generate docs for devsite" - - -readonly JAVADOC="$RUNFILES/google3/third_party/java/jdk/jdk-64/bin/javadoc" -readonly ZIP="$RUNFILES/google3/third_party/zip/zip" -readonly UNZIP="$RUNFILES/google3/third_party/unzip/unzip" -readonly DOCLAVA="$RUNFILES/google3/third_party/java/doclava/current/doclava.jar" -readonly JSILVER="$RUNFILES/google3/third_party/java/jsilver/v1_0_0/jsilver.jar" - -# Reorganize directory of java files by their java packages. -# javadoc -sourcepath only works if source files are in paths matching -# their java package. -function organize_srcs { - local -r src_dir="$1"; shift || gbash::die "Missing argument: src_dir" - (( $# == 0 )) || gbash::die "Too many arguments" - - for f in $(find "$src_dir" -name '*.java'); do - pkg="$(sed -En 's/^package ([a-zA-Z0-9\.]+)\;/\1/p' "$f" | sed 's!\.!/!g')" - mkdir -p "$src_dir/$pkg" - if [[ $(dirname "$f") != $src_dir/$pkg ]]; then - mv "$f" "$src_dir/$pkg" - fi - done -} - -# Outputs the list of packages containing classes for a well-organized -# (post organize_srcs) directory of .java files. -function all_src_packages { - local -r src_dir="$1"; shift || gbash::die "Missing argument: src_dir" - (( $# == 0 )) || gbash::die "Too many arguments" - - ( cd "$src_dir" ; find . -name '*.java' -exec dirname \{\} \; | - sed -e 's!^\./!!' -e 's!/!.!g' | sort | uniq ) -} - -# Joins paramaters $2 onwards using $1 as separator. -# Usage: join ":" "${my_array[@]" -function join { - local delim=$1; shift - echo -n "$1"; shift - printf "%s" "${@/#/$delim}" -} - -function main { - local -r src_tmp="$(mktemp -d --suffix=_sources)" - for srcjar in "$@"; do - echo "extracting $srcjar" - "$UNZIP" -qo "$srcjar" -d "$src_tmp" - done - organize_srcs "$src_tmp" - - if [[ -z $FLAGS_packages ]] ; then - # No package list specified, document all packages. - packages=($(all_src_packages "$src_tmp")) - else - packages=($FLAGS_packages) - fi - - local extra_args=() - - if [[ -n $FLAGS_federation_project ]] ; then - [[ -n $FLAGS_federation_url ]] || gbash::die "federation_url not set" - [[ -n $FLAGS_federation_api_txt ]] || - gbash::die "federation_api_txt not set" - - extra_args+=( - "-federate" "$FLAGS_federation_project" "$FLAGS_federation_url" - "-federationapi" "$FLAGS_federation_project" "$FLAGS_federation_api_txt" - ) - fi - if [[ -n $FLAGS_devsite ]] ; then - extra_args+=("-devsite") - fi - - if [[ -n $FLAGS_yamlV2 ]] ; then - extra_args+=("-yamlV2") - fi - - local -r docs_tmp="$(mktemp -d --suffix=_sources)" - mkdir -p "$docs_tmp/$FLAGS_dirname" - "$JAVADOC" \ - -quiet \ - -encoding "UTF-8" \ - -XDignore.symbol.file \ - -classpath "$FLAGS_classpath" \ - -doclet "com.google.doclava.Doclava" \ - -docletpath "$DOCLAVA:$JSILVER" \ - -protected \ - -yaml "_book.yaml" \ - -hdf dac true \ - -dac_libraryroot "androidx/test" \ - -dac_dataname "SUPPORT_TEST_DATA" \ - -toroot "/" \ - -stubpackages "$(join ":" "${packages[@]}")" \ - -api "$FLAGS_api_output" \ - -d "$docs_tmp/$FLAGS_dirname" \ - -sourcepath "$src_tmp" \ - "${extra_args[@]}" \ - "${packages[@]}" - ( - root_dir="$(pwd)" - cd "$docs_tmp/$FLAGS_dirname" - # Rare zip options: - # -jt sets the timestamp of all entries to zero - # -X no extra file attributes - "$ZIP" -jt -X -q -r "$root_dir/$FLAGS_output" . - ) -} - -gbash::main "$@" diff --git a/build_extensions/zipmerge.bzl b/build_extensions/zipmerge.bzl new file mode 100644 index 000000000..12e8a5d0f --- /dev/null +++ b/build_extensions/zipmerge.bzl @@ -0,0 +1,20 @@ +"""Combines multiple zips into one zip.""" + +def zipmerge(name, srcs): + """Macro wrapper for zipmerge + + Args: + name: Name to be used for this rule. It produces name.zip + srcs: List of zips to be combined. + """ + + native.genrule( + name = name, + srcs = srcs, + outs = ["%s.zip" % name], + tools = ["//third_party/libzip:zipmerge"], + message = "Combining following zips: %s" % ",".join(srcs), + cmd = ( + "$(location //third_party/libzip:zipmerge) -s $@ %s" % (" ".join(srcs)) + ), + ) diff --git a/core/java/androidx/test/core/app/ApplicationProvider.java b/core/java/androidx/test/core/app/ApplicationProvider.java index eaa8f311e..400257cfd 100644 --- a/core/java/androidx/test/core/app/ApplicationProvider.java +++ b/core/java/androidx/test/core/app/ApplicationProvider.java @@ -31,9 +31,9 @@ public final class ApplicationProvider { private ApplicationProvider() {} /** - * Returns the application {@link Context} for the application under test. + * Returns the application {@link android.content.Context} for the application under test. * - * @see {@link Context#getApplicationContext()} + * @see {@link android.content.Context#getApplicationContext()} */ @SuppressWarnings("unchecked") public static T getApplicationContext() { diff --git a/espresso/core/java/androidx/test/espresso/remote/InteractionRequest.java b/espresso/core/java/androidx/test/espresso/remote/InteractionRequest.java index 23c39fdc8..bbee0e8ff 100644 --- a/espresso/core/java/androidx/test/espresso/remote/InteractionRequest.java +++ b/espresso/core/java/androidx/test/espresso/remote/InteractionRequest.java @@ -156,8 +156,6 @@ public ViewAssertion getViewAssertion() { /** * Creates an instance of {@link InteractionRequest} from a View matcher and action. - * - * @return remote request object */ public static class Builder { private final RemoteDescriptorRegistry remoteDescriptorRegistry; diff --git a/espresso/core/java/androidx/test/espresso/remote/RemoteInteraction.java b/espresso/core/java/androidx/test/espresso/remote/RemoteInteraction.java index d7f120f7a..0cfa19b4a 100644 --- a/espresso/core/java/androidx/test/espresso/remote/RemoteInteraction.java +++ b/espresso/core/java/androidx/test/espresso/remote/RemoteInteraction.java @@ -44,7 +44,6 @@ public interface RemoteInteraction { * @param rootMatcher the root matcher to use. * @param viewMatcher the view matcher to use. * @param iBinders a list of binders to pass along to the remote process instance - * @param viewAssert the assertion to check. * @return a {@link Callable} that will perform the check pending completion of the task. */ Callable createRemoteCheckCallable( diff --git a/espresso/idling_resource/java/androidx/test/espresso/BUILD.bazel b/espresso/idling_resource/java/androidx/test/espresso/BUILD.bazel index 6913e6573..ba1e7a250 100644 --- a/espresso/idling_resource/java/androidx/test/espresso/BUILD.bazel +++ b/espresso/idling_resource/java/androidx/test/espresso/BUILD.bazel @@ -16,7 +16,7 @@ licenses(["notice"]) # Apache License 2.0 IDLING_INTERFACE = [ "IdlingResource.java", "IdlingRegistry.java", - "CountingIdlingResource.java", + "idling/CountingIdlingResource.java", ] android_library( diff --git a/espresso/idling_resource/java/androidx/test/espresso/api/current.txt b/espresso/idling_resource/java/androidx/test/espresso/api/current.txt index 3a329e1f4..9a21728c9 100644 --- a/espresso/idling_resource/java/androidx/test/espresso/api/current.txt +++ b/espresso/idling_resource/java/androidx/test/espresso/api/current.txt @@ -1,15 +1,39 @@ +// Signature format: 3.0 +package androidx.test.espresso { + + public final class IdlingRegistry { + method public static androidx.test.espresso.IdlingRegistry! getInstance(); + method public java.util.Collection! getLoopers(); + method public java.util.Collection! getResources(); + method public boolean register(androidx.test.espresso.IdlingResource!...); + method public void registerLooperAsIdlingResource(android.os.Looper!); + method public boolean unregister(androidx.test.espresso.IdlingResource!...); + method public boolean unregisterLooperAsIdlingResource(android.os.Looper!); + } + + public interface IdlingResource { + method public String! getName(); + method public boolean isIdleNow(); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback!); + } + + public static interface IdlingResource.ResourceCallback { + method public void onTransitionToIdle(); + } + +} package androidx.test.espresso.idling { public final class CountingIdlingResource implements androidx.test.espresso.IdlingResource { - ctor public CountingIdlingResource(java.lang.String); - ctor public CountingIdlingResource(java.lang.String, boolean); + ctor public CountingIdlingResource(String!); + ctor public CountingIdlingResource(String!, boolean); method public void decrement(); method public void dumpStateToLogs(); - method public java.lang.String getName(); + method public String! getName(); method public void increment(); method public boolean isIdleNow(); - method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback!); } } diff --git a/espresso/idling_resource/java/androidx/test/espresso/CountingIdlingResource.java b/espresso/idling_resource/java/androidx/test/espresso/idling/CountingIdlingResource.java similarity index 100% rename from espresso/idling_resource/java/androidx/test/espresso/CountingIdlingResource.java rename to espresso/idling_resource/java/androidx/test/espresso/idling/CountingIdlingResource.java diff --git a/runner/android_junit_runner/java/androidx/test/internal/runner/listener/InstrumentationRunListener.java b/runner/android_junit_runner/java/androidx/test/internal/runner/listener/InstrumentationRunListener.java index f2354154e..b7ac27069 100644 --- a/runner/android_junit_runner/java/androidx/test/internal/runner/listener/InstrumentationRunListener.java +++ b/runner/android_junit_runner/java/androidx/test/internal/runner/listener/InstrumentationRunListener.java @@ -53,8 +53,8 @@ public void sendString(String msg) { /** * Optional callback subclasses can implement. Will be called when instrumentation run completes. * - * @param streamResult the {@link PrintStream} to instrumentation out. Will be displayed even when - * instrumentation not run in -r mode + * @param streamResult the {@link java.io.PrintStream} to instrumentation out. Will be displayed + * even when instrumentation not run in -r mode * @param resultBundle the instrumentation result bundle. Can be used to inject key-value pairs * into the instrumentation output when run in -r/raw mode * @param junitResults the test results diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java b/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java index 6e1ff739a..020a8b71f 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/ShellCommand.java @@ -55,5 +55,5 @@ static String shellEscape(String word) { return word; } - abstract void execute() throws Exception; + protected abstract void execute() throws Exception; } diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java index 87cf174c9..4528b6d82 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java @@ -210,7 +210,8 @@ static void setAndroidRuntimeVersion(int sdkInt) { } /** An Exception associated with failing to capture a screenshot. */ - static final class ScreenShotException extends RuntimeException { + @ExperimentalTestApi + public static final class ScreenShotException extends RuntimeException { ScreenShotException(Throwable cause) { super(cause); } diff --git a/runner/android_test_orchestrator/java/androidx/test/orchestrator/TestRunnable.java b/runner/android_test_orchestrator/java/androidx/test/orchestrator/TestRunnable.java index ce131b129..0d5d7ad9b 100644 --- a/runner/android_test_orchestrator/java/androidx/test/orchestrator/TestRunnable.java +++ b/runner/android_test_orchestrator/java/androidx/test/orchestrator/TestRunnable.java @@ -54,7 +54,7 @@ public class TestRunnable implements Runnable { * @param secret A string representing the speakeasy binder key * @param arguments contains arguments to be passed to the target instrumentation * @param outputStream the stream to write the results of the test process - * @param listener, a callback listener to know when the run has completed + * @param listener a callback listener to know when the run has completed */ public static TestRunnable legacyTestRunnable( Context context, @@ -72,7 +72,7 @@ public static TestRunnable legacyTestRunnable( * @param secret A string representing the speakeasy binder key * @param arguments contains arguments to be passed to the target instrumentation * @param outputStream the stream to write the results of the test process - * @param listener, a callback listener to know when the run has completed + * @param listener a callback listener to know when the run has completed * @param test contains a specific test#method to run. Will override whatever is specified in the * bundle. */ @@ -93,7 +93,7 @@ public static TestRunnable singleTestRunnable( * @param secret A string representing the speakeasy binder key * @param arguments contains arguments to be passed to the target instrumentation * @param outputStream the stream to write the results of the test process - * @param listener, a callback listener to know when the run has completed + * @param listener a callback listener to know when the run has completed */ public static TestRunnable testCollectionRunnable( Context context, From 351382b3a69d8339957913bb742fef5dc108dccc Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Wed, 8 Sep 2021 14:49:30 -0700 Subject: [PATCH 010/949] List busy resources when Espresso dynamic tasks fail to go idle. PiperOrigin-RevId: 395563144 --- .../espresso/base/IdlingResourceRegistry.java | 2 +- .../test/espresso/base/UiControllerImpl.java | 13 +++++++++- .../espresso/AppNotIdleExceptionTest.java | 26 ++++++++++++++++++- .../androidx/test/espresso/OnIdleTest.java | 15 +++++++++++ 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/espresso/core/java/androidx/test/espresso/base/IdlingResourceRegistry.java b/espresso/core/java/androidx/test/espresso/base/IdlingResourceRegistry.java index b43c6eaf1..320ae4b87 100644 --- a/espresso/core/java/androidx/test/espresso/base/IdlingResourceRegistry.java +++ b/espresso/core/java/androidx/test/espresso/base/IdlingResourceRegistry.java @@ -348,7 +348,7 @@ private void scheduleTimeoutMessages() { timeoutError, error.getIdleTimeoutUnit().toMillis(error.getIdleTimeout())); } - private List getBusyResources() { + List getBusyResources() { List busyResourceNames = Lists.newArrayList(); List racyResources = Lists.newArrayList(); diff --git a/espresso/core/java/androidx/test/espresso/base/UiControllerImpl.java b/espresso/core/java/androidx/test/espresso/base/UiControllerImpl.java index 35901006d..cef1026b1 100644 --- a/espresso/core/java/androidx/test/espresso/base/UiControllerImpl.java +++ b/espresso/core/java/androidx/test/espresso/base/UiControllerImpl.java @@ -38,6 +38,7 @@ import androidx.test.espresso.UiController; import androidx.test.espresso.base.IdlingResourceRegistry.IdleNotificationCallback; import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Joiner; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ThreadFactoryBuilder; @@ -536,7 +537,7 @@ private IdleNotifier loopUntil( List idleConditions = Lists.newArrayList(); for (IdleCondition condition : conditions) { if (!condition.isSignaled(conditionSet)) { - idleConditions.add(condition.name()); + String conditionName = condition.name(); switch (condition) { case ASYNC_TASKS_HAVE_IDLED: if (masterIdlePolicy.getDisableOnTimeout() @@ -562,12 +563,22 @@ private IdleNotifier loopUntil( dynamicIdleProvider = new NoopIdleNotificationCallbackIdleNotifierProvider(); dynamicIdle = dynamicIdleProvider.get(); } + + List busyResources = idlingResourceRegistry.getBusyResources(); + conditionName = + String.format( + Locale.ROOT, + "%s(busy resources=%s)", + conditionName, + Joiner.on(",").join(busyResources)); break; default: break; } + idleConditions.add(conditionName); } } + if (idleConditions.isEmpty()) { // Formatted to look consistent with other idling conditions. idleConditions.add( diff --git a/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java b/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java index 391243e1f..4f018067b 100644 --- a/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java +++ b/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java @@ -19,6 +19,7 @@ import static androidx.test.espresso.Espresso.onView; import static androidx.test.espresso.action.ViewActions.click; import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import android.os.Handler; @@ -31,6 +32,7 @@ import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; +import org.hamcrest.core.SubstringMatcher; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -78,9 +80,31 @@ public void run() { onView(withId(R.id.request_button)).perform(click()); fail("Espresso failed to throw AppNotIdleException"); } catch (AppNotIdleException expected) { - // Do Nothing. Test pass. + assertThat( + expected.getMessage(), + new StringPattern( + "Looped for \\d+ iterations over \\d+ SECONDS. " + + "The following Idle Conditions failed MAIN_LOOPER_HAS_IDLED" + + "\\(last message: [^\\)]+\\).")); } finally { continueBeingBusy.getAndSet(false); } } + + // Simulate the MatchesPattern available in Hamcrest 2. + private static class StringPattern extends SubstringMatcher { + public StringPattern(String substringRegexPattern) { + super(substringRegexPattern); + } + + @Override + protected boolean evalSubstringOf(String s) { + return s.matches(substring); + } + + @Override + protected String relationship() { + return "matching"; + } + } } diff --git a/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java b/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java index 976d93527..c491aa527 100644 --- a/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java +++ b/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java @@ -87,6 +87,11 @@ public Void call() { assertThat(countDownLatch.await(10, TimeUnit.SECONDS), is(false)); } catch (AppNotIdleException expected) { assertThat(expected, instanceOf(AppNotIdleException.class)); + assertThat( + expected.getMessage(), + is( + "Looped for 1 iterations over 5 SECONDS. The following Idle Conditions failed" + + " DYNAMIC_TASKS_HAVE_IDLED(busy resources=testResource).")); } finally { assertThat(Espresso.unregisterIdlingResources(resource), is(true)); } @@ -109,6 +114,11 @@ public Void call() { assertThat(countDownLatch.await(10, TimeUnit.SECONDS), is(false)); } catch (AppNotIdleException expected) { assertThat(expected, instanceOf(AppNotIdleException.class)); + assertThat( + expected.getMessage(), + is( + "Looped for 1 iterations over 5 SECONDS. The following Idle Conditions failed" + + " DYNAMIC_TASKS_HAVE_IDLED(busy resources=testResource).")); } finally { assertThat(IdlingRegistry.getInstance().unregister(resource), is(true)); } @@ -124,6 +134,11 @@ public void onIdle_neverIdleResourceThrowsAppNotIdleException_withIdlingRegistry fail("Expected AppNotIdleException to be thrown"); } catch (AppNotIdleException expected) { assertThat(expected, instanceOf(AppNotIdleException.class)); + assertThat( + expected.getMessage(), + is( + "Looped for 1 iterations over 5 SECONDS. The following Idle Conditions failed" + + " DYNAMIC_TASKS_HAVE_IDLED(busy resources=testResource).")); } finally { assertThat(IdlingRegistry.getInstance().unregister(resource), is(true)); } From 14a4b11e2d6862b14f40d479f21ec6edcb5f257e Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Thu, 9 Sep 2021 10:51:40 -0700 Subject: [PATCH 011/949] Initial implementation of new Synchronized Device State Change API PiperOrigin-RevId: 395739373 --- .../androidx/test/espresso/device/BUILD.bazel | 19 +++++++- .../espresso/device/DeviceInteraction.java | 26 +++++++++- .../test/espresso/device/EspressoDevice.java | 5 +- .../test/espresso/device/action/BUILD.bazel | 11 +++++ .../espresso/device/action/DeviceAction.kt | 27 +++++++++++ .../device/action/DeviceController.kt | 24 ++++++++++ .../device/action/DeviceControllerImpl.kt | 20 ++++++++ .../test/espresso/device/dagger/BUILD.bazel | 15 ++++++ .../device/dagger/DeviceControllerModule.kt | 37 +++++++++++++++ .../espresso/device/dagger/DeviceHolder.kt | 47 +++++++++++++++++++ .../device/dagger/DeviceLayerComponent.kt | 28 +++++++++++ 11 files changed, 255 insertions(+), 4 deletions(-) create mode 100644 espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel create mode 100644 espresso/core/java/androidx/test/espresso/device/action/DeviceAction.kt create mode 100644 espresso/core/java/androidx/test/espresso/device/action/DeviceController.kt create mode 100644 espresso/core/java/androidx/test/espresso/device/action/DeviceControllerImpl.kt create mode 100644 espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel create mode 100644 espresso/core/java/androidx/test/espresso/device/dagger/DeviceControllerModule.kt create mode 100644 espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt create mode 100644 espresso/core/java/androidx/test/espresso/device/dagger/DeviceLayerComponent.kt diff --git a/espresso/core/java/androidx/test/espresso/device/BUILD.bazel b/espresso/core/java/androidx/test/espresso/device/BUILD.bazel index b5dbf4a45..f44867b20 100644 --- a/espresso/core/java/androidx/test/espresso/device/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/device/BUILD.bazel @@ -1,13 +1,28 @@ -# Device Actions for espresso. +# EspressoDevice - the new Synchronized Device State Change API for Android. licenses(["notice"]) package(default_visibility = ["//visibility:private"]) +# Add only device packages here. +package_group( + name = "device_pkg", + packages = [ + "//espresso/core/java/androidx/test/espresso/device", + "//espresso/core/java/androidx/test/espresso/device/action", + "//espresso/core/java/androidx/test/espresso/device/dagger", + ], +) + android_library( name = "device", srcs = glob(["*.java"]), + plugins = ["//opensource/dagger:dagger_plugin"], # Add programmatically deps = [ - "//runner/monitor", + "//annotation/java/androidx/test/annotation", + "//espresso/core/java/androidx/test/espresso/device/action", + "//espresso/core/java/androidx/test/espresso/device/dagger", + "//opensource/dagger", + "@maven//:com_google_guava_guava", ], ) diff --git a/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java b/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java index d4f547e92..5ee949fd7 100644 --- a/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java +++ b/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java @@ -15,7 +15,12 @@ */ package androidx.test.espresso.device; +import static com.google.common.base.Preconditions.checkNotNull; + import androidx.test.annotation.ExperimentalTestApi; +import androidx.test.espresso.device.action.DeviceAction; +import androidx.test.espresso.device.action.DeviceController; +import javax.inject.Inject; /** * API surface for performing device-centric operations. @@ -23,4 +28,23 @@ *

This API is experimental and subject to change. */ @ExperimentalTestApi -public class DeviceInteraction {} +public class DeviceInteraction { + private final DeviceController deviceController; + + @Inject + DeviceInteraction(DeviceController deviceController) { + this.deviceController = deviceController; + } + + /** + * Performs the given action on the test device. + * + * @param action the DeviceAction to execute. + * @return this interaction for further perform/verification calls. + */ + public DeviceInteraction perform(DeviceAction action) { + checkNotNull(action); + action.perform(deviceController); + return this; + } +} diff --git a/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java b/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java index 5cef5bd5f..4e5c54283 100644 --- a/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java +++ b/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java @@ -16,9 +16,12 @@ package androidx.test.espresso.device; import androidx.test.annotation.ExperimentalTestApi; +import androidx.test.espresso.device.dagger.DeviceHolder; +import androidx.test.espresso.device.dagger.DeviceLayerComponent; /** Entry point for device centric operations */ public class EspressoDevice { + private static final DeviceLayerComponent BASE = DeviceHolder.deviceLayer(); private EspressoDevice() {} @@ -30,6 +33,6 @@ private EspressoDevice() {} */ @ExperimentalTestApi public static DeviceInteraction onDevice() { - return new DeviceInteraction(); + return new DeviceInteraction(BASE.deviceController()); } } diff --git a/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel b/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel new file mode 100644 index 000000000..975eab07f --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel @@ -0,0 +1,11 @@ +# Device Actions for espresso. + +licenses(["notice"]) + +package(default_visibility = ["//espresso/core/java/androidx/test/espresso/device:__subpackages__"]) + +kt_android_library( + name = "action", + srcs = glob(["*.kt"]), + deps = [], +) diff --git a/espresso/core/java/androidx/test/espresso/device/action/DeviceAction.kt b/espresso/core/java/androidx/test/espresso/device/action/DeviceAction.kt new file mode 100644 index 000000000..b9e5b2b29 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/action/DeviceAction.kt @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.espresso.device.action + +/** Responsible for performing an interaction on the given device. */ +interface DeviceAction { + /** + * Performs this action on the given device. + * + * @param deviceController the controller to use to interact with the device. + */ + fun perform(deviceController: DeviceController) +} diff --git a/espresso/core/java/androidx/test/espresso/device/action/DeviceController.kt b/espresso/core/java/androidx/test/espresso/device/action/DeviceController.kt new file mode 100644 index 000000000..9abb6df69 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/action/DeviceController.kt @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.espresso.device.action + +/** + * Provides base-level device operations that can be used to build user actions such as folding a + * device, changing screen orientation etc. It provides a advanced synchronization mechanism for + * test actions. + */ +interface DeviceController diff --git a/espresso/core/java/androidx/test/espresso/device/action/DeviceControllerImpl.kt b/espresso/core/java/androidx/test/espresso/device/action/DeviceControllerImpl.kt new file mode 100644 index 000000000..dbdedce55 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/action/DeviceControllerImpl.kt @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.espresso.device.action + +/** Implementation of {@link DeviceController}. */ +class DeviceControllerImpl() : DeviceController diff --git a/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel b/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel new file mode 100644 index 000000000..505048873 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel @@ -0,0 +1,15 @@ +# Dagger components for device. + +licenses(["notice"]) + +package(default_visibility = ["//espresso/core/java/androidx/test/espresso/device:__subpackages__"]) + +kt_android_library( + name = "dagger", + srcs = glob(["*.kt"]), + plugins = ["//opensource/dagger:dagger_plugin"], # Add programmatically + deps = [ + "//espresso/core/java/androidx/test/espresso/device/action", + "//opensource/dagger", + ], +) diff --git a/espresso/core/java/androidx/test/espresso/device/dagger/DeviceControllerModule.kt b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceControllerModule.kt new file mode 100644 index 000000000..f4e4d478a --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceControllerModule.kt @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.espresso.device.dagger + +import androidx.test.espresso.device.action.DeviceController +import androidx.test.espresso.device.action.DeviceControllerImpl +import dagger.Module +import dagger.Provides +import javax.inject.Singleton + +/** + * Dagger module for DeviceController. + * + * @hide + */ +@Module +class DeviceControllerModule { + @Provides + @Singleton + fun provideDeviceController(): DeviceController { + return DeviceControllerImpl() + } +} diff --git a/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt new file mode 100644 index 000000000..11977f135 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.espresso.device.dagger + +import java.util.concurrent.atomic.AtomicReference + +/** Holds Espresso's device graph. */ +class DeviceHolder { + companion object { + val instance = AtomicReference(null) + + @JvmStatic + fun deviceLayer(): DeviceLayerComponent { + var instanceRef: DeviceHolder = instance.get() + if (null == instanceRef) { + instanceRef = DeviceHolder(DaggerDeviceLayerComponent.create()) + if (instance.compareAndSet(null, instanceRef)) { + return instanceRef.component + } else { + return instance.get().component + } + } else { + return instanceRef.component + } + } + } + + private val component: DeviceLayerComponent + + private constructor(component: DeviceLayerComponent) { + this.component = component + } +} diff --git a/espresso/core/java/androidx/test/espresso/device/dagger/DeviceLayerComponent.kt b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceLayerComponent.kt new file mode 100644 index 000000000..352ab94c6 --- /dev/null +++ b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceLayerComponent.kt @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.espresso.device.dagger + +import androidx.test.espresso.device.action.DeviceController +import dagger.Component +import javax.inject.Singleton + +/** Dagger component for device classes. */ +@Singleton +@Component(modules = [DeviceControllerModule::class]) +interface DeviceLayerComponent { + fun deviceController(): DeviceController +} From 2efe511d16704f3ff4d53d1af90bdcdfda01bf8e Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Thu, 9 Sep 2021 13:36:26 -0700 Subject: [PATCH 012/949] Convert EspressoDevice and DeviceInteraction to Kotlin PiperOrigin-RevId: 395776122 --- .../androidx/test/espresso/device/BUILD.bazel | 7 ++-- ...eInteraction.java => DeviceInteraction.kt} | 28 ++++++--------- ...{EspressoDevice.java => EspressoDevice.kt} | 34 +++++++++---------- 3 files changed, 31 insertions(+), 38 deletions(-) rename espresso/core/java/androidx/test/espresso/device/{DeviceInteraction.java => DeviceInteraction.kt} (59%) rename espresso/core/java/androidx/test/espresso/device/{EspressoDevice.java => EspressoDevice.kt} (53%) diff --git a/espresso/core/java/androidx/test/espresso/device/BUILD.bazel b/espresso/core/java/androidx/test/espresso/device/BUILD.bazel index f44867b20..8d1d2f4ef 100644 --- a/espresso/core/java/androidx/test/espresso/device/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/device/BUILD.bazel @@ -1,5 +1,7 @@ # EspressoDevice - the new Synchronized Device State Change API for Android. +load("//tools/build_defs/kotlin:rules.bzl", "kt_android_library") + licenses(["notice"]) package(default_visibility = ["//visibility:private"]) @@ -14,15 +16,14 @@ package_group( ], ) -android_library( +kt_android_library( name = "device", - srcs = glob(["*.java"]), + srcs = glob(["*.kt"]), plugins = ["//opensource/dagger:dagger_plugin"], # Add programmatically deps = [ "//annotation/java/androidx/test/annotation", "//espresso/core/java/androidx/test/espresso/device/action", "//espresso/core/java/androidx/test/espresso/device/dagger", "//opensource/dagger", - "@maven//:com_google_guava_guava", ], ) diff --git a/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java b/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.kt similarity index 59% rename from espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java rename to espresso/core/java/androidx/test/espresso/device/DeviceInteraction.kt index 5ee949fd7..67270bd0c 100644 --- a/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.java +++ b/espresso/core/java/androidx/test/espresso/device/DeviceInteraction.kt @@ -13,14 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package androidx.test.espresso.device; +package androidx.test.espresso.device -import static com.google.common.base.Preconditions.checkNotNull; - -import androidx.test.annotation.ExperimentalTestApi; -import androidx.test.espresso.device.action.DeviceAction; -import androidx.test.espresso.device.action.DeviceController; -import javax.inject.Inject; +import androidx.test.annotation.ExperimentalTestApi +import androidx.test.espresso.device.action.DeviceAction +import androidx.test.espresso.device.action.DeviceController +import javax.inject.Inject /** * API surface for performing device-centric operations. @@ -28,13 +26,7 @@ *

This API is experimental and subject to change. */ @ExperimentalTestApi -public class DeviceInteraction { - private final DeviceController deviceController; - - @Inject - DeviceInteraction(DeviceController deviceController) { - this.deviceController = deviceController; - } +class DeviceInteraction @Inject constructor(private val deviceController: DeviceController) { /** * Performs the given action on the test device. @@ -42,9 +34,9 @@ public class DeviceInteraction { * @param action the DeviceAction to execute. * @return this interaction for further perform/verification calls. */ - public DeviceInteraction perform(DeviceAction action) { - checkNotNull(action); - action.perform(deviceController); - return this; + fun perform(action: DeviceAction): DeviceInteraction { + requireNotNull(action) + action.perform(deviceController) + return this } } diff --git a/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java b/espresso/core/java/androidx/test/espresso/device/EspressoDevice.kt similarity index 53% rename from espresso/core/java/androidx/test/espresso/device/EspressoDevice.java rename to espresso/core/java/androidx/test/espresso/device/EspressoDevice.kt index 4e5c54283..3c77a2013 100644 --- a/espresso/core/java/androidx/test/espresso/device/EspressoDevice.java +++ b/espresso/core/java/androidx/test/espresso/device/EspressoDevice.kt @@ -13,26 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package androidx.test.espresso.device; +package androidx.test.espresso.device -import androidx.test.annotation.ExperimentalTestApi; -import androidx.test.espresso.device.dagger.DeviceHolder; -import androidx.test.espresso.device.dagger.DeviceLayerComponent; +import androidx.test.annotation.ExperimentalTestApi +import androidx.test.espresso.device.dagger.DeviceHolder +import androidx.test.espresso.device.dagger.DeviceLayerComponent /** Entry point for device centric operations */ -public class EspressoDevice { - private static final DeviceLayerComponent BASE = DeviceHolder.deviceLayer(); +class EspressoDevice private constructor() { + companion object { + private val BASE: DeviceLayerComponent = DeviceHolder.deviceLayer() - private EspressoDevice() {} - - /** - * Starts a {@link DeviceInteraction} fluent API call. This method is used to invoke operations - * that are device-centric in scope. - * - *

This API is experimental and subject to change or removal. - */ - @ExperimentalTestApi - public static DeviceInteraction onDevice() { - return new DeviceInteraction(BASE.deviceController()); + /** + * Starts a {@link DeviceInteraction} fluent API call. This method is used to invoke operations + * that are device-centric in scope. + * + *

This API is experimental and subject to change or removal. + */ + @ExperimentalTestApi + fun onDevice(): DeviceInteraction { + return DeviceInteraction(BASE.deviceController()) + } } } From 1d91a296c5d2e409e7b1121f24d7c64af7daa4a1 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Thu, 9 Sep 2021 13:37:44 -0700 Subject: [PATCH 013/949] Load kt_android_library in bazel files PiperOrigin-RevId: 395776436 --- .../core/java/androidx/test/espresso/device/action/BUILD.bazel | 2 ++ .../core/java/androidx/test/espresso/device/dagger/BUILD.bazel | 2 ++ 2 files changed, 4 insertions(+) diff --git a/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel b/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel index 975eab07f..0750922b6 100644 --- a/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/device/action/BUILD.bazel @@ -1,5 +1,7 @@ # Device Actions for espresso. +load("//tools/build_defs/kotlin:rules.bzl", "kt_android_library") + licenses(["notice"]) package(default_visibility = ["//espresso/core/java/androidx/test/espresso/device:__subpackages__"]) diff --git a/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel b/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel index 505048873..46180b044 100644 --- a/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/device/dagger/BUILD.bazel @@ -1,5 +1,7 @@ # Dagger components for device. +load("//tools/build_defs/kotlin:rules.bzl", "kt_android_library") + licenses(["notice"]) package(default_visibility = ["//espresso/core/java/androidx/test/espresso/device:__subpackages__"]) From 4cbba05b477aa0af6c61d616f18f28899d4e9737 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Fri, 10 Sep 2021 15:20:30 -0700 Subject: [PATCH 014/949] ...Internal refactor... PiperOrigin-RevId: 396019056 --- .../test/internal/runner/InstrumentationConnection.java | 2 +- .../androidx/test/internal/runner/intent/IntentMonitorImpl.java | 2 +- .../java/androidx/test/multiprocess/app/WebViewActivity.java | 2 +- .../java/androidx/test/ui/app/RuntimePermissionsActivity.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java b/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java index 91d7192ba..3434f2a0d 100644 --- a/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java +++ b/runner/monitor/java/androidx/test/internal/runner/InstrumentationConnection.java @@ -35,8 +35,8 @@ import android.os.Messenger; import android.os.Parcelable; import android.os.RemoteException; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.util.ParcelableIBinder; diff --git a/runner/monitor/java/androidx/test/internal/runner/intent/IntentMonitorImpl.java b/runner/monitor/java/androidx/test/internal/runner/intent/IntentMonitorImpl.java index 6311ceb3d..a7555962c 100644 --- a/runner/monitor/java/androidx/test/internal/runner/intent/IntentMonitorImpl.java +++ b/runner/monitor/java/androidx/test/internal/runner/intent/IntentMonitorImpl.java @@ -18,8 +18,8 @@ import android.app.Activity; import android.content.Intent; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; import androidx.test.runner.intent.IntentCallback; import androidx.test.runner.intent.IntentMonitor; import java.lang.ref.WeakReference; diff --git a/testapps/multiprocess_testapp/java/androidx/test/multiprocess/app/WebViewActivity.java b/testapps/multiprocess_testapp/java/androidx/test/multiprocess/app/WebViewActivity.java index 5f21d8b96..4ef7a35a3 100644 --- a/testapps/multiprocess_testapp/java/androidx/test/multiprocess/app/WebViewActivity.java +++ b/testapps/multiprocess_testapp/java/androidx/test/multiprocess/app/WebViewActivity.java @@ -19,10 +19,10 @@ import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.webkit.WebView; import android.webkit.WebViewClient; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; /** diff --git a/testapps/ui_testapp/java/androidx/test/ui/app/RuntimePermissionsActivity.java b/testapps/ui_testapp/java/androidx/test/ui/app/RuntimePermissionsActivity.java index ca9d349b4..84f3acb04 100644 --- a/testapps/ui_testapp/java/androidx/test/ui/app/RuntimePermissionsActivity.java +++ b/testapps/ui_testapp/java/androidx/test/ui/app/RuntimePermissionsActivity.java @@ -23,12 +23,12 @@ import android.content.pm.PackageManager; import android.graphics.Color; import android.os.Bundle; -import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.telephony.TelephonyManager; import android.view.View; import android.widget.TextView; +import androidx.annotation.NonNull; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; From 1c6438a1a509a6ce4786234dd8b12aa2e3fe187f Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Fri, 10 Sep 2021 15:20:31 -0700 Subject: [PATCH 015/949] ...Internal Refactor... PiperOrigin-RevId: 396019062 --- .../java/androidx/test/runner/screenshot/Screenshot.java | 2 +- .../java/androidx/test/rule/provider/DelegatingContext.java | 2 +- .../java/androidx/test/rule/provider/ProviderTestRule.java | 2 +- .../androidx/test/ui/app/provider/FlightsContentProvider.java | 2 +- .../test/ui/app/provider/SimpleFileContentProvider.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java b/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java index 4528b6d82..465afc6cf 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java +++ b/runner/android_junit_runner/java/androidx/test/runner/screenshot/Screenshot.java @@ -22,8 +22,8 @@ import android.graphics.Bitmap; import android.os.Build; import android.os.Looper; -import androidx.annotation.NonNull; import android.view.View; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.InstrumentationRegistry; import androidx.test.annotation.ExperimentalTestApi; diff --git a/runner/rules/java/androidx/test/rule/provider/DelegatingContext.java b/runner/rules/java/androidx/test/rule/provider/DelegatingContext.java index 1b34c3a03..43f1cf8ed 100644 --- a/runner/rules/java/androidx/test/rule/provider/DelegatingContext.java +++ b/runner/rules/java/androidx/test/rule/provider/DelegatingContext.java @@ -45,11 +45,11 @@ import android.os.Handler; import android.os.Looper; import android.os.UserHandle; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; import android.view.Display; +import androidx.annotation.NonNull; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; diff --git a/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java b/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java index a3d78944e..da57eb2a3 100644 --- a/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java +++ b/runner/rules/java/androidx/test/rule/provider/ProviderTestRule.java @@ -27,10 +27,10 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.os.Build; -import androidx.annotation.NonNull; import android.test.mock.MockContentResolver; import android.text.TextUtils; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.ExperimentalTestApi; import androidx.test.platform.app.InstrumentationRegistry; diff --git a/testapps/ui_testapp/java/androidx/test/ui/app/provider/FlightsContentProvider.java b/testapps/ui_testapp/java/androidx/test/ui/app/provider/FlightsContentProvider.java index 9b3730f6d..26a38fadd 100644 --- a/testapps/ui_testapp/java/androidx/test/ui/app/provider/FlightsContentProvider.java +++ b/testapps/ui_testapp/java/androidx/test/ui/app/provider/FlightsContentProvider.java @@ -30,10 +30,10 @@ import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteQueryBuilder; import android.net.Uri; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Log; +import androidx.annotation.NonNull; import androidx.test.ui.app.provider.FlightsDatabaseContract.FlightsColumns; /** diff --git a/testapps/ui_testapp/java/androidx/test/ui/app/provider/SimpleFileContentProvider.java b/testapps/ui_testapp/java/androidx/test/ui/app/provider/SimpleFileContentProvider.java index dc44db392..bb57c53b9 100644 --- a/testapps/ui_testapp/java/androidx/test/ui/app/provider/SimpleFileContentProvider.java +++ b/testapps/ui_testapp/java/androidx/test/ui/app/provider/SimpleFileContentProvider.java @@ -27,9 +27,9 @@ import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.ParcelFileDescriptor; -import androidx.annotation.NonNull; import android.util.Log; import android.webkit.MimeTypeMap; +import androidx.annotation.NonNull; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; From 2e51bb595cb1d5902f8cc010dc5a38027a610460 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Fri, 10 Sep 2021 15:20:32 -0700 Subject: [PATCH 016/949] ...Internal refactor... PiperOrigin-RevId: 396019066 --- .../events/java/androidx/test/services/events/ErrorInfo.java | 2 +- .../events/java/androidx/test/services/events/FailureInfo.java | 2 +- .../java/androidx/test/services/events/ParcelableConverter.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/events/java/androidx/test/services/events/ErrorInfo.java b/services/events/java/androidx/test/services/events/ErrorInfo.java index fad450944..89fbc5251 100644 --- a/services/events/java/androidx/test/services/events/ErrorInfo.java +++ b/services/events/java/androidx/test/services/events/ErrorInfo.java @@ -20,8 +20,8 @@ import android.os.Parcel; import android.os.Parcelable; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.NonNull; /** * Denotes an android test error. Has details of the error including stack trace, type, and message. diff --git a/services/events/java/androidx/test/services/events/FailureInfo.java b/services/events/java/androidx/test/services/events/FailureInfo.java index 8d60ba3f4..7ccd2bb00 100644 --- a/services/events/java/androidx/test/services/events/FailureInfo.java +++ b/services/events/java/androidx/test/services/events/FailureInfo.java @@ -20,8 +20,8 @@ import android.os.Parcel; import android.os.Parcelable; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.NonNull; /** * Denotes an android test failure, has details of the failure including stack trace / type and diff --git a/services/events/java/androidx/test/services/events/ParcelableConverter.java b/services/events/java/androidx/test/services/events/ParcelableConverter.java index 1d47620de..f55a47214 100644 --- a/services/events/java/androidx/test/services/events/ParcelableConverter.java +++ b/services/events/java/androidx/test/services/events/ParcelableConverter.java @@ -18,9 +18,9 @@ import static java.util.Collections.emptyList; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.util.Log; +import androidx.annotation.NonNull; import androidx.test.services.events.internal.StackTrimmer; import java.lang.annotation.Annotation; import java.lang.reflect.Array; From 0b4f16c6f11c056a13e85e11cf849af26beca0c3 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Fri, 10 Sep 2021 15:29:02 -0700 Subject: [PATCH 017/949] ...Internal refactor... PiperOrigin-RevId: 396020634 --- .../test/runner/permission/GrantPermissionCallable.java | 2 +- .../androidx/test/runner/permission/PermissionRequester.java | 2 +- .../test/runner/permission/RequestPermissionCallable.java | 2 +- runner/rules/java/androidx/test/rule/ActivityTestRule.java | 2 +- runner/rules/java/androidx/test/rule/PortForwardingRule.java | 2 +- runner/rules/java/androidx/test/rule/ServiceTestRule.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java b/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java index fef151185..01cdccba7 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/GrantPermissionCallable.java @@ -17,8 +17,8 @@ package androidx.test.runner.permission; import android.content.Context; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; import androidx.test.annotation.ExperimentalTestApi; /** Grants a permission at runtime using a @{link ShellCommand} */ diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java b/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java index 3c59d822c..554237dab 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/PermissionRequester.java @@ -24,9 +24,9 @@ import android.annotation.TargetApi; import android.content.Context; import android.os.Build; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.platform.content.PermissionGranter; diff --git a/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java b/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java index a79f3c566..9028de982 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java +++ b/runner/android_junit_runner/java/androidx/test/runner/permission/RequestPermissionCallable.java @@ -21,8 +21,8 @@ import android.content.Context; import android.content.pm.PackageManager; -import androidx.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.ExperimentalTestApi; import androidx.test.runner.permission.RequestPermissionCallable.Result; diff --git a/runner/rules/java/androidx/test/rule/ActivityTestRule.java b/runner/rules/java/androidx/test/rule/ActivityTestRule.java index 53eb54313..44c3cf12f 100644 --- a/runner/rules/java/androidx/test/rule/ActivityTestRule.java +++ b/runner/rules/java/androidx/test/rule/ActivityTestRule.java @@ -25,9 +25,9 @@ import android.content.Intent; import android.os.Bundle; import android.os.Looper; -import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.UiThreadTest; import androidx.test.internal.runner.junit4.statement.UiThreadStatement; diff --git a/runner/rules/java/androidx/test/rule/PortForwardingRule.java b/runner/rules/java/androidx/test/rule/PortForwardingRule.java index 5a3b9178f..4051ff1df 100644 --- a/runner/rules/java/androidx/test/rule/PortForwardingRule.java +++ b/runner/rules/java/androidx/test/rule/PortForwardingRule.java @@ -19,8 +19,8 @@ import static androidx.test.internal.util.Checks.checkArgument; import static androidx.test.internal.util.Checks.checkNotNull; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.ExperimentalTestApi; import java.util.Properties; diff --git a/runner/rules/java/androidx/test/rule/ServiceTestRule.java b/runner/rules/java/androidx/test/rule/ServiceTestRule.java index ea84dadcb..b749aa2db 100644 --- a/runner/rules/java/androidx/test/rule/ServiceTestRule.java +++ b/runner/rules/java/androidx/test/rule/ServiceTestRule.java @@ -21,8 +21,8 @@ import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; -import androidx.annotation.NonNull; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; import androidx.test.annotation.ExperimentalTestApi; import androidx.test.internal.util.Checks; From 400bc95eafc2452dcd6da1e7b00a4885147af092 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Tue, 14 Sep 2021 10:15:02 -0700 Subject: [PATCH 018/949] Initial iteration of new experimental androidx.test.core screenshot APIs. This CL adds the following kotlin extensions: - androidx.test.core.view - View.captureToBitmap - Window.captureRegionToBitmap Known issues that will be addressed in future CLs: - Window.captureRegionToImage ignores boundsInWindow for APIs < 26 - Use kotlin coroutines instead of androidx.concurrent.futures in implementation And likely define idomatic coroutine APIs - Add bazel support PiperOrigin-RevId: 396624281 --- build_extensions/axt_versions.bzl | 1 + core/java/androidx/test/core/api/current.txt | 6 + .../test/core/app/ActivityScenario.java | 1 + .../app/InstrumentationActivityInvoker.java | 9 +- .../test/core/view/HandlerExecutor.kt | 31 +++ .../androidx/test/core/view/ViewCapture.kt | 186 ++++++++++++++++++ .../androidx/test/core/view/WindowCapture.kt | 102 ++++++++++ 7 files changed, 330 insertions(+), 6 deletions(-) create mode 100644 core/java/androidx/test/core/view/HandlerExecutor.kt create mode 100644 core/java/androidx/test/core/view/ViewCapture.kt create mode 100644 core/java/androidx/test/core/view/WindowCapture.kt diff --git a/build_extensions/axt_versions.bzl b/build_extensions/axt_versions.bzl index a41a8bf00..add34656d 100644 --- a/build_extensions/axt_versions.bzl +++ b/build_extensions/axt_versions.bzl @@ -23,6 +23,7 @@ ANDROIDX_VERSION_PATH = "1.0.0" GOOGLE_MATERIAL_VERSION = "1.0.0" ANDROIDX_LIFECYCLE_VERSION = "2.0.0" ANDROIDX_MULTIDEX_VERSION = "2.0.0" +ANDROIDX_CONCURRENT_VERSION = "1.1.0" KOTLIN_VERSION = "1.4.30" # accessibilitytestframework diff --git a/core/java/androidx/test/core/api/current.txt b/core/java/androidx/test/core/api/current.txt index 1b60de3da..8ae24cdb0 100644 --- a/core/java/androidx/test/core/api/current.txt +++ b/core/java/androidx/test/core/api/current.txt @@ -89,5 +89,11 @@ package androidx.test.core.view { method public androidx.test.core.view.PointerPropertiesBuilder! setToolType(int); } + public final class ViewCapture { + } + + public final class WindowCapture { + } + } diff --git a/core/java/androidx/test/core/app/ActivityScenario.java b/core/java/androidx/test/core/app/ActivityScenario.java index 31d59bf36..f5383379e 100644 --- a/core/java/androidx/test/core/app/ActivityScenario.java +++ b/core/java/androidx/test/core/app/ActivityScenario.java @@ -109,6 +109,7 @@ * } * } */ +@SuppressWarnings("NewApi") // suppress AutoCloseable usage error public final class ActivityScenario implements AutoCloseable, Closeable { private static final String TAG = ActivityScenario.class.getSimpleName(); diff --git a/core/java/androidx/test/core/app/InstrumentationActivityInvoker.java b/core/java/androidx/test/core/app/InstrumentationActivityInvoker.java index 896666ef9..76996ef2b 100644 --- a/core/java/androidx/test/core/app/InstrumentationActivityInvoker.java +++ b/core/java/androidx/test/core/app/InstrumentationActivityInvoker.java @@ -114,9 +114,6 @@ class InstrumentationActivityInvoker implements ActivityInvoker { private static final String FINISH_EMPTY_ACTIVITIES = "androidx.test.core.app.InstrumentationActivityInvoker.FINISH_EMPTY_ACTIVITIES"; - // TODO(b/176898246): Update to PendingIntent.FLAG_MUTABLE once available - private static final int FLAG_MUTABLE = 1 << 25; - /** * BootstrapActivity starts a test target activity specified by the extras bundle with key {@link * #TARGET_ACTIVITY_INTENT_KEY} in the intent that starts this bootstrap activity. The target @@ -421,7 +418,7 @@ public void startActivity(Intent intent, @Nullable Bundle activityOptions) { getApplicationContext(), /*requestCode=*/ 0, intent, - /*flags=*/ PendingIntent.FLAG_UPDATE_CURRENT | FLAG_MUTABLE)) + /*flags=*/ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE)) .putExtra(TARGET_ACTIVITY_OPTIONS_BUNDLE_KEY, activityOptions); if (Build.VERSION.SDK_INT < 16) { @@ -481,7 +478,7 @@ public void onReceive(Context context, Intent intent) { try { latch.await(ActivityLifecycleTimeout.getMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { - throw new AssertionError("Failed to pause activity", e); + throw new RuntimeException("Failed to pause activity", e); } finally { getApplicationContext().unregisterReceiver(receiver); } @@ -514,7 +511,7 @@ public void onReceive(Context context, Intent intent) { try { latch.await(ActivityLifecycleTimeout.getMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { - throw new AssertionError("Failed to stop activity", e); + throw new RuntimeException("Failed to stop activity", e); } finally { getApplicationContext().unregisterReceiver(receiver); } diff --git a/core/java/androidx/test/core/view/HandlerExecutor.kt b/core/java/androidx/test/core/view/HandlerExecutor.kt new file mode 100644 index 000000000..d952c9b9d --- /dev/null +++ b/core/java/androidx/test/core/view/HandlerExecutor.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.core.view + +import android.os.Handler +import java.util.concurrent.Executor + +/** A likely temporary utility class that redirects Executor calls to a Handler. */ +internal class HandlerExecutor(val handler: Handler) : Executor { + + override fun execute(command: Runnable) { + if (Thread.currentThread().equals(handler.looper.thread)) { + command.run() + } else { + handler.post(command) + } + } +} diff --git a/core/java/androidx/test/core/view/ViewCapture.kt b/core/java/androidx/test/core/view/ViewCapture.kt new file mode 100644 index 000000000..717bb4a6b --- /dev/null +++ b/core/java/androidx/test/core/view/ViewCapture.kt @@ -0,0 +1,186 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@file:JvmName("ViewCapture") + +package androidx.test.core.view + +import android.app.Activity +import android.content.Context +import android.content.ContextWrapper +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Rect +import android.os.Build +import android.os.Handler +import android.os.Looper +import android.util.Log +import android.view.PixelCopy +import android.view.SurfaceView +import android.view.View +import android.view.ViewTreeObserver +import android.view.Window +import androidx.annotation.RequiresApi +import androidx.annotation.RestrictTo +import androidx.concurrent.futures.ResolvableFuture +import androidx.test.annotation.ExperimentalTestApi +import androidx.test.internal.util.Checks +import androidx.test.platform.graphics.HardwareRendererCompat +import com.google.common.util.concurrent.ListenableFuture + +/** + * Asynchronously captures an image of the underlying view into a [Bitmap]. + * + * For devices below [Build.VERSION_CODES#O] (or if the view's window cannot be determined), the + * image is obtained using [View#draw]. Otherwise, [PixelCopy] is used. + * + * This method will also enable [HardwareRendererCompat#setDrawingEnabled(boolean)] if required. + * + * This API is primarily intended for use in lower layer libraries or frameworks. For test authors, + * its recommended to use espresso or compose's captureToImage. + * + * This API is currently experimental and subject to change or removal. + */ +@ExperimentalTestApi +@RequiresApi(Build.VERSION_CODES.JELLY_BEAN) +fun View.captureToBitmap(): ListenableFuture { + val bitmapFuture: ResolvableFuture = ResolvableFuture.create() + val drawingWasEnabled = HardwareRendererCompat.enableDrawingIfNecessary() + val mainExecutor = HandlerExecutor(Handler(Looper.getMainLooper())) + + // disable drawing again if necessary once work is complete + if (!drawingWasEnabled) { + bitmapFuture.addListener({ HardwareRendererCompat.setDrawingEnabled(false) }, mainExecutor) + } + + mainExecutor.execute { forceRedraw { generateBitmap(bitmapFuture) } } + + return bitmapFuture +} + +/** + * Trigger a redraw of the given view. + * + * Should only be called on UI thread. + * + * @param view the view to trigger a redraw of + * @param onCompleteCallback the runnable to execute once the draw is complete. Will be called on + * main thread + */ +// NoClassDefFoundError occurs on API 15 +@RequiresApi(Build.VERSION_CODES.JELLY_BEAN) +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) +@ExperimentalTestApi +fun View.forceRedraw(onCompleteCallback: Runnable) { + Checks.checkMainThread() + if (Build.VERSION.SDK_INT >= 29 && isHardwareAccelerated) { + viewTreeObserver.registerFrameCommitCallback() { + // frame commit callbacks occur on main thread, so no need to post + onCompleteCallback.run() + } + } else { + viewTreeObserver.addOnDrawListener( + object : ViewTreeObserver.OnDrawListener { + var handled = false + override fun onDraw() { + if (!handled) { + handled = true + Handler(Looper.getMainLooper()).post { + onCompleteCallback.run() + viewTreeObserver.removeOnDrawListener(this) + } + } + } + } + ) + } + invalidate() +} + +private fun View.generateBitmap(bitmapFuture: ResolvableFuture) { + if (bitmapFuture.isCancelled) { + return + } + val destBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) + when { + Build.VERSION.SDK_INT < 26 -> generateBitmapFromDraw(destBitmap, bitmapFuture) + this is SurfaceView -> generateBitmapFromSurfaceViewPixelCopy(destBitmap, bitmapFuture) + else -> { + val window = getActivity()?.window + if (window != null) { + generateBitmapFromPixelCopy(window, destBitmap, bitmapFuture) + } else { + Log.i( + "View.captureToImage", + "Could not find window for view. Falling back to View#draw instead of PixelCopy" + ) + generateBitmapFromDraw(destBitmap, bitmapFuture) + } + } + } +} + +@SuppressWarnings("NewApi") +private fun SurfaceView.generateBitmapFromSurfaceViewPixelCopy( + destBitmap: Bitmap, + bitmapFuture: ResolvableFuture +) { + val onCopyFinished = + PixelCopy.OnPixelCopyFinishedListener { result -> + if (result == PixelCopy.SUCCESS) { + bitmapFuture.set(destBitmap) + } else { + bitmapFuture.setException(RuntimeException(String.format("PixelCopy failed: %d", result))) + } + } + PixelCopy.request(this, null, destBitmap, onCopyFinished, handler) +} + +internal fun View.generateBitmapFromDraw( + destBitmap: Bitmap, + bitmapFuture: ResolvableFuture +) { + destBitmap.density = resources.displayMetrics.densityDpi + computeScroll() + val canvas = Canvas(destBitmap) + canvas.translate((-scrollX).toFloat(), (-scrollY).toFloat()) + draw(canvas) + bitmapFuture.set(destBitmap) +} + +private fun View.getActivity(): Activity? { + fun Context.getActivity(): Activity? { + return when (this) { + is Activity -> this + is ContextWrapper -> this.baseContext.getActivity() + else -> null + } + } + return context.getActivity() +} + +private fun View.generateBitmapFromPixelCopy( + window: Window, + destBitmap: Bitmap, + bitmapFuture: ResolvableFuture +) { + val locationInWindow = intArrayOf(0, 0) + getLocationInWindow(locationInWindow) + val x = locationInWindow[0] + val y = locationInWindow[1] + val boundsInWindow = Rect(x, y, x + width, y + height) + + return window.generateBitmapFromPixelCopy(boundsInWindow, destBitmap, bitmapFuture) +} diff --git a/core/java/androidx/test/core/view/WindowCapture.kt b/core/java/androidx/test/core/view/WindowCapture.kt new file mode 100644 index 000000000..b8185e5c1 --- /dev/null +++ b/core/java/androidx/test/core/view/WindowCapture.kt @@ -0,0 +1,102 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@file:JvmName("WindowCapture") + +package androidx.test.core.view + +import android.graphics.Bitmap +import android.graphics.Rect +import android.os.Build +import android.os.Handler +import android.os.Looper +import android.view.PixelCopy +import android.view.Window +import androidx.annotation.RequiresApi +import androidx.concurrent.futures.ResolvableFuture +import androidx.test.annotation.ExperimentalTestApi +import androidx.test.platform.graphics.HardwareRendererCompat +import com.google.common.util.concurrent.ListenableFuture + +/** + * Asynchronously captures an image of the underlying window into a [Bitmap]. + * + * For devices below [Build.VERSION_CODES#O] the image is obtained using [View#draw] on the windows + * decorView. Otherwise, [PixelCopy] is used. + * + * This method will also enable [HardwareRendererCompat#setDrawingEnabled(boolean)] if required. + * + * This API is primarily intended for use in lower layer libraries or frameworks. For test authors, + * its recommended to use espresso or compose's captureToImage. + * + * This API is currently experimental and subject to change or removal. + */ +@ExperimentalTestApi +@RequiresApi(Build.VERSION_CODES.JELLY_BEAN) +fun Window.captureRegionToBitmap(boundsInWindow: Rect? = null): ListenableFuture { + val bitmapFuture: ResolvableFuture = ResolvableFuture.create() + val drawingWasEnabled = HardwareRendererCompat.enableDrawingIfNecessary() + val mainExecutor = HandlerExecutor(Handler(Looper.getMainLooper())) + + // disable drawing again if necessary once work is complete + if (!drawingWasEnabled) { + bitmapFuture.addListener({ HardwareRendererCompat.setDrawingEnabled(false) }, mainExecutor) + } + + mainExecutor.execute { decorView.forceRedraw { generateBitmap(boundsInWindow, bitmapFuture) } } + + return bitmapFuture +} + +internal fun Window.generateBitmap( + boundsInWindow: Rect? = null, + bitmapFuture: ResolvableFuture +) { + val destBitmap = + Bitmap.createBitmap( + boundsInWindow?.width() ?: decorView.width, + boundsInWindow?.height() ?: decorView.height, + Bitmap.Config.ARGB_8888 + ) + when { + Build.VERSION.SDK_INT < 26 -> + // TODO: handle boundsInWindow + decorView.generateBitmapFromDraw(destBitmap, bitmapFuture) + else -> generateBitmapFromPixelCopy(boundsInWindow, destBitmap, bitmapFuture) + } +} + +@SuppressWarnings("NewApi") +internal fun Window.generateBitmapFromPixelCopy( + boundsInWindow: Rect? = null, + destBitmap: Bitmap, + bitmapFuture: ResolvableFuture +) { + val onCopyFinished = + PixelCopy.OnPixelCopyFinishedListener { result -> + if (result == PixelCopy.SUCCESS) { + bitmapFuture.set(destBitmap) + } else { + bitmapFuture.setException(RuntimeException(String.format("PixelCopy failed: %d", result))) + } + } + PixelCopy.request( + this, + boundsInWindow, + destBitmap, + onCopyFinished, + Handler(Looper.getMainLooper()) + ) +} From a4f9b69bf1ccebe73449992bee72cfe4c308e3e2 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Tue, 14 Sep 2021 10:19:53 -0700 Subject: [PATCH 019/949] Refactor ReflectionUtil into caching variants. And introduce a InternalTestApi annotation to denote these type of intra-androidx.test APIs that are not exposed to public, but need to retain backwards compatibility. PiperOrigin-RevId: 396625550 --- .../java/androidx/test/annotation/BUILD.bazel | 1 + .../test/annotation/ExperimentalTestApi.java | 3 + .../test/annotation/InternalTestApi.java | 42 ++++++++ .../androidx/test/annotation/api/current.txt | 2 +- .../test/runner/AndroidJUnitRunner.java | 9 +- .../java/androidx/test/api/current.txt | 18 ++++ .../test/internal/util/ReflectionUtil.java | 101 ------------------ .../graphics/HardwareRendererCompat.java | 20 ++-- .../platform/reflect/ReflectionException.java | 24 +++++ .../platform/reflect/ReflectiveField.java | 68 ++++++++++++ .../platform/reflect/ReflectiveMethod.java | 91 ++++++++++++++++ .../platform/reflect/ReflectiveFieldTest.java | 49 +++++++++ .../reflect/ReflectiveMethodTest.java | 87 +++++++++++++++ 13 files changed, 401 insertions(+), 114 deletions(-) create mode 100644 annotation/java/androidx/test/annotation/InternalTestApi.java delete mode 100644 runner/monitor/java/androidx/test/internal/util/ReflectionUtil.java create mode 100644 runner/monitor/java/androidx/test/platform/reflect/ReflectionException.java create mode 100644 runner/monitor/java/androidx/test/platform/reflect/ReflectiveField.java create mode 100644 runner/monitor/java/androidx/test/platform/reflect/ReflectiveMethod.java create mode 100644 runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveFieldTest.java create mode 100644 runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveMethodTest.java diff --git a/annotation/java/androidx/test/annotation/BUILD.bazel b/annotation/java/androidx/test/annotation/BUILD.bazel index 3448623f9..4286ef18d 100644 --- a/annotation/java/androidx/test/annotation/BUILD.bazel +++ b/annotation/java/androidx/test/annotation/BUILD.bazel @@ -14,6 +14,7 @@ android_library( manifest = "AndroidManifest.xml", tags = ["alt_dep=//annotation"], deps = [ + "//:androidx_annotation", "//:androidx_annotation_experimental", ], ) diff --git a/annotation/java/androidx/test/annotation/ExperimentalTestApi.java b/annotation/java/androidx/test/annotation/ExperimentalTestApi.java index 408d6ff42..236649ba2 100644 --- a/annotation/java/androidx/test/annotation/ExperimentalTestApi.java +++ b/annotation/java/androidx/test/annotation/ExperimentalTestApi.java @@ -17,6 +17,8 @@ package androidx.test.annotation; import androidx.annotation.RequiresOptIn; +import androidx.annotation.RestrictTo; +import androidx.annotation.RestrictTo.Scope; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -37,5 +39,6 @@ ElementType.METHOD, ElementType.TYPE }) +@RestrictTo(Scope.LIBRARY_GROUP) @RequiresOptIn public @interface ExperimentalTestApi {} diff --git a/annotation/java/androidx/test/annotation/InternalTestApi.java b/annotation/java/androidx/test/annotation/InternalTestApi.java new file mode 100644 index 000000000..973cac00a --- /dev/null +++ b/annotation/java/androidx/test/annotation/InternalTestApi.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.annotation; + +import androidx.annotation.RestrictTo; +import androidx.annotation.RestrictTo.Scope; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Denotes an API that is for internal androidx.test usage only. + * + *

Unlike @hide APIs, @InternalTestApis can be used outside of their immediate library, and are + * thus subject to backwards compatibility constraints, but they should only be used by + * androidx.test libraries + */ +@Retention(RetentionPolicy.CLASS) +@Target({ + ElementType.ANNOTATION_TYPE, + ElementType.CONSTRUCTOR, + ElementType.FIELD, + ElementType.METHOD, + ElementType.TYPE +}) +@RestrictTo(Scope.LIBRARY_GROUP) +public @interface InternalTestApi {} diff --git a/annotation/java/androidx/test/annotation/api/current.txt b/annotation/java/androidx/test/annotation/api/current.txt index 0c389ac5a..87d88ef97 100644 --- a/annotation/java/androidx/test/annotation/api/current.txt +++ b/annotation/java/androidx/test/annotation/api/current.txt @@ -1,7 +1,7 @@ // Signature format: 3.0 package androidx.test.annotation { - @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface ExperimentalTestApi { + @RequiresOptIn @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.ANNOTATION_TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface ExperimentalTestApi { } } diff --git a/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnitRunner.java b/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnitRunner.java index 245ea5e5d..7aea48c6d 100644 --- a/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnitRunner.java +++ b/runner/android_junit_runner/java/androidx/test/runner/AndroidJUnitRunner.java @@ -40,11 +40,11 @@ import androidx.test.internal.runner.listener.InstrumentationResultPrinter; import androidx.test.internal.runner.listener.LogRunListener; import androidx.test.internal.runner.listener.SuiteAssignmentPrinter; -import androidx.test.internal.util.ReflectionUtil; -import androidx.test.internal.util.ReflectionUtil.ReflectionException; import androidx.test.orchestrator.callback.OrchestratorV1Connection; import androidx.test.platform.io.FileTestStorage; import androidx.test.platform.io.PlatformTestStorageRegistry; +import androidx.test.platform.reflect.ReflectionException; +import androidx.test.platform.reflect.ReflectiveMethod; import androidx.test.runner.lifecycle.ApplicationLifecycleCallback; import androidx.test.runner.lifecycle.ApplicationLifecycleMonitorRegistry; import androidx.test.runner.screenshot.ScreenCaptureProcessor; @@ -411,8 +411,9 @@ public void onStart() { if (runnerArgs.remoteMethod != null) { try { - ReflectionUtil.callStaticMethod( - runnerArgs.remoteMethod.testClassName, runnerArgs.remoteMethod.methodName); + new ReflectiveMethod( + runnerArgs.remoteMethod.testClassName, runnerArgs.remoteMethod.methodName) + .invokeStatic(); } catch (ReflectionException e) { Log.e( LOG_TAG, diff --git a/runner/monitor/java/androidx/test/api/current.txt b/runner/monitor/java/androidx/test/api/current.txt index 7a769243a..f6d8e4e30 100644 --- a/runner/monitor/java/androidx/test/api/current.txt +++ b/runner/monitor/java/androidx/test/api/current.txt @@ -35,6 +35,24 @@ package androidx.test.platform.app { } +package androidx.test.platform.reflect { + + public class ReflectionException extends java.lang.Exception { + } + + public class ReflectiveField { + ctor public ReflectiveField(String!, String!); + method public T! get(Object!) throws androidx.test.platform.reflect.ReflectionException; + } + + public class ReflectiveMethod { + ctor public ReflectiveMethod(String!, String!, Class!...); + method public T! invoke(Object!, java.lang.Object!...) throws androidx.test.platform.reflect.ReflectionException; + method public T! invokeStatic(java.lang.Object!...) throws androidx.test.platform.reflect.ReflectionException; + } + +} + package androidx.test.platform.ui { public class InjectEventSecurityException extends java.lang.Exception implements androidx.test.platform.TestFrameworkException { diff --git a/runner/monitor/java/androidx/test/internal/util/ReflectionUtil.java b/runner/monitor/java/androidx/test/internal/util/ReflectionUtil.java deleted file mode 100644 index 9b856c2f8..000000000 --- a/runner/monitor/java/androidx/test/internal/util/ReflectionUtil.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package androidx.test.internal.util; - -import android.util.Log; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -/** Utility methods for invoking calls via reflection. */ -public class ReflectionUtil { - - private static final String TAG = "ReflectionUtil"; - - /** Data class for reflective method call parameters. */ - public static class ReflectionParams { - final Class type; - final Object value; - - public ReflectionParams(Class type, Object value) { - this.type = type; - this.value = value; - } - - public static Class[] getTypes(ReflectionParams[] params) { - Class[] types = new Class[params.length]; - for (int i = 0; i < params.length; i++) { - types[i] = params[i].type; - } - return types; - } - - public static Object[] getValues(ReflectionParams[] params) { - Object[] values = new Object[params.length]; - for (int i = 0; i < params.length; i++) { - values[i] = params[i].value; - } - return values; - } - } - - /** Thrown when there was a failure making a reflective call. */ - public static class ReflectionException extends Exception { - ReflectionException(Exception cause) { - super("Reflective call failed", cause); - } - } - - /** - * Reflectively call the specified static method. - * - * @param className the fully qualified name of the class - * @param methodName the full name of the method - * @param params the list of parameter types and values for parameters - * @return the result from the method - * @throws ReflectionException if the call could not be performed - */ - public static Object callStaticMethod( - String className, String methodName, ReflectionParams... params) throws ReflectionException { - try { - return callStaticMethod(Class.forName(className), methodName, params); - } catch (ClassNotFoundException e) { - throw new ReflectionException(e); - } - } - - /** - * Reflectively call the specified static method. - * - * @param clazz the Class that defines the method - * @param methodName the full name of the method - * @param params the list of parameter types and values for parameters - * @return the result from the method - * @throws ReflectionException if the call could not be performed - */ - public static Object callStaticMethod( - Class clazz, String methodName, ReflectionParams... params) throws ReflectionException { - Log.d(TAG, "Attempting to reflectively call: " + methodName); - try { - Class[] types = ReflectionParams.getTypes(params); - Object[] values = ReflectionParams.getValues(params); - Method m = clazz.getDeclaredMethod(methodName, types); - m.setAccessible(true); - return m.invoke(null, values); - } catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) { - throw new ReflectionException(e); - } - } -} diff --git a/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java b/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java index 61eebe39d..bb7f1d9c2 100644 --- a/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java +++ b/runner/monitor/java/androidx/test/platform/graphics/HardwareRendererCompat.java @@ -19,9 +19,8 @@ import android.os.Build.VERSION; import android.util.Log; import androidx.test.annotation.ExperimentalTestApi; -import androidx.test.internal.util.ReflectionUtil; -import androidx.test.internal.util.ReflectionUtil.ReflectionException; -import androidx.test.internal.util.ReflectionUtil.ReflectionParams; +import androidx.test.platform.reflect.ReflectionException; +import androidx.test.platform.reflect.ReflectiveMethod; /** * Helper class that provides {@link HardwareRenderer#isDrawingEnabled()} and {@link @@ -35,6 +34,13 @@ public class HardwareRendererCompat { private static final String TAG = "HardwareRendererCompat"; + private static final ReflectiveMethod isDrawingEnabledReflectiveCall = + new ReflectiveMethod<>("android.graphics.HardwareRenderer", "isDrawingEnabled"); + + private static final ReflectiveMethod setDrawingEnabledReflectiveCall = + new ReflectiveMethod<>( + "android.graphics.HardwareRenderer", "setDrawingEnabled", boolean.class); + private HardwareRendererCompat() {} /** @@ -49,7 +55,7 @@ public static boolean isDrawingEnabled() { return true; } try { - return (boolean) ReflectionUtil.callStaticMethod(HardwareRenderer.class, "isDrawingEnabled"); + return isDrawingEnabledReflectiveCall.invokeStatic(); } catch (ReflectionException e) { Log.i( TAG, "Failed to reflectively call HardwareRenderer#isDrawingEnabled, returning true", e); @@ -67,11 +73,9 @@ public static void setDrawingEnabled(boolean renderingEnabled) { // unsupported on these apis return; } + try { - ReflectionUtil.callStaticMethod( - HardwareRenderer.class, - "setDrawingEnabled", - new ReflectionParams(boolean.class, renderingEnabled)); + setDrawingEnabledReflectiveCall.invokeStatic(renderingEnabled); } catch (ReflectionException e) { Log.i(TAG, "Failed to reflectively call HardwareRenderer#setDrawingEnabled, ignoring", e); } diff --git a/runner/monitor/java/androidx/test/platform/reflect/ReflectionException.java b/runner/monitor/java/androidx/test/platform/reflect/ReflectionException.java new file mode 100644 index 000000000..c8fb561bb --- /dev/null +++ b/runner/monitor/java/androidx/test/platform/reflect/ReflectionException.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.reflect; + +/** Thrown when there was a failure making a reflective call. */ +public class ReflectionException extends Exception { + + ReflectionException(Exception cause) { + super("Reflection access failed", cause); + } +} diff --git a/runner/monitor/java/androidx/test/platform/reflect/ReflectiveField.java b/runner/monitor/java/androidx/test/platform/reflect/ReflectiveField.java new file mode 100644 index 000000000..926477e85 --- /dev/null +++ b/runner/monitor/java/androidx/test/platform/reflect/ReflectiveField.java @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.reflect; + +import java.lang.reflect.Field; + +/** + * Helper class for making more performant reflection field access. + * + *

Lazy initializes and caches Method object ro attempt to reduce reflection overhead. + */ +public class ReflectiveField { + private final String className; + private final String fieldName; + + // lazy init + private boolean initialized = false; + private Field field; + + /** + * Creates a ReflectiveField. + * + * @param className the fully qualified class name that defines the field + * @param fieldName the field name + */ + public ReflectiveField(String className, String fieldName) { + this.className = className; + this.fieldName = fieldName; + } + + /** + * Retrieves the field's value, initializing if necessary. + * + * @param object the object that holds the field's value + * @return the field's value + * @throws ReflectionException if field could not be accessed + */ + public T get(Object object) throws ReflectionException { + try { + initIfNecessary(); + return (T) field.get(object); + } catch (ClassNotFoundException | IllegalAccessException | NoSuchFieldException e) { + throw new ReflectionException(e); + } + } + + private synchronized void initIfNecessary() throws ClassNotFoundException, NoSuchFieldException { + if (initialized) { + return; + } + field = Class.forName(className).getDeclaredField(fieldName); + field.setAccessible(true); + initialized = true; + } +} diff --git a/runner/monitor/java/androidx/test/platform/reflect/ReflectiveMethod.java b/runner/monitor/java/androidx/test/platform/reflect/ReflectiveMethod.java new file mode 100644 index 000000000..ba90e95e1 --- /dev/null +++ b/runner/monitor/java/androidx/test/platform/reflect/ReflectiveMethod.java @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.reflect; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +/** + * Helper class for making more performant reflection method invocations. + * + *

Lazy initializes and caches Method object to attempt to reduce reflection overhead. + */ +public class ReflectiveMethod { + private final String className; + private final String methodName; + private final Class[] paramTypes; + + // lazy init + private boolean initialized = false; + private Method method; + + /** + * Creates a ReflectiveMethod. + * + * @param className the fully qualified class name that defines the method + * @param methodName the method name to call + * @param paramTypes the list of types of the method parameters, in order. + */ + public ReflectiveMethod(String className, String methodName, Class... paramTypes) { + this.className = className; + this.paramTypes = paramTypes; + this.methodName = methodName; + } + + /** + * Invoke the instance method. + * + *

See {@link java.lang.reflect.Method#invoke(Object, Object...)} + * + * @param object the object the underlying method is invoked from + * @param paramValues the arguments used for the method call + * @return the return value of the method + * @throws ReflectionException if call could not be completed + */ + public T invoke(Object object, Object... paramValues) throws ReflectionException { + try { + initIfNecessary(); + return (T) method.invoke(object, paramValues); + } catch (ClassNotFoundException + | InvocationTargetException + | IllegalAccessException + | NoSuchMethodException e) { + throw new ReflectionException(e); + } + } + + /** + * Invoke th static method. + * + *

See {@link java.lang.reflect.Method#invoke(Object, Object...)} + * + * @param paramValues the arguments used for the method call + * @return the return value of the method + * @throws ReflectionException if call could not be completed + */ + public T invokeStatic(Object... paramValues) throws ReflectionException { + return invoke(null, paramValues); + } + + private synchronized void initIfNecessary() throws ClassNotFoundException, NoSuchMethodException { + if (initialized) { + return; + } + method = Class.forName(className).getDeclaredMethod(methodName, paramTypes); + method.setAccessible(true); + initialized = true; + } +} diff --git a/runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveFieldTest.java b/runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveFieldTest.java new file mode 100644 index 000000000..30a53f0d7 --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveFieldTest.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.platform.reflect; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import androidx.test.ext.junit.runners.AndroidJUnit4; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** Unit tests for {@link ReflectiveField}. */ +@RunWith(AndroidJUnit4.class) +public class ReflectiveFieldTest { + + private static class Fixture { + private final int someField = 42; + } + + @Test + public void get() throws ReflectionException { + Fixture f = new Fixture(); + int value = new ReflectiveField(f.getClass().getName(), "someField").get(f); + assertThat(value).isEqualTo(42); + } + + @Test + public void get_nonExistent() { + assertThrows( + ReflectionException.class, + () -> + new ReflectiveField(Fixture.class.getName(), "someMissingField") + .get(new Fixture())); + } +} diff --git a/runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveMethodTest.java b/runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveMethodTest.java new file mode 100644 index 000000000..65f2c6105 --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/reflect/ReflectiveMethodTest.java @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.test.platform.reflect; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import androidx.test.ext.junit.runners.AndroidJUnit4; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** Unit tests for {@link ReflectiveMethod}. */ +@RunWith(AndroidJUnit4.class) +public class ReflectiveMethodTest { + + private static class Fixture { + private int someMethod() { + return 42; + } + + private static int someStaticMethod() { + return 43; + } + + private int someMethod(int i) { + return i + 42; + } + + private static int someStaticMethod(int i) { + return i + 43; + } + } + + @Test + public void invoke() throws ReflectionException { + Fixture f = new Fixture(); + int value = new ReflectiveMethod(f.getClass().getName(), "someMethod").invoke(f); + assertThat(value).isEqualTo(42); + } + + @Test + public void invokeStatic() throws ReflectionException { + int value = + new ReflectiveMethod(Fixture.class.getName(), "someStaticMethod").invokeStatic(); + assertThat(value).isEqualTo(43); + } + + @Test + public void invoke_params() throws ReflectionException { + Fixture f = new Fixture(); + int value = + new ReflectiveMethod(f.getClass().getName(), "someMethod", int.class).invoke(f, 5); + assertThat(value).isEqualTo(47); + } + + @Test + public void invokeStatic_params() throws ReflectionException { + int value = + new ReflectiveMethod(Fixture.class.getName(), "someStaticMethod", int.class) + .invokeStatic(5); + assertThat(value).isEqualTo(48); + } + + @Test + public void invokeStatic_nonExistent() { + assertThrows( + ReflectionException.class, + () -> + new ReflectiveMethod( + Fixture.class.getName(), "someMethod", int.class, boolean.class) + .invokeStatic()); + } +} From 85d079e294a92bcd39105a66427448277bad5471 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Tue, 14 Sep 2021 16:35:36 -0700 Subject: [PATCH 020/949] Allow instanceRef to be null PiperOrigin-RevId: 396710599 --- .../java/androidx/test/espresso/device/dagger/DeviceHolder.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt index 11977f135..98b2cd89f 100644 --- a/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt +++ b/espresso/core/java/androidx/test/espresso/device/dagger/DeviceHolder.kt @@ -21,11 +21,11 @@ import java.util.concurrent.atomic.AtomicReference /** Holds Espresso's device graph. */ class DeviceHolder { companion object { - val instance = AtomicReference(null) + private val instance = AtomicReference(null) @JvmStatic fun deviceLayer(): DeviceLayerComponent { - var instanceRef: DeviceHolder = instance.get() + var instanceRef: DeviceHolder? = instance.get() if (null == instanceRef) { instanceRef = DeviceHolder(DaggerDeviceLayerComponent.create()) if (instance.compareAndSet(null, instanceRef)) { From 81fd6321cf16772e6884fe2b18a7361b68c0e853 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Wed, 15 Sep 2021 14:38:46 -0700 Subject: [PATCH 021/949] Fix flakiness in OnIdleTest. PiperOrigin-RevId: 396926411 --- .../espresso/AppNotIdleExceptionTest.java | 23 +++---------------- .../androidx/test/espresso/BUILD.bazel | 8 +++++++ .../androidx/test/espresso/OnIdleTest.java | 21 +++++++++-------- .../test/espresso/StringPatternMatcher.java | 21 +++++++++++++++++ 4 files changed, 44 insertions(+), 29 deletions(-) create mode 100644 espresso/core/javatests/androidx/test/espresso/StringPatternMatcher.java diff --git a/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java b/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java index 4f018067b..6e97ada6a 100644 --- a/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java +++ b/espresso/core/javatests/androidx/test/espresso/AppNotIdleExceptionTest.java @@ -32,7 +32,6 @@ import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.hamcrest.core.SubstringMatcher; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -82,29 +81,13 @@ public void run() { } catch (AppNotIdleException expected) { assertThat( expected.getMessage(), - new StringPattern( - "Looped for \\d+ iterations over \\d+ SECONDS. " + new StringPatternMatcher( + "Looped for \\d+ iterations over \\d+ SECONDS\\. " + "The following Idle Conditions failed MAIN_LOOPER_HAS_IDLED" - + "\\(last message: [^\\)]+\\).")); + + "\\(last message: [^\\)]+\\)\\.")); } finally { continueBeingBusy.getAndSet(false); } } - // Simulate the MatchesPattern available in Hamcrest 2. - private static class StringPattern extends SubstringMatcher { - public StringPattern(String substringRegexPattern) { - super(substringRegexPattern); - } - - @Override - protected boolean evalSubstringOf(String s) { - return s.matches(substring); - } - - @Override - protected String relationship() { - return "matching"; - } - } } diff --git a/espresso/core/javatests/androidx/test/espresso/BUILD.bazel b/espresso/core/javatests/androidx/test/espresso/BUILD.bazel index aaabb724b..6147ddc6e 100644 --- a/espresso/core/javatests/androidx/test/espresso/BUILD.bazel +++ b/espresso/core/javatests/androidx/test/espresso/BUILD.bazel @@ -13,12 +13,20 @@ load( licenses(["notice"]) # Apache License 2.0 +android_library( + name = "utils", + srcs = ["StringPatternMatcher.java"], + visibility = ["//visibility:private"], + deps = ["@maven//:org_hamcrest_hamcrest_all",], +) + android_app_instrumentation_tests( name = "instrumentation_tests", srcs = glob(["*.java"]), binary_target = "//testapps/ui_testapp/java/androidx/test/ui/app:testapp", target_devices = devices(), deps = [ + ":utils", "//core", "//espresso/core/java/androidx/test/espresso", "//espresso/core/java/androidx/test/espresso:data-interaction-remote", diff --git a/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java b/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java index c491aa527..f55521a9e 100644 --- a/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java +++ b/espresso/core/javatests/androidx/test/espresso/OnIdleTest.java @@ -89,9 +89,10 @@ public Void call() { assertThat(expected, instanceOf(AppNotIdleException.class)); assertThat( expected.getMessage(), - is( - "Looped for 1 iterations over 5 SECONDS. The following Idle Conditions failed" - + " DYNAMIC_TASKS_HAVE_IDLED(busy resources=testResource).")); + new StringPatternMatcher( + "Looped for \\d+ iterations over \\d+ SECONDS\\. " + + "The following Idle Conditions failed " + + "DYNAMIC_TASKS_HAVE_IDLED\\(busy resources=testResource\\)\\.")); } finally { assertThat(Espresso.unregisterIdlingResources(resource), is(true)); } @@ -116,9 +117,10 @@ public Void call() { assertThat(expected, instanceOf(AppNotIdleException.class)); assertThat( expected.getMessage(), - is( - "Looped for 1 iterations over 5 SECONDS. The following Idle Conditions failed" - + " DYNAMIC_TASKS_HAVE_IDLED(busy resources=testResource).")); + new StringPatternMatcher( + "Looped for \\d+ iterations over \\d+ SECONDS\\. " + + "The following Idle Conditions failed " + + "DYNAMIC_TASKS_HAVE_IDLED\\(busy resources=testResource\\)\\.")); } finally { assertThat(IdlingRegistry.getInstance().unregister(resource), is(true)); } @@ -136,9 +138,10 @@ public void onIdle_neverIdleResourceThrowsAppNotIdleException_withIdlingRegistry assertThat(expected, instanceOf(AppNotIdleException.class)); assertThat( expected.getMessage(), - is( - "Looped for 1 iterations over 5 SECONDS. The following Idle Conditions failed" - + " DYNAMIC_TASKS_HAVE_IDLED(busy resources=testResource).")); + new StringPatternMatcher( + "Looped for \\d+ iterations over \\d+ SECONDS\\. " + + "The following Idle Conditions failed " + + "DYNAMIC_TASKS_HAVE_IDLED\\(busy resources=testResource\\)\\.")); } finally { assertThat(IdlingRegistry.getInstance().unregister(resource), is(true)); } diff --git a/espresso/core/javatests/androidx/test/espresso/StringPatternMatcher.java b/espresso/core/javatests/androidx/test/espresso/StringPatternMatcher.java new file mode 100644 index 000000000..1264666bd --- /dev/null +++ b/espresso/core/javatests/androidx/test/espresso/StringPatternMatcher.java @@ -0,0 +1,21 @@ +package androidx.test.espresso; + +import org.hamcrest.core.SubstringMatcher; + +/** Simulates the MatchesPattern available in Hamcrest 2. */ +class StringPatternMatcher extends SubstringMatcher { + + public StringPatternMatcher(String substringRegexPattern) { + super(substringRegexPattern); + } + + @Override + protected boolean evalSubstringOf(String s) { + return s.matches(substring); + } + + @Override + protected String relationship() { + return "matching"; + } +} From cffa6461c102dae1d7388c3edaa5c34099d88f2a Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Thu, 16 Sep 2021 15:03:29 -0700 Subject: [PATCH 022/949] Simply logs a warning message when failed to add output properties in Espresso, without the stack trace. A stack trace looks a bit concerning to developers in the Robolectric logs, but this is mostly a benign error. PiperOrigin-RevId: 397177765 --- .../core/java/androidx/test/espresso/GraphHolder.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/espresso/core/java/androidx/test/espresso/GraphHolder.java b/espresso/core/java/androidx/test/espresso/GraphHolder.java index a61df270b..f80880067 100644 --- a/espresso/core/java/androidx/test/espresso/GraphHolder.java +++ b/espresso/core/java/androidx/test/espresso/GraphHolder.java @@ -62,15 +62,14 @@ private static void addUsageToOutputProperties( Map usageProperties, PlatformTestStorage testStorage) { try { testStorage.addOutputProperties(usageProperties); - } catch (Exception e) { + } catch (RuntimeException e) { // The properties.dat file can be created only once on an automotive emulator with API 30, // which causes the `addOutputProperties` call to fail when running multiple test cases. Catch // the exception and log until the issue is fixed in the emulator. - Log.d( + Log.w( TAG, - "Failed to add the output properties. This could happen when running on an" - + " automotive emulator with API 30. Ignore for now.", - e); + "Failed to add the output properties. This could happen when running on Robolectric or an" + + " automotive emulator with API 30. Ignore for now."); } } } From 56a4036b0b1df69ef713a02df412e4a1c4dd11c2 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Tue, 21 Sep 2021 09:51:25 -0700 Subject: [PATCH 023/949] Add WindowInspectorCompat API. Test APIs like Espresso and device screenshots need the ability to retrieve the set of root window views. android.view.inspector.WindowInspector offers this capability, but was only introduced in API 29. WindowInspectorCompat extends WindowInspector support to older APIs by copying the logic from Espresso's RootsOracle. A followup change will modify RootsOracle to use WindowInspectorCompat instead. Also update android_library_instrumentation_tests to support kotlin. PiperOrigin-RevId: 398018432 --- .../android_library_instrumentation_tests.bzl | 3 +- .../java/androidx/test/api/current.txt | 11 ++ .../view/inspector/WindowInspectorCompat.java | 116 ++++++++++++++++++ .../javatests/androidx/test/BUILD.bazel | 1 + .../inspector/WindowInspectorCompatTest.kt | 57 +++++++++ .../inspector/fixtures/ActivityWithDialog.kt | 34 +++++ .../inspector/fixtures/AndroidManifest.xml | 28 +++++ .../view/inspector/fixtures/BUILD.bazel | 12 ++ .../view/inspector/fixtures/SimpleActivity.kt | 26 ++++ .../fixtures/res/layout/simple_activity.xml | 29 +++++ 10 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 runner/monitor/java/androidx/test/platform/view/inspector/WindowInspectorCompat.java create mode 100644 runner/monitor/javatests/androidx/test/platform/view/inspector/WindowInspectorCompatTest.kt create mode 100644 runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/ActivityWithDialog.kt create mode 100644 runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/AndroidManifest.xml create mode 100644 runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/BUILD.bazel create mode 100644 runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/SimpleActivity.kt create mode 100644 runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/res/layout/simple_activity.xml diff --git a/build_extensions/android_library_instrumentation_tests.bzl b/build_extensions/android_library_instrumentation_tests.bzl index 36b2ab829..6774646e3 100644 --- a/build_extensions/android_library_instrumentation_tests.bzl +++ b/build_extensions/android_library_instrumentation_tests.bzl @@ -8,6 +8,7 @@ load( "//build_extensions:infer_java_package_name.bzl", "infer_java_package_name", ) +load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") def android_library_instrumentation_tests(name, srcs, deps, target_devices, test_java_package = None, library_args = {}, @@ -50,7 +51,7 @@ def android_library_instrumentation_tests(name, srcs, deps, target_devices, testonly = 1, ) - native.android_library( + kt_android_library( name = library_name, srcs = srcs, testonly = 1, diff --git a/runner/monitor/java/androidx/test/api/current.txt b/runner/monitor/java/androidx/test/api/current.txt index f6d8e4e30..ef09044bd 100644 --- a/runner/monitor/java/androidx/test/api/current.txt +++ b/runner/monitor/java/androidx/test/api/current.txt @@ -71,6 +71,17 @@ package androidx.test.platform.ui { } +package androidx.test.platform.view.inspector { + + @androidx.test.annotation.InternalTestApi public class WindowInspectorCompat { + method public static java.util.List! getGlobalWindowViews() throws androidx.test.platform.view.inspector.WindowInspectorCompat.ViewRetrievalException; + } + + public static class WindowInspectorCompat.ViewRetrievalException extends java.lang.Exception { + } + +} + package androidx.test.runner { public class MonitoringInstrumentation extends android.app.Instrumentation { diff --git a/runner/monitor/java/androidx/test/platform/view/inspector/WindowInspectorCompat.java b/runner/monitor/java/androidx/test/platform/view/inspector/WindowInspectorCompat.java new file mode 100644 index 000000000..7bddf3cf7 --- /dev/null +++ b/runner/monitor/java/androidx/test/platform/view/inspector/WindowInspectorCompat.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.view.inspector; + +import android.os.Build.VERSION; +import android.os.Build.VERSION_CODES; +import android.view.View; +import android.view.inspector.WindowInspector; +import androidx.test.annotation.InternalTestApi; +import androidx.test.internal.util.Checks; +import androidx.test.platform.reflect.ReflectionException; +import androidx.test.platform.reflect.ReflectiveField; +import androidx.test.platform.reflect.ReflectiveMethod; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * Compat class that supports {@link android.viee.inspecror.WindowInspector} functionality on older + * Android SDKs. + */ +@InternalTestApi +public class WindowInspectorCompat { + + // type WindowManagerImpl for API < 17 + private static final ReflectiveMethod getWindowManagerImplReflectiveCall = + new ReflectiveMethod<>("android.view.WindowManagerImpl", "getDefault"); + + // type WindowManagerGlobal + private static final ReflectiveMethod getWindowManagerGlobalReflectiveCall = + new ReflectiveMethod<>("android.view.WindowManagerGlobal", "getInstance"); + + private static final ReflectiveField> windowViewsReflectiveField = + new ReflectiveField<>("android.view.WindowManagerGlobal", "mViews"); + + private static final ReflectiveField windowViewsPreKitkatReflectiveField = + new ReflectiveField<>("android.view.WindowManagerGlobal", "mViews"); + + private static final ReflectiveField windowViewsPreJBReflectiveField = + new ReflectiveField<>("android.view.WindowManagerImpl", "mViews"); + + /** + * Thrown when there is a failure retrieving window views. + * + *

This should only occur if the device does not support the view retrieval mechanism used on + * used on APIs < 29, before WindowInspector existed. + */ + public static class ViewRetrievalException extends Exception { + + ViewRetrievalException(Throwable cause) { + super("failed to retrieve window views", cause); + } + } + + private WindowInspectorCompat() {} + + /** + * Retrieves the list of window views attached to the current process. + * + *

On APIs 29 and above, this will call through to {@link + * WindowInspector#getGlobalWindowViews()}. On older APIs, this will make a best effort attempt to + * retrieve the window views. + * + *

Must be called from UI thread. + * + * @return the list of window Views + * @throws IllegalStateException if called from a non-UI thread. ViewRetrievalException if views + * could not be retrieved. + */ + public static List getGlobalWindowViews() throws ViewRetrievalException { + Checks.checkMainThread(); + + if (VERSION.SDK_INT >= VERSION_CODES.Q) { + return WindowInspector.getGlobalWindowViews(); + } else { + try { + return getViews(getWindowManager()); + } catch (ReflectionException e) { + throw new ViewRetrievalException(e.getCause()); + } + } + } + + private static Object getWindowManager() throws ReflectionException { + if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) { + return getWindowManagerGlobalReflectiveCall.invokeStatic(); + } else { + return getWindowManagerImplReflectiveCall.invokeStatic(); + } + } + + private static List getViews(Object windowManagerGlobal) throws ReflectionException { + if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { + return windowViewsReflectiveField.get(windowManagerGlobal); + } else if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN_MR1) { + View[] views = windowViewsPreKitkatReflectiveField.get(windowManagerGlobal); + return views != null ? Arrays.asList(views) : new ArrayList<>(); + } else { + View[] views = windowViewsPreJBReflectiveField.get(windowManagerGlobal); + return views != null ? Arrays.asList(views) : new ArrayList<>(); + } + } +} diff --git a/runner/monitor/javatests/androidx/test/BUILD.bazel b/runner/monitor/javatests/androidx/test/BUILD.bazel index 0f3102a4c..23392c8d9 100644 --- a/runner/monitor/javatests/androidx/test/BUILD.bazel +++ b/runner/monitor/javatests/androidx/test/BUILD.bazel @@ -46,6 +46,7 @@ android_library_instrumentation_tests( "//runner/android_junit_runner", "//runner/monitor", "//runner/monitor/javatests/androidx/test/internal/platform:fixtures", + "//runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures", "//runner/rules", "//services/storage", "@maven//:com_google_truth_truth", diff --git a/runner/monitor/javatests/androidx/test/platform/view/inspector/WindowInspectorCompatTest.kt b/runner/monitor/javatests/androidx/test/platform/view/inspector/WindowInspectorCompatTest.kt new file mode 100644 index 000000000..6da8c1c5e --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/view/inspector/WindowInspectorCompatTest.kt @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.view.inspector + +import androidx.test.core.app.ActivityScenario +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.platform.view.inspector.fixtures.ActivityWithDialog +import androidx.test.platform.view.inspector.fixtures.SimpleActivity +import com.google.common.truth.Truth.assertThat +import org.junit.Assert.assertThrows +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4::class) +class WindowInspectorCompatTest { + + @Test + fun getGlobalWindowViews_empty() { + InstrumentationRegistry.getInstrumentation() + .runOnMainSync( + Runnable { assertThat(WindowInspectorCompat.getGlobalWindowViews()).isEmpty() } + ) + } + + @Test + fun getGlobalWindowViews_notMainThread() { + assertThrows(IllegalStateException::class.java) { WindowInspectorCompat.getGlobalWindowViews() } + } + + @Test + fun getGlobalWindowViews_activity() { + ActivityScenario.launch(SimpleActivity::class.java).use { scenario -> + scenario.onActivity { assertThat(WindowInspectorCompat.getGlobalWindowViews()).hasSize(1) } + } + } + + @Test + fun getGlobalWindowViews_activityDialog() { + ActivityScenario.launch(ActivityWithDialog::class.java).use { scenario -> + scenario.onActivity { assertThat(WindowInspectorCompat.getGlobalWindowViews()).hasSize(2) } + } + } +} diff --git a/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/ActivityWithDialog.kt b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/ActivityWithDialog.kt new file mode 100644 index 000000000..d3db2b19b --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/ActivityWithDialog.kt @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.view.inspector.fixtures + +import android.app.Activity +import android.app.AlertDialog +import android.os.Bundle + +class ActivityWithDialog : Activity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.simple_activity) + + val builder: AlertDialog.Builder? = this?.let { AlertDialog.Builder(it) } + + builder?.setMessage("This is a dialog")?.setTitle("Dialog Title") + + val dialog: AlertDialog? = builder?.create() + dialog?.show() + } +} diff --git a/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/AndroidManifest.xml b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/AndroidManifest.xml new file mode 100644 index 000000000..6bf70c4cb --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/BUILD.bazel b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/BUILD.bazel new file mode 100644 index 000000000..94960c8ad --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/BUILD.bazel @@ -0,0 +1,12 @@ +load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") + +kt_android_library( + name = "fixtures", + srcs = glob(["*.kt"]), + exports_manifest = True, + manifest = "AndroidManifest.xml", + resource_files = glob(["res/**"]), + visibility = ["//visibility:public"], + deps = [ + ], +) diff --git a/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/SimpleActivity.kt b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/SimpleActivity.kt new file mode 100644 index 000000000..3ce63791a --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/SimpleActivity.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package androidx.test.platform.view.inspector.fixtures + +import android.app.Activity +import android.os.Bundle + +class SimpleActivity : Activity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.simple_activity) + } +} diff --git a/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/res/layout/simple_activity.xml b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/res/layout/simple_activity.xml new file mode 100644 index 000000000..d323e21da --- /dev/null +++ b/runner/monitor/javatests/androidx/test/platform/view/inspector/fixtures/res/layout/simple_activity.xml @@ -0,0 +1,29 @@ + + + + + + +