blob: 8746046c220d6a0b7277281d405e8cf466ed224c [file] [log] [blame]
Dongwon Kang43c88f32018-11-28 13:25:30 -08001java_library {
Hyundo Moon14ca1422019-01-28 15:43:24 +09002 name: "updatable-media",
Sungsoo Lim64ed0092019-01-24 04:25:44 +09003
4 srcs: [
Insun Kangd5fa8152019-01-24 17:08:10 +09005 ":updatable-media-srcs",
Sungsoo Lim64ed0092019-01-24 04:25:44 +09006 ],
7
8 aidl: {
9 export_include_dirs: [
10 "apex/java",
11 ],
12
Insun Kangd5fa8152019-01-24 17:08:10 +090013 // It would be great if we don't need to add include_dirs for public
14 // parcelable classes. Find a better way.
Sungsoo Lim64ed0092019-01-24 04:25:44 +090015 include_dirs: [
Insun Kangd5fa8152019-01-24 17:08:10 +090016 // To refer:
17 // android.os.Bundle
18 // android.os.ResultReceiver
Sungsoo Lim64ed0092019-01-24 04:25:44 +090019 "frameworks/base/core/java",
20 ],
21 },
22
Sungsoo Lim64ed0092019-01-24 04:25:44 +090023 static_libs: [
24 "mediaplayer2-protos",
25 ],
26
Vladimir Markoc631e8f2019-04-02 15:31:47 +010027 permitted_packages: [
28 "android.media",
29 ],
30
Sungsoo Lim64ed0092019-01-24 04:25:44 +090031 installable: true,
32
33 // Make sure that the implementaion only relies on SDK or system APIs.
Insun Kang291318d2019-01-30 17:28:47 +090034 no_framework_libs: true,
35 libs: [
36 // The order matters. android_system_* library should come later.
37 "framework_media_annotation",
38 "android_system_stubs_current",
39 ],
Sungsoo Lim64ed0092019-01-24 04:25:44 +090040}
41
42filegroup {
Insun Kangd5fa8152019-01-24 17:08:10 +090043 name: "updatable-media-srcs",
44 srcs: [
45 ":mediasession2-srcs",
46 ":mediaplayer2-srcs",
47 ],
48}
49
50filegroup {
51 name: "updatable-media-srcs-without-aidls",
Sungsoo Lim64ed0092019-01-24 04:25:44 +090052 srcs : [
Sungsoo Lim64ed0092019-01-24 04:25:44 +090053 ":mediasession2-srcs-without-aidls",
54 ":mediaplayer2-srcs",
55 ],
56}
57
Insun Kangb3517bf2019-01-16 17:21:05 +090058filegroup {
Insun Kangf86a56c2019-01-22 17:16:07 +090059 name: "mediasession2-srcs",
60 srcs: [
61 "apex/java/android/media/Controller2Link.java",
62 "apex/java/android/media/IMediaController2.aidl",
63 "apex/java/android/media/IMediaSession2.aidl",
64 "apex/java/android/media/IMediaSession2Service.aidl",
65 "apex/java/android/media/MediaConstants.java",
66 "apex/java/android/media/MediaController2.java",
67 "apex/java/android/media/MediaItem2.java",
68 "apex/java/android/media/MediaSession2.java",
69 "apex/java/android/media/MediaSession2Service.java",
70 "apex/java/android/media/Session2Command.java",
71 "apex/java/android/media/Session2CommandGroup.java",
72 "apex/java/android/media/Session2Link.java",
Dongwon Kange6e5f412019-01-29 09:11:02 -080073 "apex/java/android/media/Session2Token.java",
Insun Kangf86a56c2019-01-22 17:16:07 +090074 ],
75}
76
77filegroup {
Sungsoo Lim64ed0092019-01-24 04:25:44 +090078 name: "mediasession2-srcs-without-aidls",
Insun Kangf86a56c2019-01-22 17:16:07 +090079 srcs: [
80 ":mediasession2-srcs",
81 ],
82 exclude_srcs: [
83 "apex/java/android/media/IMediaController2.aidl",
84 "apex/java/android/media/IMediaSession2.aidl",
85 "apex/java/android/media/IMediaSession2Service.aidl",
86 ],
87}
88
Dongwon Kang43c88f32018-11-28 13:25:30 -080089filegroup {
Insun Kangf86a56c2019-01-22 17:16:07 +090090 name: "mediaplayer2-srcs",
Dongwon Kang43c88f32018-11-28 13:25:30 -080091 srcs: [
Dongwon Kang8afd5312019-01-15 20:04:51 -080092 "apex/java/android/media/CloseGuard.java",
93 "apex/java/android/media/DataSourceCallback.java",
94 "apex/java/android/media/DataSourceDesc.java",
95 "apex/java/android/media/UriDataSourceDesc.java",
96 "apex/java/android/media/FileDataSourceDesc.java",
Dongwon Kang8afd5312019-01-15 20:04:51 -080097 "apex/java/android/media/Media2Utils.java",
98 "apex/java/android/media/MediaPlayer2Utils.java",
99 "apex/java/android/media/MediaPlayer2.java",
100 "apex/java/android/media/Media2HTTPService.java",
101 "apex/java/android/media/Media2HTTPConnection.java",
102 "apex/java/android/media/RoutingDelegate.java",
103 "apex/java/android/media/BufferingParams.java",
Dongwon Kang77ab9862019-03-21 21:38:57 -0700104 "apex/java/android/media/ProxyDataSourceCallback.java",
Dongwon Kang43c88f32018-11-28 13:25:30 -0800105 ],
106}
Insun Kangd5fa8152019-01-24 17:08:10 +0900107
108metalava_updatable_media_args = " --error UnhiddenSystemApi " +
109 "--hide RequiresPermission " +
110 "--hide MissingPermission --hide BroadcastBehavior " +
111 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
112 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
Dongwon Kang27ee1902019-02-04 14:18:38 -0800113 "--hide HiddenTypedefConstant --show-annotation android.annotation.SystemApi " +
114 " --show-annotation android.annotation.TestApi "
Insun Kangd5fa8152019-01-24 17:08:10 +0900115
116droidstubs {
117 name: "updatable-media-stubs",
118 srcs: [
119 ":updatable-media-srcs-without-aidls",
120 ":framework-media-annotation-srcs",
121 ],
Dongwon Kang27ee1902019-02-04 14:18:38 -0800122 args: metalava_updatable_media_args,
Insun Kangd5fa8152019-01-24 17:08:10 +0900123 // Ideally, sdk_version here should be "current_system", but "current - 1" is used
124 // to avoid dependency cycle with framework.
125 sdk_version: "28",
126}
127
128java_library {
129 name: "updatable_media_stubs",
130 srcs: [":updatable-media-stubs"],
131 // Ideally, sdk_version here should be "current_system", but "current - 1" is used
132 // to avoid dependency cycle with framework.
133 sdk_version: "28",
134}
135
Insun Kang291318d2019-01-30 17:28:47 +0900136java_library {
137 name: "framework_media_annotation",
138 srcs: [":framework-media-annotation-srcs"],
139 installable: false,
140}