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

Skip to content
Commit 6f38436f authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioService: optimize vol change logs

  When logging the previous volume index for the
AudioService events and media.metrics, obtaining
the current volume index (in getStreamVolume() for
the logging) before it is changed requires finding
the current device for that stream type.
  This is repeated again when changing the volume.

This change queries the device at logging time,
but then passes it to the next internal method.
Doing so requires differentiating the code path
that is used for setStreamVolume, and setDeviceVolume,
which was previously done by checking if the passed
device was null or not. This is replaced by a boolean,
the "canChangeMuteAndUpdateController" parameter.

Bug: 239091512
Test: adb shell dumpsys audio | grep -A 50  "volume changes"
Test: adb shell dumpsys media.metrics
Change-Id: Ifd0a7dfafb044f2591fcc2d8ecdb6de998582584
parent c02a454c
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