1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"], 19} 20 21// Added automatically by a large-scale-change 22// See: http://go/android-license-faq 23license { 24 name: "frameworks_base_packages_SystemUI_license", 25 visibility: [":__subpackages__"], 26 license_kinds: [ 27 "SPDX-license-identifier-Apache-2.0", 28 ], 29 license_text: [ 30 "NOTICE", 31 ], 32} 33 34// Opt-in configuration for code depending on Jetpack Compose. 35soong_config_module_type { 36 name: "systemui_compose_java_defaults", 37 module_type: "java_defaults", 38 config_namespace: "ANDROID", 39 bool_variables: ["SYSTEMUI_USE_COMPOSE"], 40 properties: [ 41 "srcs", 42 "static_libs", 43 ], 44} 45 46systemui_compose_java_defaults { 47 name: "SystemUI_compose_defaults", 48 soong_config_variables: { 49 SYSTEMUI_USE_COMPOSE: { 50 // Because files in compose/features/ depend on SystemUI 51 // code, we compile those files when compiling SystemUI-core. 52 // We also compile the ComposeFacade in 53 // compose/facade/enabled/. 54 srcs: [ 55 "compose/features/src/**/*.kt", 56 "compose/facade/enabled/src/**/*.kt", 57 ], 58 59 // The dependencies needed by SystemUIComposeFeatures, 60 // except for SystemUI-core. 61 // Copied from compose/features/Android.bp. 62 static_libs: [ 63 "PlatformComposeCore", 64 65 "androidx.compose.runtime_runtime", 66 "androidx.compose.material3_material3", 67 "androidx.activity_activity-compose", 68 "androidx.compose.animation_animation-graphics", 69 ], 70 71 // By default, Compose is disabled and we compile the ComposeFacade 72 // in compose/facade/disabled/. 73 conditions_default: { 74 srcs: ["compose/facade/disabled/src/**/*.kt"], 75 static_libs: [], 76 }, 77 }, 78 }, 79} 80 81java_library { 82 name: "SystemUI-proto", 83 84 srcs: ["src/**/*.proto"], 85 86 proto: { 87 type: "nano", 88 }, 89 90 libs: [ 91 "WindowManager-Shell-proto", 92 ], 93} 94 95java_library { 96 name: "SystemUI-tags", 97 srcs: ["src/com/android/systemui/EventLogTags.logtags"], 98} 99 100filegroup { 101 name: "ReleaseJavaFiles", 102 srcs: [ 103 "src-release/**/*.kt", 104 "src-release/**/*.java", 105 ], 106} 107 108filegroup { 109 name: "DebugJavaFiles", 110 srcs: [ 111 "src-debug/**/*.kt", 112 "src-debug/**/*.java", 113 ], 114} 115 116//Create a library to expose SystemUI's resources to other modules. 117android_library { 118 name: "SystemUI-res", 119 resource_dirs: [ 120 "res-product", 121 "res-keyguard", 122 "res", 123 ], 124 static_libs: [ 125 "SystemUISharedLib", 126 "SystemUICustomizationLib", 127 "SettingsLib", 128 "androidx.leanback_leanback", 129 "androidx.slice_slice-core", 130 "androidx.slice_slice-view", 131 ], 132 manifest: "AndroidManifest-res.xml", 133} 134 135android_library { 136 name: "SystemUI-core", 137 defaults: [ 138 "SystemUI_compose_defaults", 139 ], 140 srcs: [ 141 "src/**/*.kt", 142 "src/**/*.java", 143 "src/**/I*.aidl", 144 ":ReleaseJavaFiles", 145 ], 146 product_variables: { 147 debuggable: { 148 srcs: [":DebugJavaFiles"], 149 exclude_srcs: [":ReleaseJavaFiles"], 150 }, 151 }, 152 resource_dirs: [ 153 "res-product", 154 "res-keyguard", 155 "res", 156 ], 157 static_libs: [ 158 "WifiTrackerLib", 159 "WindowManager-Shell", 160 "SystemUIAnimationLib", 161 "SystemUICommon", 162 "SystemUICustomizationLib", 163 "SystemUILogLib", 164 "SystemUIPluginLib", 165 "SystemUISharedLib", 166 "SystemUI-statsd", 167 "SettingsLib", 168 "androidx.core_core-ktx", 169 "androidx.viewpager2_viewpager2", 170 "androidx.legacy_legacy-support-v4", 171 "androidx.recyclerview_recyclerview", 172 "androidx.preference_preference", 173 "androidx.appcompat_appcompat", 174 "androidx.concurrent_concurrent-futures", 175 "androidx.mediarouter_mediarouter", 176 "androidx.palette_palette", 177 "androidx.legacy_legacy-preference-v14", 178 "androidx.leanback_leanback", 179 "androidx.slice_slice-core", 180 "androidx.slice_slice-view", 181 "androidx.slice_slice-builders", 182 "androidx.arch.core_core-runtime", 183 "androidx.lifecycle_lifecycle-common-java8", 184 "androidx.lifecycle_lifecycle-extensions", 185 "androidx.lifecycle_lifecycle-runtime-ktx", 186 "androidx.dynamicanimation_dynamicanimation", 187 "androidx-constraintlayout_constraintlayout", 188 "androidx.exifinterface_exifinterface", 189 "com.google.android.material_material", 190 "kotlinx_coroutines_android", 191 "kotlinx_coroutines", 192 "iconloader_base", 193 "SystemUI-tags", 194 "SystemUI-proto", 195 "monet", 196 "libmonet", 197 "dagger2", 198 "jsr305", 199 "jsr330", 200 "lottie", 201 "LowLightDreamLib", 202 "motion_tool_lib", 203 ], 204 manifest: "AndroidManifest.xml", 205 206 javacflags: ["-Adagger.fastInit=enabled"], 207 kotlincflags: ["-Xjvm-default=enable"], 208 209 plugins: ["dagger2-compiler"], 210 211 lint: { 212 extra_check_modules: ["SystemUILintChecker"], 213 }, 214} 215 216filegroup { 217 name: "AAA-src", 218 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"], 219 path: "tests/src", 220} 221 222filegroup { 223 name: "SystemUI-tests-utils", 224 srcs: [ 225 "tests/utils/src/**/*.java", 226 "tests/utils/src/**/*.kt", 227 ], 228 path: "tests/utils/src", 229} 230 231filegroup { 232 name: "SystemUI-test-fakes", 233 srcs: [ 234 /* Status bar fakes */ 235 "tests/src/com/android/systemui/statusbar/pipeline/airplane/data/repository/FakeAirplaneModeRepository.kt", 236 "tests/src/com/android/systemui/statusbar/pipeline/shared/data/repository/FakeConnectivityRepository.kt", 237 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/FakeWifiRepository.kt", 238 ], 239 path: "tests/src", 240} 241 242filegroup { 243 name: "SystemUI-tests-robolectric-pilots", 244 srcs: [ 245 /* Keyguard converted tests */ 246 // data 247 "tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt", 248 "tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt", 249 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt", 250 "tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt", 251 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt", 252 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt", 253 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt", 254 "tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt", 255 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt", 256 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt", 257 "tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt", 258 "tests/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepositoryTest.kt", 259 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt", 260 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFingerprintAuthRepositoryTest.kt", 261 "tests/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryTest.kt", 262 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt", 263 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt", 264 "tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt", 265 "tests/src/com/android/systemui/keyguard/data/repository/TrustRepositoryTest.kt", 266 // domain 267 "tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt", 268 "tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerCallbackInteractorTest.kt", 269 "tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorWithCoroutinesTest.kt", 270 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt", 271 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt", 272 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt", 273 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt", 274 "tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt", 275 // ui 276 "tests/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModelTest.kt", 277 "tests/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToLockscreenTransitionViewModelTest.kt", 278 "tests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDreamingTransitionViewModelTest.kt", 279 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt", 280 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt", 281 "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt", 282 "tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt", 283 // Keyguard helper 284 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FakeKeyguardQuickAffordanceConfig.kt", 285 "tests/src/com/android/systemui/dock/DockManagerFake.java", 286 "tests/src/com/android/systemui/dump/LogBufferHelper.kt", 287 "tests/src/com/android/systemui/statusbar/phone/FakeKeyguardStateController.java", 288 289 /* Biometric converted tests */ 290 "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt", 291 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt", 292 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt", 293 "tests/src/com/android/systemui/biometrics/AuthControllerTest.java", 294 "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java", 295 "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt", 296 "tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt", 297 "tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt", 298 "tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java", 299 "tests/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapterTest.java", 300 "tests/src/com/android/systemui/biometrics/UdfpsDisplayModeTest.java", 301 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java", 302 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java", 303 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt", 304 "tests/src/com/android/systemui/biometrics/UdfpsShellTest.kt", 305 "tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt", 306 307 /* Status bar wifi converted tests */ 308 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt", 309 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepositoryTest.kt", 310 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt", 311 "tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt", 312 "tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt", 313 ], 314 path: "tests/src", 315} 316 317java_library { 318 name: "SystemUI-tests-concurrency", 319 srcs: [ 320 "src/com/android/systemui/util/concurrency/DelayableExecutor.java", 321 "src/com/android/systemui/util/time/SystemClock.java", 322 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java", 323 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java", 324 ], 325 jarjar_rules: ":jarjar-rules-shared", 326} 327 328android_library { 329 name: "SystemUI-tests-base", 330 manifest: "tests/AndroidManifest-base.xml", 331 resource_dirs: [ 332 "tests/res", 333 "res-product", 334 "res-keyguard", 335 "res", 336 ], 337 static_libs: [ 338 "WifiTrackerLib", 339 "SystemUIAnimationLib", 340 "SystemUIPluginLib", 341 "SystemUISharedLib", 342 "SystemUICustomizationLib", 343 "SystemUI-statsd", 344 "SettingsLib", 345 "androidx.viewpager2_viewpager2", 346 "androidx.legacy_legacy-support-v4", 347 "androidx.recyclerview_recyclerview", 348 "androidx.preference_preference", 349 "androidx.appcompat_appcompat", 350 "androidx.concurrent_concurrent-futures", 351 "androidx.mediarouter_mediarouter", 352 "androidx.palette_palette", 353 "androidx.legacy_legacy-preference-v14", 354 "androidx.leanback_leanback", 355 "androidx.slice_slice-core", 356 "androidx.slice_slice-view", 357 "androidx.slice_slice-builders", 358 "androidx.arch.core_core-runtime", 359 "androidx.lifecycle_lifecycle-common-java8", 360 "androidx.lifecycle_lifecycle-extensions", 361 "androidx.lifecycle_lifecycle-runtime-ktx", 362 "androidx.dynamicanimation_dynamicanimation", 363 "androidx-constraintlayout_constraintlayout", 364 "androidx.exifinterface_exifinterface", 365 "kotlinx-coroutines-android", 366 "kotlinx-coroutines-core", 367 "kotlinx_coroutines_test", 368 "kotlin-reflect", 369 "iconloader_base", 370 "SystemUI-tags", 371 "SystemUI-proto", 372 "metrics-helper-lib", 373 "hamcrest-library", 374 "androidx.test.rules", 375 "testables", 376 "truth-prebuilt", 377 "monet", 378 "libmonet", 379 "dagger2", 380 "jsr330", 381 "WindowManager-Shell", 382 "LowLightDreamLib", 383 "motion_tool_lib", 384 "androidx.core_core-animation-testing-nodeps", 385 "androidx.compose.ui_ui", 386 ], 387} 388 389android_library { 390 name: "SystemUI-tests", 391 defaults: [ 392 "SystemUI_compose_defaults", 393 ], 394 manifest: "tests/AndroidManifest-base.xml", 395 additional_manifests: ["tests/AndroidManifest.xml"], 396 srcs: [ 397 "tests/src/**/*.kt", 398 "tests/src/**/*.java", 399 "src/**/*.kt", 400 "src/**/*.java", 401 "src/**/I*.aidl", 402 ":ReleaseJavaFiles", 403 ":SystemUI-tests-utils", 404 ], 405 static_libs: [ 406 "SystemUI-tests-base", 407 "androidx.test.uiautomator_uiautomator", 408 "androidx.core_core-animation-testing", 409 "mockito-target-extended-minus-junit4", 410 "androidx.test.ext.junit", 411 "androidx.test.ext.truth", 412 "kotlin-test", 413 ], 414 libs: [ 415 "android.test.runner", 416 "android.test.base", 417 "android.test.mock", 418 ], 419 kotlincflags: ["-Xjvm-default=enable"], 420 aaptflags: [ 421 "--extra-packages", 422 "com.android.systemui", 423 ], 424 plugins: ["dagger2-compiler"], 425 lint: { 426 test: true, 427 extra_check_modules: ["SystemUILintChecker"], 428 }, 429} 430 431android_app { 432 name: "SystemUIRobo-stub", 433 defaults: [ 434 "platform_app_defaults", 435 "SystemUI_optimized_defaults", 436 "SystemUI_compose_defaults", 437 ], 438 manifest: "tests/AndroidManifest-base.xml", 439 440 srcs: [ 441 "src/**/*.kt", 442 "src/**/*.java", 443 "src/**/I*.aidl", 444 ":ReleaseJavaFiles", 445 ], 446 static_libs: [ 447 "SystemUI-tests-base", 448 ], 449 aaptflags: [ 450 "--extra-packages", 451 "com.android.systemui", 452 ], 453 dont_merge_manifests: true, 454 platform_apis: true, 455 system_ext_specific: true, 456 certificate: "platform", 457 privileged: true, 458 resource_dirs: [], 459 kotlincflags: ["-Xjvm-default=all"], 460 optimize: { 461 shrink_resources: false, 462 proguard_flags_files: ["proguard.flags"], 463 }, 464 465 plugins: ["dagger2-compiler"], 466} 467 468android_robolectric_test { 469 name: "SystemUiRoboTests", 470 srcs: [ 471 "tests/robolectric/src/**/*.kt", 472 "tests/robolectric/src/**/*.java", 473 ":SystemUI-tests-utils", 474 ":SystemUI-test-fakes", 475 ":SystemUI-tests-robolectric-pilots", 476 ], 477 static_libs: [ 478 "androidx.test.uiautomator_uiautomator", 479 "androidx.core_core-animation-testing", 480 "androidx.test.ext.junit", 481 "inline-mockito-robolectric-prebuilt", 482 ], 483 libs: [ 484 "android.test.runner", 485 "android.test.base", 486 "android.test.mock", 487 "truth-prebuilt", 488 ], 489 490 upstream: true, 491 492 instrumentation_for: "SystemUIRobo-stub", 493 java_resource_dirs: ["tests/robolectric/config"], 494} 495 496// Opt-out config for optimizing the SystemUI target using R8. 497// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via 498// `SYSTEMUI_OPTIMIZE_JAVA := false`. 499soong_config_module_type { 500 name: "systemui_optimized_java_defaults", 501 module_type: "java_defaults", 502 config_namespace: "ANDROID", 503 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"], 504 properties: ["optimize"], 505} 506 507systemui_optimized_java_defaults { 508 name: "SystemUI_optimized_defaults", 509 soong_config_variables: { 510 SYSTEMUI_OPTIMIZE_JAVA: { 511 optimize: { 512 enabled: true, 513 optimize: true, 514 shrink: true, 515 shrink_resources: true, 516 proguard_compatibility: false, 517 }, 518 conditions_default: { 519 optimize: { 520 proguard_compatibility: false, 521 }, 522 }, 523 }, 524 }, 525} 526 527android_app { 528 name: "SystemUI", 529 defaults: [ 530 "platform_app_defaults", 531 "SystemUI_optimized_defaults", 532 ], 533 static_libs: [ 534 "SystemUI-core", 535 ], 536 resource_dirs: [], 537 538 platform_apis: true, 539 system_ext_specific: true, 540 certificate: "platform", 541 privileged: true, 542 543 kotlincflags: ["-Xjvm-default=enable"], 544 545 dxflags: ["--multi-dex"], 546 optimize: { 547 proguard_flags_files: ["proguard.flags"], 548 }, 549 required: [ 550 "privapp_whitelist_com.android.systemui", 551 "wmshell.protolog.json.gz", 552 ], 553} 554