commit | bc642d878ed48cbc35693fcbda93c76468ea1fce | [log] [tgz] |
---|---|---|
author | Sudheer Shanka <sudheersai@google.com> | Mon Jan 22 19:28:21 2018 -0800 |
committer | Sudheer Shanka <sudheersai@google.com> | Mon Jan 22 19:28:21 2018 -0800 |
tree | 92fb16e17fe0a56f7556fd7dfcd406a7eb39b7be | |
parent | 83fa03fb3f77ace7828890930d64b753947ee5f5 [diff] |
Fix netpolicy cts failures due to missing FLAG_ACTIVITY_NEW_TASK. Bug: 72219677 Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \ com.android.cts.net.HostsideRestrictBackgroundNetworkTests Change-Id: I076e10b09f7d8a65120e62ed50afb2d326b62267
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java index 80fd222..47ab9fa 100644 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
@@ -1013,7 +1013,8 @@ private Intent getIntentForComponent(int type) { final Intent intent = new Intent(); if (type == TYPE_COMPONENT_ACTIVTIY) { - intent.setComponent(new ComponentName(TEST_APP2_PKG, TEST_APP2_ACTIVITY_CLASS)); + intent.setComponent(new ComponentName(TEST_APP2_PKG, TEST_APP2_ACTIVITY_CLASS)) + .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } else if (type == TYPE_COMPONENT_FOREGROUND_SERVICE) { intent.setComponent(new ComponentName(TEST_APP2_PKG, TEST_APP2_SERVICE_CLASS)) .setFlags(1);