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