// Copyright (C) 2024 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. package { // See: http://go/android-license-faq default_applicable_licenses: ["Android-Apache-2.0"], } java_sdk_library { name: "framework-pdf", defaults: ["framework-module-defaults"], srcs: [ ":framework-pdf-sources", ], permitted_packages: [ "android.graphics.pdf", ], static_libs: [ "pdf_viewer_flags_java_lib", "pdf-statsd", ], libs: [ "androidx.annotation_annotation", "error_prone_annotations", "modules-utils-preconditions", "unsupportedappusage", ], apex_available: [ "com.android.mediaprovider", ], aconfig_declarations: [ "pdf_viewer_flags", ], impl_library_visibility: [ "//packages/providers/MediaProvider:__subpackages__", "//cts/tests/pdf:__subpackages__", ], jarjar_rules: "jarjar-rules.txt", min_sdk_version: "31", } filegroup { name: "framework-pdf-sources", defaults: ["framework-sources-module-defaults"], srcs: [ "java/**/*.java", ], path: "java", visibility: [ "//packages/providers/MediaProvider/pdf/tests", ], } aconfig_declarations { name: "pdf_viewer_flags", package: "android.graphics.pdf.flags", srcs: [ "pdf_viewer_flags.aconfig", ], container: "com.android.mediaprovider", } java_aconfig_library { name: "pdf_viewer_flags_java_lib", aconfig_declarations: "pdf_viewer_flags", visibility: [ "//packages/providers/MediaProvider/pdf:__subpackages__", ], min_sdk_version: "31", apex_available: [ "com.android.mediaprovider", ], defaults: ["framework-minus-apex-aconfig-java-defaults"], } // To generate the Stats log classes for the Android Pdf. genrule { name: "statslog-pdf-java-gen", tools: ["stats-log-api-gen"], cmd: "$(location stats-log-api-gen) --java $(out) --module mediaprovider" + " --javaPackage android.graphics.pdf --javaClass PdfStatsLog" + " --minApiLevel 31", out: ["android/graphics/pdf/PdfStatsLog.java"], } // To disable NewApi checks on the generated PdfStatsLog. java_library { name: "pdf-statsd", sdk_version: "module_current", min_sdk_version: "31", srcs: [ ":statslog-pdf-java-gen", ], libs: [ // To add StatsLog as a dependency of the generated file. "framework-statsd.stubs.module_lib", ], apex_available: [ "com.android.mediaprovider", ], }