Merge "CTS: Add tests for DENSITY_440"
diff --git a/apps/CameraITS/tests/scene5/test_lens_shading_and_color_uniformity.py b/apps/CameraITS/tests/scene5/test_lens_shading_and_color_uniformity.py
index 065f854..f7f2003 100644
--- a/apps/CameraITS/tests/scene5/test_lens_shading_and_color_uniformity.py
+++ b/apps/CameraITS/tests/scene5/test_lens_shading_and_color_uniformity.py
@@ -52,6 +52,8 @@
with its.device.ItsSession() as cam:
props = cam.get_camera_properties()
+ its.caps.skip_unless(its.caps.ae_lock(props) and
+ its.caps.awb_lock(props))
if its.caps.read_3a(props):
# Converge 3A and get the estimates.
sens, exp, gains, xform, focus = cam.do_3a(get_results=True,
diff --git a/apps/CameraITS/tools/validate_scene.py b/apps/CameraITS/tools/validate_scene.py
index cfe14e2..1c0f0fd 100644
--- a/apps/CameraITS/tools/validate_scene.py
+++ b/apps/CameraITS/tools/validate_scene.py
@@ -49,8 +49,9 @@
" to frame the test scene: " + scene_name +
"\nThe scene setup should be: " + scene_desc )
# Converge 3A prior to capture.
- cam.do_3a(do_af=do_af, lock_ae=True, lock_awb=True)
props = cam.get_camera_properties()
+ cam.do_3a(do_af=do_af, lock_ae=its.caps.ae_lock(props),
+ lock_awb=its.caps.awb_lock(props))
req = its.objects.fastest_auto_capture_request(props)
if its.caps.ae_lock(props):
req["android.control.awbLock"] = True
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 4e885ad..10ed4ae 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -3249,6 +3249,12 @@
<action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>
+ <service android:name="com.android.cts.verifier.telecom.CtsSelfManagedConnectionService"
+ android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" >
+ <intent-filter>
+ <action android:name="android.telecom.ConnectionService" />
+ </intent-filter>
+ </service>
</application>
</manifest>
diff --git a/apps/CtsVerifier/jni/verifier/Android.mk b/apps/CtsVerifier/jni/verifier/Android.mk
index 66f3fd0..112be59 100644
--- a/apps/CtsVerifier/jni/verifier/Android.mk
+++ b/apps/CtsVerifier/jni/verifier/Android.mk
@@ -27,7 +27,8 @@
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
-LOCAL_CXX_STL := libc++_static
+LOCAL_SDK_VERSION := current
+LOCAL_NDK_STL_VARIANT := c++_static
LOCAL_SHARED_LIBRARIES := liblog \
libnativehelper_compat_libc++
diff --git a/apps/CtsVerifier/jni/verifier/com_android_cts_verifier_camera_StatsImage.cpp b/apps/CtsVerifier/jni/verifier/com_android_cts_verifier_camera_StatsImage.cpp
index b7c96e2..6c948ea 100644
--- a/apps/CtsVerifier/jni/verifier/com_android_cts_verifier_camera_StatsImage.cpp
+++ b/apps/CtsVerifier/jni/verifier/com_android_cts_verifier_camera_StatsImage.cpp
@@ -17,7 +17,6 @@
#define LOG_TAG "ITS-StatsImage-JNI"
// #define LOG_NDEBUG 0
#include <android/log.h>
-#include <utils/Log.h>
#include <jni.h>
#include <stdio.h>
diff --git a/apps/CtsVerifier/res/layout/ca_boot_notify.xml b/apps/CtsVerifier/res/layout/ca_boot_notify.xml
index 262c6ad..52df1f1 100644
--- a/apps/CtsVerifier/res/layout/ca_boot_notify.xml
+++ b/apps/CtsVerifier/res/layout/ca_boot_notify.xml
@@ -47,6 +47,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/caboot_if_not_installed" />
+ <TextView
+ android:id="@+id/need_to_install_cert_instructions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/cacert_install_cert" />
<Button
android:id="@+id/install"
@@ -55,6 +60,18 @@
android:text="@string/caboot_install_cert" />
<TextView
+ android:id="@+id/remove_screen_lock_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/cacert_remove_screen_lock" />
+
+ <Button
+ android:id="@+id/remove_screen_lock"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/caboot_remove_screen_lock" />
+
+ <TextView
android:id="@+id/reboot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index db4ff1d..378cdda 100755
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -1510,6 +1510,7 @@
<string name="ringer_mode_info">This test checks that Audio manager functionality that requires
particular ringer mode states works properly.
</string>
+ <string name="ringer_mode_pass_test">These tests are handled by CTS.</string>
<string name="test_sound_effects">Test sound effects</string>
<string name="test_vibrate_notification">Test vibrate notification</string>
<string name="test_vibrate_ringer">Test vibrate ringer</string>
@@ -1694,10 +1695,11 @@
<string name="caboot_test">CA Cert Notification on Boot test</string>
<string name="caboot_info">This test is to confirm that when the user has installed a trusted credential, the system notifies the user when it boots.</string>
- <string name="caboot_check_cert_installed">Please check here to see whether a certificate is already installed. (If this button does nothing, pass the test and move on.)</string>
+ <string name="caboot_check_cert_installed">Please check here to see whether a certificate is already installed. If this button does nothing, pass the test and move on.</string>
<string name="caboot_check_creds">Check Credentials</string>
- <string name="caboot_if_not_installed">Only if there is no credential currently installed, install one. (If this button does nothing, pass the test and move on.)</string>
+ <string name="caboot_if_not_installed">Only if there is no credential currently installed, install one.</string>
<string name="caboot_install_cert">Install credential</string>
+ <string name="caboot_remove_screen_lock">Remove screen lock</string>
<string name="caboot_reboot_desc">Please reboot the device and return to this test.</string>
<string name="caboot_after_boot">AFTER REBOOTING: Check that there is a notification that the network may be monitored. Opening that notification should show a dialog box giving more information, with a button to check trusted credentials. This should open up the same view of trusted credentials that you get via the "Check credentials" button.</string>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/RingerModeActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/RingerModeActivity.java
index 9084441..2886478 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/RingerModeActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/RingerModeActivity.java
@@ -109,6 +109,7 @@
protected List<InteractiveTestCase> createTestItems() {
List<InteractiveTestCase> tests = new ArrayList<>();
if (supportsConditionProviders()) {
+ tests.add(new PassTest());
return tests;
}
tests.add(new SetModeAllTest());
@@ -179,6 +180,18 @@
// Tests
+ protected class PassTest extends InteractiveTestCase {
+ @Override
+ protected View inflate(ViewGroup parent) {
+ return createRetryItem(parent, R.string.ringer_mode_pass_test);
+ }
+
+ @Override
+ protected void test() {
+ status = PASS;
+ }
+ }
+
protected class SetModeAllTest extends InteractiveTestCase {
@Override
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralAttributesActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralAttributesActivity.java
index 83e68e4..871c2a0 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralAttributesActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralAttributesActivity.java
@@ -170,7 +170,8 @@
} else {
mTestStatusTx.setText("No Peripheral or No Matching Profile.");
}
-
- getPassButton().setEnabled(outPass && inPass);
+ // Headset not publicly available, violates CTS Verifier additional equipment guidelines.
+ // Allow skipping test. See b/67777923 for details.
+ getPassButton().setEnabled(true /*outPass && inPass*/);
}
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java
index 98a7d18..861af28 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralButtonsActivity.java
@@ -122,7 +122,9 @@
Log.i(TAG, "match:" + match);
getPassButton().setEnabled(match);
} else {
- getPassButton().setEnabled(false);
+ // Headset not publicly available, violates CTS Verifier additional equipment
+ // guidelines. Allow skipping test. See b/67777923 for details.
+ getPassButton().setEnabled(true /*false*/);
}
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralPlayActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralPlayActivity.java
index 5389afb..b4b0999 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralPlayActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralPlayActivity.java
@@ -50,9 +50,10 @@
//
// USBAudioPeripheralActivity
- //
+ // Headset not publicly available, violates CTS Verifier additional equipment guidelines.
+ // Allow skipping test. See b/67777923 for details.
public void updateConnectStatus() {
- getPassButton().setEnabled(mOutputDevInfo != null);
+ getPassButton().setEnabled(true /*mOutputDevInfo != null*/);
}
public class LocalClickListener implements View.OnClickListener {
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralRecordActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralRecordActivity.java
index f05bc9e..e878c82 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralRecordActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/audio/USBAudioPeripheralRecordActivity.java
@@ -134,9 +134,10 @@
//
// USBAudioPeripheralActivity
- //
+ // Headset not publicly available, violates CTS Verifier additional equipment guidelines.
+ // Allow skipping test. See b/67777923 for details.
public void updateConnectStatus() {
- getPassButton().setEnabled(mOutputDevInfo != null);
+ getPassButton().setEnabled(true /*mOutputDevInfo != null*/);
}
public class LocalClickListener implements View.OnClickListener {
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/security/CANotifyOnBootActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/security/CANotifyOnBootActivity.java
index 5537b15..a4f63ad 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/security/CANotifyOnBootActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/security/CANotifyOnBootActivity.java
@@ -1,5 +1,6 @@
package com.android.cts.verifier.security;
+import android.app.admin.DevicePolicyManager;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Bundle;
@@ -32,6 +33,9 @@
Button installButton = (Button) view.findViewById(R.id.install);
checkCredsButton.setOnClickListener(new OpenTrustedCredentials());
installButton.setOnClickListener(new InstallCert());
+ Button removeScreenLockButton = (Button) view.findViewById(R.id.remove_screen_lock);
+ removeScreenLockButton.setOnClickListener(
+ v -> startActivity(new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD)));
setContentView(view);
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/CtsSelfManagedConnectionService.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/CtsSelfManagedConnectionService.java
new file mode 100644
index 0000000..e9c4f44
--- /dev/null
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/CtsSelfManagedConnectionService.java
@@ -0,0 +1,115 @@
+package com.android.cts.verifier.telecom;
+
+import android.os.Bundle;
+import android.telecom.Connection;
+import android.telecom.ConnectionRequest;
+import android.telecom.ConnectionService;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+public class CtsSelfManagedConnectionService extends ConnectionService {
+ static final int TIMEOUT_MILLIS = 10000;
+
+ private CtsConnection.Listener mConnectionListener =
+ new CtsConnection.Listener() {
+ @Override
+ void onDestroyed(CtsConnection connection) {
+ synchronized (mConnectionsLock) {
+ mConnections.remove(connection);
+ }
+ }
+ };
+
+ private static CtsSelfManagedConnectionService sConnectionService;
+ private static CountDownLatch sBindingLatch = new CountDownLatch(1);
+
+ List<CtsConnection> mConnections = new ArrayList<>();
+ Object mConnectionsLock = new Object();
+ CountDownLatch mConnectionLatch = new CountDownLatch(1);
+
+ public static CtsSelfManagedConnectionService getConnectionService() {
+ return sConnectionService;
+ }
+
+ public static CtsSelfManagedConnectionService waitForAndGetConnectionService() {
+ if (sConnectionService == null) {
+ try {
+ sBindingLatch.await(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ }
+ }
+ return sConnectionService;
+ }
+
+ public CtsSelfManagedConnectionService() throws Exception {
+ super();
+ sConnectionService = this;
+ if (sBindingLatch != null) {
+ sBindingLatch.countDown();
+ }
+ sBindingLatch = new CountDownLatch(1);
+ }
+
+ public List<CtsConnection> getConnections() {
+ synchronized (mConnectionsLock) {
+ return new ArrayList<CtsConnection>(mConnections);
+ }
+ }
+
+ public CtsConnection waitForAndGetConnection() {
+ try {
+ mConnectionLatch.await(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ }
+ mConnectionLatch = new CountDownLatch(1);
+ synchronized (mConnectionsLock) {
+ if (mConnections.size() > 0) {
+ return mConnections.get(0);
+ } else {
+ return null;
+ }
+ }
+ }
+
+ @Override
+ public Connection onCreateIncomingConnection(PhoneAccountHandle connectionManagerPhoneAccount,
+ ConnectionRequest request) {
+ return createConnection(request, true /* isIncoming */);
+ }
+
+ @Override
+ public Connection onCreateOutgoingConnection(PhoneAccountHandle connectionManagerAccount,
+ ConnectionRequest request) {
+ return createConnection(request, false /* isIncoming */);
+ }
+
+ private Connection createConnection(ConnectionRequest request, boolean isIncoming) {
+ boolean useAudioClip =
+ request.getExtras().getBoolean(CtsConnection.EXTRA_PLAY_CS_AUDIO, false);
+ CtsConnection connection = new CtsConnection(getApplicationContext(), isIncoming,
+ mConnectionListener, useAudioClip);
+ connection.setConnectionCapabilities(Connection.CAPABILITY_SUPPORT_HOLD |
+ Connection.CAPABILITY_HOLD);
+ connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED);
+ connection.setExtras(request.getExtras());
+
+ Bundle moreExtras = new Bundle();
+ moreExtras.putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,
+ request.getAccountHandle());
+ connection.putExtras(moreExtras);
+ connection.setVideoState(request.getVideoState());
+
+ synchronized (mConnectionsLock) {
+ mConnections.add(connection);
+ }
+ if (mConnectionLatch != null) {
+ mConnectionLatch.countDown();
+ }
+ return connection;
+ }
+}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/PhoneAccountUtils.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/PhoneAccountUtils.java
index 6b0b3da..dee09d0 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/PhoneAccountUtils.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/PhoneAccountUtils.java
@@ -61,9 +61,10 @@
public static final String TEST_SELF_MANAGED_PHONE_ACCOUNT2_LABEL = "CTSVerifier2";
public static final PhoneAccountHandle TEST_SELF_MANAGED_PHONE_ACCOUNT_HANDLE_2 =
- new PhoneAccountHandle(new ComponentName(
+ new PhoneAccountHandle(new ComponentName(
PassFailButtons.class.getPackage().getName(),
- CtsConnectionService.class.getName()), TEST_SELF_MAANGED_PHONE_ACCOUNT2_ID);
+ CtsSelfManagedConnectionService.class.getName()),
+ TEST_SELF_MAANGED_PHONE_ACCOUNT2_ID);
public static final PhoneAccount TEST_SELF_MANAGED_PHONE_ACCOUNT_2 = new PhoneAccount.Builder(
TEST_SELF_MANAGED_PHONE_ACCOUNT_HANDLE_2, TEST_SELF_MANAGED_PHONE_ACCOUNT2_LABEL)
.setAddress(TEST_SELF_MANAGED_PHONE_ACCOUNT_ADDRESS)
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/SelfManagedIncomingCallTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/SelfManagedIncomingCallTestActivity.java
index 2b06446..f1fee31 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/SelfManagedIncomingCallTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/SelfManagedIncomingCallTestActivity.java
@@ -117,6 +117,13 @@
// Make it active to simulate an answer.
connection.setActive();
+ // Removes the hold capability of the self-managed call, so that the follow
+ // incoming call can trigger the incoming call UX that allow user to answer
+ // the incoming call to disconnect the ongoing call.
+ int capabilities = connection.getConnectionCapabilities();
+ capabilities &= ~Connection.CAPABILITY_HOLD;
+ connection.setConnectionCapabilities(capabilities);
+
// Place the second call. It should trigger the incoming call UX.
Bundle extras2 = new Bundle();
extras2.putParcelable(TelecomManager.EXTRA_INCOMING_CALL_ADDRESS,
@@ -149,12 +156,13 @@
mStep3Status = view.findViewById(R.id.step_3_status);
mConfirm = view.findViewById(R.id.telecom_incoming_self_mgd_confirm_answer_button);
mConfirm.setOnClickListener(v -> {
- CtsConnectionService ctsConnectionService = CtsConnectionService.getConnectionService();
- if (ctsConnectionService == null) {
+ CtsSelfManagedConnectionService ctsSelfConnSvr =
+ CtsSelfManagedConnectionService.waitForAndGetConnectionService();
+ if (ctsSelfConnSvr == null) {
mStep3Status.setImageResource(R.drawable.fs_error);
return;
}
- List<CtsConnection> connections = ctsConnectionService.getConnections();
+ List<CtsConnection> connections = ctsSelfConnSvr.getConnections();
if (connections.size() != 1) {
mStep3Status.setImageResource(R.drawable.fs_error);
return;
@@ -170,6 +178,13 @@
mStep3Status.setImageResource(R.drawable.fs_error);
}
+ // The self-managed connection service should be disconnected, because all of the
+ // self-managed connections are disconnected.
+ if (CtsConnectionService.getConnectionService() != null) {
+ mStep3Status.setImageResource(R.drawable.fs_error);
+ return;
+ }
+
PhoneAccountUtils.unRegisterTestSelfManagedPhoneAccount(this);
});
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/UsbDeviceTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/UsbDeviceTestActivity.java
index 9dc690b..02d0629 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/UsbDeviceTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/UsbDeviceTestActivity.java
@@ -2021,11 +2021,11 @@
device.getDeviceProtocol();
Set<UsbInterface> interfacesFromAllConfigs = new ArraySet<>();
- Set<Pair<Integer, Integer>> knownInterfaceIds = new ArraySet<>();
Set<Integer> knownConfigurationIds = new ArraySet<>();
int numConfigurations = device.getConfigurationCount();
for (int configNum = 0; configNum < numConfigurations; configNum++) {
UsbConfiguration config = device.getConfiguration(configNum);
+ Set<Pair<Integer, Integer>> knownInterfaceIds = new ArraySet<>();
// Configuration ID should be unique
assertFalse(knownConfigurationIds.contains(config.getId()));
diff --git a/common/device-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicDeviceExecutorTest.java b/common/device-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicDeviceExecutorTest.java
index f24d11d..9f3ca47 100644
--- a/common/device-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicDeviceExecutorTest.java
+++ b/common/device-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicDeviceExecutorTest.java
@@ -28,6 +28,7 @@
import org.junit.AssumptionViolatedException;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -292,6 +293,7 @@
}
// throw AssertionFailedError
+ @Ignore
public void method9() throws AssertionFailedError {
assertTrue(false);
}
diff --git a/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java b/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java
index 140f9da..055d858 100644
--- a/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java
+++ b/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java
@@ -28,6 +28,7 @@
import org.easymock.EasyMock;
import org.junit.AssumptionViolatedException;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -298,6 +299,7 @@
}
// throw AssertionFailedError
+ @Ignore
public void method9() throws AssertionFailedError {
assertTrue(false);
}
diff --git a/hostsidetests/abioverride/app/jni/Android.mk b/hostsidetests/abioverride/app/jni/Android.mk
index d806a2c..e8725bd 100644
--- a/hostsidetests/abioverride/app/jni/Android.mk
+++ b/hostsidetests/abioverride/app/jni/Android.mk
@@ -28,7 +28,8 @@
# Ignore unused parameters.
LOCAL_CFLAGS += -Wall -Werror -Wno-unused-parameter
-LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog libdl
-LOCAL_CXX_STL := none
+LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++
+LOCAL_NDK_STL_VARIANT := none
+LOCAL_SDK_VERSION := current
include $(BUILD_SHARED_LIBRARY)
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
index 87d8bd6..b9712a1 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
@@ -257,6 +257,8 @@
runDeviceTests(READ_PKG, ".ReadMultiViewTest", "testROAccess", user);
}
+ // for fuse file system
+ Thread.sleep(10000);
for (int user : mUsers) {
runDeviceTests(WRITE_PKG, ".WriteMultiViewTest", "testMoveBack", user);
}
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
index fa0120d..6bf71cf 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
@@ -79,6 +79,9 @@
runDeviceTests(PKG_A, CLASS, "testAllocate", user);
}
+ // for fuse file system
+ Thread.sleep(10000);
+
// TODO: remove this once 34723223 is fixed
getDevice().executeShellCommand("sync");
diff --git a/hostsidetests/appsecurity/test-apps/StorageStatsApp/src/com/android/cts/storagestatsapp/StorageStatsTest.java b/hostsidetests/appsecurity/test-apps/StorageStatsApp/src/com/android/cts/storagestatsapp/StorageStatsTest.java
index 713ba17..9b69057 100644
--- a/hostsidetests/appsecurity/test-apps/StorageStatsApp/src/com/android/cts/storagestatsapp/StorageStatsTest.java
+++ b/hostsidetests/appsecurity/test-apps/StorageStatsApp/src/com/android/cts/storagestatsapp/StorageStatsTest.java
@@ -223,6 +223,9 @@
useWrite(makeUniqueFile(pics), 5 * MB_IN_BYTES);
useWrite(makeUniqueFile(pics), 5 * MB_IN_BYTES);
+ // for fuse file system
+ Thread.sleep(10000);
+
// TODO: remove this once 34723223 is fixed
logCommand("sync");
diff --git a/hostsidetests/appsecurity/test-apps/UsePermissionApp23/src/com/android/cts/usepermission/UsePermissionTest23.java b/hostsidetests/appsecurity/test-apps/UsePermissionApp23/src/com/android/cts/usepermission/UsePermissionTest23.java
index b4ed09f..1d81df9 100644
--- a/hostsidetests/appsecurity/test-apps/UsePermissionApp23/src/com/android/cts/usepermission/UsePermissionTest23.java
+++ b/hostsidetests/appsecurity/test-apps/UsePermissionApp23/src/com/android/cts/usepermission/UsePermissionTest23.java
@@ -29,6 +29,7 @@
import android.content.pm.PackageManager;
import android.os.Environment;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -47,6 +48,7 @@
mWatch = pm.hasSystemFeature(PackageManager.FEATURE_WATCH);
}
+ @Ignore
public void testFail() throws Exception {
fail("Expected");
}
diff --git a/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/WriteExternalStorageTest.java b/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/WriteExternalStorageTest.java
index 81cf7b3..9a568b79 100644
--- a/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/WriteExternalStorageTest.java
+++ b/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/WriteExternalStorageTest.java
@@ -87,11 +87,15 @@
}
public void testWriteExternalStorage() throws Exception {
+ final long testValue = 12345000;
assertExternalStorageMounted();
// Write a value and make sure we can read it back
writeInt(TEST_FILE, 32);
assertEquals(readInt(TEST_FILE), 32);
+
+ assertTrue("Must be able to set last modified", TEST_FILE.setLastModified(testValue));
+ assertEquals(testValue, TEST_FILE.lastModified());
}
public void testWriteExternalStorageDirs() throws Exception {
diff --git a/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java b/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java
index 8dd589a..a508d47 100644
--- a/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java
+++ b/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java
@@ -20,6 +20,7 @@
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.log.LogUtil.CLog;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/hostsidetests/content/test-apps/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java b/hostsidetests/content/test-apps/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java
index 735de23..002c5d6 100644
--- a/hostsidetests/content/test-apps/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java
+++ b/hostsidetests/content/test-apps/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java
@@ -82,7 +82,7 @@
@Test
public void testAccountAccess_otherCertAsAuthenticatorCanNotSeeAccount() throws Exception {
- if (!hasDataConnection() || !hasNotificationSupport()) {
+ if (!hasDataConnection() || !hasNotificationSupport() || isRunningInVR()) {
return;
}
@@ -227,4 +227,11 @@
SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(),
"cmd netpolicy remove restrict-background-whitelist " + Process.myUid());
}
+
+ private boolean isRunningInVR() {
+ final Context context = InstrumentationRegistry.getTargetContext();
+ return ((context.getResources().getConfiguration().uiMode &
+ Configuration.UI_MODE_TYPE_MASK) == Configuration.UI_MODE_TYPE_VR_HEADSET);
+ }
+
}
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java
index e445347c..6eed964 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java
@@ -25,11 +25,15 @@
import com.android.cts.deviceandprofileowner.vpn.VpnTestHelper;
+import java.util.concurrent.TimeUnit;
+
/**
* Contains methods to test always-on VPN invoked by DeviceAndProfileOwnerTest
*/
public class AlwaysOnVpnMultiStageTest extends BaseDeviceAdminTest {
+ private final int MAX_NUMBER_OF_ATTEMPTS = 5;
+
public void testAlwaysOnSet() throws Exception {
// Setup always-on vpn
VpnTestHelper.waitForVpn(mContext, VPN_PACKAGE, /* usable */ true);
@@ -46,6 +50,9 @@
// After the vpn app being force-stop, expect that always-on package stays the same
assertEquals(VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage(
ADMIN_RECEIVER_COMPONENT));
+ for(int i = 0; i < MAX_NUMBER_OF_ATTEMPTS && VpnTestHelper.isNetworkVpn(mContext); ++i) {
+ Thread.sleep(TimeUnit.SECONDS.toMillis(1));
+ }
assertFalse(VpnTestHelper.isNetworkVpn(mContext));
// Expect the network is still locked down after the vpn app process is killed
try {
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AssistScreenCaptureDisabledTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AssistScreenCaptureDisabledTest.java
index db54ac3..d076920 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AssistScreenCaptureDisabledTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AssistScreenCaptureDisabledTest.java
@@ -87,7 +87,11 @@
Intent showSessionIntent = new Intent(ACTION_SHOW_SESSION);
showSessionIntent.setPackage(ASSIST_PACKAGE);
mContext.sendBroadcast(showSessionIntent);
- Intent screenShotIntent = receiver.awaitForBroadcast();
+ Intent screenShotIntent = null;
+ for (int i = 0; i < MAX_ATTEMPTS_COUNT && (screenShotIntent == null); ++ i) {
+ Log.d(TAG, "has not received intent yet: wait for intent, attempt " + i);
+ screenShotIntent = receiver.awaitForBroadcast();
+ }
Assert.assertNotNull(screenShotIntent);
Assert.assertTrue(screenShotIntent.hasExtra(KEY_HAS_SCREENSHOT));
assertEquals(possible, screenShotIntent.getBooleanExtra(KEY_HAS_SCREENSHOT, false));
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java
index a540c27..0159b128 100644
--- a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java
@@ -34,7 +34,7 @@
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import java.lang.reflect.Field;
-import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
/**
@@ -303,7 +303,7 @@
}
static class LocalBroadcastReceiver extends BroadcastReceiver {
- private SynchronousQueue<UserHandle> mQueue = new SynchronousQueue<UserHandle>();
+ private LinkedBlockingQueue<UserHandle> mQueue = new LinkedBlockingQueue<UserHandle>(1);
@Override
public void onReceive(Context context, Intent intent) {
diff --git a/hostsidetests/incident/apps/errorsapp/Android.mk b/hostsidetests/incident/apps/errorsapp/Android.mk
index 191e9b7..92b9001 100644
--- a/hostsidetests/incident/apps/errorsapp/Android.mk
+++ b/hostsidetests/incident/apps/errorsapp/Android.mk
@@ -26,10 +26,10 @@
LOCAL_MULTILIB := both
-LOCAL_JAVA_LIBRARIES := android.test.runner cts-junit
+LOCAL_JAVA_LIBRARIES := android.test.runner.stubs cts-junit
# Includes the jni code as a shared library
-LOCAL_JNI_SHARED_LIBRARIES := libcrash-jni libnativehelper
+LOCAL_JNI_SHARED_LIBRARIES := libcrash-jni
LOCAL_STATIC_JAVA_LIBRARIES := \
ctstestrunner \
diff --git a/hostsidetests/incident/src/com/android/server/cts/NotificationTest.java b/hostsidetests/incident/src/com/android/server/cts/NotificationTest.java
index f91c8a7..74f634d 100644
--- a/hostsidetests/incident/src/com/android/server/cts/NotificationTest.java
+++ b/hostsidetests/incident/src/com/android/server/cts/NotificationTest.java
@@ -62,19 +62,21 @@
assertTrue(found);
}
- // Tests default state: zen mode off, no suppressors
+ // Tests default state: zen mode is a valid/expected value
public void testZenMode() throws Exception {
final NotificationServiceDumpProto dump = getDump(NotificationServiceDumpProto.parser(),
"dumpsys notification --proto");
ZenModeProto zenProto = dump.getZen();
- assertEquals(ZenMode.ZEN_MODE_OFF, zenProto.getZenMode());
- assertEquals(0, zenProto.getEnabledActiveConditionsCount());
-
- // b/64606626 Watches intentionally suppress notifications always
- if (!getDevice().hasFeature(FEATURE_WATCH)) {
- assertEquals(0, zenProto.getSuppressedEffects());
- assertEquals(0, zenProto.getSuppressorsCount());
+ switch(zenProto.getZenMode()) {
+ case ZEN_MODE_OFF:
+ case ZEN_MODE_IMPORTANT_INTERRUPTIONS:
+ case ZEN_MODE_NO_INTERRUPTIONS:
+ case ZEN_MODE_ALARMS:
+ break;
+ default:
+ fail("Unexpected ZenMode value");
+ break;
}
zenProto.getPolicy();
diff --git a/hostsidetests/jvmti/attaching/app/jni/Android.mk b/hostsidetests/jvmti/attaching/app/jni/Android.mk
index 16f2bc1..a2c1db6 100644
--- a/hostsidetests/jvmti/attaching/app/jni/Android.mk
+++ b/hostsidetests/jvmti/attaching/app/jni/Android.mk
@@ -27,14 +27,15 @@
LOCAL_HEADER_LIBRARIES := libopenjdkjvmti_headers
LOCAL_SHARED_LIBRARIES := liblog \
- libdl
+ libdl \
+ libz
# The test implementation. We get this provided by ART.
# Note: Needs to be "whole" as this exposes JNI functions.
LOCAL_WHOLE_STATIC_LIBRARIES := libctstiagent
-# Platform libraries that are not available to apps. Link in statically.
-LOCAL_STATIC_LIBRARIES += libbase
+# Platform libraries that may not be available to apps. Link in statically.
+LOCAL_STATIC_LIBRARIES += libbase_ndk
LOCAL_STRIP_MODULE := keep_symbols
@@ -58,6 +59,7 @@
-g \
-O0 \
-LOCAL_CXX_STL := libc++_static
+LOCAL_SDK_VERSION := current
+LOCAL_NDK_STL_VARIANT := c++_static
include $(BUILD_SHARED_LIBRARY)
diff --git a/hostsidetests/jvmti/base/jni/Android.mk b/hostsidetests/jvmti/base/jni/Android.mk
index 28b7ea3..8ecf315 100644
--- a/hostsidetests/jvmti/base/jni/Android.mk
+++ b/hostsidetests/jvmti/base/jni/Android.mk
@@ -36,14 +36,15 @@
LOCAL_HEADER_LIBRARIES := libopenjdkjvmti_headers
LOCAL_SHARED_LIBRARIES := liblog \
- libdl
+ libdl \
+ libz
# The test implementation. We get this provided by ART.
# Note: Needs to be "whole" as this exposes JNI functions.
LOCAL_WHOLE_STATIC_LIBRARIES := libctstiagent
-# Platform libraries that are not available to apps. Link in statically.
-LOCAL_STATIC_LIBRARIES += libbase
+# Platform libraries that may not be available to apps. Link in statically.
+LOCAL_STATIC_LIBRARIES += libbase_ndk
LOCAL_STRIP_MODULE := keep_symbols
@@ -67,6 +68,7 @@
-g \
-O0 \
-LOCAL_CXX_STL := libc++_static
+LOCAL_SDK_VERSION := current
+LOCAL_NDK_STL_VARIANT := c++_static
include $(BUILD_SHARED_LIBRARY)
diff --git a/hostsidetests/jvmti/base/run-test-based-app/src/android/jvmti/cts/JvmtiRunTestBasedTest.java b/hostsidetests/jvmti/base/run-test-based-app/src/android/jvmti/cts/JvmtiRunTestBasedTest.java
index 312a882..fcb718a 100644
--- a/hostsidetests/jvmti/base/run-test-based-app/src/android/jvmti/cts/JvmtiRunTestBasedTest.java
+++ b/hostsidetests/jvmti/base/run-test-based-app/src/android/jvmti/cts/JvmtiRunTestBasedTest.java
@@ -20,6 +20,7 @@
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
import android.content.pm.PackageManager;
@@ -55,14 +56,53 @@
PackageManager.GET_META_DATA).metaData.getInt("android.jvmti.cts.run_test_nr");
}
+ // Some tests are very sensitive to state of the thread they are running on. To support this we
+ // can have tests run on newly created threads. This defaults to false.
+ protected boolean needNewThread() throws Exception {
+ return mActivity
+ .getPackageManager()
+ .getApplicationInfo(mActivity.getPackageName(), PackageManager.GET_META_DATA)
+ .metaData
+ .getBoolean("android.jvmti.cts.needs_new_thread", /*defaultValue*/false);
+ }
+
@Test
public void testRunTest() throws Exception {
final int nr = getTestNumber();
// Load the test class.
Class<?> testClass = Class.forName("art.Test" + nr);
- Method runMethod = testClass.getDeclaredMethod("run");
- runMethod.invoke(null);
+ final Method runMethod = testClass.getDeclaredMethod("run");
+ if (needNewThread()) {
+ // Make sure the thread the test is running on has the right name. Some tests are
+ // sensitive to this. Ideally we would also avoid having a try-catch too but that is more
+ // trouble than it's worth.
+ final Throwable[] final_throw = new Throwable[] { null };
+ Thread main_thread = new Thread(
+ () -> {
+ try {
+ runMethod.invoke(null);
+ } catch (IllegalArgumentException e) {
+ throw new Error("Exception thrown", e);
+ } catch (InvocationTargetException e) {
+ throw new Error("Exception thrown", e);
+ } catch (NullPointerException e) {
+ throw new Error("Exception thrown", e);
+ } catch (IllegalAccessException e) {
+ throw new Error("Exception thrown", e);
+ }
+ }, "main");
+ main_thread.setUncaughtExceptionHandler((thread, e) -> { final_throw[0] = e; });
+
+ main_thread.start();
+ main_thread.join();
+
+ if (final_throw[0] != null) {
+ throw new InvocationTargetException(final_throw[0], "Remote exception occurred.");
+ }
+ } else {
+ runMethod.invoke(null);
+ }
// Load the expected txt file.
InputStream expectedStream = getClass().getClassLoader()
diff --git a/hostsidetests/jvmti/run-tests/Android.mk b/hostsidetests/jvmti/run-tests/Android.mk
index 66ec37d..3628877 100644
--- a/hostsidetests/jvmti/run-tests/Android.mk
+++ b/hostsidetests/jvmti/run-tests/Android.mk
@@ -20,6 +20,14 @@
src/902-hello-transformation/src/art/Redefinition.java \
src/903-hello-tagging/src/art/Main.java \
src/989-method-trace-throw/src/art/Trace.java \
+ src/993-breakpoints/src/art/Breakpoint.java \
+ src/1902-suspend/src/art/Suspension.java \
+ src/1911-get-local-var-table/src/art/Locals.java \
+ src/1912-get-set-local-primitive/src/art/StackTrace.java \
+ src/1923-frame-pop/src/art/FramePop.java \
+ src/1927-exception-event/src/art/Exceptions.java \
+ src/1930-monitor-info/src/art/Monitors.java \
+ src/1934-jvmti-signal-thread/src/art/Threads.java \
LOCAL_SRC_FILES := $(LOCAL_SHIM_CLASSES)
@@ -71,6 +79,7 @@
src/947-reflect-method/src/art/Test947.java \
src/951-threaded-obsolete/src/art/Test951.java \
src/982-ok-no-retransform/src/art/Test982.java \
+ src/983-source-transform-verify/src/art/Test983.java \
src/984-obsolete-invoke/src/art/Test984.java \
src/985-re-obsolete/src/art/Test985.java \
src/986-native-method-bind/src/art/Test986.java \
@@ -81,6 +90,48 @@
src/991-field-trace-2/src/art/Test991.java \
src/992-source-data/src/art/Test992.java \
src/992-source-data/src/art/Target2.java \
+ src/993-breakpoints/src/art/Test993.java \
+ src/994-breakpoint-line/src/art/Test994.java \
+ src/995-breakpoints-throw/src/art/Test995.java \
+ src/996-breakpoint-obsolete/src/art/Test996.java \
+ src/997-single-step/src/art/Test997.java \
+ src/1900-track-alloc/src/art/Test1900.java \
+ src/1901-get-bytecodes/src/art/Test1901.java \
+ src/1902-suspend/src/art/Test1902.java \
+ src/1903-suspend-self/src/art/Test1903.java \
+ src/1904-double-suspend/src/art/Test1904.java \
+ src/1906-suspend-list-me-first/src/art/Test1906.java \
+ src/1907-suspend-list-self-twice/src/art/Test1907.java \
+ src/1908-suspend-native-resume-self/src/art/Test1908.java \
+ src/1909-per-agent-tls/src/art/Test1909.java \
+ src/1910-transform-with-default/src/art/Test1910.java \
+ src/1911-get-local-var-table/src/art/Test1911.java \
+ src/1912-get-set-local-primitive/src/art/Test1912.java \
+ src/1913-get-set-local-objects/src/art/Test1913.java \
+ src/1914-get-local-instance/src/art/Test1914.java \
+ src/1915-get-set-local-current-thread/src/art/Test1915.java \
+ src/1916-get-set-current-frame/src/art/Test1916.java \
+ src/1917-get-stack-frame/src/art/Test1917.java \
+ src/1920-suspend-native-monitor/src/art/Test1920.java \
+ src/1921-suspend-native-recursive-monitor/src/art/Test1921.java \
+ src/1922-owned-monitors-info/src/art/Test1922.java \
+ src/1923-frame-pop/src/art/Test1923.java \
+ src/1924-frame-pop-toggle/src/art/Test1924.java \
+ src/1925-self-frame-pop/src/art/Test1925.java \
+ src/1926-missed-frame-pop/src/art/Test1926.java \
+ src/1927-exception-event/src/art/Test1927.java \
+ src/1928-exception-event-exception/src/art/Test1928.java \
+ src/1930-monitor-info/src/art/Test1930.java \
+ src/1931-monitor-events/src/art/Test1931.java \
+ src/1932-monitor-events-misc/src/art/Test1932.java \
+ src/1933-monitor-current-contended/src/art/Test1933.java \
+ src/1934-jvmti-signal-thread/src/art/Test1934.java \
+ src/1936-thread-end-events/src/art/Test1936.java \
+ src/1937-transform-soft-fail/src/art/Test1937.java \
+ src/1939-proxy-frames/src/art/Test1939.java \
+ src/1941-dispose-stress/src/art/Test1941.java \
+ src/1942-suspend-raw-monitor-exit/src/art/Test1942.java \
+ src/1943-suspend-raw-monitor-wait/src/art/Test1943.java \
JVMTI_RUN_TEST_GENERATED_NUMBERS := \
901 \
@@ -119,6 +170,7 @@
947 \
951 \
982 \
+ 983 \
984 \
985 \
986 \
@@ -127,6 +179,48 @@
990 \
991 \
992 \
+ 993 \
+ 994 \
+ 995 \
+ 996 \
+ 997 \
+ 1900 \
+ 1901 \
+ 1902 \
+ 1903 \
+ 1904 \
+ 1906 \
+ 1907 \
+ 1908 \
+ 1909 \
+ 1910 \
+ 1911 \
+ 1912 \
+ 1913 \
+ 1914 \
+ 1915 \
+ 1916 \
+ 1917 \
+ 1920 \
+ 1921 \
+ 1922 \
+ 1923 \
+ 1924 \
+ 1925 \
+ 1926 \
+ 1927 \
+ 1928 \
+ 1930 \
+ 1931 \
+ 1932 \
+ 1933 \
+ 1934 \
+ 1936 \
+ 1937 \
+ 1939 \
+ 1941 \
+ 1942 \
+ 1943 \
# Try to enforce that the directories correspond to the Java files we pull in.
JVMTI_RUN_TEST_DIR_CHECK := $(sort $(foreach DIR,$(addprefix src/,$(JVMTI_RUN_TEST_GENERATED_NUMBERS)), \
diff --git a/hostsidetests/jvmti/run-tests/test-1900/Android.mk b/hostsidetests/jvmti/run-tests/test-1900/Android.mk
new file mode 100644
index 0000000..9a5ce4d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1900/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1900HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1900/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1900/AndroidTest.xml
new file mode 100644
index 0000000..c042f22
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1900/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1900DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1900HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1900DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1900" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1900/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1900/app/Android.mk
new file mode 100644
index 0000000..652bdd6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1900/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1900DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1900/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1900/app/AndroidManifest.xml
new file mode 100644
index 0000000..ef26e2a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1900/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1900">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1900" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1900" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1900/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1900/jarjar-rules.txt
new file mode 100644
index 0000000..3d35782
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1900/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1900@1
diff --git a/hostsidetests/jvmti/run-tests/test-1901/Android.mk b/hostsidetests/jvmti/run-tests/test-1901/Android.mk
new file mode 100644
index 0000000..5a9a15a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1901/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1901HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1901/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1901/AndroidTest.xml
new file mode 100644
index 0000000..2ad6ce1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1901/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1901DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1901HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1901DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1901" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1901/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1901/app/Android.mk
new file mode 100644
index 0000000..341017e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1901/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1901DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1901/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1901/app/AndroidManifest.xml
new file mode 100644
index 0000000..a92dff1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1901/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1901">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1901" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1901" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1901/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1901/jarjar-rules.txt
new file mode 100644
index 0000000..14aef84
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1901/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1901@1
diff --git a/hostsidetests/jvmti/run-tests/test-1902/Android.mk b/hostsidetests/jvmti/run-tests/test-1902/Android.mk
new file mode 100644
index 0000000..6801941
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1902/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1902HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1902/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1902/AndroidTest.xml
new file mode 100644
index 0000000..9144779
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1902/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1902DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1902HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1902DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1902" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1902/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1902/app/Android.mk
new file mode 100644
index 0000000..6c33fb1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1902/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1902DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1902/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1902/app/AndroidManifest.xml
new file mode 100644
index 0000000..eb40444
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1902/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1902">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1902" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1902" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1902/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1902/jarjar-rules.txt
new file mode 100644
index 0000000..8e2108e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1902/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1902@1
diff --git a/hostsidetests/jvmti/run-tests/test-1903/Android.mk b/hostsidetests/jvmti/run-tests/test-1903/Android.mk
new file mode 100644
index 0000000..1905fe6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1903/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1903HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1903/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1903/AndroidTest.xml
new file mode 100644
index 0000000..6aeb66c
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1903/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1903DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1903HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1903DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1903" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1903/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1903/app/Android.mk
new file mode 100644
index 0000000..769b0d3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1903/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1903DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1903/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1903/app/AndroidManifest.xml
new file mode 100644
index 0000000..b810728
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1903/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1903">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1903" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1903" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1903/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1903/jarjar-rules.txt
new file mode 100644
index 0000000..976ec64
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1903/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1903@1
diff --git a/hostsidetests/jvmti/run-tests/test-1904/Android.mk b/hostsidetests/jvmti/run-tests/test-1904/Android.mk
new file mode 100644
index 0000000..7be2c74
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1904/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1904HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1904/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1904/AndroidTest.xml
new file mode 100644
index 0000000..86633dd
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1904/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1904DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1904HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1904DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1904" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1904/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1904/app/Android.mk
new file mode 100644
index 0000000..cca1889
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1904/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1904DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1904/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1904/app/AndroidManifest.xml
new file mode 100644
index 0000000..d3780f6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1904/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1904">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1904" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1904" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1904/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1904/jarjar-rules.txt
new file mode 100644
index 0000000..7c0b6ec
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1904/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1904@1
diff --git a/hostsidetests/jvmti/run-tests/test-1906/Android.mk b/hostsidetests/jvmti/run-tests/test-1906/Android.mk
new file mode 100644
index 0000000..baef96b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1906/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1906HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1906/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1906/AndroidTest.xml
new file mode 100644
index 0000000..fe51dfd
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1906/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1906DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1906HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1906DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1906" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1906/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1906/app/Android.mk
new file mode 100644
index 0000000..38c19d7
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1906/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1906DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1906/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1906/app/AndroidManifest.xml
new file mode 100644
index 0000000..120a603
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1906/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1906">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1906" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1906" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1906/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1906/jarjar-rules.txt
new file mode 100644
index 0000000..e5f4a94
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1906/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1906@1
diff --git a/hostsidetests/jvmti/run-tests/test-1907/Android.mk b/hostsidetests/jvmti/run-tests/test-1907/Android.mk
new file mode 100644
index 0000000..208aaaf
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1907/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1907HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1907/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1907/AndroidTest.xml
new file mode 100644
index 0000000..e3cfbb5
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1907/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1907DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1907HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1907DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1907" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1907/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1907/app/Android.mk
new file mode 100644
index 0000000..21f1d14
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1907/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1907DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1907/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1907/app/AndroidManifest.xml
new file mode 100644
index 0000000..b939d8e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1907/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1907">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1907" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1907" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1907/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1907/jarjar-rules.txt
new file mode 100644
index 0000000..1c52734
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1907/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1907@1
diff --git a/hostsidetests/jvmti/run-tests/test-1908/Android.mk b/hostsidetests/jvmti/run-tests/test-1908/Android.mk
new file mode 100644
index 0000000..7a6301b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1908/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1908HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1908/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1908/AndroidTest.xml
new file mode 100644
index 0000000..7a1f578
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1908/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1908DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1908HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1908DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1908" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1908/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1908/app/Android.mk
new file mode 100644
index 0000000..b33f371
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1908/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1908DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1908/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1908/app/AndroidManifest.xml
new file mode 100644
index 0000000..89b460d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1908/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1908">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1908" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1908" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1908/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1908/jarjar-rules.txt
new file mode 100644
index 0000000..447785f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1908/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1908@1
diff --git a/hostsidetests/jvmti/run-tests/test-1909/Android.mk b/hostsidetests/jvmti/run-tests/test-1909/Android.mk
new file mode 100644
index 0000000..072b2aa
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1909/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1909HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1909/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1909/AndroidTest.xml
new file mode 100644
index 0000000..34d9df1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1909/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1909DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1909HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1909DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1909" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1909/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1909/app/Android.mk
new file mode 100644
index 0000000..1623513
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1909/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1909DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1909/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1909/app/AndroidManifest.xml
new file mode 100644
index 0000000..99cc928
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1909/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1909">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1909" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1909" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1909/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1909/jarjar-rules.txt
new file mode 100644
index 0000000..13345eb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1909/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1909@1
diff --git a/hostsidetests/jvmti/run-tests/test-1910/Android.mk b/hostsidetests/jvmti/run-tests/test-1910/Android.mk
new file mode 100644
index 0000000..c09991f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1910/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1910HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1910/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1910/AndroidTest.xml
new file mode 100644
index 0000000..123c998
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1910/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1910DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1910HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1910DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1910" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1910/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1910/app/Android.mk
new file mode 100644
index 0000000..0ea8361a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1910/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1910DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1910/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1910/app/AndroidManifest.xml
new file mode 100644
index 0000000..1c27327
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1910/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1910">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1910" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1910" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1910/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1910/jarjar-rules.txt
new file mode 100644
index 0000000..1ac6ec4
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1910/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1910@1
diff --git a/hostsidetests/jvmti/run-tests/test-1911/Android.mk b/hostsidetests/jvmti/run-tests/test-1911/Android.mk
new file mode 100644
index 0000000..91741bb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1911/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1911HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1911/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1911/AndroidTest.xml
new file mode 100644
index 0000000..aea50bb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1911/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1911DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1911HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1911DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1911" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1911/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1911/app/Android.mk
new file mode 100644
index 0000000..9ba694d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1911/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1911DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1911/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1911/app/AndroidManifest.xml
new file mode 100644
index 0000000..241f87d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1911/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1911">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1911" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1911" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1911/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1911/jarjar-rules.txt
new file mode 100644
index 0000000..d66adbc
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1911/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1911@1
diff --git a/hostsidetests/jvmti/run-tests/test-1912/Android.mk b/hostsidetests/jvmti/run-tests/test-1912/Android.mk
new file mode 100644
index 0000000..4ed9dc3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1912/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1912HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1912/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1912/AndroidTest.xml
new file mode 100644
index 0000000..2fe4159
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1912/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1912DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1912HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1912DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1912" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1912/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1912/app/Android.mk
new file mode 100644
index 0000000..cee385b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1912/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1912DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1912/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1912/app/AndroidManifest.xml
new file mode 100644
index 0000000..6a922db
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1912/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1912">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1912" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1912" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1912/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1912/jarjar-rules.txt
new file mode 100644
index 0000000..47b2e57
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1912/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1912@1
diff --git a/hostsidetests/jvmti/run-tests/test-1913/Android.mk b/hostsidetests/jvmti/run-tests/test-1913/Android.mk
new file mode 100644
index 0000000..977b262
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1913/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1913HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1913/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1913/AndroidTest.xml
new file mode 100644
index 0000000..be5ad38
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1913/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1913DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1913HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1913DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1913" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1913/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1913/app/Android.mk
new file mode 100644
index 0000000..06ab144
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1913/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1913DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1913/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1913/app/AndroidManifest.xml
new file mode 100644
index 0000000..18759ae
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1913/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1913">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1913" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1913" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1913/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1913/jarjar-rules.txt
new file mode 100644
index 0000000..c3d7731
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1913/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1913@1
diff --git a/hostsidetests/jvmti/run-tests/test-1914/Android.mk b/hostsidetests/jvmti/run-tests/test-1914/Android.mk
new file mode 100644
index 0000000..014dfb6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1914/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1914HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1914/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1914/AndroidTest.xml
new file mode 100644
index 0000000..0740b38
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1914/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1914DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1914HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1914DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1914" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1914/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1914/app/Android.mk
new file mode 100644
index 0000000..db66d59
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1914/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1914DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1914/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1914/app/AndroidManifest.xml
new file mode 100644
index 0000000..f684c4e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1914/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1914">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1914" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1914" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1914/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1914/jarjar-rules.txt
new file mode 100644
index 0000000..81d74e7
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1914/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1914@1
diff --git a/hostsidetests/jvmti/run-tests/test-1915/Android.mk b/hostsidetests/jvmti/run-tests/test-1915/Android.mk
new file mode 100644
index 0000000..3a55a8a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1915/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1915HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1915/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1915/AndroidTest.xml
new file mode 100644
index 0000000..13a3b8c
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1915/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1915DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1915HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1915DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1915" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1915/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1915/app/Android.mk
new file mode 100644
index 0000000..facc2cb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1915/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1915DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1915/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1915/app/AndroidManifest.xml
new file mode 100644
index 0000000..1212553
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1915/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1915">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1915" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1915" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1915/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1915/jarjar-rules.txt
new file mode 100644
index 0000000..3f5e11e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1915/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1915@1
diff --git a/hostsidetests/jvmti/run-tests/test-1916/Android.mk b/hostsidetests/jvmti/run-tests/test-1916/Android.mk
new file mode 100644
index 0000000..e66e650
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1916/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1916HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1916/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1916/AndroidTest.xml
new file mode 100644
index 0000000..bd65112
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1916/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1916DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1916HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1916DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1916" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1916/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1916/app/Android.mk
new file mode 100644
index 0000000..bd68d5d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1916/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1916DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1916/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1916/app/AndroidManifest.xml
new file mode 100644
index 0000000..9aacae5
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1916/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1916">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1916" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1916" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1916/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1916/jarjar-rules.txt
new file mode 100644
index 0000000..30d1f1e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1916/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1916@1
diff --git a/hostsidetests/jvmti/run-tests/test-1917/Android.mk b/hostsidetests/jvmti/run-tests/test-1917/Android.mk
new file mode 100644
index 0000000..c0c5640
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1917/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1917HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1917/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1917/AndroidTest.xml
new file mode 100644
index 0000000..f859f1a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1917/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1917DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1917HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1917DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1917" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1917/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1917/app/Android.mk
new file mode 100644
index 0000000..c433c98
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1917/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1917DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1917/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1917/app/AndroidManifest.xml
new file mode 100644
index 0000000..6bc75d6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1917/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1917">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1917" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1917" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1917/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1917/jarjar-rules.txt
new file mode 100644
index 0000000..c42dd49
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1917/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1917@1
diff --git a/hostsidetests/jvmti/run-tests/test-1920/Android.mk b/hostsidetests/jvmti/run-tests/test-1920/Android.mk
new file mode 100644
index 0000000..0b31554
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1920/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1920HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1920/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1920/AndroidTest.xml
new file mode 100644
index 0000000..56f2079
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1920/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1920DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1920HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1920DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1920" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1920/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1920/app/Android.mk
new file mode 100644
index 0000000..afdebed
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1920/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1920DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1920/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1920/app/AndroidManifest.xml
new file mode 100644
index 0000000..e0721f4
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1920/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1920">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1920" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1920" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1920/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1920/jarjar-rules.txt
new file mode 100644
index 0000000..9607917
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1920/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1920@1
diff --git a/hostsidetests/jvmti/run-tests/test-1921/Android.mk b/hostsidetests/jvmti/run-tests/test-1921/Android.mk
new file mode 100644
index 0000000..b2da6e0
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1921/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1921HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1921/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1921/AndroidTest.xml
new file mode 100644
index 0000000..bf57784
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1921/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1921DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1921HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1921DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1921" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1921/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1921/app/Android.mk
new file mode 100644
index 0000000..d8e6c53
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1921/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1921DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1921/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1921/app/AndroidManifest.xml
new file mode 100644
index 0000000..f49e52a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1921/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1921">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1921" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1921" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1921/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1921/jarjar-rules.txt
new file mode 100644
index 0000000..d2a5f4a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1921/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1921@1
diff --git a/hostsidetests/jvmti/run-tests/test-1922/Android.mk b/hostsidetests/jvmti/run-tests/test-1922/Android.mk
new file mode 100644
index 0000000..de543f3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1922/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1922HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1922/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1922/AndroidTest.xml
new file mode 100644
index 0000000..08a775a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1922/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1922DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1922HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1922DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1922" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1922/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1922/app/Android.mk
new file mode 100644
index 0000000..4b06ad9
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1922/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1922DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1922/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1922/app/AndroidManifest.xml
new file mode 100644
index 0000000..ed425d2
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1922/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1922">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1922" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1922" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1922/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1922/jarjar-rules.txt
new file mode 100644
index 0000000..461e696
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1922/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1922@1
diff --git a/hostsidetests/jvmti/run-tests/test-1923/Android.mk b/hostsidetests/jvmti/run-tests/test-1923/Android.mk
new file mode 100644
index 0000000..2905d09
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1923/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1923HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1923/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1923/AndroidTest.xml
new file mode 100644
index 0000000..5f30957
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1923/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1923DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1923HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1923DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1923" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1923/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1923/app/Android.mk
new file mode 100644
index 0000000..e5e5118
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1923/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1923DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1923/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1923/app/AndroidManifest.xml
new file mode 100644
index 0000000..00feead
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1923/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1923">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1923" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1923" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1923/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1923/jarjar-rules.txt
new file mode 100644
index 0000000..02b3459
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1923/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1923@1
diff --git a/hostsidetests/jvmti/run-tests/test-1924/Android.mk b/hostsidetests/jvmti/run-tests/test-1924/Android.mk
new file mode 100644
index 0000000..dfe7dfa
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1924/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1924HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1924/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1924/AndroidTest.xml
new file mode 100644
index 0000000..ea7fe12
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1924/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1924DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1924HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1924DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1924" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1924/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1924/app/Android.mk
new file mode 100644
index 0000000..66f590d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1924/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1924DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1924/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1924/app/AndroidManifest.xml
new file mode 100644
index 0000000..b4c0563
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1924/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1924">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1924" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1924" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1924/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1924/jarjar-rules.txt
new file mode 100644
index 0000000..f6f867d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1924/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1924@1
diff --git a/hostsidetests/jvmti/run-tests/test-1925/Android.mk b/hostsidetests/jvmti/run-tests/test-1925/Android.mk
new file mode 100644
index 0000000..9ae558d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1925/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1925HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1925/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1925/AndroidTest.xml
new file mode 100644
index 0000000..5116d65
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1925/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1925DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1925HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1925DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1925" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1925/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1925/app/Android.mk
new file mode 100644
index 0000000..93df6e6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1925/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1925DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1925/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1925/app/AndroidManifest.xml
new file mode 100644
index 0000000..e8fbe57
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1925/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1925">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1925" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1925" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1925/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1925/jarjar-rules.txt
new file mode 100644
index 0000000..299a329
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1925/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1925@1
diff --git a/hostsidetests/jvmti/run-tests/test-1926/Android.mk b/hostsidetests/jvmti/run-tests/test-1926/Android.mk
new file mode 100644
index 0000000..5e22792
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1926/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1926HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1926/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1926/AndroidTest.xml
new file mode 100644
index 0000000..23250a0
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1926/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1926DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1926HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1926DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1926" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1926/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1926/app/Android.mk
new file mode 100644
index 0000000..d416713
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1926/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1926DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1926/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1926/app/AndroidManifest.xml
new file mode 100644
index 0000000..4a034c2
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1926/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1926">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1926" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1926" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1926/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1926/jarjar-rules.txt
new file mode 100644
index 0000000..d1ef1ca
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1926/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1926@1
diff --git a/hostsidetests/jvmti/run-tests/test-1927/Android.mk b/hostsidetests/jvmti/run-tests/test-1927/Android.mk
new file mode 100644
index 0000000..d57f679
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1927/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1927HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1927/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1927/AndroidTest.xml
new file mode 100644
index 0000000..018eaa2
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1927/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1927DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1927HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1927DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1927" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1927/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1927/app/Android.mk
new file mode 100644
index 0000000..f3efc78
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1927/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1927DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1927/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1927/app/AndroidManifest.xml
new file mode 100644
index 0000000..35e619b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1927/app/AndroidManifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1927">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1927" />
+ <meta-data android:name="android.jvmti.cts.needs_new_thread" android:value="true" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1927" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1927/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1927/jarjar-rules.txt
new file mode 100644
index 0000000..465dbf5
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1927/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1927@1
diff --git a/hostsidetests/jvmti/run-tests/test-1928/Android.mk b/hostsidetests/jvmti/run-tests/test-1928/Android.mk
new file mode 100644
index 0000000..cd22479
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1928/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1928HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1928/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1928/AndroidTest.xml
new file mode 100644
index 0000000..6abb462
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1928/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1928DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1928HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1928DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1928" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1928/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1928/app/Android.mk
new file mode 100644
index 0000000..e1fb753
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1928/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1928DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1928/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1928/app/AndroidManifest.xml
new file mode 100644
index 0000000..5e75ed0
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1928/app/AndroidManifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1928">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1928" />
+ <meta-data android:name="android.jvmti.cts.needs_new_thread" android:value="true" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1928" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1928/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1928/jarjar-rules.txt
new file mode 100644
index 0000000..74d24c4
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1928/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1928@1
diff --git a/hostsidetests/jvmti/run-tests/test-1930/Android.mk b/hostsidetests/jvmti/run-tests/test-1930/Android.mk
new file mode 100644
index 0000000..c5f5d99
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1930/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1930HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1930/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1930/AndroidTest.xml
new file mode 100644
index 0000000..52042c5
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1930/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1930DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1930HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1930DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1930" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1930/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1930/app/Android.mk
new file mode 100644
index 0000000..b825307
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1930/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1930DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1930/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1930/app/AndroidManifest.xml
new file mode 100644
index 0000000..89fe2b3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1930/app/AndroidManifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1930">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1930" />
+ <meta-data android:name="android.jvmti.cts.needs_new_thread" android:value="true" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1930" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1930/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1930/jarjar-rules.txt
new file mode 100644
index 0000000..85fa2f1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1930/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1930@1
diff --git a/hostsidetests/jvmti/run-tests/test-1931/Android.mk b/hostsidetests/jvmti/run-tests/test-1931/Android.mk
new file mode 100644
index 0000000..7f8596c
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1931/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1931HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1931/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1931/AndroidTest.xml
new file mode 100644
index 0000000..df176fd
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1931/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1931DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1931HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1931DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1931" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1931/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1931/app/Android.mk
new file mode 100644
index 0000000..cbc56bb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1931/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1931DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1931/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1931/app/AndroidManifest.xml
new file mode 100644
index 0000000..6372cd4
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1931/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1931">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1931" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1931" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1931/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1931/jarjar-rules.txt
new file mode 100644
index 0000000..ad4e1e9
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1931/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1931@1
diff --git a/hostsidetests/jvmti/run-tests/test-1932/Android.mk b/hostsidetests/jvmti/run-tests/test-1932/Android.mk
new file mode 100644
index 0000000..3ef295b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1932/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1932HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1932/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1932/AndroidTest.xml
new file mode 100644
index 0000000..3d88bc4
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1932/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1932DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1932HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1932DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1932" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1932/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1932/app/Android.mk
new file mode 100644
index 0000000..e2c8bb2
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1932/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1932DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1932/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1932/app/AndroidManifest.xml
new file mode 100644
index 0000000..d22c20d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1932/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1932">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1932" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1932" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1932/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1932/jarjar-rules.txt
new file mode 100644
index 0000000..4f2fef9
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1932/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1932@1
diff --git a/hostsidetests/jvmti/run-tests/test-1933/Android.mk b/hostsidetests/jvmti/run-tests/test-1933/Android.mk
new file mode 100644
index 0000000..e7ba6e5
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1933/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1933HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1933/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1933/AndroidTest.xml
new file mode 100644
index 0000000..4d87c55
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1933/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1933DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1933HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1933DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1933" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1933/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1933/app/Android.mk
new file mode 100644
index 0000000..dd8cee3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1933/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1933DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1933/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1933/app/AndroidManifest.xml
new file mode 100644
index 0000000..7d0fcc6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1933/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1933">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1933" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1933" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1933/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1933/jarjar-rules.txt
new file mode 100644
index 0000000..db40460
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1933/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1933@1
diff --git a/hostsidetests/jvmti/run-tests/test-1934/Android.mk b/hostsidetests/jvmti/run-tests/test-1934/Android.mk
new file mode 100644
index 0000000..7495f9f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1934/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1934HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1934/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1934/AndroidTest.xml
new file mode 100644
index 0000000..c7ee6f1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1934/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1934DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1934HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1934DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1934" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1934/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1934/app/Android.mk
new file mode 100644
index 0000000..aa190f7
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1934/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1934DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1934/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1934/app/AndroidManifest.xml
new file mode 100644
index 0000000..a7b005b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1934/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1934">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1934" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1934" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1934/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1934/jarjar-rules.txt
new file mode 100644
index 0000000..12b909e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1934/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1934@1
diff --git a/hostsidetests/jvmti/run-tests/test-1936/Android.mk b/hostsidetests/jvmti/run-tests/test-1936/Android.mk
new file mode 100644
index 0000000..f4d006d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1936/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1936HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1936/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1936/AndroidTest.xml
new file mode 100644
index 0000000..e5ff702
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1936/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1936DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1936HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1936DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1936" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1936/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1936/app/Android.mk
new file mode 100644
index 0000000..eff34af
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1936/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1936DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1936/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1936/app/AndroidManifest.xml
new file mode 100644
index 0000000..0241071
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1936/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1936">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1936" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1936" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1936/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1936/jarjar-rules.txt
new file mode 100644
index 0000000..9cf4ef7
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1936/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1936@1
diff --git a/hostsidetests/jvmti/run-tests/test-1937/Android.mk b/hostsidetests/jvmti/run-tests/test-1937/Android.mk
new file mode 100644
index 0000000..6c1ce2d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1937/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1937HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1937/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1937/AndroidTest.xml
new file mode 100644
index 0000000..9ea6184
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1937/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1937DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1937HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1937DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1937" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1937/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1937/app/Android.mk
new file mode 100644
index 0000000..adabfd6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1937/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1937DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1937/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1937/app/AndroidManifest.xml
new file mode 100644
index 0000000..795e3b2
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1937/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1937">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1937" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1937" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1937/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1937/jarjar-rules.txt
new file mode 100644
index 0000000..b1c4d88
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1937/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1937@1
diff --git a/hostsidetests/jvmti/run-tests/test-1939/Android.mk b/hostsidetests/jvmti/run-tests/test-1939/Android.mk
new file mode 100644
index 0000000..a2e39e0
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1939/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1939HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1939/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1939/AndroidTest.xml
new file mode 100644
index 0000000..ac510c1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1939/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1939DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1939HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1939DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1939" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1939/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1939/app/Android.mk
new file mode 100644
index 0000000..fb2de3f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1939/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1939DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1939/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1939/app/AndroidManifest.xml
new file mode 100644
index 0000000..3c5814d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1939/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1939">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1939" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1939" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1939/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1939/jarjar-rules.txt
new file mode 100644
index 0000000..052887f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1939/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1939@1
diff --git a/hostsidetests/jvmti/run-tests/test-1941/Android.mk b/hostsidetests/jvmti/run-tests/test-1941/Android.mk
new file mode 100644
index 0000000..d03e486
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1941/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1941HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1941/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1941/AndroidTest.xml
new file mode 100644
index 0000000..dc68b7a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1941/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1941DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1941HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1941DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1941" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1941/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1941/app/Android.mk
new file mode 100644
index 0000000..75540fa
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1941/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1941DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1941/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1941/app/AndroidManifest.xml
new file mode 100644
index 0000000..f80234a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1941/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1941">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1941" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1941" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1941/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1941/jarjar-rules.txt
new file mode 100644
index 0000000..8b3bb2f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1941/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1941@1
diff --git a/hostsidetests/jvmti/run-tests/test-1942/Android.mk b/hostsidetests/jvmti/run-tests/test-1942/Android.mk
new file mode 100644
index 0000000..754bd2d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1942/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1942HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1942/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1942/AndroidTest.xml
new file mode 100644
index 0000000..15913d3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1942/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1942DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1942HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1942DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1942" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1942/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1942/app/Android.mk
new file mode 100644
index 0000000..c3f6d0e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1942/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1942DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1942/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1942/app/AndroidManifest.xml
new file mode 100644
index 0000000..14cd1c7
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1942/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1942">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1942" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1942" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1942/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1942/jarjar-rules.txt
new file mode 100644
index 0000000..afe1edd
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1942/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1942@1
diff --git a/hostsidetests/jvmti/run-tests/test-1943/Android.mk b/hostsidetests/jvmti/run-tests/test-1943/Android.mk
new file mode 100644
index 0000000..19e44aa
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1943/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest1943HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-1943/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-1943/AndroidTest.xml
new file mode 100644
index 0000000..c03d4d9
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1943/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest1943DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest1943HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest1943DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_1943" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-1943/app/Android.mk b/hostsidetests/jvmti/run-tests/test-1943/app/Android.mk
new file mode 100644
index 0000000..e53b894
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1943/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest1943DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-1943/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-1943/app/AndroidManifest.xml
new file mode 100644
index 0000000..79efdd5
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1943/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_1943">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="1943" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_1943" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-1943/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-1943/jarjar-rules.txt
new file mode 100644
index 0000000..51fbad3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-1943/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest1943@1
diff --git a/hostsidetests/jvmti/run-tests/test-983/Android.mk b/hostsidetests/jvmti/run-tests/test-983/Android.mk
new file mode 100644
index 0000000..ba6ff0d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-983/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest983HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-983/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-983/AndroidTest.xml
new file mode 100644
index 0000000..707d790
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-983/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art"/>
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true"/>
+ <option name="test-file-name" value="CtsJvmtiRunTest983DeviceApp.apk"/>
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest">
+ <option name="jar" value="CtsJvmtiRunTest983HostTestCases.jar"/>
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest983DeviceApp.apk"/>
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_983"/>
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-983/app/Android.mk b/hostsidetests/jvmti/run-tests/test-983/app/Android.mk
new file mode 100644
index 0000000..458e794
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-983/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest983DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-983/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-983/app/AndroidManifest.xml
new file mode 100644
index 0000000..c7a04e8
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-983/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_983">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="983" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_983" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-983/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-983/jarjar-rules.txt
new file mode 100644
index 0000000..1f32824
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-983/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest983@1
diff --git a/hostsidetests/jvmti/run-tests/test-988/Android.mk b/hostsidetests/jvmti/run-tests/test-988/Android.mk
new file mode 100644
index 0000000..b58099d
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-988/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest988HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-988/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-988/AndroidTest.xml
new file mode 100644
index 0000000..edb8e2f
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-988/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest988DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest988HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest988DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_988" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-988/app/Android.mk b/hostsidetests/jvmti/run-tests/test-988/app/Android.mk
new file mode 100644
index 0000000..6ae9f78
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-988/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest988DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-988/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-988/app/AndroidManifest.xml
new file mode 100644
index 0000000..b4f7af8
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-988/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_988">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="988" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_988" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-988/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-988/jarjar-rules.txt
new file mode 100644
index 0000000..a0be15b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-988/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest988@1
diff --git a/hostsidetests/jvmti/run-tests/test-989/Android.mk b/hostsidetests/jvmti/run-tests/test-989/Android.mk
new file mode 100644
index 0000000..c01cead
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-989/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest989HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-989/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-989/AndroidTest.xml
new file mode 100644
index 0000000..46224f0
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-989/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest989DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest989HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest989DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_989" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-989/app/Android.mk b/hostsidetests/jvmti/run-tests/test-989/app/Android.mk
new file mode 100644
index 0000000..44b62c3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-989/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest989DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-989/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-989/app/AndroidManifest.xml
new file mode 100644
index 0000000..c04d145
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-989/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_989">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="989" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_989" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-989/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-989/jarjar-rules.txt
new file mode 100644
index 0000000..5347c96
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-989/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest989@1
diff --git a/hostsidetests/jvmti/run-tests/test-990/Android.mk b/hostsidetests/jvmti/run-tests/test-990/Android.mk
new file mode 100644
index 0000000..f5e1afe
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-990/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest990HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-990/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-990/AndroidTest.xml
new file mode 100644
index 0000000..9603521
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-990/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest990DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest990HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest990DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_990" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-990/app/Android.mk b/hostsidetests/jvmti/run-tests/test-990/app/Android.mk
new file mode 100644
index 0000000..f207638
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-990/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest990DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-990/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-990/app/AndroidManifest.xml
new file mode 100644
index 0000000..6d6f063
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-990/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_990">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="990" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_990" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-990/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-990/jarjar-rules.txt
new file mode 100644
index 0000000..05ff861
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-990/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest990@1
diff --git a/hostsidetests/jvmti/run-tests/test-991/Android.mk b/hostsidetests/jvmti/run-tests/test-991/Android.mk
new file mode 100644
index 0000000..d590fec
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-991/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest991HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-991/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-991/AndroidTest.xml
new file mode 100644
index 0000000..771978a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-991/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest991DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest991HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest991DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_991" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-991/app/Android.mk b/hostsidetests/jvmti/run-tests/test-991/app/Android.mk
new file mode 100644
index 0000000..68642bf
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-991/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest991DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-991/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-991/app/AndroidManifest.xml
new file mode 100644
index 0000000..e12e42a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-991/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_991">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="991" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_991" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-991/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-991/jarjar-rules.txt
new file mode 100644
index 0000000..5a102bb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-991/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest991@1
diff --git a/hostsidetests/jvmti/run-tests/test-992/Android.mk b/hostsidetests/jvmti/run-tests/test-992/Android.mk
new file mode 100644
index 0000000..0ec2b83
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-992/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest992HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-992/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-992/AndroidTest.xml
new file mode 100644
index 0000000..814dff6
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-992/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest992DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest992HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest992DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_992" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-992/app/Android.mk b/hostsidetests/jvmti/run-tests/test-992/app/Android.mk
new file mode 100644
index 0000000..62d7ab8
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-992/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest992DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-992/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-992/app/AndroidManifest.xml
new file mode 100644
index 0000000..a6e156c
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-992/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_992">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="992" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_992" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-992/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-992/jarjar-rules.txt
new file mode 100644
index 0000000..c612356
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-992/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest992@1
diff --git a/hostsidetests/jvmti/run-tests/test-993/Android.mk b/hostsidetests/jvmti/run-tests/test-993/Android.mk
new file mode 100644
index 0000000..0aa0d44
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-993/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest993HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-993/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-993/AndroidTest.xml
new file mode 100644
index 0000000..951a3bf
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-993/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest993DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest993HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest993DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_993" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-993/app/Android.mk b/hostsidetests/jvmti/run-tests/test-993/app/Android.mk
new file mode 100644
index 0000000..4837c64
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-993/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest993DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-993/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-993/app/AndroidManifest.xml
new file mode 100644
index 0000000..68a04cc
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-993/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_993">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="993" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_993" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-993/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-993/jarjar-rules.txt
new file mode 100644
index 0000000..3207971
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-993/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest993@1
diff --git a/hostsidetests/jvmti/run-tests/test-994/Android.mk b/hostsidetests/jvmti/run-tests/test-994/Android.mk
new file mode 100644
index 0000000..05a8155
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-994/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest994HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-994/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-994/AndroidTest.xml
new file mode 100644
index 0000000..47d61dc
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-994/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest994DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest994HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest994DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_994" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-994/app/Android.mk b/hostsidetests/jvmti/run-tests/test-994/app/Android.mk
new file mode 100644
index 0000000..d0defbc
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-994/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest994DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-994/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-994/app/AndroidManifest.xml
new file mode 100644
index 0000000..af8bab8
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-994/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_994">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="994" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_994" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-994/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-994/jarjar-rules.txt
new file mode 100644
index 0000000..c6a1777
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-994/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest994@1
diff --git a/hostsidetests/jvmti/run-tests/test-995/Android.mk b/hostsidetests/jvmti/run-tests/test-995/Android.mk
new file mode 100644
index 0000000..a64ce78
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-995/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest995HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-995/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-995/AndroidTest.xml
new file mode 100644
index 0000000..0278f01
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-995/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest995DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest995HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest995DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_995" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-995/app/Android.mk b/hostsidetests/jvmti/run-tests/test-995/app/Android.mk
new file mode 100644
index 0000000..150ec26
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-995/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest995DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-995/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-995/app/AndroidManifest.xml
new file mode 100644
index 0000000..7887bf3
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-995/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_995">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="995" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_995" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-995/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-995/jarjar-rules.txt
new file mode 100644
index 0000000..fe0106e
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-995/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest995@1
diff --git a/hostsidetests/jvmti/run-tests/test-996/Android.mk b/hostsidetests/jvmti/run-tests/test-996/Android.mk
new file mode 100644
index 0000000..771067b
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-996/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest996HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-996/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-996/AndroidTest.xml
new file mode 100644
index 0000000..208c34c
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-996/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest996DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest996HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest996DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_996" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-996/app/Android.mk b/hostsidetests/jvmti/run-tests/test-996/app/Android.mk
new file mode 100644
index 0000000..d0500bb
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-996/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest996DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-996/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-996/app/AndroidManifest.xml
new file mode 100644
index 0000000..7f9a22a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-996/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_996">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="996" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_996" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-996/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-996/jarjar-rules.txt
new file mode 100644
index 0000000..6c11b5a
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-996/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest996@1
diff --git a/hostsidetests/jvmti/run-tests/test-997/Android.mk b/hostsidetests/jvmti/run-tests/test-997/Android.mk
new file mode 100644
index 0000000..54db2af
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-997/Android.mk
@@ -0,0 +1,21 @@
+# Copyright (C) 2014 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CtsJvmtiRunTest997HostTestCases
+
+include $(LOCAL_PATH)/../../host_side.mk
diff --git a/hostsidetests/jvmti/run-tests/test-997/AndroidTest.xml b/hostsidetests/jvmti/run-tests/test-997/AndroidTest.xml
new file mode 100644
index 0000000..7c50579
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-997/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for CTS JVMTI test cases">
+ <option name="test-suite-tag" value="cts"/>
+ <option name="config-descriptor:metadata" key="component" value="art" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsJvmtiRunTest997DeviceApp.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsJvmtiRunTest997HostTestCases.jar" />
+ <option name="set-option" value="test-file-name:CtsJvmtiRunTest997DeviceApp.apk" />
+ <option name="set-option" value="package-name:android.jvmti.cts.run_test_997" />
+ <option name="runtime-hint" value="8s"/>
+ </test>
+</configuration>
diff --git a/hostsidetests/jvmti/run-tests/test-997/app/Android.mk b/hostsidetests/jvmti/run-tests/test-997/app/Android.mk
new file mode 100644
index 0000000..4ea37b1
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-997/app/Android.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2017 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_DEX_PREOPT := false
+LOCAL_PROGUARD_ENABLED := disabled
+LOCAL_SRC_FILES :=
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_STATIC_JAVA_LIBRARIES := CtsJvmtiDeviceRunTestAppBase
+LOCAL_JNI_SHARED_LIBRARIES := libctsjvmtiagent
+LOCAL_MULTILIB := both
+LOCAL_SDK_VERSION := current
+
+# TODO: Refactor. This is the only thing every changing.
+LOCAL_PACKAGE_NAME := CtsJvmtiRunTest997DeviceApp
+
+include $(BUILD_PACKAGE)
diff --git a/hostsidetests/jvmti/run-tests/test-997/app/AndroidManifest.xml b/hostsidetests/jvmti/run-tests/test-997/app/AndroidManifest.xml
new file mode 100644
index 0000000..5dd570c
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-997/app/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2017 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.jvmti.cts.run_test_997">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ <meta-data android:name="android.jvmti.cts.run_test_nr" android:value="997" />
+ <activity android:name="android.jvmti.JvmtiActivity" >
+ </activity>
+ </application>
+
+ <!-- self-instrumenting test package. -->
+ <instrumentation
+ android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:label="CTS tests for JVMTI"
+ android:targetPackage="android.jvmti.cts.run_test_997" >
+ </instrumentation>
+</manifest>
+
diff --git a/hostsidetests/jvmti/run-tests/test-997/jarjar-rules.txt b/hostsidetests/jvmti/run-tests/test-997/jarjar-rules.txt
new file mode 100644
index 0000000..cb35d91
--- /dev/null
+++ b/hostsidetests/jvmti/run-tests/test-997/jarjar-rules.txt
@@ -0,0 +1 @@
+rule android.jvmti.cts.JvmtiHostTest** android.jvmti.cts.JvmtiHostTest997@1
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.mk b/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.mk
index 69ed15f..38a051a 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.mk
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.mk
@@ -34,4 +34,6 @@
LOCAL_EXPORT_PACKAGE_RESOURCES := true
+LOCAL_SDK_VERSION := current
+
include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/hostsidetests/security/securityPatch/CVE-2017-0521/Android.mk b/hostsidetests/security/securityPatch/CVE-2017-0521/Android.mk
index c61f95f..118bf7c 100644
--- a/hostsidetests/security/securityPatch/CVE-2017-0521/Android.mk
+++ b/hostsidetests/security/securityPatch/CVE-2017-0521/Android.mk
@@ -21,6 +21,10 @@
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
+# This test relies on a particular implementation of ion, so needs to use
+# the frozen headers from libion.
+LOCAL_C_INCLUDES := $(TOP)/system/core/libion/kernel-headers
+
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts
LOCAL_CTS_TEST_PACKAGE := android.security.cts
diff --git a/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java b/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java
index 45b30c6..1f0a567 100644
--- a/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java
+++ b/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java
@@ -300,6 +300,15 @@
return isFullTrebleDevice(mDevice);
}
+ // NOTE: cts/tools/selinux depends on this method. Rename/change with caution.
+ /**
+ * Returns {@code true} if this device is required to enforce compatible property.
+ */
+ public static boolean isCompatiblePropertyEnforcedDevice(ITestDevice device)
+ throws DeviceNotAvailableException {
+ return PropertyUtil.getFirstApiLevel(device) > 27;
+ }
+
/**
* Asserts that no vendor domains are exempted from the prohibition on Binder use.
*
diff --git a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/KeyguardLockedTests.java b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/KeyguardLockedTests.java
index a441e56..b3d7add 100644
--- a/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/KeyguardLockedTests.java
+++ b/hostsidetests/services/activityandwindowmanager/activitymanager/src/android/server/cts/KeyguardLockedTests.java
@@ -177,6 +177,7 @@
mAmWmState.assertVisibility(SHOW_WHEN_LOCKED_ACTIVITY, true);
gotoKeyguard();
+ mAmWmState.computeState(mDevice, null);
mAmWmState.waitForKeyguardShowingAndOccluded(mDevice);
assertShowingAndOccluded();
mAmWmState.assertVisibility(SHOW_WHEN_LOCKED_ACTIVITY, true);
diff --git a/hostsidetests/services/activityandwindowmanager/windowmanager/src/android/server/cts/AlertWindowsTests.java b/hostsidetests/services/activityandwindowmanager/windowmanager/src/android/server/cts/AlertWindowsTests.java
index bfed6d5..3290ddb 100644
--- a/hostsidetests/services/activityandwindowmanager/windowmanager/src/android/server/cts/AlertWindowsTests.java
+++ b/hostsidetests/services/activityandwindowmanager/windowmanager/src/android/server/cts/AlertWindowsTests.java
@@ -106,15 +106,34 @@
assertAlertWindows(packageName, hasAlertWindowPermission, atLeastO);
}
+ private boolean allWindowsHidden(ArrayList<WindowManagerState.WindowState> windows) {
+ for (WindowManagerState.WindowState ws : windows) {
+ if (ws.isShown()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
private void assertAlertWindows(String packageName, boolean hasAlertWindowPermission,
- boolean atLeastO) {
+ boolean atLeastO) throws DeviceNotAvailableException {
final WindowManagerState wMState = mAmWmState.getWmState();
final ArrayList<WindowManagerState.WindowState> alertWindows = new ArrayList();
wMState.getWindowsByPackageName(packageName, mAlertWindowTypes, alertWindows);
if (!hasAlertWindowPermission) {
- assertTrue("Should be empty alertWindows=" + alertWindows, alertWindows.isEmpty());
+ // When running in VR Mode, an App Op restriction is
+ // in place for SYSTEM_ALERT_WINDOW, which allows the window
+ // to be created, but will be hidden instead.
+ if (isUiModeLockedToVrHeadset()) {
+ assertTrue("Should not be empty alertWindows=" + alertWindows,
+ !alertWindows.isEmpty());
+ assertTrue("All alert windows should be hidden",
+ allWindowsHidden(alertWindows));
+ } else {
+ assertTrue("Should be empty alertWindows=" + alertWindows, alertWindows.isEmpty());
+ }
return;
}
diff --git a/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java b/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java
index 78dc3d4..8709f14 100644
--- a/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java
+++ b/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java
@@ -415,6 +415,5 @@
new TimePickerModifier()),
new Layout(R.layout.togglebutton_checked, "togglebutton_checked"),
new Layout(R.layout.togglebutton, "togglebutton"),
- new Layout(R.layout.zoomcontrols, "zoomcontrols"),
};
}
diff --git a/tests/JobScheduler/src/android/jobscheduler/cts/ConnectivityConstraintTest.java b/tests/JobScheduler/src/android/jobscheduler/cts/ConnectivityConstraintTest.java
index c08b249..4486c15 100644
--- a/tests/JobScheduler/src/android/jobscheduler/cts/ConnectivityConstraintTest.java
+++ b/tests/JobScheduler/src/android/jobscheduler/cts/ConnectivityConstraintTest.java
@@ -28,6 +28,8 @@
import android.net.wifi.WifiManager;
import android.util.Log;
+import com.android.compatibility.common.util.SystemUtil;
+
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -40,6 +42,12 @@
@TargetApi(21)
public class ConnectivityConstraintTest extends ConstraintTest {
private static final String TAG = "ConnectivityConstraintTest";
+ private static final String RESTRICT_BACKGROUND_GET_CMD =
+ "cmd netpolicy get restrict-background";
+ private static final String RESTRICT_BACKGROUND_ON_CMD =
+ "cmd netpolicy set restrict-background true";
+ private static final String RESTRICT_BACKGROUND_OFF_CMD =
+ "cmd netpolicy set restrict-background false";
/** Unique identifier for the job scheduled by this suite of tests. */
public static final int CONNECTIVITY_JOB_ID = ConnectivityConstraintTest.class.hashCode();
@@ -53,6 +61,8 @@
private boolean mHasTelephony;
/** Track whether WiFi was enabled in case we turn it off. */
private boolean mInitialWiFiState;
+ /** Track whether restrict background policy was enabled in case we turn it off. */
+ private boolean mInitialRestrictBackground;
private JobInfo.Builder mBuilder;
@@ -71,12 +81,20 @@
new JobInfo.Builder(CONNECTIVITY_JOB_ID, kJobServiceComponent);
mInitialWiFiState = mWifiManager.isWifiEnabled();
+ mInitialRestrictBackground = SystemUtil
+ .runShellCommand(getInstrumentation(), RESTRICT_BACKGROUND_GET_CMD)
+ .contains("enabled");
}
@Override
public void tearDown() throws Exception {
mJobScheduler.cancel(CONNECTIVITY_JOB_ID);
+ // Restore initial restrict background data usage policy
+ if (mInitialRestrictBackground) {
+ SystemUtil.runShellCommand(getInstrumentation(), RESTRICT_BACKGROUND_ON_CMD);
+ }
+
// Ensure that we leave WiFi in its previous state.
if (mWifiManager.isWifiEnabled() == mInitialWiFiState) {
return;
@@ -174,6 +192,7 @@
if (!checkDeviceSupportsMobileData()) {
return;
}
+ ensureRestrictBackgroundPolicyOff();
disconnectWifiToConnectToMobile();
kTestEnvironment.setExpectedExecutions(1);
@@ -313,6 +332,16 @@
}
}
+ /**
+ * Ensures that restrict background data usage policy is turned off.
+ * If the policy is on, it interferes with tests that relies on metered connection.
+ */
+ private void ensureRestrictBackgroundPolicyOff() throws Exception {
+ if (mInitialRestrictBackground) {
+ SystemUtil.runShellCommand(getInstrumentation(), RESTRICT_BACKGROUND_OFF_CMD);
+ }
+ }
+
/** Capture the last connectivity change's network type and state. */
private class ConnectivityActionReceiver extends BroadcastReceiver {
diff --git a/tests/accessibilityservice/AndroidManifest.xml b/tests/accessibilityservice/AndroidManifest.xml
index cf6b774..c40f7aa 100644
--- a/tests/accessibilityservice/AndroidManifest.xml
+++ b/tests/accessibilityservice/AndroidManifest.xml
@@ -52,7 +52,8 @@
<activity
android:label="Full screen activity for gesture dispatch testing"
- android:name=".AccessibilityGestureDispatchTest$GestureDispatchActivity" />
+ android:name=".AccessibilityGestureDispatchTest$GestureDispatchActivity"
+ android:screenOrientation="portrait" />
<service
android:name=".StubGestureAccessibilityService"
diff --git a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityGestureDispatchTest.java b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityGestureDispatchTest.java
index df8c6f3..aa30f77 100644
--- a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityGestureDispatchTest.java
+++ b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityGestureDispatchTest.java
@@ -34,6 +34,8 @@
import android.os.SystemClock;
import android.test.ActivityInstrumentationTestCase2;
import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
@@ -52,6 +54,8 @@
*/
public class AccessibilityGestureDispatchTest extends
ActivityInstrumentationTestCase2<AccessibilityGestureDispatchTest.GestureDispatchActivity> {
+ private static final String TAG = AccessibilityGestureDispatchTest.class.getSimpleName();
+
private static final int GESTURE_COMPLETION_TIMEOUT = 5000; // millis
private static final int MOTION_EVENT_TIMEOUT = 1000; // millis
@@ -300,6 +304,12 @@
return;
}
+ int displayId = getActivity().getWindow().getDecorView().getDisplay().getDisplayId();
+ if (displayId != Display.DEFAULT_DISPLAY) {
+ Log.i(TAG, "Magnification is not supported on virtual displays.");
+ return;
+ }
+
final WindowManager wm = (WindowManager) getInstrumentation().getContext().getSystemService(
Context.WINDOW_SERVICE);
final StubMagnificationAccessibilityService magnificationService =
diff --git a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java
index 49c209f..eb8e0e8 100644
--- a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java
+++ b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java
@@ -140,26 +140,6 @@
assertTrue(mKeyboardController.removeOnShowModeChangedListener(listener));
}
- public void testHideSoftKeyboard_shouldHideKeyboardOnRequest() throws Exception {
- // The soft keyboard should be in its default mode.
- assertEquals(SHOW_MODE_AUTO, mKeyboardController.getShowMode());
-
- if (!tryShowSoftInput()) {
- // If the current (default) IME declined to show its window, then there is nothing we
- // can test here.
- // TODO: Create a mock IME so that we can test only the framework behavior.
- return;
- }
-
- waitForImePresentToBe(true);
- // Request the keyboard be hidden.
- assertTrue(mKeyboardController.setShowMode(SHOW_MODE_HIDDEN));
-
- waitForImePresentToBe(false);
-
- assertTrue(mKeyboardController.setShowMode(SHOW_MODE_AUTO));
- }
-
private void waitForCallbackValueWithLock(int expectedValue) throws Exception {
long timeoutTimeMillis = SystemClock.uptimeMillis() + TIMEOUT_PROPAGATE_SETTING;
@@ -180,89 +160,8 @@
+ "> does not match expected value < " + expectedValue + ">");
}
- private void waitForWindowChanges() {
- try {
- mUiAutomation.executeAndWaitForEvent(new Runnable() {
- @Override
- public void run() {
- // Do nothing.
- }
- },
- new UiAutomation.AccessibilityEventFilter() {
- @Override
- public boolean accept (AccessibilityEvent event) {
- return event.getEventType() == AccessibilityEvent.TYPE_WINDOWS_CHANGED;
- }
- },
- TIMEOUT_PROPAGATE_SETTING);
- } catch (TimeoutException ignored) {
- // Ignore since the event could have occurred before this method was called. There
- // should be a check after this method returns to catch incorrect values.
- }
- }
-
- private boolean isImeWindowPresent() {
- List<AccessibilityWindowInfo> windows = mUiAutomation.getWindows();
- for (int i = 0; i < windows.size(); i++) {
- if (windows.get(i).getType() == AccessibilityWindowInfo.TYPE_INPUT_METHOD) {
- return true;
- }
- }
- return false;
- }
-
- private void waitForImePresentToBe(boolean imeShown) {
- long timeOutTime = System.currentTimeMillis() + TIMEOUT_ASYNC_PROCESSING;
- while (isImeWindowPresent() != imeShown) {
- assertTrue(System.currentTimeMillis() < timeOutTime);
- waitForWindowChanges();
- }
- }
-
/**
- * Tries to call {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int)} to see if
- * software keyboard is shown as a result or not.
- * @return {@code true} if the current input method reported that it is currently shown
- * @throws Exception when the result is unknown, including the system did not return the result
- * within {@link #TIMEOUT_SHOW_SOFTINPUT_RESULT}
- */
- private boolean tryShowSoftInput() throws Exception {
- final BlockingQueue<Integer> queue = new ArrayBlockingQueue<>(1);
-
- getInstrumentation().runOnMainSync(() -> {
- Activity activity = getActivity();
- ResultReceiver resultReceiver =
- new ResultReceiver(new Handler(activity.getMainLooper())) {
- @Override
- protected void onReceiveResult(int resultCode, Bundle resultData) {
- queue.add(resultCode);
- }
- };
- View editText = activity.findViewById(R.id.edit_text);
- activity.getSystemService(InputMethodManager.class)
- .showSoftInput(editText, InputMethodManager.SHOW_FORCED, resultReceiver);
- });
-
- Integer result;
- try {
- result = queue.poll(TIMEOUT_SHOW_SOFTINPUT_RESULT, TimeUnit.MILLISECONDS);
- } catch (InterruptedException e) {
- throw new Exception("Failed to get the result of showSoftInput().", e);
- }
- if (result == null) {
- throw new Exception("Failed to get the result of showSoftInput() within timeout.");
- }
- switch (result) {
- case InputMethodManager.RESULT_SHOWN:
- case InputMethodManager.RESULT_UNCHANGED_SHOWN:
- return true;
- default:
- return false;
- }
- }
-
- /**
- * Activity for testing the AccessibilityService API for hiding and showring the soft keyboard.
+ * Activity for testing the AccessibilityService API for hiding and showing the soft keyboard.
*/
public static class SoftKeyboardModesActivity extends AccessibilityTestActivity {
public SoftKeyboardModesActivity() {
diff --git a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
index 31292c3..18c02e5 100755
--- a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
+++ b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
@@ -26,7 +26,9 @@
import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
+import android.app.ActivityManager;
import android.app.UiAutomation;
+import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Rect;
@@ -43,6 +45,8 @@
import android.widget.Button;
import android.accessibilityservice.cts.R;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -617,13 +621,22 @@
// Do nothing, assume split screen multi window is supported.
}
- // Get com.android.internal.R.bool.config_supportsMultiWindow
- if (!getInstrumentation().getContext().getResources().getBoolean(
- Resources.getSystem().getIdentifier("config_supportsMultiWindow", "bool",
- "android"))) {
- // Check if multiWindow is supported.
+ /* In P as ActivityManager.supportsMultiWindow() becomes a @TestAPI
+ i.e. a compatibility requirement, make the test fail in the next API */
+ try {
+ final Method method = ActivityManager.class
+ .getMethod("supportsMultiWindow", Context.class);
+ if (!(Boolean)method.invoke(getInstrumentation().getContext().getSystemService(
+ ActivityManager.class), getInstrumentation().getContext())) {
+ // Check if multiWindow is supported.
+ return;
+ }
+ } catch (NoSuchMethodException e) {
+ } catch (IllegalAccessException e) {
+ } catch (InvocationTargetException e) {
return;
}
+
setAccessInteractiveWindowsFlag();
final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
assertFalse(isDividerWindowPresent(uiAutomation));
diff --git a/tests/app/src/android/app/cts/ApplicationTest.java b/tests/app/src/android/app/cts/ApplicationTest.java
index 664d3ee..ee1758d 100644
--- a/tests/app/src/android/app/cts/ApplicationTest.java
+++ b/tests/app/src/android/app/cts/ApplicationTest.java
@@ -21,16 +21,25 @@
import android.app.Instrumentation;
import android.app.stubs.MockApplication;
import android.app.stubs.MockApplicationActivity;
-import android.app.stubs.OrientationTestUtils;
import android.content.Context;
import android.content.Intent;
-import android.content.pm.PackageManager;
import android.test.InstrumentationTestCase;
+import com.android.compatibility.common.util.SystemUtil;
+
/**
* Test {@link Application}.
*/
public class ApplicationTest extends InstrumentationTestCase {
+ private static final String ERASE_FONT_SCALE_CMD = "settings delete system font_scale";
+ // 2 is an arbitrary value.
+ private static final String PUT_FONT_SCALE_CMD = "settings put system font_scale 2";
+
+ @Override
+ public void tearDown() throws Exception {
+ SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD);
+ }
+
public void testApplication() throws Throwable {
final Instrumentation instrumentation = getInstrumentation();
@@ -43,27 +52,30 @@
final MockApplication mockApp = (MockApplication) activity.getApplication();
assertTrue(mockApp.isConstructorCalled);
assertTrue(mockApp.isOnCreateCalled);
+ toggleFontScale();
+ assertTrue(waitForOnConfigurationChange(mockApp));
+ }
- //skip if the device doesn't support both of portrait and landscape orientation screens.
- final PackageManager pm = targetContext.getPackageManager();
- if(!(pm.hasSystemFeature(PackageManager.FEATURE_SCREEN_LANDSCAPE)
- && pm.hasSystemFeature(PackageManager.FEATURE_SCREEN_PORTRAIT))){
- return;
- }
+ // Font scale is a global configuration.
+ // This function will delete any previous font scale changes, apply one, and remove it.
+ private void toggleFontScale() throws Throwable {
+ SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD);
+ getInstrumentation().waitForIdleSync();
+ SystemUtil.runShellCommand(getInstrumentation(), PUT_FONT_SCALE_CMD);
+ getInstrumentation().waitForIdleSync();
+ SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD);
+ }
- runTestOnUiThread(new Runnable() {
- public void run() {
- OrientationTestUtils.toggleOrientation(activity);
+ // Wait for a maximum of 5 seconds for global config change to occur.
+ private boolean waitForOnConfigurationChange(MockApplication mockApp) throws Throwable {
+ int retriesLeft = 5;
+ while(retriesLeft-- > 0) {
+ if (mockApp.isOnConfigurationChangedCalled) {
+ return true;
}
- });
- instrumentation.waitForIdleSync();
- final boolean isInMultiwindowMode = activity.isInMultiWindowMode();
- if (activity.isInMultiWindowMode()) {
- assertFalse("Orientation change should not trigger global configuration change when "
- + " in multi-window mode.", mockApp.isOnConfigurationChangedCalled);
- } else {
- assertTrue(mockApp.isOnConfigurationChangedCalled);
+ Thread.sleep(1000);
}
+ return false;
}
}
diff --git a/tests/app/src/android/app/cts/PipActivityTest.java b/tests/app/src/android/app/cts/PipActivityTest.java
index a8cfc90..bceb748 100644
--- a/tests/app/src/android/app/cts/PipActivityTest.java
+++ b/tests/app/src/android/app/cts/PipActivityTest.java
@@ -17,6 +17,7 @@
package android.app.cts;
import android.app.Instrumentation;
+import android.app.PictureInPictureParams;
import android.app.stubs.PipActivity;
import android.test.ActivityInstrumentationTestCase2;
@@ -58,9 +59,9 @@
} else {
boolean pipSupportDisabled = false;
try {
- mActivity.enterPictureInPictureMode();
+ pipSupportDisabled = !mActivity.enterPictureInPictureMode(
+ new PictureInPictureParams.Builder().build());
} catch (IllegalStateException e) {
- // Pip not supported
pipSupportDisabled = true;
}
assertTrue(pipSupportDisabled);
diff --git a/tests/app/src/android/app/cts/PipNotSupportedActivityTest.java b/tests/app/src/android/app/cts/PipNotSupportedActivityTest.java
index d33ff4d..810c353 100644
--- a/tests/app/src/android/app/cts/PipNotSupportedActivityTest.java
+++ b/tests/app/src/android/app/cts/PipNotSupportedActivityTest.java
@@ -17,6 +17,7 @@
package android.app.cts;
import android.app.Instrumentation;
+import android.app.PictureInPictureParams;
import android.app.stubs.PipNotSupportedActivity;
import android.test.ActivityInstrumentationTestCase2;
@@ -42,7 +43,8 @@
public void run() {
boolean pipSupportDisabled = false;
try {
- mActivity.enterPictureInPictureMode();
+ pipSupportDisabled = !mActivity.enterPictureInPictureMode(
+ new PictureInPictureParams.Builder().build());
} catch (IllegalStateException e) {
// Pip not supported
pipSupportDisabled = true;
diff --git a/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java b/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java
index 33f0943..210fab8 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/CustomDescriptionWithLinkTestCase.java
@@ -25,6 +25,7 @@
import android.support.test.uiautomator.UiObject2;
import android.widget.RemoteViews;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -166,6 +167,7 @@
* the Save UI should have been canceled.
*/
@Test
+ @Ignore("Test fail on some devices because Recents UI is not well defined: b/72044685")
public final void testTapLink_backToPreviousActivityByTappingRecents()
throws Exception {
saveUiCancelledAfterTappingLinkTest(PostSaveLinkTappedAction.TAP_RECENTS);
diff --git a/tests/autofillservice/src/android/autofillservice/cts/Helper.java b/tests/autofillservice/src/android/autofillservice/cts/Helper.java
index c1a70f0..b11ba01 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/Helper.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/Helper.java
@@ -107,6 +107,11 @@
static final int UI_SCREEN_ORIENTATION_TIMEOUT_MS = 5000;
/**
+ * Timeout (in milliseconds) for using Recents to swtich activities.
+ */
+ static final int UI_RECENTS_SWITCH_TIMEOUT_MS = 200;
+
+ /**
* Time to wait in between retries
*/
static final int RETRY_MS = 100;
diff --git a/tests/autofillservice/src/android/autofillservice/cts/LoginActivityTest.java b/tests/autofillservice/src/android/autofillservice/cts/LoginActivityTest.java
index 898ca84..ab25326 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/LoginActivityTest.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/LoginActivityTest.java
@@ -86,6 +86,7 @@
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -1188,6 +1189,7 @@
}
@Test
+ @Ignore("Test fail on some devices because Recents UI is not well defined: b/72044685")
public void testSaveGoesAwayWhenTappingRecentsButton() throws Exception {
// Launches new activity first...
startCheckoutActivityAsNewTask();
diff --git a/tests/autofillservice/src/android/autofillservice/cts/PartitionedActivityTest.java b/tests/autofillservice/src/android/autofillservice/cts/PartitionedActivityTest.java
index d458940..b9d99f5 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/PartitionedActivityTest.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/PartitionedActivityTest.java
@@ -52,6 +52,8 @@
import org.junit.Rule;
import org.junit.Test;
+import java.util.concurrent.TimeoutException;
+
/**
* Test case for an activity containing multiple partitions.
*/
@@ -68,6 +70,30 @@
mActivity = mActivityRule.getActivity();
}
+ /**
+ * Focus to a cell and expect window event
+ */
+ void focusCell(int row, int column) throws TimeoutException {
+ sUiBot.waitForWindowChange(() -> mActivity.focusCell(row, column),
+ Helper.UI_TIMEOUT_MS);
+ }
+
+ /**
+ * Focus to a cell and expect no window event.
+ */
+ void focusCellNoWindowChange(int row, int column) {
+ try {
+ // TODO: define a small value in Timeout
+ sUiBot.waitForWindowChange(() -> mActivity.focusCell(row, column),
+ Helper.UI_TIMEOUT_MS);
+ } catch (TimeoutException ex) {
+ // no window events! looking good
+ return;
+ }
+ throw new IllegalStateException(String.format("Expect no window event when focusing to"
+ + " column %d row %d, but event happened", row, column));
+ }
+
@Test
public void testAutofillTwoPartitionsSkipFirst() throws Exception {
// Set service.
@@ -83,7 +109,7 @@
sReplier.addResponse(response1);
// Trigger auto-fill on 1st partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
final FillRequest fillRequest1 = sReplier.getNextFillRequest();
assertThat(fillRequest1.flags).isEqualTo(0);
final ViewNode p1l1c1 = assertTextIsSanitized(fillRequest1.structure, ID_L1C1);
@@ -93,7 +119,7 @@
// Make sure UI is shown, but don't tap it.
sUiBot.assertDatasets("l1c1");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("l1c2");
// Now tap a field in a different partition
@@ -106,7 +132,7 @@
sReplier.addResponse(response2);
// Trigger auto-fill on 2nd partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
final FillRequest fillRequest2 = sReplier.getNextFillRequest();
assertThat(fillRequest2.flags).isEqualTo(0);
final ViewNode p2l1c1 = assertTextIsSanitized(fillRequest2.structure, ID_L1C1);
@@ -119,14 +145,14 @@
assertWithMessage("Focus on p2l2c2").that(p2l2c2.isFocused()).isFalse();
// Make sure UI is shown, but don't tap it.
sUiBot.assertDatasets("l2c1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("l2c2");
// Now fill them
final FillExpectation expectation1 = mActivity.expectAutofill()
.onCell(1, 1, "l1c1")
.onCell(1, 2, "l1c2");
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.selectDataset("l1c1");
expectation1.assertAutoFilled();
@@ -137,7 +163,7 @@
final FillExpectation expectation2 = mActivity.expectAutofill()
.onCell(2, 1, "l2c1")
.onCell(2, 2, "l2c2");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.selectDataset("l2c2");
expectation2.assertAutoFilled();
@@ -166,7 +192,7 @@
.onCell(1, 2, "l1c2");
// Trigger auto-fill.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
final FillRequest fillRequest1 = sReplier.getNextFillRequest();
assertThat(fillRequest1.flags).isEqualTo(0);
@@ -194,7 +220,7 @@
.onCell(2, 2, "l2c2");
// Trigger auto-fill.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
final FillRequest fillRequest2 = sReplier.getNextFillRequest();
assertThat(fillRequest2.flags).isEqualTo(0);
@@ -387,7 +413,7 @@
.onCell(1, 2, "l1c2");
// Trigger auto-fill.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
final FillRequest fillRequest1 = sReplier.getNextFillRequest();
assertThat(fillRequest1.flags).isEqualTo(0);
@@ -448,7 +474,7 @@
.onCell(3, 2, "l3c2");
// Trigger auto-fill.
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
final FillRequest fillRequest3 = sReplier.getNextFillRequest();
assertThat(fillRequest3.flags).isEqualTo(0);
@@ -521,7 +547,7 @@
sReplier.addResponse(response1);
// Trigger auto-fill on 1st partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
final FillRequest fillRequest1 = sReplier.getNextFillRequest();
assertThat(fillRequest1.flags).isEqualTo(0);
assertThat(fillRequest1.data).isNull();
@@ -542,7 +568,7 @@
sReplier.addResponse(response2);
// Trigger auto-fill on 2nd partition
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
final FillRequest fillRequest2 = sReplier.getNextFillRequest();
assertThat(fillRequest2.flags).isEqualTo(0);
assertWithMessage("null bundle on request 2").that(fillRequest2.data).isNotNull();
@@ -561,7 +587,7 @@
sReplier.addResponse(response3);
// Trigger auto-fill on 3rd partition
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
final FillRequest fillRequest3 = sReplier.getNextFillRequest();
assertThat(fillRequest3.flags).isEqualTo(0);
assertWithMessage("null bundle on request 3").that(fillRequest2.data).isNotNull();
@@ -586,7 +612,7 @@
sReplier.addResponse(response4);
// Trigger auto-fill on 4th partition
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
final FillRequest fillRequest4 = sReplier.getNextFillRequest();
assertThat(fillRequest4.flags).isEqualTo(0);
assertWithMessage("non-null bundle on request 4").that(fillRequest4.data).isNull();
@@ -616,7 +642,7 @@
.build())
.build();
sReplier.addResponse(response1);
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Trigger 2nd partition.
@@ -628,7 +654,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_L2C1)
.build();
sReplier.addResponse(response2);
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Trigger save
@@ -653,7 +679,7 @@
.build())
.build();
sReplier.addResponse(response1);
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Trigger 2nd partition.
@@ -665,7 +691,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_L1C1)
.build();
sReplier.addResponse(response2);
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Trigger save
@@ -691,7 +717,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_L1C1)
.build();
sReplier.addResponse(response1);
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Trigger 2nd partition.
@@ -704,7 +730,7 @@
ID_L2C1)
.build();
sReplier.addResponse(response2);
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Trigger save
@@ -732,7 +758,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_L1C1)
.build();
sReplier.addResponse(response1);
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Trigger 2nd partition.
@@ -745,7 +771,7 @@
ID_L2C1)
.build();
sReplier.addResponse(response2);
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Trigger 3rd partition.
@@ -758,7 +784,7 @@
| SAVE_DATA_TYPE_USERNAME, ID_L3C1)
.build();
sReplier.addResponse(response3);
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
// Trigger save
@@ -789,7 +815,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_L1C1)
.build();
sReplier.addResponse(response1);
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Trigger 2nd partition.
@@ -801,7 +827,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD | SAVE_DATA_TYPE_GENERIC, ID_L2C1)
.build();
sReplier.addResponse(response2);
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Trigger 3rd partition.
@@ -815,7 +841,7 @@
ID_L3C1)
.build();
sReplier.addResponse(response3);
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
@@ -847,7 +873,7 @@
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_L1C1)
.build();
sReplier.addResponse(response1);
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Trigger 2nd partition.
@@ -860,7 +886,7 @@
ID_L2C1)
.build();
sReplier.addResponse(response2);
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Trigger 3rd partition.
@@ -873,7 +899,7 @@
| SAVE_DATA_TYPE_USERNAME, ID_L3C1)
.build();
sReplier.addResponse(response3);
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
// Trigger 4th partition.
@@ -886,7 +912,7 @@
| SAVE_DATA_TYPE_USERNAME | SAVE_DATA_TYPE_ADDRESS, ID_L4C1)
.build();
sReplier.addResponse(response4);
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
@@ -921,7 +947,7 @@
sReplier.addResponse(response1);
// Trigger auto-fill on 1st partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
final FillRequest fillRequest1 = sReplier.getNextFillRequest();
assertThat(fillRequest1.flags).isEqualTo(0);
final ViewNode p1l1c1 = assertTextIsSanitized(fillRequest1.structure, ID_L1C1);
@@ -931,13 +957,13 @@
// Make sure UI is shown on 1st partition
sUiBot.assertDatasets("l1c1");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("l1c2");
// Make sure UI is not shown on ignored partition
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertNoDatasets();
- mActivity.focusCell(2, 2);
+ focusCellNoWindowChange(2, 2);
sUiBot.assertNoDatasets();
}
@@ -971,7 +997,7 @@
.onCell(1, 2, "l1c2");
// Trigger partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
@@ -995,7 +1021,7 @@
.onCell(2, 2, "L2C2");
// Trigger partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
/**
@@ -1020,7 +1046,7 @@
.onCell(3, 2, "L3C2");
// Trigger partition.
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
/**
@@ -1043,48 +1069,48 @@
.onCell(4, 1, "l4c1");
// Trigger partition.
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
/*
* Now move focus around to make sure the proper values are displayed each time.
*/
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P1D1", "P1D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P2D1", "P2D2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("P4D2");
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P3D1", "P3D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P3D1", "P3D2");
/*
* Finally, autofill and check results.
*/
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.selectDataset("P4D1");
expectation4.assertAutoFilled();
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.selectDataset("P1D1");
expectation1.assertAutoFilled();
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.selectDataset("P3D2");
expectation3.assertAutoFilled();
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.selectDataset("P2D2");
expectation2.assertAutoFilled();
}
@@ -1141,13 +1167,12 @@
sReplier.addResponse(response1);
// Trigger partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
sUiBot.assertDatasets("P1D1", "P1D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
/**
@@ -1169,17 +1194,17 @@
sReplier.addResponse(response2);
// Trigger partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P2D1"); // changed
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P2D1", "P2D2");
/**
@@ -1203,21 +1228,21 @@
sReplier.addResponse(response3);
// Trigger partition.
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P3D1"); // changed
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P3D2"); // changed
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P3D1", "P3D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P3D1", "P3D2");
/**
@@ -1251,25 +1276,25 @@
sReplier.addResponse(response4);
// Trigger partition.
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("P4D2");
/*
@@ -1300,7 +1325,7 @@
chosenOne = "P4D2";
}
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.selectDataset(chosenOne);
expectation.assertAutoFilled();
}
@@ -1344,12 +1369,12 @@
.onCell(1, 2, "l1c2");
// Trigger partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Focus around different fields in the partition.
sUiBot.assertDatasets("P1D1", "P1D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
// Autofill it...
@@ -1385,12 +1410,12 @@
.onCell(2, 2, "L2C2");
// Trigger partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Focus around different fields in the partition.
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P2D1", "P2D2");
// Autofill it...
@@ -1429,12 +1454,12 @@
.onCell(3, 2, "l3c2");
// Trigger partition.
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sReplier.getNextFillRequest();
// Focus around different fields in the partition.
sUiBot.assertDatasets("P3D1", "P3D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P3D1", "P3D2");
// Autofill it...
@@ -1472,12 +1497,12 @@
.onCell(4, 2, "L4C2");
// Trigger partition.
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
// Focus around different fields in the partition.
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("P4D2");
// Autofill it...
@@ -1530,7 +1555,7 @@
.onCell(1, 2, "l1c2");
// Trigger partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
/**
@@ -1561,7 +1586,7 @@
.onCell(2, 2, "L2C2");
// Trigger partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
/**
@@ -1595,7 +1620,7 @@
.onCell(3, 2, "l3c2");
// Trigger partition.
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sReplier.getNextFillRequest();
/**
@@ -1627,48 +1652,48 @@
.onCell(4, 1, "L4C1")
.onCell(4, 2, "L4C2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
/*
* Now move focus around to make sure the proper values are displayed each time.
*/
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P1D1", "P1D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P2D1", "P2D2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("P4D2");
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P3D1", "P3D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P3D1", "P3D2");
/*
* Finally, autofill and check results.
*/
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.selectDataset("P4D2");
expectation4.assertAutoFilled();
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.selectDataset("P1D1");
expectation1.assertAutoFilled();
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.selectDataset("P3D1");
expectation3.assertAutoFilled();
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.selectDataset("P2D2");
expectation2.assertAutoFilled();
}
@@ -1710,7 +1735,7 @@
.onCell(1, 2, "l1c2");
// Trigger partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
/**
@@ -1739,7 +1764,7 @@
.onCell(2, 2, "L2C2");
// Trigger partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
/**
@@ -1771,7 +1796,7 @@
.onCell(3, 2, "l3c2");
// Trigger partition.
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sReplier.getNextFillRequest();
/**
@@ -1796,48 +1821,48 @@
.onCell(4, 1, "L4C1")
.onCell(4, 2, "L4C2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
/*
* Now move focus around to make sure the proper values are displayed each time.
*/
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P1D1", "P1D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P2D1", "P2D2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("P4D2");
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P3D1", "P3D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P3D1", "P3D2");
/*
* Finally, autofill and check results.
*/
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.selectDataset("P4D2");
expectation4.assertAutoFilled();
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.selectDataset("P1D1");
expectation1.assertAutoFilled();
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.selectDataset("P3D1");
expectation3.assertAutoFilled();
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.selectDataset("P2D2");
expectation2.assertAutoFilled();
}
@@ -1899,13 +1924,12 @@
.build();
sReplier.addResponse(response1);
// Trigger partition.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
sUiBot.assertDatasets("P1D1", "P1D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
/**
@@ -1935,17 +1959,17 @@
sReplier.addResponse(response2);
// Trigger partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P2D1"); // changed
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P1D1");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P2D1", "P2D2");
/**
@@ -1979,21 +2003,21 @@
sReplier.addResponse(response3);
// Trigger partition.
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P3D1"); // changed
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P2D1");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P3D2"); // changed
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P3D1", "P3D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P3D1", "P3D2");
/**
@@ -2053,25 +2077,25 @@
sReplier.addResponse(response4);
// Trigger partition.
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
// Asserts proper datasets are shown on each field defined so far.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.assertDatasets("P4D1", "P4D2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("P4D2");
/*
@@ -2102,9 +2126,9 @@
chosenOne = "P4D2";
}
- mActivity.focusCell(4, 1);
- sUiBot.selectDataset(chosenOne);
- expectation.assertAutoFilled();
+ focusCell(4, 1);
+ sUiBot.selectDataset(chosenOne);
+ expectation.assertAutoFilled();
}
@Test
@@ -2129,7 +2153,7 @@
final FillExpectation expectation1 = mActivity.expectAutofill()
.onCell(1, 1, "l1c1")
.onCell(1, 2, "l1c2");
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
sUiBot.assertDatasets("Auth 1");
@@ -2151,7 +2175,7 @@
final FillExpectation expectation2 = mActivity.expectAutofill()
.onCell(2, 1, "l2c1")
.onCell(2, 2, "l2c2");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sReplier.getNextFillRequest();
sUiBot.assertDatasets("Auth 2");
@@ -2173,7 +2197,7 @@
final FillExpectation expectation3 = mActivity.expectAutofill()
.onCell(3, 1, "l3c1")
.onCell(3, 2, "l3c2");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sReplier.getNextFillRequest();
sUiBot.assertDatasets("Auth 3");
@@ -2195,50 +2219,50 @@
final FillExpectation expectation4 = mActivity.expectAutofill()
.onCell(4, 1, "l4c1")
.onCell(4, 2, "l4c2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sReplier.getNextFillRequest();
sUiBot.assertDatasets("Auth 4");
// Now play around the focus to make sure they still display the right values.
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("Auth 1");
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("Auth 1");
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.assertDatasets("Auth 3");
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
sUiBot.assertDatasets("Auth 3");
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.assertDatasets("Auth 2");
- mActivity.focusCell(4, 2);
+ focusCell(4, 2);
sUiBot.assertDatasets("Auth 4");
- mActivity.focusCell(2, 2);
+ focusCell(2, 2);
sUiBot.assertDatasets("Auth 2");
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.assertDatasets("Auth 4");
// Finally, autofill and check them.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
sUiBot.selectDataset("Auth 2");
sUiBot.selectDataset("Partition 2");
expectation2.assertAutoFilled();
- mActivity.focusCell(4, 1);
+ focusCell(4, 1);
sUiBot.selectDataset("Auth 4");
sUiBot.selectDataset("Partition 4");
expectation4.assertAutoFilled();
- mActivity.focusCell(3, 1);
+ focusCell(3, 1);
sUiBot.selectDataset("Auth 3");
sUiBot.selectDataset("Partition 3");
expectation3.assertAutoFilled();
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.selectDataset("Auth 1");
sUiBot.selectDataset("Partition 1");
expectation1.assertAutoFilled();
@@ -2262,12 +2286,12 @@
sReplier.addResponse(response1);
// Trigger autofill.
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sReplier.getNextFillRequest();
// Make sure UI is shown, but don't tap it.
sUiBot.assertDatasets("l1c1");
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("l1c2");
// Prepare 2nd partition.
@@ -2279,15 +2303,15 @@
sReplier.addResponse(response2);
// Trigger autofill on 2nd partition.
- mActivity.focusCell(2, 1);
+ focusCell(2, 1);
// Make sure it was ignored.
sUiBot.assertNoDatasets();
// Make sure 1st partition is still working.
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("l1c2");
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("l1c1");
// Prepare 3rd partition.
@@ -2298,15 +2322,15 @@
.build();
sReplier.addResponse(response3);
// Trigger autofill on 3rd partition.
- mActivity.focusCell(3, 2);
+ focusCell(3, 2);
// Make sure it was ignored.
sUiBot.assertNoDatasets();
// Make sure 1st partition is still working...
- mActivity.focusCell(1, 2);
+ focusCell(1, 2);
sUiBot.assertDatasets("l1c2");
- mActivity.focusCell(1, 1);
+ focusCell(1, 1);
sUiBot.assertDatasets("l1c1");
//...and can be autofilled.
diff --git a/tests/autofillservice/src/android/autofillservice/cts/SimpleSaveActivityTest.java b/tests/autofillservice/src/android/autofillservice/cts/SimpleSaveActivityTest.java
index 9fb16a2..8e4ec03 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/SimpleSaveActivityTest.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/SimpleSaveActivityTest.java
@@ -35,6 +35,7 @@
import android.support.test.uiautomator.UiObject2;
import android.view.View;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -298,6 +299,7 @@
}
@Test
+ @Ignore("Test fail on some devices because Recents UI is not well defined: b/72044685")
public void testDismissSave_byTappingRecents() throws Exception {
// Launches a different activity first.
startWelcomeActivityOnNewTask();
diff --git a/tests/autofillservice/src/android/autofillservice/cts/UiBot.java b/tests/autofillservice/src/android/autofillservice/cts/UiBot.java
index 5611499..fffde3e 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/UiBot.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/UiBot.java
@@ -18,6 +18,7 @@
import static android.autofillservice.cts.Helper.NOT_SHOWING_TIMEOUT_MS;
import static android.autofillservice.cts.Helper.SAVE_TIMEOUT_MS;
+import static android.autofillservice.cts.Helper.UI_RECENTS_SWITCH_TIMEOUT_MS;
import static android.autofillservice.cts.Helper.UI_TIMEOUT_MS;
import static android.service.autofill.SaveInfo.SAVE_DATA_TYPE_ADDRESS;
import static android.service.autofill.SaveInfo.SAVE_DATA_TYPE_CREDIT_CARD;
@@ -33,7 +34,6 @@
import android.app.UiAutomation;
import android.content.Context;
import android.content.res.Resources;
-import android.os.RemoteException;
import android.os.SystemClock;
import android.service.autofill.SaveInfo;
import android.support.test.uiautomator.By;
@@ -42,12 +42,14 @@
import android.support.test.uiautomator.UiObject2;
import android.text.Html;
import android.util.Log;
+import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityWindowInfo;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.concurrent.TimeoutException;
/**
* Helper for UI-related needs.
@@ -293,11 +295,16 @@
/**
* Uses the Recents button to switch back to previous activity
*/
- void switchAppsUsingRecents() throws RemoteException {
+ void switchAppsUsingRecents() throws Exception {
Log.d(TAG, "switchAppsUsingRecents()");
// Press once to show list of apps...
mDevice.pressRecentApps();
+
+ // ...wait until apps are shown...
+ // TODO(b/37566627): figure out a way to wait for a specific UI instead.
+ SystemClock.sleep(UI_RECENTS_SWITCH_TIMEOUT_MS);
+
// ...press again to go back to the activity.
mDevice.pressRecentApps();
}
@@ -546,6 +553,23 @@
}
/**
+ * Execute a Runnable and wait for TYPE_WINDOWS_CHANGED or TYPE_WINDOW_STATE_CHANGED.
+ * TODO: No longer need Retry, Refactoring the Timeout (e.g. we probably need two values:
+ * one large timeout value that expects window event, one small value that expect no window
+ * event)
+ */
+ public void waitForWindowChange(Runnable runnable, long timeoutMillis) throws TimeoutException {
+ mAutoman.executeAndWaitForEvent(runnable, (AccessibilityEvent event) -> {
+ switch (event.getEventType()) {
+ case AccessibilityEvent.TYPE_WINDOWS_CHANGED:
+ case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED:
+ return true;
+ }
+ return false;
+ }, timeoutMillis);
+ }
+
+ /**
* Waits for and returns a list of objects.
*
* @param selector {@link BySelector} that identifies the object.
diff --git a/tests/autofillservice/src/android/autofillservice/cts/VirtualContainerActivityTest.java b/tests/autofillservice/src/android/autofillservice/cts/VirtualContainerActivityTest.java
index 8adbdd7..5c0bcbc 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/VirtualContainerActivityTest.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/VirtualContainerActivityTest.java
@@ -46,8 +46,7 @@
import org.junit.Rule;
import org.junit.Test;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
/**
* Test case for an activity containing virtual children.
@@ -81,6 +80,30 @@
}
/**
+ * Focus to username and expect window event
+ */
+ void focusToUsername() throws TimeoutException {
+ sUiBot.waitForWindowChange(() -> mActivity.mUsername.changeFocus(true),
+ Helper.UI_TIMEOUT_MS);
+ }
+
+ /**
+ * Focus to username and expect no autofill window event
+ */
+ void focusToUsernameExpectNoWindowEvent() throws Throwable {
+ // TODO should use waitForWindowChange() if we can filter out event of app Activity itself.
+ mActivityRule.runOnUiThread(() -> mActivity.mUsername.changeFocus(true));
+ }
+
+ /**
+ * Focus to password and expect window event
+ */
+ void focusToPassword() throws TimeoutException {
+ sUiBot.waitForWindowChange(() -> mActivity.mPassword.changeFocus(true),
+ Helper.UI_TIMEOUT_MS);
+ }
+
+ /**
* Tests autofilling the virtual views, using the sync / async version of ViewStructure.addChild
*/
private void autofillTest(boolean sync) throws Exception {
@@ -97,13 +120,13 @@
mActivity.mCustomView.setSync(sync);
// Trigger auto-fill.
- mActivity.mUsername.changeFocus(true);
+ focusToUsername();
assertDatasetShown(mActivity.mUsername, "The Dude");
// Play around with focus to make sure picker is properly drawn.
- mActivity.mPassword.changeFocus(true);
+ focusToPassword();
assertDatasetShown(mActivity.mPassword, "The Dude");
- mActivity.mUsername.changeFocus(true);
+ focusToUsername();
assertDatasetShown(mActivity.mUsername, "The Dude");
// Make sure input was sanitized.
@@ -175,14 +198,14 @@
mActivity.expectAutoFill("DUDE", "SWEET");
// Trigger auto-fill.
- mActivity.mUsername.changeFocus(true);
+ focusToUsername();
sReplier.getNextFillRequest();
assertDatasetShown(mActivity.mUsername, "The Dude", "THE DUDE");
// Play around with focus to make sure picker is properly drawn.
- mActivity.mPassword.changeFocus(true);
+ focusToPassword();
assertDatasetShown(mActivity.mPassword, "The Dude", "THE DUDE");
- mActivity.mUsername.changeFocus(true);
+ focusToUsername();
assertDatasetShown(mActivity.mUsername, "The Dude", "THE DUDE");
// Auto-fill it.
@@ -292,43 +315,43 @@
mActivity.expectAutoFill("dude", "sweet");
// Trigger auto-fill.
- mActivity.mUsername.changeFocus(true);
+ focusToUsername();
sReplier.getNextFillRequest();
callback.assertUiShownEvent(mActivity.mCustomView, mActivity.mUsername.text.id);
// Change focus
- mActivity.mPassword.changeFocus(true);
+ focusToPassword();
callback.assertUiHiddenEvent(mActivity.mCustomView, mActivity.mUsername.text.id);
callback.assertUiShownEvent(mActivity.mCustomView, mActivity.mPassword.text.id);
}
@Test
- public void testAutofillCallbackDisabled() throws Exception {
+ public void testAutofillCallbackDisabled() throws Throwable {
// Set service.
disableService();
final MyAutofillCallback callback = mActivity.registerCallback();
// Trigger auto-fill.
- mActivity.mUsername.changeFocus(true);
+ focusToUsernameExpectNoWindowEvent();
// Assert callback was called
callback.assertUiUnavailableEvent(mActivity.mCustomView, mActivity.mUsername.text.id);
}
@Test
- public void testAutofillCallbackNoDatasets() throws Exception {
+ public void testAutofillCallbackNoDatasets() throws Throwable {
callbackUnavailableTest(NO_RESPONSE);
}
@Test
- public void testAutofillCallbackNoDatasetsButSaveInfo() throws Exception {
+ public void testAutofillCallbackNoDatasetsButSaveInfo() throws Throwable {
callbackUnavailableTest(new CannedFillResponse.Builder()
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_USERNAME, ID_PASSWORD)
.build());
}
- private void callbackUnavailableTest(CannedFillResponse response) throws Exception {
+ private void callbackUnavailableTest(CannedFillResponse response) throws Throwable {
// Set service.
enableService();
final MyAutofillCallback callback = mActivity.registerCallback();
@@ -337,7 +360,7 @@
sReplier.addResponse(response);
// Trigger auto-fill.
- mActivity.mUsername.changeFocus(true);
+ focusToUsernameExpectNoWindowEvent();
sReplier.getNextFillRequest();
// Auto-fill it.
@@ -364,7 +387,7 @@
mActivity.expectAutoFill("dude", "sweet");
// Trigger auto-fill.
- mActivity.mUsername.changeFocus(true);
+ focusToUsername();
sReplier.getNextFillRequest();
assertDatasetShown(mActivity.mUsername, "The Dude");
@@ -374,7 +397,7 @@
}
@Test
- public void testSaveDialogShownWhenAllVirtualViewsNotVisible() throws Exception {
+ public void testSaveDialogShownWhenAllVirtualViewsNotVisible() throws Throwable {
// Set service.
enableService();
@@ -384,14 +407,8 @@
.setFlags(SaveInfo.FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE)
.build());
- final CountDownLatch latch = new CountDownLatch(1);
-
// Trigger auto-fill.
- mActivity.runOnUiThread(() -> {
- mActivity.mUsername.changeFocus(true);
- latch.countDown();
- });
- latch.await(Helper.UI_TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ focusToUsernameExpectNoWindowEvent();
sReplier.getNextFillRequest();
// TODO: 63602573 Should be removed once this bug is fixed
diff --git a/tests/perfetto/AndroidTest.xml b/tests/perfetto/AndroidTest.xml
index 6fada38..625af6a 100644
--- a/tests/perfetto/AndroidTest.xml
+++ b/tests/perfetto/AndroidTest.xml
@@ -15,6 +15,7 @@
-->
<!-- The Android.mk file that defines these target lives in /external/perfetto/cts -->
<configuration description="Config for CTS Perfetto test cases">
+ <option name="test-suite-tag" value="cts" />
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
<option name="test-file-name" value="CtsPerfettoProducerApp.apk" />
@@ -30,4 +31,4 @@
<!-- test-timeout unit is ms, value = 10 seconds -->
<option name="native-test-timeout" value="10000" />
</test>
-</configuration>
\ No newline at end of file
+</configuration>
diff --git a/tests/tests/assist/AndroidManifest.xml b/tests/tests/assist/AndroidManifest.xml
index a81ced2..0114ef5 100644
--- a/tests/tests/assist/AndroidManifest.xml
+++ b/tests/tests/assist/AndroidManifest.xml
@@ -24,8 +24,11 @@
<application>
<uses-library android:name="android.test.runner" />
+ <!-- resizeableActivity makes the TestStartActivity run on Primary display to accommodate
+ stack behavior assumptions in this test. See b/70032125 -->
<activity android:name="android.assist.cts.TestStartActivity"
- android:label="Assist Test Start Activity">
+ android:label="Assist Test Start Activity"
+ android:resizeableActivity="false">
<intent-filter>
<action android:name="android.intent.action.TEST_START_ACTIVITY_ASSIST_STRUCTURE" />
<action android:name="android.intent.action.TEST_START_ACTIVITY_DISABLE_CONTEXT" />
diff --git a/tests/tests/assist/testapp/AndroidManifest.xml b/tests/tests/assist/testapp/AndroidManifest.xml
index fa08f55..ee4c68f 100644
--- a/tests/tests/assist/testapp/AndroidManifest.xml
+++ b/tests/tests/assist/testapp/AndroidManifest.xml
@@ -55,8 +55,12 @@
<category android:name="android.intent.category.VOICE" />
</intent-filter>
</activity>
+ <!-- resizeableActivity makes the ScreenshotActivity run on Primary display to accommodate
+ assumptions about screenshot display vs TestStartActivity display in this test.
+ See b/70032125 -->
<activity android:name=".ScreenshotActivity"
- android:label="Screenshot Test Activity">
+ android:label="Screenshot Test Activity"
+ android:resizeableActivity="false">
<intent-filter>
<action android:name="android.intent.action.TEST_APP_SCREENSHOT" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/tests/tests/bionic/Android.build.copy.libs.mk b/tests/tests/bionic/Android.build.copy.libs.mk
index 2944911..5fac32e 100644
--- a/tests/tests/bionic/Android.build.copy.libs.mk
+++ b/tests/tests/bionic/Android.build.copy.libs.mk
@@ -105,6 +105,10 @@
libtest_with_dependency_loop_c.so \
ns2/ld_config_test_helper_lib1.so \
ns2/ld_config_test_helper_lib2.so \
+ ns_a/libnstest_ns_a_public1.so \
+ ns_a/libnstest_ns_a_public1_internal.so \
+ ns_b/libnstest_ns_b_public2.so \
+ ns_b/libnstest_ns_b_public3.so \
prebuilt-elf-files/libtest_invalid-empty_shdr_table.so \
prebuilt-elf-files/libtest_invalid-rw_load_segment.so \
prebuilt-elf-files/libtest_invalid-textrels.so \
diff --git a/tests/tests/bionic/Android.mk b/tests/tests/bionic/Android.mk
index 83172e4..e5d4340 100644
--- a/tests/tests/bionic/Android.mk
+++ b/tests/tests/bionic/Android.mk
@@ -12,6 +12,7 @@
LOCAL_LDFLAGS := -Wl,--rpath,\$${ORIGIN}/lib/bionic-loader-test-libs -Wl,--enable-new-dtags -Wl,--export-dynamic
LOCAL_SHARED_LIBRARIES += \
+ ld-android \
libdl \
libdl_preempt_test_1 \
libdl_preempt_test_2 \
diff --git a/tests/tests/display/src/android/display/cts/DisplayTest.java b/tests/tests/display/src/android/display/cts/DisplayTest.java
index beeee3e..1a2753b 100644
--- a/tests/tests/display/src/android/display/cts/DisplayTest.java
+++ b/tests/tests/display/src/android/display/cts/DisplayTest.java
@@ -22,8 +22,10 @@
import android.app.Instrumentation;
import android.app.Presentation;
import android.app.UiAutomation;
+import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.PixelFormat;
import android.graphics.Point;
@@ -69,6 +71,7 @@
private DisplayManager mDisplayManager;
private WindowManager mWindowManager;
+ private UiModeManager mUiModeManager;
private Context mContext;
// To test display mode switches.
@@ -88,6 +91,7 @@
mContext = getInstrumentation().getContext();
mDisplayManager = (DisplayManager)mContext.getSystemService(Context.DISPLAY_SERVICE);
mWindowManager = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
+ mUiModeManager = (UiModeManager)mContext.getSystemService(Context.UI_MODE_SERVICE);
}
@Override
@@ -290,6 +294,12 @@
* Tests that mode switch requests are correctly executed.
*/
public void testModeSwitch() throws Exception {
+ // Standalone VR devices globally ignore SYSTEM_ALERT_WINDOW via AppOps.
+ // Skip this test, which depends on a Presentation SYSTEM_ALERT_WINDOW to pass.
+ if (mUiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_VR_HEADSET) {
+ return;
+ }
+
enableAppOps();
final Display display = getSecondaryDisplay(mDisplayManager.getDisplays());
Display.Mode[] modes = display.getSupportedModes();
diff --git a/tests/tests/icu/Android.mk b/tests/tests/icu/Android.mk
index 5b80a37..ea00e7c 100644
--- a/tests/tests/icu/Android.mk
+++ b/tests/tests/icu/Android.mk
@@ -38,7 +38,5 @@
LOCAL_PACKAGE_NAME := CtsIcuTestCases
-LOCAL_SDK_VERSION := current
-
include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/tests/tests/media/assets/video_decode_with_cropping-h264_520x360_30fps.mp4 b/tests/tests/media/assets/video_decode_with_cropping-h264_520x360_30fps.mp4
new file mode 100644
index 0000000..9a899b2
--- /dev/null
+++ b/tests/tests/media/assets/video_decode_with_cropping-h264_520x360_30fps.mp4
Binary files differ
diff --git a/tests/tests/media/assets/video_decode_with_cropping-h264_520x360_60fps.mp4 b/tests/tests/media/assets/video_decode_with_cropping-h264_520x360_60fps.mp4
deleted file mode 100644
index 362568c..0000000
--- a/tests/tests/media/assets/video_decode_with_cropping-h264_520x360_60fps.mp4
+++ /dev/null
Binary files differ
diff --git a/tests/tests/media/assets/video_decode_with_cropping-vp9_520x360_30fps.webm b/tests/tests/media/assets/video_decode_with_cropping-vp9_520x360_30fps.webm
new file mode 100644
index 0000000..df2723c
--- /dev/null
+++ b/tests/tests/media/assets/video_decode_with_cropping-vp9_520x360_30fps.webm
Binary files differ
diff --git a/tests/tests/media/assets/video_decode_with_cropping-vp9_520x360_60fps.webm b/tests/tests/media/assets/video_decode_with_cropping-vp9_520x360_60fps.webm
deleted file mode 100644
index 2ad27ed..0000000
--- a/tests/tests/media/assets/video_decode_with_cropping-vp9_520x360_60fps.webm
+++ /dev/null
Binary files differ
diff --git a/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java b/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java
index 2840b16..7042213 100644
--- a/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java
+++ b/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java
@@ -129,8 +129,8 @@
"video_decode_accuracy_and_capability-vp9_2880x2160_30fps.webm",
"video_decode_accuracy_and_capability-vp9_1216x2160_30fps.webm",
// cropped
- "video_decode_with_cropping-h264_520x360_60fps.mp4",
- "video_decode_with_cropping-vp9_520x360_60fps.webm"
+ "video_decode_with_cropping-h264_520x360_30fps.mp4",
+ "video_decode_with_cropping-vp9_520x360_30fps.webm"
};
private View videoView;
diff --git a/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java b/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java
index 0720b2f..72eddf1 100644
--- a/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java
+++ b/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java
@@ -643,18 +643,16 @@
handler.post(viewCleaner);
}
- public synchronized Bitmap generateBitmapFromVideoViewSnapshot(VideoViewSnapshot snapshot) {
- final long timeOutMs = TimeUnit.SECONDS.toMillis(30);
- final long start = SystemClock.elapsedRealtime();
+ public Bitmap generateBitmapFromVideoViewSnapshot(VideoViewSnapshot snapshot) {
handler.post(snapshot);
- try {
- while (!snapshot.isBitmapReady()
- && (SystemClock.elapsedRealtime() - start < timeOutMs)) {
- Thread.sleep(100);
+ synchronized (snapshot.getSyncObject()) {
+ try {
+ snapshot.getSyncObject().wait(snapshot.SNAPSHOT_TIMEOUT_MS + 100);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ Log.e(TAG, "Unable to finish generateBitmapFromVideoViewSnapshot().");
+ return null;
}
- } catch (InterruptedException e) {
- e.printStackTrace();
- return null;
}
if (!snapshot.isBitmapReady()) {
Log.e(TAG, "Time out in generateBitmapFromVideoViewSnapshot().");
@@ -1304,10 +1302,16 @@
/* Definition of a VideoViewSnapshot and a runnable to get a bitmap from a view. */
abstract class VideoViewSnapshot implements Runnable {
+ public static final long SNAPSHOT_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(30);
+ public static final long SLEEP_TIME_MS = 30;
+ public static final Object SYNC_TOKEN = new Object();
+
public abstract Bitmap getBitmap();
public abstract boolean isBitmapReady();
+ public abstract Object getSyncObject();
+
}
/* Runnable to get a bitmap from a texture view on the UI thread via a handler.
@@ -1324,9 +1328,12 @@
}
@Override
- public synchronized void run() {
+ public void run() {
bitmap = null;
bitmap = tv.getBitmap();
+ synchronized (SYNC_TOKEN) {
+ SYNC_TOKEN.notify();
+ }
}
@Override
@@ -1339,6 +1346,11 @@
return bitmap != null;
}
+ @Override
+ public Object getSyncObject() {
+ return SYNC_TOKEN;
+ }
+
}
/**
@@ -1350,7 +1362,6 @@
class SurfaceViewSnapshot extends VideoViewSnapshot {
private static final String TAG = SurfaceViewSnapshot.class.getSimpleName();
- private static final int PIXELCOPY_REQUEST_SLEEP_MS = 30;
private static final int PIXELCOPY_TIMEOUT_MS = 1000;
private static final int INITIAL_STATE = -1;
@@ -1358,7 +1369,6 @@
private final int width;
private final int height;
- private SynchronousPixelCopy copyHelper;
private Bitmap bitmap;
private int copyResult;
@@ -1371,20 +1381,26 @@
}
@Override
- public synchronized void run() {
+ public void run() {
+ final long start = SystemClock.elapsedRealtime();
copyResult = INITIAL_STATE;
final SynchronousPixelCopy copyHelper = new SynchronousPixelCopy();
bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888);
try {
// Wait for PixelCopy to finish.
- while ((copyResult = copyHelper.request(surfaceView, bitmap)) != PixelCopy.SUCCESS) {
- Thread.sleep(PIXELCOPY_REQUEST_SLEEP_MS);
+ while ((copyResult = copyHelper.request(surfaceView, bitmap)) != PixelCopy.SUCCESS
+ && (SystemClock.elapsedRealtime() - start) < SNAPSHOT_TIMEOUT_MS) {
+ Thread.sleep(SLEEP_TIME_MS);
}
} catch (InterruptedException e) {
Log.e(TAG, "Pixel Copy is stopped/interrupted before it finishes.", e);
bitmap = null;
+ } finally {
+ copyHelper.release();
+ synchronized (SYNC_TOKEN) {
+ SYNC_TOKEN.notify();
+ }
}
- copyHelper.release();
}
@Override
@@ -1397,6 +1413,11 @@
return bitmap != null && copyResult == PixelCopy.SUCCESS;
}
+ @Override
+ public Object getSyncObject() {
+ return SYNC_TOKEN;
+ }
+
private static class SynchronousPixelCopy implements OnPixelCopyFinishedListener {
private final Handler handler;
@@ -1457,8 +1478,6 @@
class GLSurfaceViewSnapshot extends VideoViewSnapshot {
private static final String TAG = GLSurfaceViewSnapshot.class.getSimpleName();
- private static final int GET_BYTEBUFFER_SLEEP_MS = 30;
- private static final int GET_BYTEBUFFER_MAX_ATTEMPTS = 30;
private final GLSurfaceViewFactory glSurfaceViewFactory;
private final int width;
@@ -1474,7 +1493,7 @@
}
@Override
- public synchronized void run() {
+ public void run() {
bitmapIsReady = false;
bitmap = null;
try {
@@ -1482,6 +1501,7 @@
} catch (InterruptedException exception) {
Log.e(TAG, exception.getMessage());
bitmap = null;
+ notifyObject();
return;
}
try {
@@ -1494,6 +1514,8 @@
} catch (NullPointerException exception) {
Log.e(TAG, "glSurfaceViewFactory or byteBuffer may have been released", exception);
bitmap = null;
+ } finally {
+ notifyObject();
}
}
@@ -1507,13 +1529,25 @@
return bitmapIsReady;
}
+ @Override
+ public Object getSyncObject() {
+ return SYNC_TOKEN;
+ }
+
+ private void notifyObject() {
+ synchronized (SYNC_TOKEN) {
+ SYNC_TOKEN.notify();
+ }
+ }
+
private void waitForByteBuffer() throws InterruptedException {
// Wait for byte buffer to be ready.
- for (int i = 0; i < GET_BYTEBUFFER_MAX_ATTEMPTS; i++) {
+ final long start = SystemClock.elapsedRealtime();
+ while (SystemClock.elapsedRealtime() - start < SNAPSHOT_TIMEOUT_MS) {
if (glSurfaceViewFactory.byteBufferIsReady()) {
return;
}
- Thread.sleep(GET_BYTEBUFFER_SLEEP_MS);
+ Thread.sleep(SLEEP_TIME_MS);
}
throw new InterruptedException("Taking too long to read pixels into a ByteBuffer.");
}
diff --git a/tests/tests/net/src/android/net/cts/MacAddressTest.java b/tests/tests/net/src/android/net/cts/MacAddressTest.java
new file mode 100644
index 0000000..ace1cde
--- /dev/null
+++ b/tests/tests/net/src/android/net/cts/MacAddressTest.java
@@ -0,0 +1,162 @@
+/*
+ * 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 android.net.cts;
+
+import static android.net.MacAddress.TYPE_BROADCAST;
+import static android.net.MacAddress.TYPE_MULTICAST;
+import static android.net.MacAddress.TYPE_UNICAST;
+import static org.junit.Assert.fail;
+
+import android.net.MacAddress;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Arrays;
+
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class MacAddressTest {
+
+ static class TestCase {
+ final String macAddress;
+ final String ouiString;
+ final int addressType;
+ final boolean isLocallyAssigned;
+
+ TestCase(String macAddress, String ouiString, int addressType, boolean isLocallyAssigned) {
+ this.macAddress = macAddress;
+ this.ouiString = ouiString;
+ this.addressType = addressType;
+ this.isLocallyAssigned = isLocallyAssigned;
+ }
+ }
+
+ static final boolean LOCALLY_ASSIGNED = true;
+ static final boolean GLOBALLY_UNIQUE = false;
+
+ static String typeToString(int addressType) {
+ switch (addressType) {
+ case TYPE_UNICAST:
+ return "TYPE_UNICAST";
+ case TYPE_BROADCAST:
+ return "TYPE_BROADCAST";
+ case TYPE_MULTICAST:
+ return "TYPE_MULTICAST";
+ default:
+ return "UNKNOWN";
+ }
+ }
+
+ static String localAssignedToString(boolean isLocallyAssigned) {
+ return isLocallyAssigned ? "LOCALLY_ASSIGNED" : "GLOBALLY_UNIQUE";
+ }
+
+ @Test
+ public void testMacAddress() {
+ TestCase[] tests = {
+ new TestCase("ff:ff:ff:ff:ff:ff", "ff:ff:ff", TYPE_BROADCAST, LOCALLY_ASSIGNED),
+ new TestCase("d2:c4:22:4d:32:a8", "d2:c4:22", TYPE_UNICAST, LOCALLY_ASSIGNED),
+ new TestCase("33:33:aa:bb:cc:dd", "33:33:aa", TYPE_MULTICAST, LOCALLY_ASSIGNED),
+ new TestCase("06:00:00:00:00:00", "06:00:00", TYPE_UNICAST, LOCALLY_ASSIGNED),
+ new TestCase("07:00:d3:56:8a:c4", "07:00:d3", TYPE_MULTICAST, LOCALLY_ASSIGNED),
+ new TestCase("00:01:44:55:66:77", "00:01:44", TYPE_UNICAST, GLOBALLY_UNIQUE),
+ new TestCase("08:00:22:33:44:55", "08:00:22", TYPE_UNICAST, GLOBALLY_UNIQUE),
+ };
+
+ for (TestCase tc : tests) {
+ MacAddress mac = MacAddress.fromString(tc.macAddress);
+
+ if (!tc.ouiString.equals(mac.toOuiString())) {
+ fail(String.format("expected OUI string %s, got %s",
+ tc.ouiString, mac.toOuiString()));
+ }
+
+ if (tc.isLocallyAssigned != mac.isLocallyAssigned()) {
+ fail(String.format("expected %s to be %s, got %s", mac,
+ localAssignedToString(tc.isLocallyAssigned),
+ localAssignedToString(mac.isLocallyAssigned())));
+ }
+
+ if (tc.addressType != mac.getAddressType()) {
+ fail(String.format("expected %s address type to be %s, got %s", mac,
+ typeToString(tc.addressType), typeToString(mac.getAddressType())));
+ }
+
+ if (!tc.macAddress.equals(mac.toString())) {
+ fail(String.format("expected toString() to return %s, got %s",
+ tc.macAddress, mac.toString()));
+ }
+
+ if (!mac.equals(MacAddress.fromBytes(mac.toByteArray()))) {
+ byte[] bytes = mac.toByteArray();
+ fail(String.format("expected mac address from bytes %s to be %s, got %s",
+ Arrays.toString(bytes),
+ MacAddress.fromBytes(bytes),
+ mac));
+ }
+ }
+ }
+
+ @Test
+ public void testConstructorInputValidation() {
+ String[] invalidStringAddresses = {
+ "",
+ "abcd",
+ "1:2:3:4:5",
+ "1:2:3:4:5:6:7",
+ "10000:2:3:4:5:6",
+ };
+
+ for (String s : invalidStringAddresses) {
+ try {
+ MacAddress mac = MacAddress.fromString(s);
+ fail("MacAddress.fromString(" + s + ") should have failed, but returned " + mac);
+ } catch (IllegalArgumentException excepted) {
+ }
+ }
+
+ try {
+ MacAddress mac = MacAddress.fromString(null);
+ fail("MacAddress.fromString(null) should have failed, but returned " + mac);
+ } catch (NullPointerException excepted) {
+ }
+
+ byte[][] invalidBytesAddresses = {
+ {},
+ {1,2,3,4,5},
+ {1,2,3,4,5,6,7},
+ };
+
+ for (byte[] b : invalidBytesAddresses) {
+ try {
+ MacAddress mac = MacAddress.fromBytes(b);
+ fail("MacAddress.fromBytes(" + Arrays.toString(b)
+ + ") should have failed, but returned " + mac);
+ } catch (IllegalArgumentException excepted) {
+ }
+ }
+
+ try {
+ MacAddress mac = MacAddress.fromBytes(null);
+ fail("MacAddress.fromBytes(null) should have failed, but returned " + mac);
+ } catch (NullPointerException excepted) {
+ }
+ }
+}
diff --git a/tests/tests/os/src/android/os/cts/FileObserverTest.java b/tests/tests/os/src/android/os/cts/FileObserverTest.java
index b51f804..744963e 100644
--- a/tests/tests/os/src/android/os/cts/FileObserverTest.java
+++ b/tests/tests/os/src/android/os/cts/FileObserverTest.java
@@ -26,11 +26,6 @@
import java.util.List;
public class FileObserverTest extends AndroidTestCase {
-
- private File mTestFile;
- private File mTestDir;
- private File mMoveDestFile;
- private FileOutputStream mOut;
private static final String PATH = "/PATH";
private static final String TEST_FILE = "file_observer_test.txt";
private static final String TEST_DIR = "fileobserver_dir";
@@ -38,34 +33,50 @@
private static final int UNDEFINED = 0x8000;
private static final long DELAY_MSECOND = 2000;
+ private void helpSetUp(File dir) throws Exception {
+ File testFile = new File(dir, TEST_FILE);
+ testFile.createNewFile();
+ File testDir = new File(dir, TEST_DIR);
+ testDir.mkdirs();
+ }
+
@Override
protected void setUp() throws Exception {
super.setUp();
File dir = getContext().getFilesDir();
- mTestFile = new File(dir, TEST_FILE);
- mTestFile.createNewFile();
- mTestDir = new File(dir, TEST_DIR);
- mTestDir.mkdirs();
+ helpSetUp(dir);
+
+ dir = getContext().getExternalFilesDir(null);
+ helpSetUp(dir);
+ }
+
+ private void helpTearDown(File dir) throws Exception {
+ File testFile = new File(dir, TEST_FILE);
+ File testDir = new File(dir, TEST_DIR);
+ File moveDestFile = new File(testDir, TEST_FILE);
+
+ if (testFile.exists()) {
+ testFile.delete();
+ }
+
+ if (moveDestFile.exists()) {
+ moveDestFile.delete();
+ }
+
+ if (testDir.exists()) {
+ testDir.delete();
+ }
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
- if (mTestFile != null && mTestFile.exists()) {
- mTestFile.delete();
- }
- if (mMoveDestFile != null && mMoveDestFile.exists()) {
- mMoveDestFile.delete();
- }
+ File dir = getContext().getFilesDir();
+ helpTearDown(dir);
- if (mTestDir != null && mTestDir.exists()) {
- mTestDir.delete();
- }
-
- if (mOut != null) {
- mOut.close();
- }
+ dir = getContext().getExternalFilesDir(null);
+ helpTearDown(dir);
}
public void testConstructor() {
@@ -86,84 +97,107 @@
* file observer should get move-self event,
* moved from dir observer should get moved-from event,
* moved to dir observer should get moved-to event.
+ *
+ * On emulated storage, there may be additional operations related to case insensitivity, so
+ * we just check that the expected ones are present.
*/
- public void testFileObserver() throws Exception {
+ public void helpTestFileObserver(File dir, boolean isEmulated) throws Exception {
MockFileObserver fileObserver = null;
int[] expected = null;
FileEvent[] moveEvents = null;
+ File testFile = new File(dir, TEST_FILE);
+ File testDir = new File(dir, TEST_DIR);
+ File moveDestFile;
+ FileOutputStream out = null;
- fileObserver = new MockFileObserver(mTestFile.getParent());
+ fileObserver = new MockFileObserver(testFile.getParent());
try {
fileObserver.startWatching();
- mOut = new FileOutputStream(mTestFile);
+ out = new FileOutputStream(testFile);
- mOut.write(FILE_DATA); // modify, open, write, modify
- mOut.close(); // close_write
+ out.write(FILE_DATA); // modify, open, write, modify
+ out.close(); // close_write
expected = new int[] {FileObserver.MODIFY, FileObserver.OPEN, FileObserver.MODIFY,
FileObserver.CLOSE_WRITE};
moveEvents = waitForEvent(fileObserver);
- assertEventsEquals(expected, moveEvents);
+ if (isEmulated)
+ assertEventsContains(expected, moveEvents);
+ else
+ assertEventsEquals(expected, moveEvents);
fileObserver.stopWatching();
// action after observer stop watching
- mTestFile.delete(); // delete
+ testFile.delete(); // delete
// should not get any event
expected = new int[] {UNDEFINED};
moveEvents = waitForEvent(fileObserver);
- assertEventsEquals(expected, moveEvents);
+ if (isEmulated)
+ assertEventsContains(expected, moveEvents);
+ else
+ assertEventsEquals(expected, moveEvents);
} finally {
fileObserver.stopWatching();
- mOut.close();
- mOut = null;
+ if (out != null)
+ out.close();
+ out = null;
}
-
- fileObserver = new MockFileObserver(mTestDir.getPath());
+ fileObserver = new MockFileObserver(testDir.getPath());
try {
fileObserver.startWatching();
- mTestFile = new File(mTestDir, TEST_FILE);
- assertTrue(mTestFile.createNewFile());
- assertTrue(mTestFile.exists());
- mTestFile.delete();
- mTestDir.delete();
-
+ testFile = new File(testDir, TEST_FILE);
+ assertTrue(testFile.createNewFile());
+ assertTrue(testFile.exists());
+ testFile.delete();
+ testDir.delete();
expected = new int[] {FileObserver.CREATE,
FileObserver.OPEN, FileObserver.CLOSE_WRITE,
FileObserver.DELETE, FileObserver.DELETE_SELF, UNDEFINED};
moveEvents = waitForEvent(fileObserver);
- assertEventsEquals(expected, moveEvents);
+ if (isEmulated)
+ assertEventsContains(expected, moveEvents);
+ else
+ assertEventsEquals(expected, moveEvents);
} finally {
fileObserver.stopWatching();
}
-
- File dir = getContext().getFilesDir();
- mTestFile = new File(dir, TEST_FILE);
- mTestFile.createNewFile();
- mTestDir = new File(dir, TEST_DIR);
- mTestDir.mkdirs();
- mMoveDestFile = new File(mTestDir, TEST_FILE);
+ dir = getContext().getFilesDir();
+ testFile = new File(dir, TEST_FILE);
+ testFile.createNewFile();
+ testDir = new File(dir, TEST_DIR);
+ testDir.mkdirs();
+ moveDestFile = new File(testDir, TEST_FILE);
MockFileObserver movedFrom = new MockFileObserver(dir.getPath());
- MockFileObserver movedTo = new MockFileObserver(mTestDir.getPath());
- fileObserver = new MockFileObserver(mTestFile.getPath());
+ MockFileObserver movedTo = new MockFileObserver(testDir.getPath());
+ fileObserver = new MockFileObserver(testFile.getPath());
try {
movedFrom.startWatching();
movedTo.startWatching();
fileObserver.startWatching();
- mTestFile.renameTo(mMoveDestFile);
+ testFile.renameTo(moveDestFile);
expected = new int[] {FileObserver.MOVE_SELF};
moveEvents = waitForEvent(fileObserver);
- assertEventsEquals(expected, moveEvents);
+ if (isEmulated)
+ assertEventsContains(expected, moveEvents);
+ else
+ assertEventsEquals(expected, moveEvents);
expected = new int[] {FileObserver.MOVED_FROM};
moveEvents = waitForEvent(movedFrom);
- assertEventsEquals(expected, moveEvents);
+ if (isEmulated)
+ assertEventsContains(expected, moveEvents);
+ else
+ assertEventsEquals(expected, moveEvents);
expected = new int[] {FileObserver.MOVED_TO};
moveEvents = waitForEvent(movedTo);
- assertEventsEquals(expected, moveEvents);
+ if (isEmulated)
+ assertEventsContains(expected, moveEvents);
+ else
+ assertEventsEquals(expected, moveEvents);
} finally {
fileObserver.stopWatching();
movedTo.stopWatching();
@@ -174,6 +208,18 @@
// here ACCESS ATTRIB we found no way to test.
}
+ public void testFileObserver() throws Exception {
+ helpTestFileObserver(getContext().getFilesDir(), false);
+ }
+
+ /*
+ * Same as testFileObserver, except on emulated storage
+ */
+ public void testFileObserverEmulated() throws Exception {
+ helpTestFileObserver(getContext().getExternalFilesDir(null), true);
+ }
+
+
private void assertEventsEquals(final int[] expected, final FileEvent[] moveEvents) {
List<Integer> expectedEvents = new ArrayList<Integer>();
for (int i = 0; i < expected.length; i++) {
@@ -187,6 +233,24 @@
}
}
+ private void assertEventsContains(final int[] expected, final FileEvent[] moveEvents) {
+ List<Integer> expectedEvents = new ArrayList<Integer>();
+ for (int i = 0; i < expected.length; i++) {
+ expectedEvents.add(expected[i]);
+ }
+ List<FileEvent> actualEvents = Arrays.asList(moveEvents);
+ String message = "Expected to contain: " + expectedEvents + " Actual: " + actualEvents;
+ int j = 0;
+ for (int i = 0; i < expected.length; i++) {
+ while (expected[i] != moveEvents[j].event) {
+ j++;
+ if (j >= moveEvents.length)
+ fail(message);
+ }
+ j++;
+ }
+ }
+
private FileEvent[] waitForEvent(MockFileObserver fileObserver)
throws InterruptedException {
Thread.sleep(DELAY_MSECOND);
diff --git a/tests/tests/permission2/res/raw/android_manifest.xml b/tests/tests/permission2/res/raw/android_manifest.xml
index a4dad83..74e8024 100644
--- a/tests/tests/permission2/res/raw/android_manifest.xml
+++ b/tests/tests/permission2/res/raw/android_manifest.xml
@@ -1714,19 +1714,20 @@
<permission android:name="android.permission.BIND_IMS_SERVICE"
android:protectionLevel="signature|privileged" />
- <!-- Allows an application to manage embedded subscriptions (those on a eUICC) through
- EuiccManager APIs.
+ <!-- @SystemApi Allows an application to manage embedded subscriptions (those on a eUICC)
+ through EuiccManager APIs.
<p>Protection level: signature|privileged|development
- TODO(b/35851809): Mark this as a SystemApi and remove com. prefix.
- @hide -->
- <permission android:name="com.android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"
+ @hide
+ -->
+ <permission android:name="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"
android:protectionLevel="signature|privileged|development" />
- <!-- Must be required by an EuiccService to ensure that only the system can bind to it.
+ <!-- @SystemApi Must be required by an EuiccService to ensure that only the system can bind to
+ it.
<p>Protection level: signature
- TODO(b/35851809): Mark this as a SystemApi and remove com. prefix.
- @hide -->
- <permission android:name="com.android.permission.BIND_EUICC_SERVICE"
+ @hide
+ -->
+ <permission android:name="android.permission.BIND_EUICC_SERVICE"
android:protectionLevel="signature" />
<!-- ================================== -->
diff --git a/tests/tests/permission2/res/raw/automotive_android_manifest.xml b/tests/tests/permission2/res/raw/automotive_android_manifest.xml
new file mode 100644
index 0000000..4a68183
--- /dev/null
+++ b/tests/tests/permission2/res/raw/automotive_android_manifest.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ package="com.android.car"
+ coreApp="true"
+ android:sharedUserId="android.uid.system">
+
+ <original-package android:name="com.android.car" />
+
+ <permission-group
+ android:name="android.car.permission-group.CAR_INFORMATION"
+ android:icon="@drawable/car_ic_mode"
+ android:description="@string/car_permission_desc"
+ android:label="@string/car_permission_label" />
+ <permission
+ android:name="android.car.permission.CAR_CABIN"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_cabin"
+ android:description="@string/car_permission_desc_cabin" />
+ <permission
+ android:name="android.car.permission.CAR_CAMERA"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_camera"
+ android:description="@string/car_permission_desc_camera" />
+ <permission
+ android:name="android.car.permission.CAR_FUEL"
+ android:permissionGroup="android.car.permission-group.CAR_INFORMATION"
+ android:protectionLevel="dangerous"
+ android:label="@string/car_permission_label_fuel"
+ android:description="@string/car_permission_desc_fuel" />
+ <permission
+ android:name="android.car.permission.CAR_HVAC"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_hvac"
+ android:description="@string/car_permission_desc_hvac" />
+ <permission
+ android:name="android.car.permission.CAR_MILEAGE"
+ android:permissionGroup="android.car.permission-group.CAR_INFORMATION"
+ android:protectionLevel="dangerous"
+ android:label="@string/car_permission_label_mileage"
+ android:description="@string/car_permission_desc_mileage" />
+ <permission
+ android:name="android.car.permission.CAR_SPEED"
+ android:permissionGroup="android.permission-group.LOCATION"
+ android:protectionLevel="dangerous"
+ android:label="@string/car_permission_label_speed"
+ android:description="@string/car_permission_desc_speed" />
+ <permission
+ android:name="android.car.permission.VEHICLE_DYNAMICS_STATE"
+ android:permissionGroup="android.car.permission-group.CAR_INFORMATION"
+ android:protectionLevel="dangerous"
+ android:label="@string/car_permission_label_vehicle_dynamics_state"
+ android:description="@string/car_permission_desc_vehicle_dynamics_state" />
+ <permission
+ android:name="android.car.permission.CAR_VENDOR_EXTENSION"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_vendor_extension"
+ android:description="@string/car_permission_desc_vendor_extension" />
+ <permission
+ android:name="android.car.permission.CAR_RADIO"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_radio"
+ android:description="@string/car_permission_desc_radio" />
+ <permission
+ android:name="android.car.permission.CAR_PROJECTION"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_projection"
+ android:description="@string/car_permission_desc_projection" />
+ <permission
+ android:name="android.car.permission.CAR_MOCK_VEHICLE_HAL"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_mock_vehicle_hal"
+ android:description="@string/car_permission_desc_mock_vehicle_hal" />
+ <permission
+ android:name="android.car.permission.CAR_NAVIGATION_MANAGER"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_car_navigation_manager"
+ android:description="@string/car_permission_desc_car_navigation_manager" />
+ <permission
+ android:name="android.car.permission.DIAGNOSTIC_READ_ALL"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_diag_read"
+ android:description="@string/car_permission_desc_diag_read" />
+ <permission
+ android:name="android.car.permission.DIAGNOSTIC_CLEAR"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_diag_clear"
+ android:description="@string/car_permission_desc_diag_clear" />
+ <permission
+ android:name="android.car.permission.VMS_PUBLISHER"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_vms_publisher"
+ android:description="@string/car_permission_desc_vms_publisher" />
+ <permission
+ android:name="android.car.permission.VMS_SUBSCRIBER"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_vms_subscriber"
+ android:description="@string/car_permission_desc_vms_subscriber" />
+
+ <!-- may replace this with system permission if proper one is defined. -->
+ <permission
+ android:name="android.car.permission.CONTROL_APP_BLOCKING"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_control_app_blocking"
+ android:description="@string/car_permission_desc_control_app_blocking" />
+
+ <permission
+ android:name="android.car.permission.CAR_CONTROL_AUDIO_VOLUME"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_audio_volume"
+ android:description="@string/car_permission_desc_audio_volume" />
+
+ <permission
+ android:name="android.car.permission.CAR_CONTROL_AUDIO_SETTINGS"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_audio_settings"
+ android:description="@string/car_permission_desc_audio_settings" />
+
+ <permission
+ android:name="android.car.permission.BIND_INSTRUMENT_CLUSTER_RENDERER_SERVICE"
+ android:protectionLevel="signature"
+ android:label="@string/car_permission_label_bind_instrument_cluster_rendering"
+ android:description="@string/car_permission_desc_bind_instrument_cluster_rendering"/>
+
+ <permission
+ android:name="android.car.permission.BIND_CAR_INPUT_SERVICE"
+ android:protectionLevel="signature"
+ android:label="@string/car_permission_label_bind_input_service"
+ android:description="@string/car_permission_desc_bind_input_service"/>
+
+ <permission
+ android:name="android.car.permission.CAR_DISPLAY_IN_CLUSTER"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_car_display_in_cluster"
+ android:description="@string/car_permission_desc_car_display_in_cluster" />
+
+ <permission android:name="android.car.permission.CAR_INSTRUMENT_CLUSTER_CONTROL"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_car_cluster_control"
+ android:description="@string/car_permission_desc_car_cluster_control" />
+
+ <permission android:name="android.car.permission.STORAGE_MONITORING"
+ android:protectionLevel="system|signature"
+ android:label="@string/car_permission_label_storage_monitoring"
+ android:description="@string/car_permission_desc_storage_monitoring" />
+
+ <uses-permission android:name="android.permission.CALL_PHONE" />
+ <uses-permission android:name="android.permission.DEVICE_POWER" />
+ <uses-permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS" />
+ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
+ <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS" />
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING" />
+ <uses-permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE" />
+ <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
+ <uses-permission android:name="android.permission.READ_CALL_LOG" />
+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ <uses-permission android:name="android.permission.REAL_GET_TASKS" />
+ <uses-permission android:name="android.permission.REBOOT" />
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.REMOVE_TASKS" />
+ <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
+ <uses-permission android:name="android.permission.BLUETOOTH" />
+ <uses-permission android:name="android.permission.MANAGE_USERS" />
+
+ <application android:label="Car service"
+ android:directBootAware="true"
+ android:allowBackup="false"
+ android:persistent="true">
+
+
+ <uses-library android:name="android.test.runner" />
+ <service android:name=".CarService"
+ android:singleUser="true">
+ <intent-filter>
+ <action android:name="android.car.ICar" />
+ </intent-filter>
+ </service>
+ <service android:name=".PerUserCarService" android:exported="false" />
+ <activity android:name="com.android.car.pm.ActivityBlockingActivity"
+ android:excludeFromRecents="true"
+ android:exported="false">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
index 35a99da..50a5bce 100644
--- a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
+++ b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
@@ -16,8 +16,12 @@
package android.permission2.cts;
+import static android.os.Build.VERSION.SECURITY_PATCH;
+
+import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PermissionGroupInfo;
import android.content.pm.PermissionInfo;
import android.test.AndroidTestCase;
@@ -26,10 +30,10 @@
import android.util.ArraySet;
import android.util.Log;
import android.util.Xml;
+
import org.xmlpull.v1.XmlPullParser;
import java.io.InputStream;
-import java.lang.String;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -38,8 +42,6 @@
import java.util.Map;
import java.util.Set;
-import static android.os.Build.VERSION.SECURITY_PATCH;
-
/**
* Tests for permission policy on the platform.
*/
@@ -54,6 +56,8 @@
private static final String PLATFORM_ROOT_NAMESPACE = "android.";
+ private static final String AUTOMOTIVE_SERVICE_PACKAGE_NAME = "com.android.car";
+
private static final String TAG_PERMISSION = "permission";
private static final String ATTR_NAME = "name";
@@ -61,14 +65,10 @@
private static final String ATTR_PROTECTION_LEVEL = "protectionLevel";
public void testPlatformPermissionPolicyUnaltered() throws Exception {
- PackageInfo platformPackage = getContext().getPackageManager()
- .getPackageInfo(PLATFORM_PACKAGE_NAME, PackageManager.GET_PERMISSIONS);
- Map<String, PermissionInfo> declaredPermissionsMap = new ArrayMap<>();
- List<String> offendingList = new ArrayList<String>();
+ Map<String, PermissionInfo> declaredPermissionsMap =
+ getPermissionsForPackage(getContext(), PLATFORM_PACKAGE_NAME);
- for (PermissionInfo declaredPermission : platformPackage.permissions) {
- declaredPermissionsMap.put(declaredPermission.name, declaredPermission);
- }
+ List<String> offendingList = new ArrayList<>();
List<PermissionGroupInfo> declaredGroups = getContext().getPackageManager()
.getAllPermissionGroups(0);
@@ -77,9 +77,16 @@
declaredGroupsSet.add(declaredGroup.name);
}
- Set<String> expectedPermissionGroups = new ArraySet<String>();
+ Set<String> expectedPermissionGroups = new ArraySet<>();
+ List<PermissionInfo> expectedPermissions = loadExpectedPermissions(R.raw.android_manifest);
- for (PermissionInfo expectedPermission : loadExpectedPermissions()) {
+ if (getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) {
+ expectedPermissions.addAll(loadExpectedPermissions(R.raw.automotive_android_manifest));
+ declaredPermissionsMap.putAll(
+ getPermissionsForPackage(getContext(), AUTOMOTIVE_SERVICE_PACKAGE_NAME));
+ }
+
+ for (PermissionInfo expectedPermission : expectedPermissions) {
String expectedPermissionName = expectedPermission.name;
if (shouldSkipPermission(expectedPermissionName)) {
continue;
@@ -132,7 +139,7 @@
if (!declaredGroupsSet.contains(declaredPermission.group)) {
offendingList.add(
- "Permission group " + expectedPermission.group + "must be defined");
+ "Permission group " + expectedPermission.group + " must be defined");
}
}
}
@@ -149,7 +156,7 @@
if (!expectedPermissionGroups.contains(declaredGroup.name)) {
if (declaredGroup.name != null) {
if (declaredGroup.packageName.equals(PLATFORM_PACKAGE_NAME)
- || declaredGroup.name.startsWith(PLATFORM_ROOT_NAMESPACE)) {
+ && declaredGroup.name.startsWith(PLATFORM_ROOT_NAMESPACE)) {
offendingList.add(
"Cannot define group "
+ declaredGroup.name
@@ -177,12 +184,9 @@
assertTrue(errMsg, offendingList.isEmpty());
}
- private List<PermissionInfo> loadExpectedPermissions() throws Exception {
+ private List<PermissionInfo> loadExpectedPermissions(int resourceId) throws Exception {
List<PermissionInfo> permissions = new ArrayList<>();
- try (
- InputStream in = getContext().getResources()
- .openRawResource(android.permission2.cts.R.raw.android_manifest)
- ) {
+ try (InputStream in = getContext().getResources().openRawResource(resourceId)) {
XmlPullParser parser = Xml.newPullParser();
parser.setInput(in, null);
@@ -264,6 +268,18 @@
return protectionLevel;
}
+ private static Map<String, PermissionInfo> getPermissionsForPackage(Context context, String pkg)
+ throws NameNotFoundException {
+ PackageInfo packageInfo = context.getPackageManager()
+ .getPackageInfo(pkg, PackageManager.GET_PERMISSIONS);
+ Map<String, PermissionInfo> declaredPermissionsMap = new ArrayMap<>();
+
+ for (PermissionInfo declaredPermission : packageInfo.permissions) {
+ declaredPermissionsMap.put(declaredPermission.name, declaredPermission);
+ }
+ return declaredPermissionsMap;
+ }
+
private static Date parseDate(String date) {
Date patchDate = new Date();
try {
diff --git a/tests/tests/simpleperf/Android.mk b/tests/tests/simpleperf/Android.mk
index ddbb26a..164c14d 100644
--- a/tests/tests/simpleperf/Android.mk
+++ b/tests/tests/simpleperf/Android.mk
@@ -16,10 +16,9 @@
libsimpleperf_cts_test \
LOCAL_STATIC_LIBRARIES += \
- libbacktrace_offline \
libbacktrace \
- libunwind \
libunwindstack \
+ libdexfile \
libziparchive \
libz \
libgtest \
diff --git a/tests/tests/telecom/AndroidManifest.xml b/tests/tests/telecom/AndroidManifest.xml
index f0cad67..76e7743 100644
--- a/tests/tests/telecom/AndroidManifest.xml
+++ b/tests/tests/telecom/AndroidManifest.xml
@@ -24,6 +24,7 @@
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />
+ <uses-permission android:name="android.permission.ACCEPT_HANDOVER" />
<uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
diff --git a/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java b/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java
index ea29552..ddab9d1 100644
--- a/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java
+++ b/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java
@@ -81,6 +81,8 @@
TestUtils.InvokeCounter mOnRttStatusChangedCounter;
TestUtils.InvokeCounter mOnRttInitiationFailedCounter;
TestUtils.InvokeCounter mOnRttRequestCounter;
+ TestUtils.InvokeCounter mOnHandoverCompleteCounter;
+ TestUtils.InvokeCounter mOnHandoverFailedCounter;
Bundle mPreviousExtras;
int mPreviousProperties = -1;
@@ -315,6 +317,15 @@
mOnRttInitiationFailedCounter.invoke(call, reason);
}
+ @Override
+ public void onHandoverComplete(Call call) {
+ mOnHandoverCompleteCounter.invoke(call);
+ }
+
+ @Override
+ public void onHandoverFailed(Call call, int reason) {
+ mOnHandoverFailedCounter.invoke(call, reason);
+ }
};
MockInCallService.setCallbacks(mInCallCallbacks);
@@ -334,6 +345,8 @@
mOnRttInitiationFailedCounter =
new TestUtils.InvokeCounter("mOnRttInitiationFailedCounter");
mOnRttRequestCounter = new TestUtils.InvokeCounter("mOnRttRequestCounter");
+ mOnHandoverCompleteCounter = new TestUtils.InvokeCounter("mOnHandoverCompleteCounter");
+ mOnHandoverFailedCounter = new TestUtils.InvokeCounter("mOnHandoverFailedCounter");
}
/**
@@ -595,7 +608,10 @@
if (extras == null) {
extras = new Bundle();
}
- extras.putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, TestUtils.TEST_PHONE_ACCOUNT_HANDLE);
+ if (!extras.containsKey(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE)) {
+ extras.putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,
+ TestUtils.TEST_PHONE_ACCOUNT_HANDLE);
+ }
if (!VideoProfile.isAudioOnly(videoState)) {
extras.putInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, videoState);
diff --git a/tests/tests/telecom/src/android/telecom/cts/ConnectionServiceTest.java b/tests/tests/telecom/src/android/telecom/cts/ConnectionServiceTest.java
index 0b70f1b..2fc401b 100644
--- a/tests/tests/telecom/src/android/telecom/cts/ConnectionServiceTest.java
+++ b/tests/tests/telecom/src/android/telecom/cts/ConnectionServiceTest.java
@@ -21,6 +21,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.media.AudioManager;
+import android.net.Uri;
import android.telecom.Call;
import android.telecom.Connection;
import android.telecom.ConnectionService;
@@ -34,12 +35,16 @@
*/
public class ConnectionServiceTest extends BaseTelecomTestWithMockServices {
+ private static final Uri SELF_MANAGED_TEST_ADDRESS =
+ Uri.fromParts("sip", "call1@test.com", null);
+
@Override
protected void setUp() throws Exception {
super.setUp();
mContext = getInstrumentation().getContext();
if (mShouldTestTelecom) {
setupConnectionService(null, FLAG_REGISTER | FLAG_ENABLE);
+ mTelecomManager.registerPhoneAccount(TestUtils.TEST_SELF_MANAGED_PHONE_ACCOUNT_1);
}
}
@@ -124,6 +129,86 @@
assertEquals(AudioManager.MODE_IN_CALL, audioManager.getMode());
}
+ public void testConnectionServiceFocusGainedWithNoConnectionService() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // WHEN place a managed call
+ placeAndVerifyCall();
+
+ // THEN managed connection service has gained the focus
+ assertTrue(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_GAINED));
+ }
+
+ public void testConnectionServiceFocusGainedWithSameConnectionService() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // GIVEN a managed call
+ placeAndVerifyCall();
+ verifyConnectionForOutgoingCall().setActive();
+ assertTrue(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_GAINED));
+
+ // WHEN place another call has the same ConnectionService as the existing call
+ placeAndVerifyCall();
+ verifyConnectionForOutgoingCall();
+
+ // THEN the ConnectionService has not gained the focus again
+ assertFalse(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_GAINED));
+ // and the ConnectionService didn't lose the focus
+ assertFalse(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_LOST));
+ }
+
+ public void testConnectionServiceFocusGainedWithDifferentConnectionService() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // GIVEN an existing managed call
+ placeAndVerifyCall();
+ verifyConnectionForOutgoingCall().setActive();
+ assertTrue(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_GAINED));
+
+ // WHEN a self-managed call is coming
+ SelfManagedConnection selfManagedConnection =
+ addIncomingSelfManagedCall(TEST_SELF_MANAGED_HANDLE_1, SELF_MANAGED_TEST_ADDRESS);
+
+ // THEN the managed ConnectionService has lost the focus
+ assertTrue(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_LOST));
+ // and the self-managed ConnectionService has gained the focus
+ assertTrue(CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
+ CtsSelfManagedConnectionService.FOCUS_GAINED_LOCK));
+
+ // Disconnected the self-managed call
+ selfManagedConnection.disconnectAndDestroy();
+ }
+
+ private SelfManagedConnection addIncomingSelfManagedCall(
+ PhoneAccountHandle pah, Uri address) {
+
+ TestUtils.addIncomingCall(getInstrumentation(), mTelecomManager, pah, address);
+
+ // Ensure Telecom bound to the self managed CS
+ if (!CtsSelfManagedConnectionService.waitForBinding()) {
+ fail("Could not bind to Self-Managed ConnectionService");
+ }
+
+ SelfManagedConnection connection = TestUtils.waitForAndGetConnection(address);
+
+ // Active the call
+ connection.setActive();
+
+ return connection;
+ }
+
public void testGetAllConnections() {
if (!mShouldTestTelecom) {
return;
diff --git a/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java b/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java
index 329031a..c9e0c56 100644
--- a/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java
+++ b/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java
@@ -176,6 +176,24 @@
}
@Override
+ public void onConnectionServiceFocusGained() {
+ synchronized (sLock) {
+ if (sConnectionService != null) {
+ sConnectionService.onConnectionServiceFocusGained();
+ }
+ }
+ }
+
+ @Override
+ public void onConnectionServiceFocusLost() {
+ synchronized (sLock) {
+ if (sConnectionService != null) {
+ sConnectionService.onConnectionServiceFocusLost();
+ }
+ }
+ }
+
+ @Override
public boolean onUnbind(Intent intent) {
Log.i(LOG_TAG, "Service has been unbound");
sServiceUnBoundLatch.countDown();
@@ -193,7 +211,6 @@
}
public static boolean waitForUnBinding() {
- sServiceUnBoundLatch = TestUtils.waitForLock(sServiceUnBoundLatch);
- return sServiceUnBoundLatch != null;
+ return TestUtils.waitForLatchCountDown(sServiceUnBoundLatch);
}
}
diff --git a/tests/tests/telecom/src/android/telecom/cts/CtsSelfManagedConnectionService.java b/tests/tests/telecom/src/android/telecom/cts/CtsSelfManagedConnectionService.java
index 16e7b27..e6070ce 100644
--- a/tests/tests/telecom/src/android/telecom/cts/CtsSelfManagedConnectionService.java
+++ b/tests/tests/telecom/src/android/telecom/cts/CtsSelfManagedConnectionService.java
@@ -24,6 +24,7 @@
import android.telecom.DisconnectCause;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
+import android.util.Log;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,7 +42,11 @@
public static int CONNECTION_CREATED_LOCK = 0;
public static int CREATE_INCOMING_CONNECTION_FAILED_LOCK = 1;
public static int CREATE_OUTGOING_CONNECTION_FAILED_LOCK = 2;
- private static int NUM_LOCKS = CREATE_OUTGOING_CONNECTION_FAILED_LOCK + 1;
+ public static int HANDOVER_FAILED_LOCK = 3;
+ public static int FOCUS_GAINED_LOCK = 4;
+ public static int FOCUS_LOST_LOCK = 5;
+
+ private static int NUM_LOCKS = FOCUS_LOST_LOCK + 1;
private static CtsSelfManagedConnectionService sConnectionService;
@@ -60,6 +65,10 @@
private Object mLock = new Object();
private List<SelfManagedConnection> mConnections = new ArrayList<>();
+ private TestUtils.InvokeCounter mOnCreateIncomingHandoverConnectionCounter =
+ new TestUtils.InvokeCounter("incomingHandoverConnection");
+ private TestUtils.InvokeCounter mOnCreateOutgoingHandoverConnectionCounter =
+ new TestUtils.InvokeCounter("outgoingHandoverConnection");
public static CtsSelfManagedConnectionService getConnectionService() {
return sConnectionService;
@@ -106,6 +115,36 @@
mLocks[CREATE_OUTGOING_CONNECTION_FAILED_LOCK].countDown();
}
+ @Override
+ public Connection onCreateIncomingHandoverConnection(PhoneAccountHandle fromPhoneAccountHandle,
+ ConnectionRequest request) {
+ mOnCreateIncomingHandoverConnectionCounter.invoke(fromPhoneAccountHandle, request);
+ return createSelfManagedConnection(request, true /* incoming */);
+ }
+
+ @Override
+ public Connection onCreateOutgoingHandoverConnection(PhoneAccountHandle fromPhoneAccountHandle,
+ ConnectionRequest request) {
+ mOnCreateOutgoingHandoverConnectionCounter.invoke(fromPhoneAccountHandle, request);
+ return createSelfManagedConnection(request, false /* incoming */);
+ }
+
+ @Override
+ public void onHandoverFailed(ConnectionRequest request, int error) {
+ mLocks[HANDOVER_FAILED_LOCK].countDown();
+ }
+
+
+ @Override
+ public void onConnectionServiceFocusGained() {
+ mLocks[FOCUS_GAINED_LOCK].countDown();
+ }
+
+ @Override
+ public void onConnectionServiceFocusLost() {
+ mLocks[FOCUS_LOST_LOCK].countDown();
+ }
+
public void tearDown() {
synchronized(mLock) {
if (mConnections != null && mConnections.size() > 0) {
@@ -124,6 +163,8 @@
SelfManagedConnection connection = new SelfManagedConnection(isIncoming,
mConnectionListener);
connection.setConnectionProperties(Connection.PROPERTY_SELF_MANAGED);
+ connection.setConnectionCapabilities(
+ Connection.CAPABILITY_HOLD | Connection.CAPABILITY_SUPPORT_HOLD);
connection.setAddress(request.getAddress(), TelecomManager.PRESENTATION_ALLOWED);
connection.setExtras(request.getExtras());
@@ -157,7 +198,7 @@
* timeout expired without the lock being released.
*/
public boolean waitForUpdate(int lock) {
- mLocks[lock] = waitForLock(mLocks[lock]);
+ mLocks[lock] = TestUtils.waitForLock(mLocks[lock]);
return mLocks[lock] != null;
}
@@ -166,30 +207,14 @@
* @return {@code true} if binding happened within the time limit, or {@code false} otherwise.
*/
public static boolean waitForBinding() {
- sBindingLock = waitForLock(sBindingLock);
- return sBindingLock != null;
+ return TestUtils.waitForLatchCountDown(sBindingLock);
}
- /**
- * Given a {@link CountDownLatch}, wait for the latch to reach zero for 5 seconds. If the lock
- * was released, return a new instance. Otherwise, return null to indicate that the timeout
- * expired without the lock being released.
- *
- * @param lock The lock to wait on.
- * @return {@code true} if the lock was released, and {@code false} if it failed to be released.
- */
- private static CountDownLatch waitForLock(CountDownLatch lock) {
- boolean success;
- try {
- success = lock.await(5000, TimeUnit.MILLISECONDS);
- } catch (InterruptedException ie) {
- return null;
- }
+ public TestUtils.InvokeCounter getOnCreateIncomingHandoverConnectionCounter() {
+ return mOnCreateIncomingHandoverConnectionCounter;
+ }
- if (success) {
- return new CountDownLatch(1);
- } else {
- return null;
- }
+ public TestUtils.InvokeCounter getOnCreateOutgoingHandoverConnectionCounter() {
+ return mOnCreateOutgoingHandoverConnectionCounter;
}
}
diff --git a/tests/tests/telecom/src/android/telecom/cts/HandoverTest.java b/tests/tests/telecom/src/android/telecom/cts/HandoverTest.java
new file mode 100644
index 0000000..597694b
--- /dev/null
+++ b/tests/tests/telecom/src/android/telecom/cts/HandoverTest.java
@@ -0,0 +1,251 @@
+/*
+ * 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 android.telecom.cts;
+
+import static android.telecom.cts.TestUtils.TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE;
+import static android.telecom.cts.TestUtils.TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE;
+import static android.telecom.cts.TestUtils.TEST_PHONE_ACCOUNT_HANDOVER_SRC;
+import static android.telecom.cts.TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS;
+import static android.telecom.cts.TestUtils.waitOnLocalMainLooper;
+
+import android.net.Uri;
+import android.os.Bundle;
+import android.telecom.Call;
+import android.telecom.Connection;
+import android.telecom.ConnectionRequest;
+import android.telecom.ConnectionService;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telecom.VideoProfile;
+
+/**
+ * Tests the Telecom handover APIs.
+ */
+public class HandoverTest extends BaseTelecomTestWithMockServices {
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mContext = getInstrumentation().getContext();
+ if (mShouldTestTelecom) {
+ setupConnectionService(null, FLAG_REGISTER | FLAG_ENABLE);
+
+ // Test handover source is a managed ConnectionService
+ mTelecomManager.registerPhoneAccount(TestUtils.TEST_PHONE_ACCOUNT_HANDOVER_SRC);
+ TestUtils.enablePhoneAccount(getInstrumentation(),
+ TestUtils.TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE);
+ assertPhoneAccountEnabled(TestUtils.TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE);
+
+ // Test handover destination is a self-managed ConnectionService.
+ mTelecomManager.registerPhoneAccount(TestUtils.TEST_PHONE_ACCOUNT_HANDOVER_DEST);
+ }
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ CtsSelfManagedConnectionService connectionService =
+ CtsSelfManagedConnectionService.getConnectionService();
+ if (connectionService != null) {
+ connectionService.tearDown();
+ mTelecomManager.unregisterPhoneAccount(
+ TestUtils.TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE);
+ mTelecomManager.unregisterPhoneAccount(
+ TestUtils.TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE);
+ }
+
+ super.tearDown();
+ }
+
+ /**
+ * Ensures a call handover cannot be initiated for a {@link android.telecom.PhoneAccount} which
+ * does not declare {@link android.telecom.PhoneAccount#EXTRA_SUPPORTS_HANDOVER_FROM}.
+ */
+ public void testHandoverSourceFailed() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ placeAndVerifyCall();
+ Call call = mInCallCallbacks.getService().getLastCall();
+
+ call.handoverTo(TestUtils.TEST_SELF_MANAGED_HANDLE_1, VideoProfile.STATE_BIDIRECTIONAL,
+ null);
+
+ // Expect the handover failed callback to be called.
+ mOnHandoverFailedCounter.waitForCount(WAIT_FOR_STATE_CHANGE_TIMEOUT_MS);
+ Call callbackCall = (Call) mOnHandoverFailedCounter.getArgs(0)[0];
+ int failureReason = (int) mOnHandoverFailedCounter.getArgs(0)[1];
+ assertEquals(call, callbackCall);
+ assertEquals(Call.Callback.HANDOVER_FAILURE_DEST_NOT_SUPPORTED, failureReason);
+
+ call.disconnect();
+ }
+
+ /**
+ * Ensures a call handover cannot be initiated to a {@link android.telecom.PhoneAccount} which
+ * does not declare {@link android.telecom.PhoneAccount#EXTRA_SUPPORTS_HANDOVER_TO}.
+ */
+ public void testHandoverDestinationFailed() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+ startSourceCall();
+ Call call = mInCallCallbacks.getService().getLastCall();
+
+ // Now try to handover to an account which does not support handover.
+ call.handoverTo(TestUtils.TEST_SELF_MANAGED_HANDLE_1, VideoProfile.STATE_BIDIRECTIONAL,
+ null);
+
+ // Expect the handover failed callback to be called.
+ mOnHandoverFailedCounter.waitForCount(WAIT_FOR_STATE_CHANGE_TIMEOUT_MS);
+ Call callbackCall = (Call) mOnHandoverFailedCounter.getArgs(0)[0];
+ int failureReason = (int) mOnHandoverFailedCounter.getArgs(0)[1];
+ assertEquals(call, callbackCall);
+ assertEquals(Call.Callback.HANDOVER_FAILURE_DEST_NOT_SUPPORTED, failureReason);
+
+ call.disconnect();
+ }
+
+ /**
+ * Ensures that when the source and destination both support handover that an outgoing handover
+ * request will be successfully relayed.
+ */
+ public void testOutgoingHandoverRequestValid() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // Begin our source call on the CS which supports handover from it.
+ startSourceCall();
+ final Call call = mInCallCallbacks.getService().getLastCall();
+
+ // Now try to handover to an account which does support handover to it.
+ call.handoverTo(TestUtils.TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE,
+ VideoProfile.STATE_BIDIRECTIONAL, null);
+
+ // Ensure Telecom bound to the self managed CS
+ if (!CtsSelfManagedConnectionService.waitForBinding()) {
+ fail("Could not bind to Self-Managed ConnectionService");
+ }
+
+ // Wait for binding to self managed CS and invocation of outgoing handover method.
+ TestUtils.InvokeCounter counter =
+ CtsSelfManagedConnectionService.getConnectionService()
+ .getOnCreateOutgoingHandoverConnectionCounter();
+ counter.waitForCount(WAIT_FOR_STATE_CHANGE_TIMEOUT_MS);
+
+ SelfManagedConnection connection = TestUtils.waitForAndGetConnection(
+ call.getDetails().getHandle());
+
+ // Verify the from handle is as expected.
+ PhoneAccountHandle fromHandle = (PhoneAccountHandle) counter.getArgs(0)[0];
+ assertEquals(TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE, fromHandle);
+ // Verify the to handle is as expected.
+ ConnectionRequest request = (ConnectionRequest) counter.getArgs(0)[1];
+ assertEquals(TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE, request.getAccountHandle());
+
+ completeHandoverAndVerify(call, connection);
+ }
+
+ /**
+ * Tests use of the
+ * {@link android.telecom.TelecomManager#acceptHandover(Uri, int, PhoneAccountHandle)} API on
+ * the receiving side of the handover.
+ */
+ public void testIncomingHandoverRequestValid() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // Begin our source call on the CS which supports handover from it.
+ startSourceCall();
+ final Call call = mInCallCallbacks.getService().getLastCall();
+
+ // Request to accept handover of that call to another app.
+ mTelecomManager.acceptHandover(call.getDetails().getHandle(),
+ VideoProfile.STATE_BIDIRECTIONAL, TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE);
+
+ // Ensure Telecom bound to the self managed CS
+ if (!CtsSelfManagedConnectionService.waitForBinding()) {
+ fail("Could not bind to Self-Managed ConnectionService");
+ }
+
+ // Wait for binding to self managed CS and invocation of incoming handover method.
+ TestUtils.InvokeCounter counter =
+ CtsSelfManagedConnectionService.getConnectionService()
+ .getOnCreateIncomingHandoverConnectionCounter();
+ counter.waitForCount(WAIT_FOR_STATE_CHANGE_TIMEOUT_MS);
+
+ SelfManagedConnection connection = TestUtils.waitForAndGetConnection(
+ call.getDetails().getHandle());
+
+ // Verify the from handle is as expected.
+ PhoneAccountHandle fromHandle = (PhoneAccountHandle) counter.getArgs(0)[0];
+ assertEquals(TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE, fromHandle);
+ // Verify the to handle is as expected.
+ ConnectionRequest request = (ConnectionRequest) counter.getArgs(0)[1];
+ assertEquals(TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE, request.getAccountHandle());
+ // The original call's address should match the address of the handover request.
+ assertEquals(call.getDetails().getHandle(), request.getAddress());
+
+ completeHandoverAndVerify(call, connection);
+ }
+
+ /**
+ * Begins a call which will be the source of a handover.
+ */
+ private void startSourceCall() {
+ // Ensure the ongoing account is on a PhoneAccount which supports handover from.
+ Bundle extras = new Bundle();
+ extras.putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,
+ TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE);
+ placeAndVerifyCall(extras);
+ }
+
+ /**
+ * Complete the a call handover and verify that it was successfully reported.
+ * @param call
+ * @param connection
+ */
+ private void completeHandoverAndVerify(final Call call, SelfManagedConnection connection) {
+ // Make the connection active, indicating that the user has accepted the handover.
+ connection.setActive();
+
+ // Expect the original call to have been informed of handover completion.
+ mOnHandoverCompleteCounter.waitForCount(1, WAIT_FOR_STATE_CHANGE_TIMEOUT_MS);
+ assertEquals(1, mOnHandoverCompleteCounter.getInvokeCount());
+
+ // Also expect the connection to be informed of handover completion.
+ connection.getHandoverCompleteCounter().waitForCount(1, WAIT_FOR_STATE_CHANGE_TIMEOUT_MS);
+ assertEquals(1, connection.getHandoverCompleteCounter().getInvokeCount());
+
+ // Now, we expect that the original connection will get disconnected.
+ waitUntilConditionIsTrueOrTimeout(new Condition() {
+ @Override
+ public Object expected() {
+ return Call.STATE_DISCONNECTED;
+ }
+ @Override
+ public Object actual() {
+ return call.getState();
+ }
+ },
+ WAIT_FOR_STATE_CHANGE_TIMEOUT_MS,
+ "Expected original call to be disconnected."
+ );
+ }
+}
diff --git a/tests/tests/telecom/src/android/telecom/cts/MockConnectionService.java b/tests/tests/telecom/src/android/telecom/cts/MockConnectionService.java
index 6e022e6..6523bac 100644
--- a/tests/tests/telecom/src/android/telecom/cts/MockConnectionService.java
+++ b/tests/tests/telecom/src/android/telecom/cts/MockConnectionService.java
@@ -27,6 +27,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
/**
* Default implementation of a {@link CtsConnectionService}. This is used for the majority
@@ -36,6 +37,16 @@
public class MockConnectionService extends ConnectionService {
public static final int CONNECTION_PRESENTATION = TelecomManager.PRESENTATION_ALLOWED;
+ public static final int EVENT_CONNECTION_SERVICE_FOCUS_GAINED = 0;
+ public static final int EVENT_CONNECTION_SERVICE_FOCUS_LOST = 1;
+
+ // Next event id is 2
+ private static final int TOTAL_EVENT = EVENT_CONNECTION_SERVICE_FOCUS_LOST + 1;
+
+ private static final int DEFAULT_EVENT_TIMEOUT_MS = 2000;
+
+ private final Semaphore[] mEventLock = initializeSemaphore(TOTAL_EVENT);
+
/**
* Used to control whether the {@link MockVideoProvider} will be created when connections are
* created. Used by {@link VideoCallTest#testVideoCallDelayProvider()} to test scenario where
@@ -131,7 +142,39 @@
remoteConferences.add(conference);
}
+ @Override
+ public void onConnectionServiceFocusGained() {
+ mEventLock[EVENT_CONNECTION_SERVICE_FOCUS_GAINED].release();
+ }
+
+ @Override
+ public void onConnectionServiceFocusLost() {
+ mEventLock[EVENT_CONNECTION_SERVICE_FOCUS_LOST].release();
+ }
+
public void setCreateVideoProvider(boolean createVideoProvider) {
mCreateVideoProvider = createVideoProvider;
}
+
+ /** Returns true if the given {@code event} is happened before the default timeout. */
+ public boolean waitForEvent(int event) {
+ if (event < 0 || event >= mEventLock.length) {
+ return false;
+ }
+
+ try {
+ return mEventLock[event].tryAcquire(DEFAULT_EVENT_TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ // No interaction for the given event within the given timeout.
+ return false;
+ }
+ }
+
+ private static final Semaphore[] initializeSemaphore(int total) {
+ Semaphore[] locks = new Semaphore[total];
+ for (int i = 0; i < total; i++) {
+ locks[i] = new Semaphore(0);
+ }
+ return locks;
+ }
}
diff --git a/tests/tests/telecom/src/android/telecom/cts/MockInCallService.java b/tests/tests/telecom/src/android/telecom/cts/MockInCallService.java
index e13335e..338a225 100644
--- a/tests/tests/telecom/src/android/telecom/cts/MockInCallService.java
+++ b/tests/tests/telecom/src/android/telecom/cts/MockInCallService.java
@@ -65,6 +65,8 @@
public void onRttStatusChanged(Call call, boolean enabled, Call.RttCall rttCall) {}
public void onRttRequest(Call call, int id) {}
public void onRttInitiationFailure(Call call, int reason) {}
+ public void onHandoverComplete(Call call) {}
+ public void onHandoverFailed(Call call, int failureReason) {}
final public MockInCallService getService() {
return mService;
@@ -189,6 +191,22 @@
getCallbacks().onRttInitiationFailure(call, reason);
}
}
+
+ @Override
+ public void onHandoverComplete(Call call) {
+ super.onHandoverComplete(call);
+ if (getCallbacks() != null) {
+ getCallbacks().onHandoverComplete(call);
+ }
+ }
+
+ @Override
+ public void onHandoverFailed(Call call, int failureReason) {
+ super.onHandoverFailed(call, failureReason);
+ if (getCallbacks() != null) {
+ getCallbacks().onHandoverFailed(call, failureReason);
+ }
+ }
};
private void saveVideoCall(Call call, VideoCall videoCall) {
diff --git a/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnection.java b/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnection.java
index f9a3d91..e53d789 100644
--- a/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnection.java
+++ b/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnection.java
@@ -16,6 +16,7 @@
package android.telecom.cts;
+import android.os.Bundle;
import android.telecom.CallAudioState;
import android.telecom.Connection;
import android.telecom.DisconnectCause;
@@ -31,6 +32,8 @@
InvokeCounter mCallAudioRouteInvokeCounter = new InvokeCounter("onCallAudioStateChanged");
InvokeCounter mOnShowIncomingUiInvokeCounter = new InvokeCounter(
"onShowIncomingUiInvokeCounter");
+ InvokeCounter mCallEventCounter = new InvokeCounter("onCallEvent");
+ InvokeCounter mHandoverCompleteCounter = new InvokeCounter("handoverCompleteCounter");
CountDownLatch mOnHoldLatch = new CountDownLatch(1);
public static abstract class Listener {
@@ -70,6 +73,16 @@
mOnHoldLatch.countDown();
}
+ @Override
+ public void onCallEvent(String event, Bundle extras) {
+ mCallEventCounter.invoke(event, extras);
+ }
+
+ @Override
+ public void onHandoverComplete() {
+ mHandoverCompleteCounter.invoke();
+ }
+
public InvokeCounter getCallAudioStateChangedInvokeCounter() {
return mCallAudioRouteInvokeCounter;
}
@@ -78,6 +91,14 @@
return mOnShowIncomingUiInvokeCounter;
}
+ public InvokeCounter getCallEventCounter() {
+ return mCallEventCounter;
+ }
+
+ public InvokeCounter getHandoverCompleteCounter() {
+ return mHandoverCompleteCounter;
+ }
+
public boolean waitOnHold() {
mOnHoldLatch = TestUtils.waitForLock(mOnHoldLatch);
return mOnHoldLatch != null;
diff --git a/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnectionServiceTest.java b/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnectionServiceTest.java
index 41bf986..2b67f95 100644
--- a/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnectionServiceTest.java
+++ b/tests/tests/telecom/src/android/telecom/cts/SelfManagedConnectionServiceTest.java
@@ -19,6 +19,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.telecom.CallAudioState;
+import android.telecom.Connection;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -52,7 +53,6 @@
mTelecomManager.registerPhoneAccount(TestUtils.TEST_SELF_MANAGED_PHONE_ACCOUNT_1);
mTelecomManager.registerPhoneAccount(TestUtils.TEST_SELF_MANAGED_PHONE_ACCOUNT_2);
}
-
}
@Override
@@ -107,7 +107,7 @@
// enabled, and the one we get back after registration is.
assertPhoneAccountEquals(TestUtils.TEST_SELF_MANAGED_PHONE_ACCOUNT_1, registeredAccount);
- // An important asumption is that self-managed PhoneAccounts are automatically
+ // An important assumption is that self-managed PhoneAccounts are automatically
// enabled by default.
assertTrue("Self-managed PhoneAccounts must be enabled by default.",
registeredAccount.isEnabled());
@@ -219,6 +219,32 @@
}
/**
+ * Tests ensures that Telecom disallow to place outgoing self-managed call when the ongoing
+ * managed call can not be held.
+ */
+ public void testDisallowOutgoingCallWhileOngoingManagedCallCanNotBeHeld() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // GIVEN an ongoing managed call that can not be held
+ addAndVerifyNewIncomingCall(createTestNumber(), null);
+ Connection connection = verifyConnectionForIncomingCall();
+ int capabilities = connection.getConnectionCapabilities();
+ capabilities &= ~Connection.CAPABILITY_HOLD;
+ connection.setConnectionCapabilities(capabilities);
+ connection.setActive();
+
+ // WHEN place a self-managed outgoing call
+ TestUtils.placeOutgoingCall(getInstrumentation(), mTelecomManager,
+ TestUtils.TEST_SELF_MANAGED_HANDLE_1, TEST_ADDRESS_1);
+
+ // THEN the new outgoing call is failed.
+ assertTrue(CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
+ CtsSelfManagedConnectionService.CREATE_OUTGOING_CONNECTION_FAILED_LOCK));
+ }
+
+ /**
* Tests ability to add a new self-managed outgoing connection.
*/
public void testAddSelfManagedOutgoingConnection() throws Exception {
@@ -296,11 +322,11 @@
}
/**
- * Tests that Telecom will disallow an outgoing call when there is already an ongoing call in
- * another third-party app.
+ * Tests that Telecom will allow the incoming call while the number of self-managed call is not
+ * exceed the limit.
* @throws Exception
*/
- public void testDisallowOutgoingCall() throws Exception {
+ public void testIncomingWhileOngoingWithinLimit() throws Exception {
if (!mShouldTestTelecom) {
return;
}
@@ -311,33 +337,7 @@
SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1);
setActiveAndVerify(connection);
- // Attempt to create a new outgoing call for the other PhoneAccount; it should fail.
- TestUtils.placeOutgoingCall(getInstrumentation(), mTelecomManager,
- TestUtils.TEST_SELF_MANAGED_HANDLE_2, TEST_ADDRESS_2);
- assertTrue("Expected onCreateOutgoingConnectionFailed callback",
- CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
- CtsSelfManagedConnectionService.CREATE_OUTGOING_CONNECTION_FAILED_LOCK));
-
- setDisconnectedAndVerify(connection);
- }
-
- /**
- * Tests that Telecom will disallow an outgoing call when there is already an ongoing call in
- * another third-party app.
- * @throws Exception
- */
- public void testIncomingWhileOngoing() throws Exception {
- if (!mShouldTestTelecom) {
- return;
- }
-
- // Create an ongoing call in the first self-managed PhoneAccount.
- TestUtils.placeOutgoingCall(getInstrumentation(), mTelecomManager,
- TestUtils.TEST_SELF_MANAGED_HANDLE_1, TEST_ADDRESS_1);
- SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1);
- setActiveAndVerify(connection);
-
- // Attempt to create a new outgoing call for the other PhoneAccount; it should succeed.
+ // Attempt to create a new incoming call for the other PhoneAccount; it should succeed.
TestUtils.addIncomingCall(getInstrumentation(), mTelecomManager,
TestUtils.TEST_SELF_MANAGED_HANDLE_2, TEST_ADDRESS_2);
SelfManagedConnection connection2 = TestUtils.waitForAndGetConnection(TEST_ADDRESS_2);
@@ -347,6 +347,76 @@
}
/**
+ * Tests the self-managed ConnectionService has gained the focus when it become active.
+ */
+ public void testSelfManagedConnectionServiceGainedFocus() throws Exception {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // Attempt to create a new Incoming self-managed call
+ TestUtils.addIncomingCall(getInstrumentation(), mTelecomManager,
+ TestUtils.TEST_SELF_MANAGED_HANDLE_1, TEST_ADDRESS_1);
+ SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1);
+ setActiveAndVerify(connection);
+
+ // The ConnectionService has gained the focus
+ assertTrue(CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
+ CtsSelfManagedConnectionService.FOCUS_GAINED_LOCK));
+
+ setDisconnectedAndVerify(connection);
+ }
+
+ public void testSelfManagedConnectionServiceLostFocus() throws Exception {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // GIVEN an ongoing self-managed call
+ TestUtils.addIncomingCall(getInstrumentation(), mTelecomManager,
+ TestUtils.TEST_SELF_MANAGED_HANDLE_1, TEST_ADDRESS_1);
+ SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1);
+ setActiveAndVerify(connection);
+ assertTrue(CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
+ CtsSelfManagedConnectionService.FOCUS_GAINED_LOCK));
+
+ // WHEN place a managed call
+ placeAndVerifyCall();
+ verifyConnectionForOutgoingCall().setActive();
+ assertTrue(connectionService.waitForEvent(
+ MockConnectionService.EVENT_CONNECTION_SERVICE_FOCUS_GAINED));
+
+ // THEN the self-managed ConnectionService lost the focus
+
+ connection.disconnectAndDestroy();
+ assertTrue(CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
+ CtsSelfManagedConnectionService.FOCUS_LOST_LOCK));
+ }
+
+ /**
+ * Tests that Telecom will disallow the incoming call while the ringing call is existed.
+ */
+ public void testRingCallLimitForOnePhoneAccount() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // GIVEN a self-managed call which state is ringing
+ TestUtils.addIncomingCall(getInstrumentation(), mTelecomManager,
+ TestUtils.TEST_SELF_MANAGED_HANDLE_1, TEST_ADDRESS_1);
+ SelfManagedConnection connection = TestUtils.waitForAndGetConnection(TEST_ADDRESS_1);
+ connection.setRinging();
+
+ // WHEN create a new incoming call for the the same PhoneAccount
+ TestUtils.addIncomingCall(getInstrumentation(), mTelecomManager,
+ TestUtils.TEST_SELF_MANAGED_HANDLE_1, TEST_ADDRESS_1);
+
+ // THEN the new incoming call is denied
+ assertTrue(CtsSelfManagedConnectionService.getConnectionService().waitForUpdate(
+ CtsSelfManagedConnectionService.CREATE_INCOMING_CONNECTION_FAILED_LOCK));
+ }
+
+ /**
* Tests that Telecom enforces a maximum number of calls for a self-managed ConnectionService.
*
* @throws Exception
diff --git a/tests/tests/telecom/src/android/telecom/cts/TestUtils.java b/tests/tests/telecom/src/android/telecom/cts/TestUtils.java
index ac717d7..31000de 100644
--- a/tests/tests/telecom/src/android/telecom/cts/TestUtils.java
+++ b/tests/tests/telecom/src/android/telecom/cts/TestUtils.java
@@ -63,6 +63,11 @@
public static final String ACCOUNT_ID = "xtstest_CALL_PROVIDER_ID";
public static final PhoneAccountHandle TEST_PHONE_ACCOUNT_HANDLE =
new PhoneAccountHandle(new ComponentName(PACKAGE, COMPONENT), ACCOUNT_ID);
+ public static final PhoneAccountHandle TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE =
+ new PhoneAccountHandle(new ComponentName(PACKAGE, COMPONENT), "handoverFrom");
+ public static final PhoneAccountHandle TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE =
+ new PhoneAccountHandle(new ComponentName(PACKAGE, SELF_MANAGED_COMPONENT),
+ "handoverTo");
public static final String REMOTE_ACCOUNT_ID = "xtstest_REMOTE_CALL_PROVIDER_ID";
public static final String SELF_MANAGED_ACCOUNT_ID_1 = "ctstest_SELF_MANAGED_ID_1";
public static final PhoneAccountHandle TEST_SELF_MANAGED_HANDLE_1 =
@@ -87,6 +92,34 @@
.addSupportedUriScheme(PhoneAccount.SCHEME_TEL)
.addSupportedUriScheme(PhoneAccount.SCHEME_VOICEMAIL)
.build();
+ private static final Bundle SUPPORTS_HANDOVER_FROM_EXTRAS = new Bundle();
+ private static final Bundle SUPPORTS_HANDOVER_TO_EXTRAS = new Bundle();
+ static {
+ SUPPORTS_HANDOVER_FROM_EXTRAS.putBoolean(PhoneAccount.EXTRA_SUPPORTS_HANDOVER_FROM, true);
+ SUPPORTS_HANDOVER_TO_EXTRAS.putBoolean(PhoneAccount.EXTRA_SUPPORTS_HANDOVER_TO, true);
+ }
+ public static final PhoneAccount TEST_PHONE_ACCOUNT_HANDOVER_SRC = PhoneAccount.builder(
+ TEST_HANDOVER_SRC_PHONE_ACCOUNT_HANDLE, ACCOUNT_LABEL)
+ .setAddress(Uri.parse("tel:555-TEST"))
+ .setExtras(SUPPORTS_HANDOVER_FROM_EXTRAS)
+ .setSubscriptionAddress(Uri.parse("tel:555-TEST"))
+ .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)
+ .setHighlightColor(Color.BLUE)
+ .setShortDescription(ACCOUNT_LABEL)
+ .addSupportedUriScheme(PhoneAccount.SCHEME_TEL)
+ .addSupportedUriScheme(PhoneAccount.SCHEME_VOICEMAIL)
+ .build();
+ public static final PhoneAccount TEST_PHONE_ACCOUNT_HANDOVER_DEST = PhoneAccount.builder(
+ TEST_HANDOVER_DEST_PHONE_ACCOUNT_HANDLE, ACCOUNT_LABEL)
+ .setAddress(Uri.parse("tel:555-TEST"))
+ .setExtras(SUPPORTS_HANDOVER_TO_EXTRAS)
+ .setSubscriptionAddress(Uri.parse("tel:555-TEST"))
+ .setCapabilities(PhoneAccount.CAPABILITY_SELF_MANAGED)
+ .setHighlightColor(Color.MAGENTA)
+ .setShortDescription(ACCOUNT_LABEL)
+ .addSupportedUriScheme(PhoneAccount.SCHEME_TEL)
+ .addSupportedUriScheme(PhoneAccount.SCHEME_VOICEMAIL)
+ .build();
public static final String REMOTE_ACCOUNT_LABEL = "CTSRemoteConnectionService";
public static final String SELF_MANAGED_ACCOUNT_LABEL = "android.telecom.cts";
public static final PhoneAccount TEST_SELF_MANAGED_PHONE_ACCOUNT_2 = PhoneAccount.builder(
@@ -222,17 +255,36 @@
}
}
- public static CountDownLatch waitForLock(CountDownLatch lock) {
- boolean success;
- try {
- if (lock == null) {
- return null;
- }
- success = lock.await(5000, TimeUnit.MILLISECONDS);
- } catch (InterruptedException ie) {
- return null;
+ /**
+ * Waits for the {@link CountDownLatch} to count down to 0 and then returns without reseting
+ * the latch.
+ * @param lock the latch that the system will wait on.
+ * @return true if the latch was released successfully, false if the latch timed out before
+ * resetting.
+ */
+ public static boolean waitForLatchCountDown(CountDownLatch lock) {
+ if (lock == null) {
+ return false;
}
+ boolean success;
+ try {
+ success = lock.await(5000, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException ie) {
+ return false;
+ }
+
+ return success;
+ }
+
+ /**
+ * Waits for the {@link CountDownLatch} to count down to 0 and then returns a new reset latch.
+ * @param lock The lock that will await a countDown to 0.
+ * @return a new reset {@link CountDownLatch} if the lock successfully counted down to 0 or
+ * null if the operation timed out.
+ */
+ public static CountDownLatch waitForLock(CountDownLatch lock) {
+ boolean success = waitForLatchCountDown(lock);
if (success) {
return new CountDownLatch(1);
} else {
@@ -297,6 +349,9 @@
*/
public static SelfManagedConnection waitForAndGetConnection(Uri address) {
// Wait for creation of the new connection.
+ if (!CtsSelfManagedConnectionService.waitForBinding()) {
+ TestCase.fail("Could not bind to Self-Managed ConnectionService");
+ }
CtsSelfManagedConnectionService connectionService =
CtsSelfManagedConnectionService.getConnectionService();
TestCase.assertTrue(connectionService.waitForUpdate(
diff --git a/tests/tests/telephony/EmbmsMiddlewareTestApp/src/android/telephony/cts/embmstestapp/CtsDownloadService.java b/tests/tests/telephony/EmbmsMiddlewareTestApp/src/android/telephony/cts/embmstestapp/CtsDownloadService.java
index 01777c6..06e88c0 100644
--- a/tests/tests/telephony/EmbmsMiddlewareTestApp/src/android/telephony/cts/embmstestapp/CtsDownloadService.java
+++ b/tests/tests/telephony/EmbmsMiddlewareTestApp/src/android/telephony/cts/embmstestapp/CtsDownloadService.java
@@ -189,6 +189,10 @@
@Override
public int setTempFileRootDirectory(int subscriptionId, String rootDirectoryPath) {
+ if (mErrorCodeOverride != MbmsErrors.SUCCESS) {
+ return mErrorCodeOverride;
+ }
+
Bundle b = new Bundle();
b.putString(METHOD_NAME, METHOD_SET_TEMP_FILE_ROOT);
b.putInt(ARGUMENT_SUBSCRIPTION_ID, subscriptionId);
@@ -214,7 +218,7 @@
}
@Override
- public int getDownloadStatus(DownloadRequest downloadRequest, FileInfo fileInfo) {
+ public int requestDownloadState(DownloadRequest downloadRequest, FileInfo fileInfo) {
Bundle b = new Bundle();
b.putString(METHOD_NAME, METHOD_GET_DOWNLOAD_STATUS);
b.putParcelable(ARGUMENT_DOWNLOAD_REQUEST, downloadRequest);
diff --git a/tests/tests/telephony/src/android/telephony/cts/CellInfoTest.java b/tests/tests/telephony/src/android/telephony/cts/CellInfoTest.java
index 6b68a4a..c1031ec 100644
--- a/tests/tests/telephony/src/android/telephony/cts/CellInfoTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/CellInfoTest.java
@@ -56,6 +56,10 @@
// Maximum and minimum possible CQI values.
private static final int MAX_CQI = 30;
private static final int MIN_CQI = 0;
+
+ // 3gpp 36.101 Sec 5.7.2
+ private static final int CHANNEL_RASTER_EUTRAN = 100; //kHz
+
private PackageManager mPm;
@Override
@@ -161,8 +165,23 @@
int earfcn = lte.getCellIdentity().getEarfcn();
// Reference 3GPP 36.101 Table 5.7.3-1
- assertTrue("getEarfcn() out of range [0,47000], earfcn=" + earfcn,
- earfcn >= 0 && earfcn <= 47000);
+ // As per NOTE 1 in the table, although 0-6 are valid channel numbers for
+ // LTE, the reported EARFCN is the center frequency, rendering these channels
+ // out of the range of the narrowest 1.4Mhz deployment.
+ int minEarfcn = 7;
+ if (bw != Integer.MAX_VALUE) {
+ // The number of channels used by a cell is equal to the cell bandwidth divided
+ // by the channel raster (bandwidth of a channel). The center channel is the channel
+ // the n/2-th channel where n is the number of channels, and since it is the center
+ // channel that is reported as the channel number for a cell, we can exclude any channel
+ // numbers within a band that would place the bottom of a cell's bandwidth below the
+ // edge of the band. For channel numbers in Band 1, the EARFCN numbering starts from
+ // channel 0, which means that we can exclude from the valid range channels starting
+ // from 0 and numbered less than half the total number of channels occupied by a cell.
+ minEarfcn = bw / CHANNEL_RASTER_EUTRAN / 2;
+ }
+ assertTrue("getEarfcn() out of range [7,47000], earfcn=" + earfcn,
+ earfcn >= minEarfcn && earfcn <= 47000);
CellSignalStrengthLte cellSignalStrengthLte = lte.getCellSignalStrength();
//Integer.MAX_VALUE indicates an unavailable field
int rsrp = cellSignalStrengthLte.getRsrp();
@@ -197,8 +216,10 @@
int uarfcn = wcdma.getCellIdentity().getUarfcn();
// Reference 3GPP 25.101 Table 5.2
- assertTrue("getUarfcn() out of range [400,11000], uarfcn=" + uarfcn,
- uarfcn >= 400 && uarfcn <= 11000);
+ // From Appendix E.1, even though UARFCN is numbered from 400, the minumum
+ // usable channel is 412 due to the fixed bandwidth of 5Mhz
+ assertTrue("getUarfcn() out of range [412,11000], uarfcn=" + uarfcn,
+ uarfcn >= 412 && uarfcn <= 11000);
String alphaLong = (String) wcdma.getCellIdentity().getOperatorAlphaLong();
assertNotNull("getOperatorAlphaLong() returns NULL!", alphaLong);
diff --git a/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java b/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
index 9803a45..f2a6ec2 100644
--- a/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
@@ -196,6 +196,7 @@
mTelephonyManager.getPhoneCount();
mTelephonyManager.getDataEnabled();
mTelephonyManager.getNetworkSpecifier();
+ mTelephonyManager.getNai();
TelecomManager telecomManager = (TelecomManager) getContext()
.getSystemService(Context.TELECOM_SERVICE);
PhoneAccountHandle defaultAccount = telecomManager
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadFlowTest.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadFlowTest.java
index 5089381..e6a97ed 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadFlowTest.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadFlowTest.java
@@ -21,6 +21,7 @@
import android.os.Bundle;
import android.telephony.MbmsDownloadSession;
import android.telephony.cts.embmstestapp.CtsDownloadService;
+import android.telephony.mbms.DownloadRequest;
import android.telephony.mbms.MbmsDownloadReceiver;
import java.io.File;
@@ -29,14 +30,16 @@
public class MbmsDownloadFlowTest extends MbmsDownloadTestBase {
private File tempFileRootDir;
- private String tempFileRootDirPath;
+ private DownloadRequest testDownloadRequest;
@Override
public void setUp() throws Exception {
super.setUp();
+ testDownloadRequest = downloadRequestTemplate
+ .setAppIntent(new Intent(MbmsDownloadReceiverTest.APP_INTENT_ACTION))
+ .build();
tempFileRootDir = new File(mContext.getFilesDir(), "CtsTestDir");
tempFileRootDir.mkdir();
- tempFileRootDirPath = tempFileRootDir.getCanonicalPath();
mDownloadSession.setTempFileRootDirectory(tempFileRootDir);
}
@@ -49,15 +52,15 @@
public void testFileDownloadFlow() throws Exception {
MbmsDownloadReceiverTest.AppIntentCapture captor =
- new MbmsDownloadReceiverTest.AppIntentCapture(mContext, mCallbackHandler);
- mDownloadSession.download(MbmsDownloadReceiverTest.TEST_DOWNLOAD_REQUEST);
+ new MbmsDownloadReceiverTest.AppIntentCapture(mContext, mHandler);
+ mDownloadSession.download(testDownloadRequest);
mMiddlewareControl.actuallyStartDownloadFlow();
Intent downloadDoneIntent = captor.getIntent();
assertEquals(MbmsDownloadReceiverTest.APP_INTENT_ACTION, downloadDoneIntent.getAction());
assertEquals(MbmsDownloadSession.RESULT_SUCCESSFUL,
downloadDoneIntent.getIntExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT, -1));
- assertEquals(MbmsDownloadReceiverTest.TEST_DOWNLOAD_REQUEST,
+ assertEquals(testDownloadRequest,
downloadDoneIntent.getParcelableExtra(
MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST));
assertEquals(CtsDownloadService.FILE_INFO,
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadReceiverTest.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadReceiverTest.java
index 0d88f13..8232271 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadReceiverTest.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadReceiverTest.java
@@ -47,9 +47,6 @@
public static final String APP_INTENT_ACTION =
"android.telephony.embms.cts.ACTION_TEST_DOWNLOAD_COMPLETE";
- public static final DownloadRequest TEST_DOWNLOAD_REQUEST = DOWNLOAD_REQUEST_TEMPLATE
- .setAppIntent(new Intent(APP_INTENT_ACTION))
- .build();
public static class AppIntentCapture {
private final BlockingQueue<Intent> mReceivedIntent = new LinkedBlockingQueue<>();
@@ -82,10 +79,14 @@
private MbmsDownloadReceiver mReceiver;
private File tempFileRootDir;
private String tempFileRootDirPath;
+ private DownloadRequest testDownloadRequest;
@Override
public void setUp() throws Exception {
super.setUp();
+ testDownloadRequest = downloadRequestTemplate
+ .setAppIntent(new Intent(APP_INTENT_ACTION))
+ .build();
mReceiver = new MbmsDownloadReceiver();
IntentFilter filter = new IntentFilter();
filter.addAction(VendorUtils.ACTION_DOWNLOAD_RESULT_INTERNAL);
@@ -140,9 +141,9 @@
intentForReceiverTest.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT,
MbmsDownloadSession.RESULT_CANCELLED);
intentForReceiverTest.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST,
- TEST_DOWNLOAD_REQUEST);
+ testDownloadRequest);
- AppIntentCapture intentCaptor = new AppIntentCapture(mContext, mCallbackHandler);
+ AppIntentCapture intentCaptor = new AppIntentCapture(mContext, mHandler);
sendBroadcastAndValidate(intentForReceiverTest, MbmsDownloadReceiver.RESULT_OK);
Intent receivedIntent = intentCaptor.getIntent();
@@ -150,7 +151,7 @@
assertEquals(MbmsDownloadSession.RESULT_CANCELLED,
receivedIntent.getIntExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT, -1));
- assertEquals(TEST_DOWNLOAD_REQUEST,
+ assertEquals(testDownloadRequest,
receivedIntent.getParcelableExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST));
}
@@ -162,7 +163,7 @@
intentForReceiverTest.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_RESULT,
MbmsDownloadSession.RESULT_SUCCESSFUL);
intentForReceiverTest.putExtra(MbmsDownloadSession.EXTRA_MBMS_DOWNLOAD_REQUEST,
- TEST_DOWNLOAD_REQUEST);
+ testDownloadRequest);
intentForReceiverTest.putExtra(MbmsDownloadSession.EXTRA_MBMS_FILE_INFO,
CtsDownloadService.FILE_INFO);
intentForReceiverTest.putExtra(VendorUtils.EXTRA_FINAL_URI,
@@ -230,7 +231,7 @@
receivedExtras.add(getResultExtras(true));
receivedCode.add(getResultCode());
}
- }, mCallbackHandler, -1, null, null);
+ }, mHandler, -1, null, null);
try {
assertEquals(expectedCode,
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadSessionTest.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadSessionTest.java
index 6bd35c3..5e70828 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadSessionTest.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadSessionTest.java
@@ -20,7 +20,6 @@
import android.os.Bundle;
import android.telephony.MbmsDownloadSession;
import android.telephony.cts.embmstestapp.CtsDownloadService;
-import android.telephony.cts.embmstestapp.CtsStreamingService;
import android.telephony.mbms.DownloadRequest;
import android.telephony.mbms.FileServiceInfo;
import android.telephony.mbms.MbmsErrors;
@@ -34,7 +33,7 @@
public void testDuplicateSession() throws Exception {
try {
MbmsDownloadSession failure = MbmsDownloadSession.create(
- mContext, mCallback, mCallbackHandler);
+ mContext, mCallbackExecutor, mCallback);
fail("Duplicate create should've thrown an exception");
} catch (IllegalStateException e) {
// Succeed
@@ -140,7 +139,7 @@
}
public void testResetDownloadKnowledge() throws Exception {
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
+ DownloadRequest request = downloadRequestTemplate.build();
mDownloadSession.resetDownloadKnowledge(request);
List<Bundle> resetDownloadKnowledgeCalls =
@@ -151,8 +150,8 @@
}
public void testGetDownloadStatus() throws Exception {
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
- mDownloadSession.getDownloadStatus(request, CtsDownloadService.FILE_INFO);
+ DownloadRequest request = downloadRequestTemplate.build();
+ mDownloadSession.requestDownloadState(request, CtsDownloadService.FILE_INFO);
List<Bundle> getDownloadStatusCalls =
getMiddlewareCalls(CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS);
@@ -164,7 +163,7 @@
}
public void testCancelDownload() throws Exception {
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
+ DownloadRequest request = downloadRequestTemplate.build();
mDownloadSession.cancelDownload(request);
List<Bundle> cancelDownloadCalls =
@@ -175,7 +174,11 @@
}
public void testListPendingDownloads() throws Exception {
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.setAppIntent(new Intent()).build();
+ File tempFileRootDir = new File(mContext.getFilesDir(), "CtsTestDir");
+ tempFileRootDir.mkdir();
+ mDownloadSession.setTempFileRootDirectory(tempFileRootDir);
+
+ DownloadRequest request = downloadRequestTemplate.setAppIntent(new Intent()).build();
mDownloadSession.download(request);
List<DownloadRequest> downloads = mDownloadSession.listPendingDownloads();
@@ -183,14 +186,24 @@
assertEquals(request, downloads.get(0));
}
- public void testDownloadRequestOpacity() throws Exception {
+ public void testSetTempFileDirFailure() throws Exception {
+ String tempFileDirName = "CTSTestDir101010";
+ File tempFileRootDirectory = new File(mContext.getFilesDir(), tempFileDirName);
+ tempFileRootDirectory.mkdirs();
+
+ mMiddlewareControl.forceErrorCode(
+ MbmsErrors.DownloadErrors.ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT);
+ mDownloadSession.setTempFileRootDirectory(tempFileRootDirectory);
+ assertNotNull(mCallback.waitOnError());
+ assertNotSame(mDownloadSession.getTempFileRootDirectory(), tempFileDirName);
+ }
+
+ public void testDownloadRequestSerialization() throws Exception {
Intent intent = new Intent("sample_intent_action");
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.setAppIntent(intent).build();
- DownloadRequest newRequest = new DownloadRequest.Builder(request.getSourceUri())
- .setServiceId(request.getFileServiceId())
- .setSubscriptionId(request.getSubscriptionId())
- .setOpaqueData(request.getOpaqueData())
- .build();
+ DownloadRequest request = downloadRequestTemplate.setAppIntent(intent).build();
+ DownloadRequest newRequest =
+ DownloadRequest.Builder.fromSerializedRequest(request.toByteArray())
+ .build();
assertEquals(request, newRequest);
}
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadStateCallbackTest.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadStateCallbackTest.java
index a5cc2d0..c01de7c 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadStateCallbackTest.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadStateCallbackTest.java
@@ -83,8 +83,8 @@
public void testFullCallback() throws Exception {
int sampleInt = 10;
TestDSCallback callback = new TestDSCallback(DownloadStateCallback.ALL_UPDATES);
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
- mDownloadSession.registerStateCallback(request, callback, mCallbackHandler);
+ DownloadRequest request = downloadRequestTemplate.build();
+ mDownloadSession.registerStateCallback(request, mCallbackExecutor, callback);
mMiddlewareControl.fireOnProgressUpdated(request, CtsDownloadService.FILE_INFO,
sampleInt, sampleInt, sampleInt, sampleInt);
SomeArgs progressArgs = callback.waitOnProgressUpdated(ASYNC_TIMEOUT);
@@ -104,8 +104,8 @@
public void testDeregistration() throws Exception {
TestDSCallback callback = new TestDSCallback(DownloadStateCallback.ALL_UPDATES);
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
- mDownloadSession.registerStateCallback(request, callback, mCallbackHandler);
+ DownloadRequest request = downloadRequestTemplate.build();
+ mDownloadSession.registerStateCallback(request, mCallbackExecutor, callback);
mDownloadSession.unregisterStateCallback(request, callback);
mMiddlewareControl.fireOnStateUpdated(null, null, 0);
@@ -116,8 +116,8 @@
public void testCallbackFiltering1() throws Exception {
TestDSCallback callback = new TestDSCallback(DownloadStateCallback.PROGRESS_UPDATES);
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
- mDownloadSession.registerStateCallback(request, callback, mCallbackHandler);
+ DownloadRequest request = downloadRequestTemplate.build();
+ mDownloadSession.registerStateCallback(request, mCallbackExecutor, callback);
mMiddlewareControl.fireOnStateUpdated(null, null, 0);
assertNull(callback.waitOnStateUpdated(SHORT_TIMEOUT));
@@ -127,8 +127,8 @@
public void testCallbackFiltering2() throws Exception {
TestDSCallback callback = new TestDSCallback(DownloadStateCallback.STATE_UPDATES);
- DownloadRequest request = DOWNLOAD_REQUEST_TEMPLATE.build();
- mDownloadSession.registerStateCallback(request, callback, mCallbackHandler);
+ DownloadRequest request = downloadRequestTemplate.build();
+ mDownloadSession.registerStateCallback(request, mCallbackExecutor, callback);
mMiddlewareControl.fireOnStateUpdated(null, null, 0);
assertNotNull(callback.waitOnStateUpdated(SHORT_TIMEOUT));
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadTestBase.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadTestBase.java
index 9da5f04..bde9de6 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadTestBase.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsDownloadTestBase.java
@@ -21,6 +21,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
+import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
@@ -41,6 +42,7 @@
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@@ -107,13 +109,12 @@
}
}
- static final DownloadRequest.Builder DOWNLOAD_REQUEST_TEMPLATE =
- new DownloadRequest.Builder(CtsDownloadService.DOWNLOAD_SOURCE_URI)
- .setServiceInfo(CtsDownloadService.FILE_SERVICE_INFO);
+ DownloadRequest.Builder downloadRequestTemplate;
Context mContext;
HandlerThread mHandlerThread;
- Handler mCallbackHandler;
+ Handler mHandler;
+ Executor mCallbackExecutor;
ICtsDownloadMiddlewareControl mMiddlewareControl;
MbmsDownloadSession mDownloadSession;
TestCallback mCallback = new TestCallback();
@@ -123,8 +124,16 @@
mContext = getInstrumentation().getContext();
mHandlerThread = new HandlerThread("EmbmsCtsTestWorker");
mHandlerThread.start();
- mCallbackHandler = new Handler(mHandlerThread.getLooper());
+ mHandler = new Handler(mHandlerThread.getLooper());
+ mCallbackExecutor = mHandler::post;
mCallback = new TestCallback();
+
+ File destinationDirectory = new File(mContext.getFilesDir(), "downloads");
+ destinationDirectory.mkdirs();
+ Uri destinationDirectoryUri = Uri.fromFile(destinationDirectory);
+ downloadRequestTemplate = new DownloadRequest.Builder(
+ CtsDownloadService.DOWNLOAD_SOURCE_URI, destinationDirectoryUri)
+ .setServiceInfo(CtsDownloadService.FILE_SERVICE_INFO);
getControlBinder();
setupDownloadSession();
}
@@ -138,7 +147,7 @@
private void setupDownloadSession() throws Exception {
mDownloadSession = MbmsDownloadSession.create(
- mContext, mCallback, mCallbackHandler);
+ mContext, mCallbackExecutor, mCallback);
assertNotNull(mDownloadSession);
assertTrue(mCallback.waitOnMiddlewareReady());
assertEquals(0, mCallback.getNumErrorCalls());
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingServiceTest.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingServiceTest.java
index 42e5618..835a6e4 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingServiceTest.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingServiceTest.java
@@ -127,7 +127,7 @@
public void testStartStreaming() throws Exception {
StreamingService streamingService = mStreamingSession.startStreaming(
CtsStreamingService .STREAMING_SERVICE_INFO,
- mStreamingServiceCallback, mCallbackHandler);
+ mCallbackExecutor, mStreamingServiceCallback);
assertNotNull(streamingService);
assertEquals(CtsStreamingService.STREAMING_SERVICE_INFO, streamingService.getInfo());
@@ -145,7 +145,7 @@
public void testGetPlaybackUri() throws Exception {
StreamingService streamingService = mStreamingSession.startStreaming(
CtsStreamingService .STREAMING_SERVICE_INFO,
- mStreamingServiceCallback, mCallbackHandler);
+ mCallbackExecutor, mStreamingServiceCallback);
assertEquals(CtsStreamingService.STREAMING_URI, streamingService.getPlaybackUri());
List<List<Object>> getPlaybackUriCalls =
@@ -158,8 +158,8 @@
public void testStopStreaming() throws Exception {
StreamingService streamingService = mStreamingSession.startStreaming(
CtsStreamingService .STREAMING_SERVICE_INFO,
- mStreamingServiceCallback, mCallbackHandler);
- streamingService.stopStreaming();
+ mCallbackExecutor, mStreamingServiceCallback);
+ streamingService.close();
List<List<Object>> stopStreamingCalls =
getMiddlewareCalls(CtsStreamingService.METHOD_STOP_STREAMING);
assertEquals(1, stopStreamingCalls.size());
@@ -170,7 +170,7 @@
public void testStreamingCallbacks() throws Exception {
mStreamingSession.startStreaming(
CtsStreamingService .STREAMING_SERVICE_INFO,
- mStreamingServiceCallback, mCallbackHandler);
+ mCallbackExecutor, mStreamingServiceCallback);
mMiddlewareControl.fireErrorOnStream(
MbmsErrors.StreamingErrors.ERROR_UNABLE_TO_START_SERVICE, "");
@@ -194,7 +194,7 @@
mMiddlewareControl.forceErrorCode(
MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE);
mStreamingSession.startStreaming(CtsStreamingService.STREAMING_SERVICE_INFO,
- mStreamingServiceCallback, mCallbackHandler);
+ mCallbackExecutor, mStreamingServiceCallback);
assertEquals(MbmsErrors.GeneralErrors.ERROR_MIDDLEWARE_TEMPORARILY_UNAVAILABLE,
mCallback.waitOnError().arg1);
}
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingSessionTest.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingSessionTest.java
index 92b3fc9..0aeb734 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingSessionTest.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingSessionTest.java
@@ -29,7 +29,7 @@
public void testDuplicateSession() throws Exception {
try {
MbmsStreamingSession failure = MbmsStreamingSession.create(
- mContext, mCallback, mCallbackHandler);
+ mContext, mCallbackExecutor, mCallback);
fail("Duplicate create should've thrown an exception");
} catch (IllegalStateException e) {
// Succeed
diff --git a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingTestBase.java b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingTestBase.java
index e170998..e4bb27b 100644
--- a/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingTestBase.java
+++ b/tests/tests/telephony/src/android/telephony/embms/cts/MbmsStreamingTestBase.java
@@ -21,6 +21,7 @@
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@@ -87,7 +88,7 @@
Context mContext;
HandlerThread mHandlerThread;
- Handler mCallbackHandler;
+ Executor mCallbackExecutor;
ICtsStreamingMiddlewareControl mMiddlewareControl;
MbmsStreamingSession mStreamingSession;
TestCallback mCallback = new TestCallback();
@@ -97,7 +98,7 @@
mContext = getInstrumentation().getContext();
mHandlerThread = new HandlerThread("EmbmsCtsTestWorker");
mHandlerThread.start();
- mCallbackHandler = new Handler(mHandlerThread.getLooper());
+ mCallbackExecutor = (new Handler(mHandlerThread.getLooper()))::post;
mCallback = new TestCallback();
getControlBinder();
setupStreamingSession();
@@ -112,7 +113,7 @@
private void setupStreamingSession() throws Exception {
mStreamingSession = MbmsStreamingSession.create(
- mContext, mCallback, mCallbackHandler);
+ mContext, mCallbackExecutor, mCallback);
assertNotNull(mStreamingSession);
assertTrue(mCallback.waitOnMiddlewareReady());
assertEquals(0, mCallback.getNumErrorCalls());
diff --git a/tests/tests/transition/src/android/transition/cts/TransitionActivity.java b/tests/tests/transition/src/android/transition/cts/TransitionActivity.java
index afc48be..692d323 100644
--- a/tests/tests/transition/src/android/transition/cts/TransitionActivity.java
+++ b/tests/tests/transition/src/android/transition/cts/TransitionActivity.java
@@ -18,12 +18,31 @@
import android.app.Activity;
import android.os.Bundle;
+import android.view.View;
+import android.view.WindowInsets;
+import android.widget.FrameLayout;
-public class TransitionActivity extends Activity {
+public class TransitionActivity extends Activity implements View.OnApplyWindowInsetsListener{
+
+ private View mContent;
+
@Override
public void onCreate(Bundle bundle){
super.onCreate(bundle);
setContentView(R.layout.transition_main);
+ mContent = findViewById(R.id.container);
+ mContent.setOnApplyWindowInsetsListener(this);
+ }
+
+ @Override
+ public WindowInsets onApplyWindowInsets(View v, WindowInsets in) {
+ if (in.isRound()) {
+ FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mContent.getLayoutParams();
+ params.setMargins(in.getSystemWindowInsetLeft(), in.getSystemWindowInsetTop(),
+ in.getSystemWindowInsetRight(), in.getSystemWindowInsetBottom());
+ mContent.setLayoutParams(params);
+ }
+ return in;
}
}
diff --git a/tests/tests/view/AndroidManifest.xml b/tests/tests/view/AndroidManifest.xml
index 7c35627..823704c 100644
--- a/tests/tests/view/AndroidManifest.xml
+++ b/tests/tests/view/AndroidManifest.xml
@@ -316,8 +316,7 @@
</activity>
<activity android:name="android.view.cts.HoverCtsActivity"
- android:screenOrientation="locked"
- android:theme="@style/WhiteBackgroundTheme">
+ android:screenOrientation="locked">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
diff --git a/tests/tests/view/src/android/view/cts/HoverTest.java b/tests/tests/view/src/android/view/cts/HoverTest.java
index 45b56e9..d3734c8 100644
--- a/tests/tests/view/src/android/view/cts/HoverTest.java
+++ b/tests/tests/view/src/android/view/cts/HoverTest.java
@@ -103,9 +103,8 @@
}
private void injectHoverMove(View view, int offsetX, int offsetY) {
- mActivity.getWindow().injectInputEvent(
+ mInstrumentation.sendPointerSync(
obtainMouseEvent(MotionEvent.ACTION_HOVER_MOVE, view, offsetX, offsetY));
- mInstrumentation.waitForIdleSync();
}
private void remove(View view) throws Throwable {
diff --git a/tests/tests/view/src/android/view/cts/TextureViewTest.java b/tests/tests/view/src/android/view/cts/TextureViewTest.java
index d9b84a4..f66e137 100644
--- a/tests/tests/view/src/android/view/cts/TextureViewTest.java
+++ b/tests/tests/view/src/android/view/cts/TextureViewTest.java
@@ -20,16 +20,17 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import android.app.Instrumentation;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Point;
-import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
+import android.view.PixelCopy;
import android.view.View;
+import android.view.Window;
+import com.android.compatibility.common.util.SynchronousPixelCopy;
import com.android.compatibility.common.util.WidgetTestUtils;
import org.junit.Before;
@@ -42,8 +43,9 @@
@MediumTest
@RunWith(AndroidJUnit4.class)
public class TextureViewTest {
- private Instrumentation mInstrumentation;
private TextureViewCtsActivity mActivity;
+ private SynchronousPixelCopy mPixelCopy;
+ private Window mWindow;
@Rule
public ActivityTestRule<TextureViewCtsActivity> mActivityRule =
@@ -51,10 +53,9 @@
@Before
public void setup() {
- mInstrumentation = InstrumentationRegistry.getInstrumentation();
mActivity = mActivityRule.getActivity();
+ mPixelCopy = new SynchronousPixelCopy();
assertNotNull(mActivity);
- assertNotNull(mInstrumentation);
}
@Test
@@ -68,6 +69,7 @@
content.getLocationOnScreen(outLocation);
center.x = outLocation[0] + (content.getWidth() / 2);
center.y = outLocation[1] + (content.getHeight() / 2);
+ mWindow = mActivity.getWindow();
});
assertTrue(center.x > 0);
assertTrue(center.y > 0);
@@ -94,7 +96,10 @@
}
private int getPixel(Point point) {
- Bitmap screenshot = mInstrumentation.getUiAutomation().takeScreenshot();
+ Bitmap screenshot = Bitmap.createBitmap(mWindow.getDecorView().getWidth(),
+ mWindow.getDecorView().getHeight(), Bitmap.Config.ARGB_8888);
+ int result = mPixelCopy.request(mWindow, screenshot);
+ assertEquals("Copy request failed", PixelCopy.SUCCESS, result);
int pixel = screenshot.getPixel(point.x, point.y);
screenshot.recycle();
return pixel;
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java b/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
index b02deec..f10e7fd 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
@@ -20,10 +20,13 @@
import android.net.http.SslError;
import android.os.Build;
import android.test.ActivityInstrumentationTestCase2;
+import android.util.Base64;
import android.util.Log;
import android.webkit.ConsoleMessage;
import android.webkit.SslErrorHandler;
import android.webkit.WebIconDatabase;
+import android.webkit.WebResourceResponse;
+import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebSettings.TextSize;
import android.webkit.WebStorage;
@@ -35,7 +38,9 @@
import com.android.compatibility.common.util.NullWebViewUtils;
import com.android.compatibility.common.util.PollingCheck;
+import java.io.ByteArrayInputStream;
import java.io.FileOutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -944,61 +949,77 @@
if (!NullWebViewUtils.isWebViewAvailable()) {
return;
}
- final class SslWebViewClient extends WaitForLoadedClient {
- public SslWebViewClient() {
+
+ final String INSECURE_BASE_URL = "http://www.example.com/";
+ final String INSECURE_JS_URL = INSECURE_BASE_URL + "insecure.js";
+ final String INSECURE_IMG_URL = INSECURE_BASE_URL + "insecure.png";
+ final String SECURE_URL = "/secure.html";
+ final String JS_HTML = "<script src=\"" + INSECURE_JS_URL + "\"></script>";
+ final String IMG_HTML = "<img src=\"" + INSECURE_IMG_URL + "\" />";
+ final String SECURE_HTML = "<body>" + IMG_HTML + " " + JS_HTML + "</body>";
+ final String JS_CONTENT = "window.loaded_js = 42;";
+ final String IMG_CONTENT = "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
+
+ final class InterceptClient extends WaitForLoadedClient {
+ public int mInsecureJsCounter;
+ public int mInsecureImgCounter;
+
+ public InterceptClient() {
super(mOnUiThread);
}
+
@Override
- public void onReceivedSslError(WebView view,
- SslErrorHandler handler, SslError error) {
+ public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}
+
+ @Override
+ public WebResourceResponse shouldInterceptRequest(
+ WebView view, WebResourceRequest request) {
+ if (request.getUrl().toString().equals(INSECURE_JS_URL)) {
+ mInsecureJsCounter++;
+ return new WebResourceResponse("text/javascript", "utf-8",
+ new ByteArrayInputStream(JS_CONTENT.getBytes(StandardCharsets.UTF_8)));
+ } else if (request.getUrl().toString().equals(INSECURE_IMG_URL)) {
+ mInsecureImgCounter++;
+ return new WebResourceResponse("image/gif", "utf-8",
+ new ByteArrayInputStream(Base64.decode(IMG_CONTENT, Base64.DEFAULT)));
+ }
+
+ if (request.getUrl().toString().startsWith(INSECURE_BASE_URL)) {
+ return new WebResourceResponse("text/html", "UTF-8", null);
+ }
+ return null;
+ }
}
+ InterceptClient interceptClient = new InterceptClient();
+ mOnUiThread.setWebViewClient(interceptClient);
mSettings.setJavaScriptEnabled(true);
TestWebServer httpsServer = null;
- TestWebServer httpServer = null;
try {
httpsServer = new TestWebServer(true);
- httpServer = new TestWebServer(false);
- final String JS_URL = "/insecure.js";
- final String IMG_URL = "/insecure.png";
- final String SECURE_URL = "/secure.html";
- final String JS_HTML = "<script src=\"" + httpServer.getResponseUrl(JS_URL) +
- "\"></script>";
- final String IMG_HTML = "<img src=\"" + httpServer.getResponseUrl(IMG_URL) + "\" />";
- final String SECURE_HTML = "<body>" + IMG_HTML + " " + JS_HTML + "</body>";
- httpServer.setResponse(JS_URL, "window.loaded_js = 42;", null);
- httpServer.setResponseBase64(IMG_URL,
- "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
- null);
String secureUrl = httpsServer.setResponse(SECURE_URL, SECURE_HTML, null);
-
mOnUiThread.clearSslPreferences();
- mOnUiThread.setWebViewClient(new SslWebViewClient());
-
mSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
mOnUiThread.loadUrlAndWaitForCompletion(secureUrl);
assertEquals(1, httpsServer.getRequestCount(SECURE_URL));
- assertEquals(0, httpServer.getRequestCount(JS_URL));
- assertEquals(0, httpServer.getRequestCount(IMG_URL));
+ assertEquals(0, interceptClient.mInsecureJsCounter);
+ assertEquals(0, interceptClient.mInsecureImgCounter);
mSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
mOnUiThread.loadUrlAndWaitForCompletion(secureUrl);
assertEquals(2, httpsServer.getRequestCount(SECURE_URL));
- assertEquals(1, httpServer.getRequestCount(JS_URL));
- assertEquals(1, httpServer.getRequestCount(IMG_URL));
+ assertEquals(1, interceptClient.mInsecureJsCounter);
+ assertEquals(1, interceptClient.mInsecureImgCounter);
mSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
mOnUiThread.loadUrlAndWaitForCompletion(secureUrl);
assertEquals(3, httpsServer.getRequestCount(SECURE_URL));
- assertEquals(1, httpServer.getRequestCount(JS_URL));
- assertEquals(2, httpServer.getRequestCount(IMG_URL));
+ assertEquals(1, interceptClient.mInsecureJsCounter);
+ assertEquals(2, interceptClient.mInsecureImgCounter);
} finally {
- if (httpServer != null) {
- httpServer.shutdown();
- }
if (httpsServer != null) {
httpsServer.shutdown();
}
diff --git a/tests/tests/widget/src/android/widget/cts/TimePickerTest.java b/tests/tests/widget/src/android/widget/cts/TimePickerTest.java
index ce093e7..0886aa3 100644
--- a/tests/tests/widget/src/android/widget/cts/TimePickerTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TimePickerTest.java
@@ -553,6 +553,12 @@
prepareForKeyboardInput(initialHour, initialMinute, false /* is24hFormat */,
false /* isClockMode */);
+ // when testing on device with lower resolution, the Spinner mode time picker may not show
+ // completely, which will cause case fail, so in this case remove the clock time picker to
+ // focus on the test of Spinner mode
+ final TimePicker clock = mActivity.findViewById(R.id.timepicker_clock);
+ mActivityRule.runOnUiThread(() -> clock.setVisibility(View.GONE));
+
assertEquals(initialHour, mTimePicker.getHour());
mActivityRule.runOnUiThread(() -> mTimePicker.getHourView().requestFocus());
mInstrumentation.waitForIdleSync();
@@ -665,6 +671,12 @@
prepareForKeyboardInput(initialHour, initialMinute, true /* is24hFormat */,
false /* isClockMode */);
+ // when testing on device with lower resolution, the Spinner mode time picker may not show
+ // completely, which will cause case fail, so in this case remove the clock time picker to
+ // focus on the test of Spinner mode
+ final TimePicker clock = mActivity.findViewById(R.id.timepicker_clock);
+ mActivityRule.runOnUiThread(() -> clock.setVisibility(View.GONE));
+
assertEquals(initialHour, mTimePicker.getHour());
mActivityRule.runOnUiThread(() -> mTimePicker.getHourView().requestFocus());
mInstrumentation.waitForIdleSync();
diff --git a/tests/vr/jni/VrExtensionsJni.cpp b/tests/vr/jni/VrExtensionsJni.cpp
index 6f304b8..c93ca62 100644
--- a/tests/vr/jni/VrExtensionsJni.cpp
+++ b/tests/vr/jni/VrExtensionsJni.cpp
@@ -22,7 +22,9 @@
#include <stdlib.h>
#include <android/hardware_buffer.h>
#include <android/log.h>
+#include <cmath>
#include <string>
+#include <sstream>
#define LOG_TAG "VrExtensionsJni"
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,LOG_TAG,__VA_ARGS__)
@@ -62,6 +64,9 @@
#define GL_MAP_PERSISTENT_BIT_EXT 0x0040
#define GL_MAP_COHERENT_BIT_EXT 0x0080
+// Declare tokens added as a part of EGL_EXT_image_gl_colorspace.
+#define EGL_GL_COLORSPACE_DEFAULT_EXT 0x314D
+
#define LOAD_PROC(NAME, TYPE) \
NAME = reinterpret_cast<TYPE>(eglGetProcAddress(# NAME))
@@ -81,6 +86,9 @@
ASSERT((a) != (b), "assert failed on (" #a ") at " __FILE__ ":%d", __LINE__)
#define ASSERT_GT(a, b) \
ASSERT((a) > (b), "assert failed on (" #a ") at " __FILE__ ":%d", __LINE__)
+#define ASSERT_NEAR(a, b, delta) \
+ ASSERT((a - delta) <= (b) && (b) <= (a + delta), \
+ "assert failed on (" #a ") at " __FILE__ ":%d", __LINE__)
void fail(JNIEnv* env, const char* format, ...) {
va_list args;
@@ -266,3 +274,403 @@
testExternalBuffer(env, usage, false, test_string);
testExternalBuffer(env, usage, true, test_string);
}
+
+const GLchar* const kSrgbVertexCode = R"(
+ // vertex position in clip space (-1..1)
+ attribute vec4 position;
+ varying mediump vec2 uv;
+ void main() {
+ gl_Position = position;
+ uv = vec2(0.5 * (position.x + 1.0), 0.5);
+ })";
+
+const GLchar* const kSrgbFragmentCode = R"(
+ varying mediump vec2 uv;
+ uniform sampler2D tex;
+ void main() {
+ gl_FragColor = texture2D(tex, uv);
+ })";
+
+static inline float SrgbChannelToLinear(float cs) {
+ if (cs <= 0.04045)
+ return cs / 12.92f;
+ else
+ return std::pow((cs + 0.055f) / 1.055f, 2.4f);
+}
+
+static inline float LinearChannelToSrgb(float cs) {
+ if (cs <= 0.0f)
+ return 0.0f;
+ else if (cs < 0.0031308f)
+ return 12.92f * cs;
+ else if (cs < 1.0f)
+ return 1.055f * std::pow(cs, 0.41666f) - 0.055f;
+ else
+ return 1.0f;
+}
+
+static uint32_t SrgbColorToLinear(uint32_t color) {
+ float r = SrgbChannelToLinear((color & 0xff) / 255.0f);
+ float g = SrgbChannelToLinear(((color >> 8) & 0xff) / 255.0f);
+ float b = SrgbChannelToLinear(((color >> 16) & 0xff) / 255.0f);
+ uint32_t r8 = r * 255.0f;
+ uint32_t g8 = g * 255.0f;
+ uint32_t b8 = b * 255.0f;
+ uint32_t a8 = color >> 24;
+ return (a8 << 24) | (b8 << 16) | (g8 << 8) | r8;
+}
+
+static uint32_t LinearColorToSrgb(uint32_t color) {
+ float r = LinearChannelToSrgb((color & 0xff) / 255.0f);
+ float g = LinearChannelToSrgb(((color >> 8) & 0xff) / 255.0f);
+ float b = LinearChannelToSrgb(((color >> 16) & 0xff) / 255.0f);
+ uint32_t r8 = r * 255.0f;
+ uint32_t g8 = g * 255.0f;
+ uint32_t b8 = b * 255.0f;
+ uint32_t a8 = color >> 24;
+ return (a8 << 24) | (b8 << 16) | (g8 << 8) | r8;
+}
+
+static uint32_t LerpColor(uint32_t color0, uint32_t color1, float t) {
+ float r0 = (color0 & 0xff) / 255.0f;
+ float g0 = ((color0 >> 8) & 0xff) / 255.0f;
+ float b0 = ((color0 >> 16) & 0xff) / 255.0f;
+ float a0 = ((color0 >> 24) & 0xff) / 255.0f;
+ float r1 = (color1 & 0xff) / 255.0f;
+ float g1 = ((color1 >> 8) & 0xff) / 255.0f;
+ float b1 = ((color1 >> 16) & 0xff) / 255.0f;
+ float a1 = ((color1 >> 24) & 0xff) / 255.0f;
+ uint32_t r8 = (r0 * (1.0f - t) + r1 * t) * 255.0f;
+ uint32_t g8 = (g0 * (1.0f - t) + g1 * t) * 255.0f;
+ uint32_t b8 = (b0 * (1.0f - t) + b1 * t) * 255.0f;
+ uint32_t a8 = (a0 * (1.0f - t) + a1 * t) * 255.0f;
+ return (a8 << 24) | (b8 << 16) | (g8 << 8) | r8;
+}
+
+// Choose an odd-numbered framebuffer width so that we can
+// extract the middle pixel of a gradient.
+constexpr uint32_t kFramebufferWidth = 31;
+
+// Declare the pixel data for the 2x1 texture.
+// Color components are ordered like this: AABBGGRR
+constexpr uint32_t kTextureData[] = {
+ 0xff800000, // Half-Blue
+ 0xff000080, // Half-Red
+};
+constexpr uint32_t kTextureWidth = sizeof(kTextureData) / sizeof(kTextureData[0]);
+
+// Declare expected values for the middle pixel for various sampling behaviors.
+const uint32_t kExpectedMiddlePixel_NoSrgb = LerpColor(kTextureData[0], kTextureData[1], 0.5f);
+const uint32_t kExpectedMiddlePixel_LinearizeAfterFiltering =
+ SrgbColorToLinear(kExpectedMiddlePixel_NoSrgb);
+const uint32_t kExpectedMiddlePixel_LinearizeBeforeFiltering =
+ LerpColor(SrgbColorToLinear(kTextureData[0]), SrgbColorToLinear(kTextureData[1]), 0.5f);
+
+// Declare expected values for the final pixel color for various blending behaviors.
+constexpr uint32_t kBlendDestColor = 0xff000080;
+constexpr uint32_t kBlendSourceColor = 0x80800000;
+const uint32_t kExpectedBlendedPixel_NoSrgb = LerpColor(kBlendSourceColor, kBlendDestColor, 0.5f);
+const uint32_t kExpectedBlendedPixel_Srgb =
+ LinearColorToSrgb(LerpColor(kBlendSourceColor, SrgbColorToLinear(kBlendDestColor), 0.5f));
+
+// Define a set of test flags. Not using an enum to avoid lots of casts.
+namespace SrgbFlag {
+constexpr uint32_t kHardwareBuffer = 1 << 0;
+constexpr uint32_t kSrgbFormat = 1 << 1;
+constexpr uint32_t kEglColorspaceDefault = 1 << 2;
+constexpr uint32_t kEglColorspaceLinear = 1 << 3;
+constexpr uint32_t kEglColorspaceSrgb = 1 << 4;
+} // namespace SrgbFlag
+
+static void configureEglColorspace(EGLint attrs[4], uint32_t srgb_flags) {
+ if (srgb_flags & SrgbFlag::kEglColorspaceDefault) {
+ attrs[0] = EGL_GL_COLORSPACE_KHR;
+ attrs[1] = EGL_GL_COLORSPACE_DEFAULT_EXT;
+ } else if (srgb_flags & SrgbFlag::kEglColorspaceLinear) {
+ attrs[0] = EGL_GL_COLORSPACE_KHR;
+ attrs[1] = EGL_GL_COLORSPACE_LINEAR_KHR;
+ } else if (srgb_flags & SrgbFlag::kEglColorspaceSrgb) {
+ attrs[0] = EGL_GL_COLORSPACE_KHR;
+ attrs[1] = EGL_GL_COLORSPACE_SRGB_KHR;
+ } else {
+ attrs[0] = EGL_NONE;
+ attrs[1] = EGL_NONE;
+ }
+ attrs[2] = EGL_NONE;
+ attrs[3] = EGL_NONE;
+}
+
+static void printSrgbFlags(std::ostream& out, uint32_t srgb_flags) {
+ if (srgb_flags & SrgbFlag::kHardwareBuffer) {
+ out << " AHardwareBuffer";
+ }
+ if (srgb_flags & SrgbFlag::kSrgbFormat) {
+ out << " GL_SRGB_ALPHA";
+ }
+ if (srgb_flags & SrgbFlag::kEglColorspaceDefault) {
+ out << " EGL_GL_COLORSPACE_DEFAULT_KHR";
+ }
+ if (srgb_flags & SrgbFlag::kEglColorspaceLinear) {
+ out << " EGL_GL_COLORSPACE_LINEAR_KHR";
+ }
+ if (srgb_flags & SrgbFlag::kEglColorspaceSrgb) {
+ out << " EGL_GL_COLORSPACE_SRGB_KHR";
+ }
+}
+
+// Draws a gradient and extracts the middle pixel. Returns void to allow ASSERT to work.
+static void testLinearMagnification(JNIEnv* env, uint32_t flags, uint32_t* middle_pixel) {
+ const bool use_hwbuffer = flags & SrgbFlag::kHardwareBuffer;
+ const bool use_srgb_format = flags & SrgbFlag::kSrgbFormat;
+ GLuint srgbtex;
+ glGenTextures(1, &srgbtex);
+ glBindTexture(GL_TEXTURE_2D, srgbtex);
+ if (use_hwbuffer) {
+ // Create a one-dimensional AHardwareBuffer.
+ AHardwareBuffer_Desc desc = {};
+ desc.width = kTextureWidth;
+ desc.height = 1;
+ desc.layers = 1;
+ desc.format = AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM;
+ desc.usage =
+ AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE | AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT;
+ AHardwareBuffer* hwbuffer = nullptr;
+ int error = AHardwareBuffer_allocate(&desc, &hwbuffer);
+ ASSERT_EQ(error, NO_ERROR);
+ // Populate the pixels.
+ uint32_t* pixels = nullptr;
+ error = AHardwareBuffer_lock(hwbuffer, AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN, -1, nullptr,
+ reinterpret_cast<void**>(&pixels));
+ ASSERT_EQ(error, NO_ERROR);
+ ASSERT_TRUE(pixels);
+ memcpy(pixels, kTextureData, sizeof(kTextureData));
+ error = AHardwareBuffer_unlock(hwbuffer, nullptr);
+ ASSERT_EQ(error, NO_ERROR);
+ // Create EGLClientBuffer from the AHardwareBuffer.
+ EGLClientBuffer native_buffer = eglGetNativeClientBufferANDROID(hwbuffer);
+ ASSERT_TRUE(native_buffer);
+ // Create EGLImage from EGLClientBuffer.
+ EGLint attrs[4];
+ configureEglColorspace(attrs, flags);
+ EGLImageKHR image = eglCreateImageKHR(eglGetCurrentDisplay(), EGL_NO_CONTEXT,
+ EGL_NATIVE_BUFFER_ANDROID, native_buffer, attrs);
+ ASSERT_TRUE(image);
+ // Allocate the OpenGL texture using the EGLImage.
+ glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);
+ } else {
+ GLenum internal_format = use_srgb_format ? GL_SRGB8_ALPHA8_EXT : GL_RGBA8_OES;
+ GLenum format = use_srgb_format ? GL_SRGB_ALPHA_EXT : GL_RGBA;
+ glTexImage2D(GL_TEXTURE_2D, 0, internal_format, kTextureWidth, 1, 0, format,
+ GL_UNSIGNED_BYTE, kTextureData);
+ }
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ ASSERT_EQ(glGetError(), GL_NO_ERROR);
+ // Clear to an interesting constant color to make it easier to spot bugs.
+ glClearColor(1.0, 0.0, 0.5, 0.25);
+ glClear(GL_COLOR_BUFFER_BIT);
+ // Draw the texture.
+ const float kTriangleCoords[] = {-1, -1, -1, 1, 1, -1, 1, 1};
+ glBindTexture(GL_TEXTURE_2D, srgbtex);
+ const int kPositionSlot = 0;
+ glVertexAttribPointer(kPositionSlot, 2, GL_FLOAT, false, 0, kTriangleCoords);
+ glEnableVertexAttribArray(kPositionSlot);
+ glViewport(0, 0, kFramebufferWidth, 1);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ // Read back the framebuffer.
+ glReadPixels(kFramebufferWidth / 2, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, middle_pixel);
+ std::ostringstream flag_string;
+ printSrgbFlags(flag_string, flags);
+ LOGV("Filtered Result: %8.8X Flags =%s", *middle_pixel, flag_string.str().c_str());
+ ASSERT_EQ(glGetError(), GL_NO_ERROR);
+}
+
+// Blends a color into an (optionally) sRGB-encoded framebuffer and extracts the final color.
+// Returns void to allow ASSERT to work.
+static void testFramebufferBlending(JNIEnv* env, uint32_t flags, uint32_t* final_color) {
+ const bool use_hwbuffer = flags & SrgbFlag::kHardwareBuffer;
+ const bool use_srgb_format = flags & SrgbFlag::kSrgbFormat;
+ const bool override_egl_colorspace = use_hwbuffer && (flags & SrgbFlag::kEglColorspaceSrgb);
+ GLuint tex;
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_2D, tex);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ // Create a 1x1 half-blue, half-opaque texture.
+ const uint32_t kTextureData[] = {
+ kBlendSourceColor,
+ };
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA,
+ GL_UNSIGNED_BYTE, kTextureData);
+ // Create 1x1 framebuffer object.
+ GLuint fbo;
+ glGenFramebuffers(1, &fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+ GLuint fbotex;
+ glGenTextures(1, &fbotex);
+ glBindTexture(GL_TEXTURE_2D, fbotex);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ if (use_hwbuffer) {
+ AHardwareBuffer_Desc desc = {};
+ desc.width = 1;
+ desc.height = 1;
+ desc.layers = 1;
+ desc.format = AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM;
+ desc.usage =
+ AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE | AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT;
+ AHardwareBuffer* hwbuffer = nullptr;
+ int error = AHardwareBuffer_allocate(&desc, &hwbuffer);
+ ASSERT_EQ(error, NO_ERROR);
+ // Create EGLClientBuffer from the AHardwareBuffer.
+ EGLClientBuffer native_buffer = eglGetNativeClientBufferANDROID(hwbuffer);
+ ASSERT_TRUE(native_buffer);
+ // Create EGLImage from EGLClientBuffer.
+ EGLint attrs[4];
+ configureEglColorspace(attrs, flags);
+ EGLImageKHR image = eglCreateImageKHR(eglGetCurrentDisplay(), EGL_NO_CONTEXT,
+ EGL_NATIVE_BUFFER_ANDROID, native_buffer, attrs);
+ ASSERT_TRUE(image);
+ // Allocate the OpenGL texture using the EGLImage.
+ glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);
+ } else {
+ GLenum internal_format = use_srgb_format ? GL_SRGB8_ALPHA8_EXT : GL_RGBA8_OES;
+ GLenum format = use_srgb_format ? GL_SRGB_ALPHA_EXT : GL_RGBA;
+ glTexImage2D(GL_TEXTURE_2D, 0, internal_format, 1, 1, 0, format,
+ GL_UNSIGNED_BYTE, nullptr);
+ }
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+ GL_TEXTURE_2D, fbotex, 0);
+ ASSERT_EQ(glCheckFramebufferStatus(GL_FRAMEBUFFER), GL_FRAMEBUFFER_COMPLETE);
+ ASSERT_EQ(glGetError(), GL_NO_ERROR);
+ // Clear to half-red.
+ if (use_srgb_format || override_egl_colorspace) {
+ glClearColor(SrgbChannelToLinear(0.5), 0.0, 0.0, 1.0);
+ } else {
+ glClearColor(0.5, 0.0, 0.0, 1.0);
+ }
+ glClear(GL_COLOR_BUFFER_BIT);
+ // Sanity check the cleared color.
+ uint32_t cleared_color = 0;
+ glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &cleared_color);
+ LOGV(" Cleared Color: %8.8X", cleared_color);
+ ASSERT_EQ(cleared_color, kBlendDestColor);
+ // Draw the texture.
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ const float kTriangleCoords[] = {-1, -1, -1, 1, 1, -1, 1, 1};
+ glBindTexture(GL_TEXTURE_2D, tex);
+ const int kPositionSlot = 0;
+ glVertexAttribPointer(kPositionSlot, 2, GL_FLOAT, false, 0, kTriangleCoords);
+ glEnableVertexAttribArray(kPositionSlot);
+ glViewport(0, 0, 1, 1);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ // Read back the framebuffer.
+ glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, final_color);
+ std::ostringstream flag_string;
+ printSrgbFlags(flag_string, flags);
+ LOGV("Blending Result: %8.8X Flags =%s", *final_color, flag_string.str().c_str());
+ ASSERT_EQ(glGetError(), GL_NO_ERROR);
+}
+
+extern "C" JNIEXPORT void JNICALL
+Java_android_vr_cts_VrExtensionBehaviorTest_nativeTestSrgbBuffer(
+ JNIEnv* env, jclass /* unused */) {
+ // First, check the published extension strings against expectations.
+ const char *egl_exts =
+ eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS);
+ LOGV("EGL Extensions: %s", egl_exts);
+ ASSERT_TRUE(egl_exts);
+ bool egl_colorspace_supported = strstr(egl_exts, "EGL_EXT_image_gl_colorspace");
+ auto gl_exts = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
+ LOGV("OpenGL Extensions: %s", gl_exts);
+ ASSERT_TRUE(gl_exts);
+ // Load ancillary entry points provided by extensions.
+ LOAD_PROC(eglGetNativeClientBufferANDROID,
+ PFNEGLGETNATIVECLIENTBUFFERANDROID);
+ ASSERT_NE(eglGetNativeClientBufferANDROID, nullptr);
+ LOAD_PROC(eglCreateImageKHR, PFNEGLCREATEIMAGEKHRPROC);
+ ASSERT_NE(eglCreateImageKHR, nullptr);
+ LOAD_PROC(glEGLImageTargetTexture2DOES,
+ PFNGLEGLIMAGETARGETTEXTURE2DOESPROC);
+ ASSERT_NE(glEGLImageTargetTexture2DOES, nullptr);
+ // Create a plain old one-dimensional FBO to render to.
+ GLuint fbo;
+ glGenFramebuffers(1, &fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+ GLuint fbotex;
+ glGenTextures(1, &fbotex);
+ glBindTexture(GL_TEXTURE_2D, fbotex);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kFramebufferWidth, 1, 0, GL_RGBA,
+ GL_UNSIGNED_BYTE, nullptr);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+ GL_TEXTURE_2D, fbotex, 0);
+ ASSERT_EQ(glCheckFramebufferStatus(GL_FRAMEBUFFER), GL_FRAMEBUFFER_COMPLETE);
+ ASSERT_EQ(glGetError(), GL_NO_ERROR);
+ // Compile and link shaders.
+ int program = glCreateProgram();
+ int vshader = glCreateShader(GL_VERTEX_SHADER);
+ glShaderSource(vshader, 1, &kSrgbVertexCode, nullptr);
+ glCompileShader(vshader);
+ glAttachShader(program, vshader);
+ int fshader = glCreateShader(GL_FRAGMENT_SHADER);
+ glShaderSource(fshader, 1, &kSrgbFragmentCode, nullptr);
+ glCompileShader(fshader);
+ glAttachShader(program, fshader);
+ glLinkProgram(program);
+ int status;
+ glGetProgramiv(program, GL_LINK_STATUS, &status);
+ ASSERT_EQ(status, GL_TRUE);
+ glUseProgram(program);
+ ASSERT_EQ(glGetError(), GL_NO_ERROR);
+
+ // Filtering test.
+ LOGV("Expected value for NoSrgb = %8.8X", kExpectedMiddlePixel_NoSrgb);
+ LOGV("Expected value for Srgb = %8.8X", kExpectedMiddlePixel_LinearizeBeforeFiltering);
+ uint32_t middle_pixel;
+ // First do a sanity check with plain old pre-linearized textures.
+ testLinearMagnification(env, 0, &middle_pixel);
+ ASSERT_NEAR(middle_pixel, kExpectedMiddlePixel_NoSrgb, 1);
+ testLinearMagnification(env, SrgbFlag::kHardwareBuffer, &middle_pixel);
+ ASSERT_NEAR(middle_pixel, kExpectedMiddlePixel_NoSrgb, 1);
+ // Try a "normally allocated" OpenGL texture with an sRGB source format.
+ testLinearMagnification(env, SrgbFlag::kSrgbFormat, &middle_pixel);
+ ASSERT_NEAR(middle_pixel, kExpectedMiddlePixel_LinearizeBeforeFiltering, 1);
+ // Try EGL_EXT_image_gl_colorspace.
+ if (egl_colorspace_supported) {
+ testLinearMagnification(env, SrgbFlag::kHardwareBuffer | SrgbFlag::kEglColorspaceDefault, &middle_pixel);
+ ASSERT_NEAR(middle_pixel, kExpectedMiddlePixel_NoSrgb, 1);
+ testLinearMagnification(env, SrgbFlag::kHardwareBuffer | SrgbFlag::kEglColorspaceLinear, &middle_pixel);
+ ASSERT_NEAR(middle_pixel, kExpectedMiddlePixel_NoSrgb, 1);
+ testLinearMagnification(env, SrgbFlag::kHardwareBuffer | SrgbFlag::kEglColorspaceSrgb, &middle_pixel);
+ ASSERT_NEAR(middle_pixel, kExpectedMiddlePixel_LinearizeBeforeFiltering, 1);
+ }
+
+ // Blending test.
+ LOGV("Expected value for NoSrgb = %8.8X", kExpectedBlendedPixel_NoSrgb);
+ LOGV("Expected value for Srgb = %8.8X", kExpectedBlendedPixel_Srgb);
+ uint32_t final_color;
+ // First do a sanity check with plain old pre-linearized textures.
+ testFramebufferBlending(env, 0, &final_color);
+ ASSERT_NEAR(final_color, kExpectedBlendedPixel_NoSrgb, 1);
+ testFramebufferBlending(env, SrgbFlag::kHardwareBuffer, &final_color);
+ ASSERT_NEAR(final_color, kExpectedBlendedPixel_NoSrgb, 1);
+ // Try a "normally allocated" OpenGL texture with an sRGB source format.
+ testFramebufferBlending(env, SrgbFlag::kSrgbFormat, &final_color);
+ ASSERT_NEAR(final_color, kExpectedBlendedPixel_Srgb, 1);
+ // Try EGL_EXT_image_gl_colorspace.
+ if (egl_colorspace_supported) {
+ testFramebufferBlending(env, SrgbFlag::kHardwareBuffer | SrgbFlag::kEglColorspaceDefault, &final_color);
+ ASSERT_NEAR(final_color, kExpectedBlendedPixel_NoSrgb, 1);
+ testFramebufferBlending(env, SrgbFlag::kHardwareBuffer | SrgbFlag::kEglColorspaceLinear, &final_color);
+ ASSERT_NEAR(final_color, kExpectedBlendedPixel_NoSrgb, 1);
+ testFramebufferBlending(env, SrgbFlag::kHardwareBuffer | SrgbFlag::kEglColorspaceSrgb, &final_color);
+ ASSERT_NEAR(final_color, kExpectedBlendedPixel_Srgb, 1);
+ }
+}
diff --git a/tests/vr/src/android/vr/cts/VrExtensionBehaviorTest.java b/tests/vr/src/android/vr/cts/VrExtensionBehaviorTest.java
index a27633a..5230eda 100644
--- a/tests/vr/src/android/vr/cts/VrExtensionBehaviorTest.java
+++ b/tests/vr/src/android/vr/cts/VrExtensionBehaviorTest.java
@@ -193,6 +193,20 @@
});
}
+ public void testSrgbBuffer() throws Throwable {
+ mActivity = getGlEsActivity(OpenGLESActivity.RENDERER_BASIC, 0, 0, 0);
+ if (!mActivity.supportsVrHighPerformance())
+ return;
+
+ assertEquals(GLES32.GL_NO_ERROR, mActivity.glGetError());
+
+ mActivity.runOnGlThread(new Runnable() {
+ public void run() {
+ nativeTestSrgbBuffer();
+ }
+ });
+ }
+
/**
* Runs a context priority test.
*/
@@ -223,4 +237,5 @@
private static native boolean nativeTestEglImageArray();
private static native boolean nativeTestExternalBuffer();
+ private static native boolean nativeTestSrgbBuffer();
}
diff --git a/tools/cts-tradefed/res/config/cts-jvmti.xml b/tools/cts-tradefed/res/config/cts-jvmti.xml
index b02529a..6a48d81 100644
--- a/tools/cts-tradefed/res/config/cts-jvmti.xml
+++ b/tools/cts-tradefed/res/config/cts-jvmti.xml
@@ -56,9 +56,57 @@
<option name="compatibility:include-filter" value="CtsJvmtiRunTest947HostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiRunTest951HostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiRunTest982HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest983HostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiRunTest984HostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiRunTest985HostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiRunTest986HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest988HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest989HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest990HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest991HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest992HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest993HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest994HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest995HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest996HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest997HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1900HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1901HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1902HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1903HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1904HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1906HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1907HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1908HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1909HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1910HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1911HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1912HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1913HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1914HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1915HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1916HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1917HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1920HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1921HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1922HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1923HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1924HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1925HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1926HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1927HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1928HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1930HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1931HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1932HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1933HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1934HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1936HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1937HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1939HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1941HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1942HostTestCases" />
+ <option name="compatibility:include-filter" value="CtsJvmtiRunTest1943HostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiTaggingHostTestCases" />
<option name="compatibility:include-filter" value="CtsJvmtiTrackingHostTestCases" />
diff --git a/tools/junit/Android.mk b/tools/junit/Android.mk
index bc507c1..0b56d0e 100644
--- a/tools/junit/Android.mk
+++ b/tools/junit/Android.mk
@@ -20,4 +20,5 @@
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_DEX_PREOPT := false
+LOCAL_SDK_VERSION := current
include $(BUILD_JAVA_LIBRARY)
diff --git a/tools/selinux/SELinuxNeverallowTestFrame.py b/tools/selinux/SELinuxNeverallowTestFrame.py
index 20e1ed4..f27c81d 100644
--- a/tools/selinux/SELinuxNeverallowTestFrame.py
+++ b/tools/selinux/SELinuxNeverallowTestFrame.py
@@ -74,6 +74,10 @@
private boolean isFullTrebleDevice() throws Exception {
return android.security.cts.SELinuxHostTest.isFullTrebleDevice(mDevice);
}
+
+ private boolean isCompatiblePropertyEnforcedDevice() throws Exception {
+ return android.security.cts.SELinuxHostTest.isCompatiblePropertyEnforcedDevice(mDevice);
+ }
"""
src_body = ""
src_footer = """}
@@ -84,11 +88,17 @@
public void testNeverallowRules() throws Exception {
String neverallowRule = "$NEVERALLOW_RULE_HERE$";
boolean fullTrebleOnly = $FULL_TREBLE_ONLY_BOOL_HERE$;
+ boolean compatiblePropertyOnly = $COMPATIBLE_PROPERTY_ONLY_BOOL_HERE$;
if ((fullTrebleOnly) && (!isFullTrebleDevice())) {
// This test applies only to Treble devices but this device isn't one
return;
}
+ if ((compatiblePropertyOnly) && (!isCompatiblePropertyEnforcedDevice())) {
+ // This test applies only to devices on which compatible property is enforced but this
+ // device isn't one
+ return;
+ }
/* run sepolicy-analyze neverallow check on policy file using given neverallow rules */
ProcessBuilder pb = new ProcessBuilder(sepolicyAnalyze.getAbsolutePath(),
diff --git a/tools/selinux/SELinuxNeverallowTestGen.py b/tools/selinux/SELinuxNeverallowTestGen.py
index e74ba78..b4b900e 100755
--- a/tools/selinux/SELinuxNeverallowTestGen.py
+++ b/tools/selinux/SELinuxNeverallowTestGen.py
@@ -10,10 +10,12 @@
class NeverallowRule:
statement = ''
treble_only = False
+ compatible_property_only = False
def __init__(self, statement):
self.statement = statement
self.treble_only = False
+ self.compatible_property_only = False
# extract_neverallow_rules - takes an intermediate policy file and pulls out the
@@ -29,7 +31,7 @@
# uncomment TREBLE_ONLY section delimiter lines
remaining = re.sub(
- r'^\s*#\s*(BEGIN_TREBLE_ONLY|END_TREBLE_ONLY)',
+ r'^\s*#\s*(BEGIN_TREBLE_ONLY|END_TREBLE_ONLY|BEGIN_COMPATIBLE_PROPERTY_ONLY|END_COMPATIBLE_PROPERTY_ONLY)',
r'\1',
policy_str,
flags = re.M)
@@ -37,13 +39,14 @@
remaining = re.sub(r'#.+?$', r'', remaining, flags = re.M)
# match neverallow rules
lines = re.findall(
- r'^\s*(neverallow\s.+?;|BEGIN_TREBLE_ONLY|END_TREBLE_ONLY)',
+ r'^\s*(neverallow\s.+?;|BEGIN_TREBLE_ONLY|END_TREBLE_ONLY|BEGIN_COMPATIBLE_PROPERTY_ONLY|END_COMPATIBLE_PROPERTY_ONLY)',
remaining,
flags = re.M |re.S)
# extract neverallow rules from the remaining lines
rules = list()
treble_only_depth = 0
+ compatible_property_only_depth = 0
for line in lines:
if line.startswith("BEGIN_TREBLE_ONLY"):
treble_only_depth += 1
@@ -53,12 +56,24 @@
exit("ERROR: END_TREBLE_ONLY outside of TREBLE_ONLY section")
treble_only_depth -= 1
continue
+ elif line.startswith("BEGIN_COMPATIBLE_PROPERTY_ONLY"):
+ compatible_property_only_depth += 1
+ continue
+ elif line.startswith("END_COMPATIBLE_PROPERTY_ONLY"):
+ if compatible_property_only_depth < 1:
+ exit("ERROR: END_COMPATIBLE_PROPERTY_ONLY outside of COMPATIBLE_PROPERTY_ONLY section")
+ compatible_property_only_depth -= 1
+ continue
rule = NeverallowRule(line)
rule.treble_only = (treble_only_depth > 0)
+ rule.compatible_property_only = (compatible_property_only_depth > 0)
rules.append(rule)
if treble_only_depth != 0:
exit("ERROR: end of input while inside TREBLE_ONLY section")
+ if compatible_property_only_depth != 0:
+ exit("ERROR: end of input while inside COMPATIBLE_PROPERTY_ONLY section")
+
return rules
# neverallow_rule_to_test - takes a neverallow statement and transforms it into
@@ -73,6 +88,9 @@
method = method.replace(
"$FULL_TREBLE_ONLY_BOOL_HERE$",
"true" if rule.treble_only else "false")
+ method = method.replace(
+ "$COMPATIBLE_PROPERTY_ONLY_BOOL_HERE$",
+ "true" if rule.compatible_property_only else "false")
return method
if __name__ == "__main__":
diff --git a/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java b/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
index e9e1996..e223289 100644
--- a/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
+++ b/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
@@ -679,9 +679,10 @@
FileReader reader = new FileReader(f);
reader.skip(result.end());
- char currentChar;
+ int readResult;
int blocks = 1;
- while ((currentChar = (char) reader.read()) != -1 && blocks > 0) {
+ while ((readResult = reader.read()) != -1 && blocks > 0) {
+ char currentChar = (char) readResult;
switch (currentChar) {
case '}': {
blocks--;