Fix SdkExtensions e2e test on R
- Introduce use of isAtLeastS() to change expectations based on
the platform version of the device running the test. In order
to re-use the existing impl of isAtLeastS(), this needs to be
routed into the test app and communicated back. Because it's
somewhat costly/slow, we cache the value.
- Add two more "apps-with-reqs", and rename the existing ones.
We now have apps with R-ext requirements and apps with R+S-ext
requirements.
- Refactor the asserts around versions a little bit to make it
easier to reuse logic around isAtLeastS() etc.
Test: atest --test-mapping packages/modules/SdkExtensions
Change-Id: I88311631466a341169efa055731cb22d3eea0e58
diff --git a/tests/e2e/AndroidManifest.xml b/tests/e2e/AndroidManifest.xml
index 0e4f8d1..d3fe85f 100644
--- a/tests/e2e/AndroidManifest.xml
+++ b/tests/e2e/AndroidManifest.xml
@@ -30,6 +30,9 @@
<action android:name="com.android.tests.apex.sdkextensions.MAKE_CALLS_45" />
</intent-filter>
<intent-filter>
+ <action android:name="com.android.tests.apex.sdkextensions.IS_AT_LEAST" />
+ </intent-filter>
+ <intent-filter>
<action android:name="com.android.tests.apex.sdkextensions.GET_SDK_VERSION" />
</intent-filter>
</receiver>