Merge "Define IRemoteAccess.aidl."

This commit is contained in:
Yu Shan 2022-09-28 22:46:01 +00:00 committed by Android (Google) Code Review
commit 79830e13e5
9 changed files with 324 additions and 0 deletions

View file

@ -0,0 +1,39 @@
// 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 {
default_applicable_licenses: ["hardware_interfaces_license"],
}
aidl_interface {
name: "android.hardware.automotive.remoteaccess",
vendor_available: true,
srcs: [
"android/hardware/automotive/remoteaccess/**/*.aidl",
],
stability: "vintf",
backend: {
cpp: {
enabled: false,
},
java: {
sdk_version: "module_current",
min_sdk_version: "31",
apex_available: [
"//apex_available:platform",
"com.android.car.framework",
],
},
},
}

View file

@ -0,0 +1,2 @@
ericjeong@google.com
shanyu@google.com

View file

@ -0,0 +1,39 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.automotive.remoteaccess;
@VintfStability
parcelable ApState {
boolean isReadyForRemoteTask;
boolean isWakeupRequired;
}

View file

@ -0,0 +1,42 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.automotive.remoteaccess;
@VintfStability
interface IRemoteAccess {
String getDeviceId();
String getWakeupServiceName();
void setRemoteTaskCallback(android.hardware.automotive.remoteaccess.IRemoteTaskCallback callback);
void clearRemoteTaskCallback();
void notifyApStateChange(in android.hardware.automotive.remoteaccess.ApState state);
}

View file

@ -0,0 +1,38 @@
/*
* 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.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.automotive.remoteaccess;
@VintfStability
interface IRemoteTaskCallback {
oneway void onRemoteTaskRequested(String clientId, in byte[] data);
}

View file

@ -0,0 +1,38 @@
/*
* 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.hardware.automotive.remoteaccess;
@VintfStability
parcelable ApState {
/**
* Whether AP (application processor) is ready to receive remote tasks.
*
* If this is true. AP is powered on and the car service is ready to handle
* remote tasks.
*/
boolean isReadyForRemoteTask;
/**
* Whether AP (application processor) needs to be woken up.
*
* While the AP is shutting down, this will be set to false to prevent the
* wakeup signal to interrupt the shutdown process. At the last step of the
* shutdown process, this will be set to true so that AP will be waken
* up when task arrives. After AP starts up, this will be set to false
* to prevent unnecessary wakeup signal.
*/
boolean isWakeupRequired;
}

View file

@ -0,0 +1,88 @@
/*
* 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.hardware.automotive.remoteaccess;
import android.hardware.automotive.remoteaccess.ApState;
import android.hardware.automotive.remoteaccess.IRemoteTaskCallback;
/**
* Interface representing a remote wakeup client.
*
* A wakeup client is a binary outside Android framework that communicates with
* a wakeup server and receives wake up command.
*/
@VintfStability
interface IRemoteAccess {
/**
* Gets a unique device ID that could be recognized by wake up server.
*
* This device ID is provisioned during car production and is registered
* with the wake up server.
*
* @return a unique device ID.
*/
String getDeviceId();
/**
* Gets the name for the remote wakeup server.
*
* This name will be provided to remote task server during registration
* and used by remote task server to find the remote wakeup server to
* use for waking up the device. This name must be pre-negotiated between
* the remote wakeup server/client and the remote task server/client and
* must be unique. We recommend the format to be a human readable string
* with reverse domain name notation (reverse-DNS), e.g.
* "com.google.vehicle.wakeup".
*/
String getWakeupServiceName();
/**
* Sets a callback to be called when a remote task is requested.
*
* @param callback A callback to be called when a remote task is requested.
*/
void setRemoteTaskCallback(IRemoteTaskCallback callback);
/**
* Clears a previously set remote task callback.
*
* If no callback was set, this operation is no-op.
*/
void clearRemoteTaskCallback();
/**
* Notifies whether AP is ready to receive remote tasks.
*
* <p>Wakeup client should store and use this state until a new call with a
* different state arrives.
*
* <p>If {@code isReadyForRemoteTask} is true, the wakeup client may send
* the task received from the server to AP immediately.
*
* <p>If {@code isReadyForRemoteTask} is false, it must store the received
* remote tasks and wait until AP is ready to receive tasks. If it takes too
* long for AP to become ready, the task must be reported to remote task
* server as failed. Implementation must make sure no duplicate tasks are
* delivered to AP.
*
* <p>If {@code isWakeupRequired} is true, it must try to wake up AP when a
* remote task arrives or when there are pending requests.
*
* <p>If {@code isWakeupRequired} is false, it must not try to wake up AP.
*/
void notifyApStateChange(in ApState state);
}

View file

@ -0,0 +1,31 @@
/*
* 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.hardware.automotive.remoteaccess;
/**
* The callback interface for car service to receive tasks from wakup client.
*/
@VintfStability
interface IRemoteTaskCallback {
/**
* A callback that is called when a remote task is requested.
*
* @param clientId An ID to uniquely identify a remote task client.
* @param data Opaque task data passed to the remote task client.
*/
oneway void onRemoteTaskRequested(String clientId, in byte[] data);
}

View file

@ -111,6 +111,13 @@
<name>IVehicle</name>
<regex-instance>.*</regex-instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.automotive.remoteaccess</name>
<interface>
<name>IRemoteAccess</name>
<regex-instance>.*</regex-instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.biometrics.face</name>