From 895f4f69140a2fbcd189ab73b6def33939e173c6 Mon Sep 17 00:00:00 2001 From: Sungsoo Lim Date: Wed, 8 Apr 2020 11:21:36 +0900 Subject: [PATCH] Do not export private AIDL files of the media module The current directory contains public and private AIDL types in the same place. This CL separates into two directories and makes the directory having the public types should be exported. Bug: 148660295 Test: build Change-Id: Ib2632afa00f7fa7f992690e68684464928cd3c61 --- Android.bp | 4 +-- apex/media/aidl/Android.bp | 35 +++++++++++++++++++ .../android/media/Controller2Link.aidl | 0 .../android/media/IMediaController2.aidl | 0 .../android/media/IMediaSession2.aidl | 0 .../android/media/IMediaSession2Service.aidl | 0 .../android/media/Session2Command.aidl | 0 .../stable}/android/media/Session2Token.aidl | 0 apex/media/framework/Android.bp | 10 +++--- 9 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 apex/media/aidl/Android.bp rename apex/media/{framework/java => aidl/private}/android/media/Controller2Link.aidl (100%) rename apex/media/{framework/java => aidl/private}/android/media/IMediaController2.aidl (100%) rename apex/media/{framework/java => aidl/private}/android/media/IMediaSession2.aidl (100%) rename apex/media/{framework/java => aidl/private}/android/media/IMediaSession2Service.aidl (100%) rename apex/media/{framework/java => aidl/private}/android/media/Session2Command.aidl (100%) rename apex/media/{framework/java => aidl/stable}/android/media/Session2Token.aidl (100%) diff --git a/Android.bp b/Android.bp index 874d76fe8d00..9d222da2e6ef 100644 --- a/Android.bp +++ b/Android.bp @@ -339,9 +339,7 @@ java_defaults { "sax/java", "telecomm/java", - // TODO(b/148660295): remove this - "apex/media/framework/java", - + "apex/media/aidl/stable", // TODO(b/147699819): remove this "telephony/java", ], diff --git a/apex/media/aidl/Android.bp b/apex/media/aidl/Android.bp new file mode 100644 index 000000000000..409a04897f56 --- /dev/null +++ b/apex/media/aidl/Android.bp @@ -0,0 +1,35 @@ +// +// Copyright 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. +// + +filegroup { + name: "stable-mediasession2-aidl-srcs", + srcs: ["stable/**/*.aidl"], + path: "stable", +} + +filegroup { + name: "private-mediasession2-aidl-srcs", + srcs: ["private/**/I*.aidl"], + path: "private", +} + +filegroup { + name: "mediasession2-aidl-srcs", + srcs: [ + ":private-mediasession2-aidl-srcs", + ":stable-mediasession2-aidl-srcs", + ], +} diff --git a/apex/media/framework/java/android/media/Controller2Link.aidl b/apex/media/aidl/private/android/media/Controller2Link.aidl similarity index 100% rename from apex/media/framework/java/android/media/Controller2Link.aidl rename to apex/media/aidl/private/android/media/Controller2Link.aidl diff --git a/apex/media/framework/java/android/media/IMediaController2.aidl b/apex/media/aidl/private/android/media/IMediaController2.aidl similarity index 100% rename from apex/media/framework/java/android/media/IMediaController2.aidl rename to apex/media/aidl/private/android/media/IMediaController2.aidl diff --git a/apex/media/framework/java/android/media/IMediaSession2.aidl b/apex/media/aidl/private/android/media/IMediaSession2.aidl similarity index 100% rename from apex/media/framework/java/android/media/IMediaSession2.aidl rename to apex/media/aidl/private/android/media/IMediaSession2.aidl diff --git a/apex/media/framework/java/android/media/IMediaSession2Service.aidl b/apex/media/aidl/private/android/media/IMediaSession2Service.aidl similarity index 100% rename from apex/media/framework/java/android/media/IMediaSession2Service.aidl rename to apex/media/aidl/private/android/media/IMediaSession2Service.aidl diff --git a/apex/media/framework/java/android/media/Session2Command.aidl b/apex/media/aidl/private/android/media/Session2Command.aidl similarity index 100% rename from apex/media/framework/java/android/media/Session2Command.aidl rename to apex/media/aidl/private/android/media/Session2Command.aidl diff --git a/apex/media/framework/java/android/media/Session2Token.aidl b/apex/media/aidl/stable/android/media/Session2Token.aidl similarity index 100% rename from apex/media/framework/java/android/media/Session2Token.aidl rename to apex/media/aidl/stable/android/media/Session2Token.aidl diff --git a/apex/media/framework/Android.bp b/apex/media/framework/Android.bp index 99e82e7a3367..aaf7edaa65bf 100644 --- a/apex/media/framework/Android.bp +++ b/apex/media/framework/Android.bp @@ -55,17 +55,15 @@ filegroup { name: "updatable-media-srcs", srcs: [ ":mediaparser-srcs", - ":mediasession2-srcs", + ":mediasession2-java-srcs", + ":mediasession2-aidl-srcs", ], } filegroup { - name: "mediasession2-srcs", + name: "mediasession2-java-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", @@ -83,7 +81,7 @@ filegroup { srcs: [ "java/android/media/MediaParser.java" ], - path: "java" + path: "java", } stubs_defaults {