Merge "RecordingActivityMonitor: remove spam from death events"
This commit is contained in:
committed by
Android (Google) Code Review
commit
b397107edc
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user