LineageParts: make volume button re-orient functionality act based on relevant input
* The only variable that matters in making the re-orient decision is
where (on what side) the volume buttons are situated relative to the
default screen orientation.
* This variable has been synthesized as a configurable integer resource
named config_volumeRockerVsDisplayOrientation. The values for this
resource are compatible with values expected by InputFlinger
(1 for what it understands to be, generically, a "phone", and 2 for a
"tablet").
* The patch is needed because the old logic could not determine reliably,
programatically, what sort of tablets it was dealing with. It just
assumed that landscape tablets automatically have the volume buttons
placed on top, and portrait tablets on the sides (basically in the
same place, considering that the framework's understanding of the
device's screen orientation is the only thing that's changed here).
* Therefore, this patch makes things right for landscape tablets with
the volume rocker on the sides, while also leaving room for more
exotic future devices.
Change-Id: I46cc8fbee43c9ac3f5ae306ccbfe0bdd3a71d4b4
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
2 files changed