Loading Android.bp +30 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,24 @@ license { ], } aidl_interface_defaults { name: "audio-aidl-defaults", unstable: true, host_supported: true, backend: { cpp: { enabled: true, }, java: { enabled: true, }, rust: { enabled: true, }, }, } aidl_interface { name: "av-types-aidl", unstable: true, Loading Loading @@ -71,6 +89,18 @@ aidl_interface { }, } aidl_interface { name: "audio-permission-aidl", // TODO remove vendor_available: true, double_loadable: true, defaults: ["audio-aidl-defaults"], local_include_dir: "aidl", srcs: [ "aidl/com/android/media/permission/*", ], } cc_library_headers { name: "av-headers", export_include_dirs: ["include"], Loading aidl/com/android/media/permission/INativePermissionController.aidl 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * 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 com.android.media.permission; import com.android.media.permission.UidPackageState; /** * This interface is used by system_server to communicate permission information * downwards towards native services. * {@hide} */ interface INativePermissionController { /** * Initialize app-ids and their corresponding packages, to be used for package validation. */ void populatePackagesForUids(in List<UidPackageState> initialPackageStates); /** * Replace or populate the list of packages associated with a given uid. * If the list is empty, the package no longer exists. */ void updatePackagesForUid(in UidPackageState newPackageState); } aidl/com/android/media/permission/UidPackageState.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * 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 com.android.media.permission; /** * Entity representing the package names associated with a particular uid/app-id * {@hide} */ parcelable UidPackageState { int uid; @utf8InCpp List<String> packageNames; } Loading
Android.bp +30 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,24 @@ license { ], } aidl_interface_defaults { name: "audio-aidl-defaults", unstable: true, host_supported: true, backend: { cpp: { enabled: true, }, java: { enabled: true, }, rust: { enabled: true, }, }, } aidl_interface { name: "av-types-aidl", unstable: true, Loading Loading @@ -71,6 +89,18 @@ aidl_interface { }, } aidl_interface { name: "audio-permission-aidl", // TODO remove vendor_available: true, double_loadable: true, defaults: ["audio-aidl-defaults"], local_include_dir: "aidl", srcs: [ "aidl/com/android/media/permission/*", ], } cc_library_headers { name: "av-headers", export_include_dirs: ["include"], Loading
aidl/com/android/media/permission/INativePermissionController.aidl 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * 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 com.android.media.permission; import com.android.media.permission.UidPackageState; /** * This interface is used by system_server to communicate permission information * downwards towards native services. * {@hide} */ interface INativePermissionController { /** * Initialize app-ids and their corresponding packages, to be used for package validation. */ void populatePackagesForUids(in List<UidPackageState> initialPackageStates); /** * Replace or populate the list of packages associated with a given uid. * If the list is empty, the package no longer exists. */ void updatePackagesForUid(in UidPackageState newPackageState); }
aidl/com/android/media/permission/UidPackageState.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * 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 com.android.media.permission; /** * Entity representing the package names associated with a particular uid/app-id * {@hide} */ parcelable UidPackageState { int uid; @utf8InCpp List<String> packageNames; }