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

Commit d6405bf4 authored by Seth Moore's avatar Seth Moore Committed by Automerger Merge Worker
Browse files

Merge "Add remote_provisioning system service" am: 222a476a am: 9430c5fe

parents 972db539 9430c5fe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ combined_apis {
    system_server_classpath: [
        "service-media-s",
        "service-permission",
        "service-rkp",
        "service-sdksandbox",
    ],
}
+14 −0
Original line number Diff line number Diff line
@@ -376,6 +376,20 @@ aidl_interface {
    },
}

// Build Rust bindings for remote provisioning. Needed by keystore2.
aidl_interface {
    name: "android.security.rkp_aidl",
    unstable: true,
    srcs: [
        "android/security/rkp/*.aidl",
    ],
    backend: {
        rust: {
            enabled: true,
        },
    },
}

aidl_interface {
    name: "android.debug_aidl",
    unstable: true,
+8 −0
Original line number Diff line number Diff line
@@ -5918,6 +5918,14 @@ public abstract class Context {
     */
    public static final String FILE_INTEGRITY_SERVICE = "file_integrity";

    /**
     * Binder service for remote key provisioning.
     *
     * @see android.frameworks.rkp.IRemoteProvisioning
     * @hide
     */
    public static final String REMOTE_PROVISIONING_SERVICE = "remote_provisioning";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a
     * {@link android.hardware.lights.LightsManager} for controlling device lights.
+49 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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 android.security.rkp;

import android.security.rkp.RemotelyProvisionedKey;

/**
 * Callback interface for receiving remotely provisioned keys from a
 * {@link IRegistration}.
 *
 * @hide
 */
oneway interface IGetKeyCallback {
    /**
     * Called in response to {@link IRegistration.getKey}, indicating
     * a remotely-provisioned key is available.
     *
     * @param key The key that was received from the remote provisioning service.
     */
    void onSuccess(in RemotelyProvisionedKey key);

    /**
     * Called when the key request has been successfully cancelled.
     * @see IRegistration.cancelGetKey
     */
    void onCancel();

    /**
     * Called when an error has occurred while trying to get a remotely provisioned key.
     *
     * @param error A description of what failed, suitable for logging.
     */
    void onError(String error);
}
+49 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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 android.security.rkp;

import android.security.rkp.IRegistration;

/**
 * Callback interface for receiving a remote provisioning registration.
 * {@link IRegistration}.
 *
 * @hide
 */
oneway interface IGetRegistrationCallback {
    /**
     * Called in response to {@link IRemoteProvisioning.getRegistration}.
     *
     * @param registration an IRegistration that is used to fetch remotely
     * provisioned keys for the given IRemotelyProvisionedComponent.
     */
    void onSuccess(in IRegistration registration);

    /**
     * Called when the get registration request has been successfully cancelled.
     * @see IRemoteProvisioning.cancelGetRegistration
     */
    void onCancel();

    /**
     * Called when an error has occurred while trying to get a registration.
     *
     * @param error A description of what failed, suitable for logging.
     */
    void onError(String error);
}
Loading