1//
2// Copyright (C) 2015 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: ["packages_apps_TV_license"],
19}
20
21// See: http://go/android-license-faq
22license {
23    name: "packages_apps_TV_license",
24    package_name: "Android Live TV App",
25    visibility: [":__subpackages__"],
26    license_kinds: [
27        "SPDX-license-identifier-Apache-2.0",
28        "SPDX-license-identifier-BSD",
29        "SPDX-license-identifier-MIT",
30    ],
31    license_text: ["res/raw/third_party_licenses"],
32}
33
34version_name = "1.24-asop"
35// Allow LiveTv app to be available for kids mode without being impacted by OEM's configuration
36version_code = "999999999"
37
38java_defaults {
39    name: "LiveTv_defaults",
40    srcs: ["src/**/*.java"],
41
42    manifest: "AndroidManifest_common.xml",
43
44    // TODO(b/122608868) turn proguard back on
45    optimize: {
46        enabled: false,
47    },
48
49    // It is required for com.android.providers.tv.permission.ALL_EPG_DATA
50    privileged: true,
51    product_specific: true,
52
53    sdk_version: "system_current",
54    min_sdk_version: "23", // M
55
56    resource_dirs: [
57        "res",
58        "material_res",
59
60    ],
61
62    required: ["com.android.tv.xml"],
63
64    libs: ["tv-guava-android-jar"],
65
66    static_libs: [
67        "androidx-constraintlayout_constraintlayout",
68        "android-support-annotations",
69        "android-support-compat",
70        "android-support-v7-recyclerview",
71        "androidx.legacy_legacy-support-core-ui",
72        "androidx.leanback_leanback",
73        "androidx.leanback_leanback-preference",
74        "androidx.palette_palette",
75        "androidx.preference_preference",
76        "androidx.tvprovider_tvprovider",
77        "jsr330",
78        "live-channels-partner-support",
79        "live-tv-tuner-proto",
80        "live-tv-tuner",
81        "tv-auto-value-jar",
82        "tv-auto-factory-jar",
83        "tv-common",
84        "tv-error-prone-annotations-jar",
85        "tv-ratings-resources",
86        "tv-javax-annotations-jar",
87        "tv-lib-dagger",
88        "tv-lib-exoplayer",
89        "tv-lib-exoplayer-v2-core",
90        "tv-lib-dagger-android",
91    ],
92
93    plugins: [
94        "tv-auto-value",
95        "tv-auto-factory",
96        "tv-lib-dagger-android-processor",
97        "tv-lib-dagger-compiler",
98    ],
99
100    javacflags: [
101        "-Xlint:deprecation",
102        "-Xlint:unchecked",
103    ],
104
105    aaptflags: [
106        "--version-name",
107        version_name,
108
109        "--version-code",
110        version_code,
111
112        "--extra-packages",
113        "com.android.tv.tuner",
114
115        "--extra-packages",
116        "com.android.tv.common",
117    ],
118}
119
120android_app {
121    name: "LiveTv",
122    defaults: ["LiveTv_defaults"],
123    additional_manifests: ["AndroidManifest_all_inputs.xml"],
124    lint: {
125        baseline_filename: "lint-baseline.xml",
126    },
127}
128
129android_app {
130    name: "LiveTvNonPassthrough",
131    defaults: ["LiveTv_defaults"],
132    additional_manifests: ["AndroidManifest_non_passthrough.xml"],
133    lint: {
134        baseline_filename: "lint-baseline.xml",
135    },
136}
137
138prebuilt_etc {
139    name: "com.android.tv.xml",
140    sub_dir: "permissions",
141    src: "com.android.tv.xml",
142    product_specific: true,
143}
144