device/vibrator: Add contextual haptics feature

Add capability for vibrator HAL to detect whether the device is face-up
and adjust/scale haptic alerts to avoid loud and startling buzzing when
there is no case on the device. Added global compile-time disable that
can be set in the environment.

Bug: 198239103
Test: Verified tests and functionality
Change-Id: I6b2355acb7fa5e0323b8eca6327bb19ac42a2c56
Signed-off-by: Chris Paulo <chrispaulo@google.com>
This commit is contained in:
Chris Paulo
2022-11-02 22:21:50 +00:00
committed by TreeHugger Robot
parent 24789fe332
commit 0db068b63c
18 changed files with 730 additions and 56 deletions

View File

@@ -18,7 +18,7 @@ package {
}
cc_library {
name: "PixelVibratorCommon",
name: "PixelVibratorCommonPrivateLynx",
srcs: [
"HardwareBase.cpp",
],