FastThread: Remove unused NBLog variable
Test: Compile and verify NBLog
Change-Id: I145eb480415b076b7f75d266df35fc945563a364
diff --git a/services/audioflinger/FastThread.cpp b/services/audioflinger/FastThread.cpp
index 01b0432..04b32c2 100644
--- a/services/audioflinger/FastThread.cpp
+++ b/services/audioflinger/FastThread.cpp
@@ -66,8 +66,6 @@
/* mMeasuredWarmupTs({0, 0}), */
mWarmupCycles(0),
mWarmupConsecutiveInRangeCycles(0),
- mDummyNBLogWriter(new NBLog::Writer()),
- mNBLogWriter(mDummyNBLogWriter.get()),
mTimestampStatus(INVALID_OPERATION),
mCommand(FastThreadState::INITIAL),
@@ -124,10 +122,9 @@
// As soon as possible of learning of a new dump area, start using it
mDumpState = next->mDumpState != NULL ? next->mDumpState : mDummyDumpState;
- mNBLogWriter = next->mNBLogWriter != NULL ?
+ tlNBLogWriter = next->mNBLogWriter != NULL ?
next->mNBLogWriter : mDummyNBLogWriter.get();
- setNBLogWriter(mNBLogWriter); // FastMixer informs its AudioMixer, FastCapture ignores
- tlNBLogWriter = mNBLogWriter;
+ setNBLogWriter(tlNBLogWriter); // FastMixer informs its AudioMixer, FastCapture ignores
// We want to always have a valid reference to the previous (non-idle) state.
// However, the state queue only guarantees access to current and previous states.
diff --git a/services/audioflinger/FastThread.h b/services/audioflinger/FastThread.h
index bbb1d22..3f6b206 100644
--- a/services/audioflinger/FastThread.h
+++ b/services/audioflinger/FastThread.h
@@ -81,9 +81,7 @@
struct timespec mMeasuredWarmupTs; // how long did it take for warmup to complete
uint32_t mWarmupCycles; // counter of number of loop cycles during warmup phase
uint32_t mWarmupConsecutiveInRangeCycles; // number of consecutive cycles in range
- sp<NBLog::Writer> mDummyNBLogWriter;
- NBLog::Writer* mNBLogWriter; // always non-nullptr: real NBLog::Writer* or
- // mDummyNBLogWriter.get()
+ const sp<NBLog::Writer> mDummyNBLogWriter{new NBLog::Writer()};
status_t mTimestampStatus;
FastThreadState::Command mCommand;