Create Contexthub HAL 1.1

The HAL 1.1 update allows the contexthub framework to notify the HAL of
any settings changes the user makes.

Bug: 135951924
Test: compile
Change-Id: Ia523c89b2e546ec169eb4997a0af7f471c8185b5
This commit is contained in:
Anthony Stange
2020-02-04 18:46:55 -05:00
committed by Brian Duddie
parent 368c0d9efe
commit 7a04231aaa
4 changed files with 83 additions and 0 deletions

18
contexthub/1.1/Android.bp Normal file
View File

@@ -0,0 +1,18 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "android.hardware.contexthub@1.1",
root: "android.hardware",
vndk: {
enabled: true,
},
srcs: [
"types.hal",
"IContexthub.hal",
],
interfaces: [
"android.hardware.contexthub@1.0",
"android.hidl.base@1.0",
],
gen_java: true,
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2020 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.contexthub@1.1;
import @1.0::IContexthub;
import @1.0::Result;
interface IContexthub extends @1.0::IContexthub {
/**
* Notification sent by the framework to indicate that the user
* has changed a setting.
*
* @param setting User setting that has been modified.
* @param newValue The update value of the user setting.
*/
oneway onSettingChanged(Setting setting, SettingValue newValue);
};

32
contexthub/1.1/types.hal Normal file
View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2020 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.contexthub@1.1;
/**
* Used to indicate the type of user setting that has changed.
*/
enum Setting : uint8_t {
LOCATION,
};
/**
* Used to indicate the value of a user setting.
*/
enum SettingValue : uint8_t {
DISABLED,
ENABLED,
};

View File

@@ -644,6 +644,8 @@ c1aa508d00b66ed5feefea398fd5edf28fa651ac89773adad7dfda4e0a73a952 android.hardwar
9811f867def49b420d8c707f7e38d3bdd64f835244e1d2a5e9762ab9835672dc android.hardware.cas@1.2::ICasListener
f18695dd36ee205640b8326a17453858a7b4596653aaa6ef0016b0aef1bd4dac android.hardware.cas@1.2::IMediaCasService
4d85e814f94949dae4dc6cb82bbd7d6bb24ffafda6ddb2eac928d2a4fc2e21ce android.hardware.cas@1.2::types
2a6b1a1202493f0a7c88d716da6e2cdd66bfd77a170621791fdf14997fdfcaf9 android.hardware.contexthub@1.1::IContexthub
3581d0ba61663cdd45807494dcd697d01c074f27587df9140655f94346969cfe android.hardware.contexthub@1.1::types
66931c2506fbb5af61f20138cb05e0a09e7bf67d6964c231d27c648933bb33ec android.hardware.drm@1.3::ICryptoFactory
994d08ab27d613022c258a9ec48cece7adf2a305e92df5d76ef923e2c6665f64 android.hardware.drm@1.3::IDrmFactory
446287268831f4ddfac4a51bb1c32ae1e48e47bccd535fccc2c4546d0e7c4013 android.hardware.dumpstate@1.1::types