Apps will now lose network access once they are in top-sleeping or higher process state. Adding some cts tests to ensure correct behavior. The tests are using temporarily using junit Assume to skip if the feature flag is enabled to enable a following code migration. Test: atest CtsHostsideNetworkTests BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing method Bug: 304347838 Change-Id: Iba7c7bd01309fa7a301fdc1524033f0fad5ae512
73 lines
2 KiB
Text
73 lines
2 KiB
Text
//
|
|
// Copyright (C) 2014 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//
|
|
|
|
package {
|
|
default_team: "trendy_team_fwk_core_networking",
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
java_defaults {
|
|
name: "CtsHostsideNetworkTestsAppDefaults",
|
|
platform_apis: true,
|
|
static_libs: [
|
|
"CtsHostsideNetworkTestsAidl",
|
|
"androidx.test.ext.junit",
|
|
"androidx.test.rules",
|
|
"androidx.test.uiautomator_uiautomator",
|
|
"compatibility-device-util-axt",
|
|
"cts-net-utils",
|
|
"ctstestrunner-axt",
|
|
"modules-utils-build",
|
|
],
|
|
libs: [
|
|
"android.test.runner",
|
|
"android.test.base",
|
|
],
|
|
srcs: [
|
|
"src/**/*.java",
|
|
":ArgumentConstants",
|
|
],
|
|
// Tag this module as a cts test artifact
|
|
test_suites: [
|
|
"general-tests",
|
|
"sts",
|
|
],
|
|
}
|
|
|
|
android_test_helper_app {
|
|
name: "CtsHostsideNetworkTestsApp",
|
|
defaults: [
|
|
"cts_support_defaults",
|
|
"framework-connectivity-test-defaults",
|
|
"CtsHostsideNetworkTestsAppDefaults",
|
|
],
|
|
static_libs: [
|
|
"NetworkStackApiStableShims",
|
|
],
|
|
}
|
|
|
|
android_test_helper_app {
|
|
name: "CtsHostsideNetworkTestsAppNext",
|
|
defaults: [
|
|
"cts_support_defaults",
|
|
"framework-connectivity-test-defaults",
|
|
"CtsHostsideNetworkTestsAppDefaults",
|
|
"ConnectivityNextEnableDefaults",
|
|
],
|
|
static_libs: [
|
|
"NetworkStackApiCurrentShims",
|
|
],
|
|
}
|