1package { 2 default_applicable_licenses: ["Android-Apache-2.0"], 3} 4 5genrule { 6 name: "statslog-telecom-java-gen", 7 tools: ["stats-log-api-gen"], 8 cmd: "$(location stats-log-api-gen) --java $(out) --module telecom" 9 + " --javaPackage com.android.server.telecom --javaClass TelecomStatsLog", 10 out: ["com/android/server/telecom/TelecomStatsLog.java"], 11} 12 13filegroup { 14 name: "Telecom-srcs", 15 srcs: [ 16 "src/**/*.java", 17 ":statslog-telecom-java-gen", 18 ], 19} 20 21// Build the Telecom service. 22android_app { 23 name: "Telecom", 24 srcs: [ 25 ":Telecom-srcs", 26 "proto/**/*.proto", 27 ], 28 static_libs: [ 29 "androidx.annotation_annotation", 30 "androidx.core_core", 31 ], 32 libs: [ 33 "services", 34 ], 35 resource_dirs: ["res"], 36 proto: { 37 type: "nano", 38 local_include_dirs: ["proto/"], 39 output_params: ["optional_field_style=accessors"], 40 }, 41 platform_apis: true, 42 certificate: "platform", 43 privileged: true, 44 optimize: { 45 proguard_flags_files: ["proguard.flags"], 46 }, 47} 48 49android_test { 50 name: "TelecomUnitTests", 51 static_libs: [ 52 "android-ex-camera2", 53 "guava", 54 "mockito-target-extended", 55 "androidx.test.rules", 56 "platform-test-annotations", 57 "androidx.legacy_legacy-support-core-ui", 58 "androidx.legacy_legacy-support-core-utils", 59 "androidx.core_core", 60 "androidx.fragment_fragment", 61 "androidx.test.ext.junit", 62 "platform-compat-test-rules", 63 ], 64 srcs: [ 65 "tests/src/**/*.java", 66 ":Telecom-srcs", 67 "proto/**/*.proto", 68 ], 69 proto: { 70 type: "nano", 71 local_include_dirs: ["proto/"], 72 output_params: ["optional_field_style=accessors"], 73 }, 74 resource_dirs: [ 75 "tests/res", 76 "res", 77 ], 78 libs: [ 79 "android.test.mock", 80 "android.test.base", 81 "android.test.runner", 82 ], 83 84 jni_libs: [ 85 "libdexmakerjvmtiagent", 86 "libstaticjvmtiagent", 87 ], 88 89 aaptflags: [ 90 "--auto-add-overlay", 91 "--extra-packages", 92 "com.android.server.telecom", 93 ], 94 manifest: "tests/AndroidManifest.xml", 95 optimize: { 96 enabled: false, 97 }, 98 platform_apis: true, 99 certificate: "platform", 100 jacoco: { 101 include_filter: ["com.android.server.telecom.**"], 102 exclude_filter: ["com.android.server.telecom.tests.**"], 103 }, 104 test_suites: ["device-tests"], 105 defaults: ["SettingsLibDefaults"], 106} 107