Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b898274 authored by Atneya Nair's avatar Atneya Nair Committed by Android (Google) Code Review
Browse files

Merge "Add AIDL interface for native permission" into main

parents 4713e06f dd104a0c
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -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,
@@ -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"],
+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);
}
+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;
}