Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 680034b3 authored by Lais Andrade's avatar Lais Andrade
Browse files

Update haptics scaling

The new scaling is defined as:

(scale_factor * amplitude)
  when scale_factor <= 1

(scale_factor * amplitude) / (1 + (scale_factor - 1) * amplitude^2)
  when scale_factor > 1

Where the scale factor is now defined by a configurable gain between
scale levels. The default value for each scale level is:

 very_low: ~0.5
      low: ~0.7
     none:  1.0
     high:  1.4
very_high: ~2.0

The value is also forwarded to the audio-coupled haptics scaling
function via the ExternalVibrationScale parcelable.

Fix: 356407385
Flag: android.os.vibrator.haptics_scale_v2_enabled
Test: FrameworksVibratorServicesTests
Change-Id: I455d530eb8bf7733d373f6a338411b45b56e9799
parent 006496c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment