commit | f709f2d19442678040b4ef47228c6e9915d1006f | [log] [tgz] |
---|---|---|
author | Erik Wolsheimer <ewol@google.com> | Wed Nov 16 11:33:12 2016 -0800 |
committer | Erik Wolsheimer <ewol@google.com> | Thu Nov 17 18:18:59 2016 +0000 |
tree | a8ad2c25e17bfd206c6ef0c6b53893b52d9ed4fc | |
parent | 323a2e8ffc8f6657eee8aae0e975c0f9296464e8 [diff] |
Catch case where browser is protected by a permission BUG: 32885564 Change-Id: I571e977e7756e3885d1a69cdaf0e6fc48a268178
diff --git a/tests/tests/security/src/android/security/cts/BrowserTest.java b/tests/tests/security/src/android/security/cts/BrowserTest.java index 0948713..f468d66 100644 --- a/tests/tests/security/src/android/security/cts/BrowserTest.java +++ b/tests/tests/security/src/android/security/cts/BrowserTest.java
@@ -172,7 +172,13 @@ // do a file request intent.setData(Uri.fromFile(htmlFile)); - mContext.startActivity(intent); + + try { + mContext.startActivity(intent); + } catch (SecurityException e) { + // If browser activity cannot be started, skip the test. + continue; + } /* * Wait 5 seconds for the browser to contact the server, but