Revert "STS test fix for Android Security CVE-2021-0921"
This reverts commit d855679a347bb8566efa9b9e507aa0b653970fd6.
Reason for revert: This CL does not fix the issue. The startActivity() in Trigger.java is the one that needs to be wrapped in a try block.
Change-Id: I65a73a3d658434010239e36d4f751b505f6b215e
diff --git a/hostsidetests/securitybulletin/test-apps/CVE-2021-0921/src/android/security/cts/CVE_2021_0921/DeviceTest.java b/hostsidetests/securitybulletin/test-apps/CVE-2021-0921/src/android/security/cts/CVE_2021_0921/DeviceTest.java
index c2474cc..51733ef 100644
--- a/hostsidetests/securitybulletin/test-apps/CVE-2021-0921/src/android/security/cts/CVE_2021_0921/DeviceTest.java
+++ b/hostsidetests/securitybulletin/test-apps/CVE-2021-0921/src/android/security/cts/CVE_2021_0921/DeviceTest.java
@@ -19,7 +19,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@@ -31,7 +30,6 @@
import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assume.assumeNoException;
@RunWith(AndroidJUnit4.class)
public class DeviceTest {
@@ -55,12 +53,6 @@
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
- try{
- context.startActivity(intent);
- } catch(ActivityNotFoundException e){
- assumeNoException(e);
- return;
- }
//wait for poc app to complete (it takes about 6 seconds)
SystemClock.sleep(20000);