Merge "RecordingActivityMonitor: remove spam from death events"

This commit is contained in:
TreeHugger Robot
2019-07-02 16:45:34 +00:00
committed by Android (Google) Code Review

View File

@@ -86,6 +86,12 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
return mIsActive && mConfig != null;
}
void release() {
if (mDeathHandler != null) {
mDeathHandler.release();
}
}
// returns true if status of an active recording has changed
boolean setActive(boolean active) {
if (mIsActive == active) return false;
@@ -417,6 +423,7 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
break;
case AudioManager.RECORD_CONFIG_EVENT_RELEASE:
configChanged = state.isActiveConfiguration();
state.release();
mRecordStates.remove(stateIndex);
break;
default:
@@ -519,6 +526,10 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
return false;
}
}
void release() {
mRecorderToken.unlinkToDeath(this, 0);
}
}
/**