Merge "RecordingActivityMonitor: remove spam from death events" am: 91d0f80387 am: 407f4c5c47

Change-Id: I85cbd7cecddc7e5c2c4f4e442edb4d60f50a45c4
This commit is contained in:
Automerger Merge Worker
2020-02-03 22:40:59 +00:00

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);
}
}
/**