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
This commit is contained in:
@@ -1013,7 +1013,8 @@ abstract class AbstractRestrictBackgroundNetworkTestCase extends Instrumentation
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user