Files
app_Settings/tests/unit/Android.bp
Gil Cukierman 761fd612c4 Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
KEY_HIDE_ENABLE_2G is soft removed in Android API level 35
because it hides a security feature. This patch
introduces simplified logic that ignores the
carrier config value. The new behavior is behind a feature flag.

This patch also includes some cleanup.
1. It removes an unneeded check for null carrier config
2. It removes test logic that set the value of KEY_HIDE_ENABLE_2G
   in places where it had no impact on the test.

Bug: 300248708
Test: atest Enable2gPreferenceControllerTest
Change-Id: I892d115d1ae173d2f3cd69e8f8b97bc5bfa7c67b
2023-10-04 13:59:55 +00:00

52 lines
1.4 KiB
Plaintext

package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "packages_apps_Settings_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["packages_apps_Settings_license"],
}
android_test {
name: "SettingsUnitTests",
certificate: "platform",
libs: [
"telephony-common",
"ims-common",
],
static_libs: [
"aconfig_settings_flags_lib",
"androidx.arch.core_core-testing",
"androidx.test.core",
"androidx.test.rules",
"androidx.test.ext.junit",
"androidx.preference_preference",
"mockito-target-minus-junit4",
"platform-test-annotations",
"platform-test-rules",
"truth-prebuilt",
"kotlinx_coroutines_test",
"flag-junit",
"Settings-testutils2",
// Don't add SettingsLib libraries here - you can use them directly as they are in the
// instrumented Settings app.
],
errorprone: {
javacflags: ["-Xep:CheckReturnValue:WARN"]
},
// Include all test java/kotlin files.
srcs: [
"src/**/*.java",
"src/**/*.kt",
],
use_resource_processor: true,
platform_apis: true,
test_suites: ["device-tests"],
instrumentation_for: "Settings",
}