commit | f183787bbd08150560834ee5792fab6ed8d1d70d | [log] [tgz] |
---|---|---|
author | Christopher Dombroski <cdombroski@google.com> | Wed Feb 09 14:38:35 2022 -0800 |
committer | Christopher Dombroski <cdombroski@google.com> | Wed Feb 09 15:08:09 2022 -0800 |
tree | 613f7c2b697b1e1179684a6d130377cda113bc87 | |
parent | cf22d055ff69fab8ff46fb4e45d3b2a2ba53d8d0 [diff] |
STS Catch ActivityNotFoundException Bug: 185153206 Bug: 218684357 Test: compiles Change-Id: Id17a416b7e12c36df57cf778a2ba13c1119f9a77
diff --git a/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/PocActivity.java b/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/PocActivity.java index a28b337..3e35266 100644 --- a/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/PocActivity.java +++ b/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/PocActivity.java
@@ -17,6 +17,7 @@ package android.security.cts.cve_2021_0523; import android.app.Activity; +import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.wifi.WifiManager; import android.os.Bundle; @@ -28,6 +29,10 @@ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent intent = new Intent(WifiManager.ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE); - startActivity(intent); + try { + startActivity(intent); + } catch (ActivityNotFoundException e) { + // do nothing + } } }