Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b397107e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "RecordingActivityMonitor: remove spam from death events"

parents 49a81ba1 27c6887a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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);
        }
    }

    /**