OSDN Git Service

audioflinger: fix ro.audio.silent in offload again
authorEric Laurent <elaurent@google.com>
Tue, 24 Sep 2013 01:24:31 +0000 (18:24 -0700)
committerEric Laurent <elaurent@google.com>
Tue, 24 Sep 2013 01:33:25 +0000 (18:33 -0700)
Commit 1abbdb4 was not working 100% of the times because
it is possible that the offload thread loop never sleeps
after being created in which case the property is never read.

The loop now reads the property once when starting.

Bug: 10899309.
Change-Id: I2e2ca332f2d7086e59d65f6010378c4d9618ba9e

services/audioflinger/Threads.cpp

index 5f36cab..b771e3b 100644 (file)
@@ -2115,6 +2115,8 @@ bool AudioFlinger::PlaybackThread::threadLoop()
     // and then that string will be logged at the next convenient opportunity.
     const char *logString = NULL;
 
+    checkSilentMode_l();
+
     while (!exitPending())
     {
         cpuStats.sample(myName);