Fix error code and exception class.
Bug: 273826477
Test: atest CtsOnDevicePersonalizationE2ETests
Change-Id: I4a3aa1c41f5ec4eb939793d055490c7671195275
diff --git a/tests/cts/endtoend/src/com/android/ondevicepersonalization/cts/e2e/CtsOdpManagerTests.java b/tests/cts/endtoend/src/com/android/ondevicepersonalization/cts/e2e/CtsOdpManagerTests.java
index 38ab0f1..f896cb6 100644
--- a/tests/cts/endtoend/src/com/android/ondevicepersonalization/cts/e2e/CtsOdpManagerTests.java
+++ b/tests/cts/endtoend/src/com/android/ondevicepersonalization/cts/e2e/CtsOdpManagerTests.java
@@ -289,7 +289,8 @@
var receiver = new ResultReceiver<ExecuteResult>();
PersistableBundle appParams = new PersistableBundle();
appParams.putString(SampleServiceApi.KEY_OPCODE, SampleServiceApi.OPCODE_THROW_EXCEPTION);
- appParams.putString(SampleServiceApi.KEY_EXCEPTION_CLASS, "NullPointerException");
+ appParams.putString(
+ SampleServiceApi.KEY_EXCEPTION_CLASS, "java.lang.NullPointerException");
manager.execute(
new ComponentName(SERVICE_PACKAGE, SERVICE_CLASS),
appParams,
diff --git a/tests/cts/service/src/com/android/ondevicepersonalization/testing/sampleservice/SampleWorker.java b/tests/cts/service/src/com/android/ondevicepersonalization/testing/sampleservice/SampleWorker.java
index d881c27..5f2bca2 100644
--- a/tests/cts/service/src/com/android/ondevicepersonalization/testing/sampleservice/SampleWorker.java
+++ b/tests/cts/service/src/com/android/ondevicepersonalization/testing/sampleservice/SampleWorker.java
@@ -97,7 +97,7 @@
if (result != null) {
receiver.onResult(result);
} else {
- receiver.onError(new IsolatedServiceException(ERROR_SAMPLE_SERVICE_FAILED));
+ receiver.onError(new IsolatedServiceException(errorCode));
}
}