diff options
| author | Peter Cai <peter@typeblog.net> | 2019-06-21 18:51:48 +0800 |
|---|---|---|
| committer | dragonGR <alextsanisbadlorg@gmail.com> | 2019-09-22 14:03:42 +0300 |
| commit | 365697e40cdfad9a5b3b5a81fb8b96a958acde91 (patch) | |
| tree | c5cb0057ded0b52d1524c803cdb6923f03fdacf9 | |
| parent | 598b1af745f85fdb2c9de245aec78ec29fdce4bb (diff) | |
IFingerprintInscreen: Allow HALs to control dimming
* On OnePlus 7 Pro, the kernel provides the dimming value. We can use
hals to directly retrieve that value instead of calculating manually.
* Also, the kernel implemented brightness boosting. Allow the hal to
pass this information to the framework so no repeated boosting is done.
Change-Id: Ifc4137d6e033ff52662b57aae4ffffd5bd1c9cae
| -rw-r--r-- | biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.hal | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.hal b/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.hal index 7a83fb2..af3e40b 100644 --- a/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.hal +++ b/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.hal @@ -57,4 +57,17 @@ interface IFingerprintInscreen { * Used when in keyguard mode. */ setLongPressEnabled(bool enabled); + /** + * Calculate the dimming amount [0, 255] based on the current brightness [0, 255] + * This can be done by the vendor's kernel, but can also be implemented + * directly in this hal. + */ + getDimAmount(int32_t cur_brightness) generates (int32_t cur_brightness); + /** + * Should the framework boost the brightness? In ideal scenario the boosting + * should be handled in the lower layers for the best user experience. + * If this returns false, then the implementation MUST boost the brightness + * according to the previous events. + */ + shouldBoostBrightness() generates (bool ret); }; |
