Merge "RecordingActivityMonitor: remove spam from death events" am: 91d0f80387
Change-Id: I9c6279268eedf816e780c33a2e36521ef448ac94
This commit is contained in:
@@ -86,6 +86,12 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
|
|||||||
return mIsActive && mConfig != null;
|
return mIsActive && mConfig != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void release() {
|
||||||
|
if (mDeathHandler != null) {
|
||||||
|
mDeathHandler.release();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// returns true if status of an active recording has changed
|
// returns true if status of an active recording has changed
|
||||||
boolean setActive(boolean active) {
|
boolean setActive(boolean active) {
|
||||||
if (mIsActive == active) return false;
|
if (mIsActive == active) return false;
|
||||||
@@ -417,6 +423,7 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
|
|||||||
break;
|
break;
|
||||||
case AudioManager.RECORD_CONFIG_EVENT_RELEASE:
|
case AudioManager.RECORD_CONFIG_EVENT_RELEASE:
|
||||||
configChanged = state.isActiveConfiguration();
|
configChanged = state.isActiveConfiguration();
|
||||||
|
state.release();
|
||||||
mRecordStates.remove(stateIndex);
|
mRecordStates.remove(stateIndex);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -519,6 +526,10 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void release() {
|
||||||
|
mRecorderToken.unlinkToDeath(this, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user