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

Commit b62904ba authored by Jaideep Sharma's avatar Jaideep Sharma Committed by Vlad Popa
Browse files

services: Enable runtime logging in AudioService

Add runtime logging in AudioService based on isLoggable,
which helps to debug easily without recompiling services.

To use it :

add log.tag.AS.AudioService.Mode=LOG_LEVEL
in the build.prop and reboot.

Test: compile and enable flags to check logs
Bug: 440323751
Flag: NONE logging improvement

Change-Id: Ie8c018c0ee2bfc3d3547e25343acafeb6e47bb93
parent 2ef21e4c
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -350,22 +350,22 @@ public class AudioService extends IAudioService.Stub
    private final MusicFxHelper mMusicFxHelper;
    private final MusicFxHelper mMusicFxHelper;
    /** Debug audio mode */
    /** Debug audio mode */
    protected static final boolean DEBUG_MODE = false;
    protected static final boolean DEBUG_MODE = Log.isLoggable(TAG + ".Mode", Log.DEBUG);
    /** Debug audio policy feature */
    /** Debug audio policy feature */
    protected static final boolean DEBUG_AP = false;
    protected static final boolean DEBUG_AP = Log.isLoggable(TAG + ".AP", Log.DEBUG);
    /** Debug volumes */
    /** Debug volumes */
    protected static final boolean DEBUG_VOL = false;
    protected static final boolean DEBUG_VOL = Log.isLoggable(TAG + ".VOL", Log.DEBUG);
    /** debug calls to devices APIs */
    /** debug calls to devices APIs */
    protected static final boolean DEBUG_DEVICES = false;
    protected static final boolean DEBUG_DEVICES = Log.isLoggable(TAG + ".Devices", Log.DEBUG);
    /** Debug communication route */
    /** Debug communication route */
    protected static final boolean DEBUG_COMM_RTE = false;
    protected static final boolean DEBUG_COMM_RTE = Log.isLoggable(TAG + ".Comm", Log.DEBUG);
    /** Debug log sound fx (touchsounds...) in dumpsys */
    /** Debug log sound fx (touchsounds...) in dumpsys */
    protected static final boolean DEBUG_LOG_SOUND_FX = false;
    protected static final boolean DEBUG_LOG_SOUND_FX = Log.isLoggable(TAG + ".SoundFx", Log.DEBUG);
    /** How long to delay before persisting a change in volume/ringer mode. */
    /** How long to delay before persisting a change in volume/ringer mode. */
    private static final int PERSIST_DELAY = 500;
    private static final int PERSIST_DELAY = 500;