The non-updatable part of the platform shouldn't directly link to the boot jars in APEXes. Ensure this by 1) setting the visibility property for the boot jars so that they are not visible to non-APEX modules and 2) setting the apex_available property so that the boot jars are only built for the corresponding APEXes, but not for others. Bug: b/146167933 Bug: b/146218515 Bug: b/147200698 Test: m Change-Id: I251fabd773bc31f46d572d143c72dd9162f3f0a6
128 lines
3.4 KiB
Plaintext
128 lines
3.4 KiB
Plaintext
// Copyright (C) 2020 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
java_library {
|
|
name: "updatable-media",
|
|
|
|
srcs: [
|
|
":updatable-media-srcs",
|
|
],
|
|
|
|
aidl: {
|
|
export_include_dirs: [
|
|
"java",
|
|
],
|
|
|
|
// It would be great if we don't need to add include_dirs for public
|
|
// parcelable classes. Find a better way.
|
|
include_dirs: [
|
|
// To refer:
|
|
// android.os.Bundle
|
|
// android.os.ResultReceiver
|
|
"frameworks/base/core/java",
|
|
],
|
|
},
|
|
|
|
permitted_packages: [
|
|
"android.media",
|
|
],
|
|
|
|
installable: true,
|
|
|
|
// TODO: build against stable API surface. Use core_platform for now to avoid
|
|
// link-check failure with exoplayer building against "current".
|
|
sdk_version: "core_platform",
|
|
libs: [
|
|
// The order matters. android_system_* library should come later.
|
|
"framework_media_annotation",
|
|
"android_system_stubs_current",
|
|
],
|
|
|
|
static_libs: [
|
|
"exoplayer2-core"
|
|
],
|
|
jarjar_rules: "jarjar_rules.txt",
|
|
|
|
plugins: ["java_api_finder"],
|
|
|
|
hostdex: true, // for hiddenapi check
|
|
visibility: ["//frameworks/av/apex:__subpackages__"],
|
|
apex_available: [
|
|
"com.android.media",
|
|
"test_com.android.media",
|
|
],
|
|
}
|
|
|
|
filegroup {
|
|
name: "updatable-media-srcs",
|
|
srcs: [
|
|
":mediaparser-srcs",
|
|
":mediasession2-srcs",
|
|
],
|
|
}
|
|
|
|
filegroup {
|
|
name: "mediasession2-srcs",
|
|
srcs: [
|
|
"java/android/media/Controller2Link.java",
|
|
"java/android/media/IMediaController2.aidl",
|
|
"java/android/media/IMediaSession2.aidl",
|
|
"java/android/media/IMediaSession2Service.aidl",
|
|
"java/android/media/MediaConstants.java",
|
|
"java/android/media/MediaController2.java",
|
|
"java/android/media/MediaSession2.java",
|
|
"java/android/media/MediaSession2Service.java",
|
|
"java/android/media/Session2Command.java",
|
|
"java/android/media/Session2CommandGroup.java",
|
|
"java/android/media/Session2Link.java",
|
|
"java/android/media/Session2Token.java",
|
|
],
|
|
path: "java",
|
|
}
|
|
|
|
filegroup {
|
|
name: "mediaparser-srcs",
|
|
srcs: [
|
|
"java/android/media/MediaParser.java"
|
|
],
|
|
path: "java"
|
|
}
|
|
|
|
droidstubs {
|
|
name: "updatable-media-stubs",
|
|
srcs: [
|
|
":updatable-media-srcs",
|
|
":framework-media-annotation-srcs",
|
|
],
|
|
defaults: [ "framework-module-stubs-defaults-systemapi" ],
|
|
aidl: {
|
|
// TODO(b/135922046) remove this
|
|
include_dirs: ["frameworks/base/core/java"],
|
|
},
|
|
sdk_version: "system_current",
|
|
}
|
|
|
|
java_library {
|
|
name: "updatable_media_stubs",
|
|
srcs: [":updatable-media-stubs"],
|
|
sdk_version: "system_current",
|
|
}
|
|
|
|
java_library {
|
|
name: "framework_media_annotation",
|
|
srcs: [":framework-media-annotation-srcs"],
|
|
installable: false,
|
|
sdk_version: "core_current",
|
|
}
|