interfaces: displayfeature: 1.0: Update

Change-Id: Iaa192a481702c876722864b6a4f1f54f495622c9
Signed-off-by: Sebastiano Barezzi <barezzisebastiano@gmail.com>
This commit is contained in:
Sebastiano Barezzi 2022-01-08 21:49:11 +01:00 committed by Bruno Martins
parent 410e126e08
commit 8704be1ae1
4 changed files with 55 additions and 2 deletions

View File

@ -5,7 +5,9 @@ hidl_interface {
root: "vendor.xiaomi",
system_ext_specific: true,
srcs: [
"types.hal",
"IDisplayFeature.hal",
"IDisplayFeatureCallback.hal",
],
interfaces: [
"android.hidl.base@1.0",

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 The LineageOS Project
* Copyright (C) 2019-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,6 +16,15 @@
package vendor.xiaomi.hardware.displayfeature@1.0;
import @1.0::IDisplayFeatureCallback;
interface IDisplayFeature {
setFeature(uint32_t displayId, uint32_t mode, uint32_t value, uint32_t cookie);
notifyBrightness(uint32_t brightness);
registerCallback(uint32_t displayId, IDisplayFeatureCallback callback) generates (Status status);
sendMessage(uint32_t index, uint32_t value, string cmd);
sendPanelCommand(string cmd) generates (Status status);
sendPostProcCommand(uint32_t cmd, uint32_t value) generates (Status status);
sendRefreshCommand() generates (Status status);
setFeature(uint32_t displayId, uint32_t caseId, uint32_t modeId, uint32_t cookie) generates (Status status);
setFunction(uint32_t displayId, uint32_t caseId, uint32_t modeId, uint32_t cookie) generates (Status status);
};

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2022 The LineageOS 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 vendor.xiaomi.hardware.displayfeature@1.0;
interface IDisplayFeatureCallback {
oneway displayfeatureInfoChanged(uint32_t caseId, uint32_t value, float red, float green, float blue);
};

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2022 The LineageOS 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 vendor.xiaomi.hardware.displayfeature@1.0;
// Based on observations using Ghidra, all methods that return Status
// only set the result of __android_log_print and cast it to Status.
enum Status : int32_t {};