The nullaway plugin fails in errorprone build with stubs generated from the API signature files, although the nullability information between the from-text and from-source stubs are identical. Below is the failing error message: ``` packages/apps/Settings/src/com/android/settings/accessibility/AccessibilitySettingsContentObserver.java:54: error: An unhandled exception was thrown by the Error Prone static analysis plugin. contentResolver.registerContentObserver(uri, false, this); ^ Please report this at https://github.com/google/error-prone/issues/new and include the following: error-prone version: 2.15.0 BugPattern: NullAway Stack Trace: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: expected call to iterator(), instead saw null ``` The error message indicates that the nullaway plugin is throwing an uncaught exception. Given that the plugin has been recently introduced to the tree and is currently being only used by Settings, this change proposes to temporarily disable the plugin to unblock the from-text stub generation feature and re-enable the plugin once the issue is fixed. Test: m Settings Bug: 306242755 Bug: 304077181 Change-Id: I617d8f20ceeefb339b3c1f8cd03af94a8c37fd39
177 lines
4.8 KiB
Plaintext
177 lines
4.8 KiB
Plaintext
package {
|
|
default_applicable_licenses: ["packages_apps_Settings_license"],
|
|
}
|
|
|
|
// Added automatically by a large-scale-change
|
|
// See: http://go/android-license-faq
|
|
license {
|
|
name: "packages_apps_Settings_license",
|
|
visibility: [":__subpackages__"],
|
|
license_kinds: [
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
],
|
|
license_text: [
|
|
"NOTICE",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "settings-logtags",
|
|
srcs: ["src/**/*.logtags"],
|
|
}
|
|
|
|
genrule {
|
|
name: "statslog-settings-java-gen",
|
|
tools: ["stats-log-api-gen"],
|
|
cmd: "$(location stats-log-api-gen) --java $(out) --module settings"
|
|
+ " --javaPackage com.android.settings.core.instrumentation --javaClass SettingsStatsLog",
|
|
out: ["com/android/settings/core/instrumentation/SettingsStatsLog.java"],
|
|
}
|
|
|
|
java_library {
|
|
name: "statslog-settings",
|
|
srcs: [
|
|
":statslog-settings-java-gen",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "Settings-change-ids",
|
|
srcs: ["src/com/android/settings/ChangeIds.java"],
|
|
libs: [
|
|
"app-compat-annotations",
|
|
],
|
|
}
|
|
|
|
|
|
// Build the Settings APK
|
|
android_library {
|
|
name: "Settings-core",
|
|
platform_apis: true,
|
|
defaults: [
|
|
"SettingsLibDefaults",
|
|
"SettingsLib-search-defaults",
|
|
"SpaPrivilegedLib-defaults",
|
|
],
|
|
|
|
srcs: ["src/**/*.java", "src/**/*.kt"],
|
|
exclude_srcs: [
|
|
"src/com/android/settings/biometrics/fingerprint2/shared/**/*.kt",
|
|
],
|
|
use_resource_processor: true,
|
|
resource_dirs: [
|
|
"res",
|
|
"res-export", // for external usage
|
|
"res-product",
|
|
],
|
|
static_libs: [
|
|
"androidx-constraintlayout_constraintlayout",
|
|
"androidx.slice_slice-builders",
|
|
"androidx.slice_slice-core",
|
|
"androidx.slice_slice-view",
|
|
"androidx.core_core",
|
|
"androidx.appcompat_appcompat",
|
|
"androidx.cardview_cardview",
|
|
"androidx.compose.runtime_runtime-livedata",
|
|
"androidx.activity_activity-ktx",
|
|
"androidx.navigation_navigation-fragment-ktx",
|
|
"androidx.navigation_navigation-ui-ktx",
|
|
"androidx.preference_preference",
|
|
"androidx.recyclerview_recyclerview",
|
|
"androidx.window_window",
|
|
"androidx.window_window-java",
|
|
"com.google.android.material_material",
|
|
"setupcompat",
|
|
"setupdesign",
|
|
"androidx.lifecycle_lifecycle-runtime",
|
|
"androidx.lifecycle_lifecycle-runtime-ktx",
|
|
"androidx.lifecycle_lifecycle-viewmodel",
|
|
"gson",
|
|
"guava",
|
|
"jsr305",
|
|
"net-utils-framework-common",
|
|
"app-usage-event-protos-lite",
|
|
"battery-event-protos-lite",
|
|
"battery-usage-slot-protos-lite",
|
|
"power-anomaly-event-protos-lite",
|
|
"settings-contextual-card-protos-lite",
|
|
"settings-log-bridge-protos-lite",
|
|
"settings-telephony-protos-lite",
|
|
"fuelgauge-log-protos-lite",
|
|
"fuelgauge-usage-state-protos-lite",
|
|
"contextualcards",
|
|
"securebox",
|
|
"settings-logtags",
|
|
"statslog-settings",
|
|
"android.hardware.dumpstate-V1.0-java",
|
|
"android.hardware.dumpstate-V1.1-java",
|
|
"android.hardware.dumpstate-V1-java",
|
|
"lottie",
|
|
"BiometricsSharedLib",
|
|
"WifiTrackerLib",
|
|
"SettingsLibActivityEmbedding",
|
|
"Settings-change-ids",
|
|
"androidx.room_room-runtime",
|
|
"SystemUIUnfoldLib",
|
|
"aconfig_settings_flags_lib",
|
|
"factory_reset_flags_lib",
|
|
"android.content.pm.flags-aconfig-java",
|
|
"FingerprintManagerInteractor",
|
|
"notification_flags_lib",
|
|
],
|
|
|
|
plugins: ["androidx.room_room-compiler-plugin"],
|
|
|
|
// TODO: b/307330031 - Re-enable the nullaway plugin when the issue is fixed.
|
|
// errorprone: {
|
|
// extra_check_modules: ["//external/nullaway:nullaway_plugin"],
|
|
// javacflags: [
|
|
// "-XepOpt:NullAway:AnnotatedPackages=com.android.settings",
|
|
// ],
|
|
// },
|
|
|
|
libs: [
|
|
"telephony-common",
|
|
"ims-common",
|
|
],
|
|
}
|
|
|
|
platform_compat_config {
|
|
name: "settings-platform-compat-config",
|
|
src: ":Settings-change-ids",
|
|
system_ext_specific: true,
|
|
}
|
|
|
|
android_app {
|
|
name: "Settings",
|
|
defaults: [
|
|
"platform_app_defaults",
|
|
"SpaPrivilegedLib-defaults",
|
|
],
|
|
platform_apis: true,
|
|
certificate: "platform",
|
|
system_ext_specific: true,
|
|
privileged: true,
|
|
required: [
|
|
"privapp_whitelist_com.android.settings",
|
|
"settings-platform-compat-config",
|
|
],
|
|
static_libs: ["Settings-core"],
|
|
uses_libs: ["org.apache.http.legacy"],
|
|
use_resource_processor: true,
|
|
resource_dirs: [],
|
|
optimize: {
|
|
proguard_flags_files: ["proguard.flags"],
|
|
},
|
|
}
|
|
|
|
android_library_import {
|
|
name: "contextualcards",
|
|
aars: ["libs/contextualcards.aar"],
|
|
}
|
|
|
|
filegroup {
|
|
name: "Settings_proguard_flags",
|
|
srcs: ["proguard.flags"],
|
|
}
|