From 8bee1b00ea2d2a98d8d62864fa0548fbfa303652 Mon Sep 17 00:00:00 2001 From: Hyundo Moon Date: Fri, 15 Jan 2021 20:04:29 +0900 Subject: [PATCH] Allow service-media-s in apex Bug: 175511943 Test: Builds successfully Change-Id: I5d76087d3c537205e8b8ca837c13ca1aeb641b4c --- android/neverallow.go | 9 --------- android/neverallow_test.go | 13 ------------- apex/allowed_deps.txt | 1 + 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/android/neverallow.go b/android/neverallow.go index 031b3f411..7455e6a78 100644 --- a/android/neverallow.go +++ b/android/neverallow.go @@ -51,7 +51,6 @@ var neverallows = []Rule{} func init() { AddNeverAllowRules(createIncludeDirsRules()...) AddNeverAllowRules(createTrebleRules()...) - AddNeverAllowRules(createMediaRules()...) AddNeverAllowRules(createJavaDeviceForHostRules()...) AddNeverAllowRules(createCcSdkVariantRules()...) AddNeverAllowRules(createUncompressDexRules()...) @@ -132,14 +131,6 @@ func createTrebleRules() []Rule { } } -func createMediaRules() []Rule { - return []Rule{ - NeverAllow(). - With("libs", "updatable-media"). - Because("updatable-media includes private APIs. Use updatable_media_stubs instead."), - } -} - func createJavaDeviceForHostRules() []Rule { javaDeviceForHostProjectsAllowedList := []string{ "external/guava", diff --git a/android/neverallow_test.go b/android/neverallow_test.go index 8c7a5385d..b761065ca 100644 --- a/android/neverallow_test.go +++ b/android/neverallow_test.go @@ -189,19 +189,6 @@ var neverallowTests = []struct { }`), }, }, - { - name: "dependency on updatable-media", - fs: map[string][]byte{ - "Android.bp": []byte(` - java_library { - name: "needs_updatable_media", - libs: ["updatable-media"], - }`), - }, - expectedErrors: []string{ - "updatable-media includes private APIs. Use updatable_media_stubs instead.", - }, - }, { name: "java_device_for_host", fs: map[string][]byte{ diff --git a/apex/allowed_deps.txt b/apex/allowed_deps.txt index 57b18de15..3823f1416 100644 --- a/apex/allowed_deps.txt +++ b/apex/allowed_deps.txt @@ -566,6 +566,7 @@ prebuilt_libclang_rt.builtins-i686-android(minSdkVersion:(no version)) prebuilt_libclang_rt.builtins-x86_64-android(minSdkVersion:(no version)) prebuilt_test_framework-sdkextensions(minSdkVersion:(no version)) server_configurable_flags(minSdkVersion:29) +service-media-s(minSdkVersion:29) service-permission(minSdkVersion:current) service-statsd(minSdkVersion:current) SettingsLibActionBarShadow(minSdkVersion:21)