Home | History | Annotate | Download | only in media
      1 java_library {
      2     name: "updatable-media",
      3 
      4     srcs: [
      5         ":updatable-media-srcs",
      6     ],
      7 
      8     aidl: {
      9         export_include_dirs: [
     10             "apex/java",
     11         ],
     12 
     13         // It would be great if we don't need to add include_dirs for public
     14         // parcelable classes. Find a better way.
     15         include_dirs: [
     16             // To refer:
     17             // android.os.Bundle
     18             // android.os.ResultReceiver
     19             "frameworks/base/core/java",
     20         ],
     21     },
     22 
     23     permitted_packages: [
     24         "android.media",
     25     ],
     26 
     27     installable: true,
     28 
     29     // Make sure that the implementaion only relies on SDK or system APIs.
     30     no_framework_libs: true,
     31     libs: [
     32         // The order matters. android_system_* library should come later.
     33         "framework_media_annotation",
     34         "android_system_stubs_current",
     35     ],
     36 }
     37 
     38 filegroup {
     39     name: "updatable-media-srcs",
     40     srcs: [
     41         ":mediasession2-srcs",
     42     ],
     43 }
     44 
     45 filegroup {
     46     name: "updatable-media-srcs-without-aidls",
     47     srcs : [
     48         ":mediasession2-srcs-without-aidls",
     49     ],
     50 }
     51 
     52 filegroup {
     53     name: "mediasession2-srcs",
     54     srcs: [
     55         "apex/java/android/media/Controller2Link.java",
     56         "apex/java/android/media/IMediaController2.aidl",
     57         "apex/java/android/media/IMediaSession2.aidl",
     58         "apex/java/android/media/IMediaSession2Service.aidl",
     59         "apex/java/android/media/MediaConstants.java",
     60         "apex/java/android/media/MediaController2.java",
     61         "apex/java/android/media/MediaSession2.java",
     62         "apex/java/android/media/MediaSession2Service.java",
     63         "apex/java/android/media/Session2Command.java",
     64         "apex/java/android/media/Session2CommandGroup.java",
     65         "apex/java/android/media/Session2Link.java",
     66         "apex/java/android/media/Session2Token.java",
     67     ],
     68 }
     69 
     70 filegroup {
     71     name: "mediasession2-srcs-without-aidls",
     72     srcs: [
     73         ":mediasession2-srcs",
     74     ],
     75     exclude_srcs: [
     76         "apex/java/android/media/IMediaController2.aidl",
     77         "apex/java/android/media/IMediaSession2.aidl",
     78         "apex/java/android/media/IMediaSession2Service.aidl",
     79     ],
     80 }
     81 
     82 filegroup {
     83     name: "mediaplayer2-srcs",
     84     srcs: [
     85         "apex/java/android/media/CloseGuard.java",
     86         "apex/java/android/media/DataSourceCallback.java",
     87         "apex/java/android/media/DataSourceDesc.java",
     88         "apex/java/android/media/UriDataSourceDesc.java",
     89         "apex/java/android/media/FileDataSourceDesc.java",
     90         "apex/java/android/media/Media2Utils.java",
     91         "apex/java/android/media/MediaPlayer2Utils.java",
     92         "apex/java/android/media/MediaPlayer2.java",
     93         "apex/java/android/media/Media2HTTPService.java",
     94         "apex/java/android/media/Media2HTTPConnection.java",
     95         "apex/java/android/media/RoutingDelegate.java",
     96         "apex/java/android/media/BufferingParams.java",
     97         "apex/java/android/media/ProxyDataSourceCallback.java",
     98     ],
     99 }
    100 
    101 metalava_updatable_media_args = " --error UnhiddenSystemApi " +
    102     "--hide RequiresPermission " +
    103     "--hide MissingPermission --hide BroadcastBehavior " +
    104     "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
    105     "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
    106     "--hide HiddenTypedefConstant --show-annotation android.annotation.SystemApi "
    107 
    108 droidstubs {
    109     name: "updatable-media-stubs",
    110     srcs: [
    111         ":updatable-media-srcs-without-aidls",
    112         ":framework-media-annotation-srcs",
    113     ],
    114     args: metalava_updatable_media_args,
    115     // Ideally, sdk_version here should be "current_system", but "current - 1" is used
    116     // to avoid dependency cycle with framework.
    117     sdk_version: "28",
    118 }
    119 
    120 java_library {
    121     name: "updatable_media_stubs",
    122     srcs: [":updatable-media-stubs"],
    123     // 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 
    128 java_library {
    129     name: "framework_media_annotation",
    130     srcs: [":framework-media-annotation-srcs"],
    131     installable: false,
    132 }
    133