Skip to main content

Do stack really need to dispatch ENTRY_STATE_CHANGE event for RecordingRequest delete() operation ??

3 replies [Last post]
svikrant
Offline
Joined: 2011-02-09
Points: 0

Hi All,
When recRequest.delete() is called, it internally stops the recording and then it deletes the recording. During the process, after stop() the stack dispatches ENTRY_STATE_CHANGE (for INCOMPLETE_STATE) event followed by ENTRY_DELETED.
MY QUESTION : Do the stack need to really dispatch ENTRY_STATE_CHANGE for INCOMPLETE_STATE when it is finally going to delete the recording giving "ENTRY_DELETED"??
Issue : If i want to track whether the delete is succesful or not . I am looking for ENTRY_DELETED but before ENTRY_DELETED the stack dispatches ENTRY_STATE_CHANGE (for INCOMPLETE_STATE), my code is handling ENTRY_STATE_CHANGE separately where i query the recordingState by calling recordingChangedEvent.getRecordingRequest().getState(); But by the time i query the state for ENTRY_STATE_CHANGE event, the stack deletes the recording moves the state to DESTROYED state which results in IllegalStateException even though the ENTRY_DELETED event is not dispatched by the stack.
I feel it would be better if the user is given only ENTRTY_DELETED callback only after delete opertaion. Let the recording get stopped but notifying the appication for INCOMPLETE_STATE is not worth in delete case where tha main intention is to receive ENTRY_DELETED.
Please let me know your inputs on this.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cpratt
Offline
Joined: 2008-12-18
Points: 0

Not only is the signaling of transitions from IN_PROGRESS->INCOMPLETE->DELETED unnecessary, the "oldState" value on the RecordingchangedEvent(INCOMPLETE) notification was an invalid state value (4104).
Both issues were corrected with change 14725 (committed 2011-02-09).
This change fixes a couple of unnecessary or invalid state notifications. But primarily, RecordingRequest.delete() no longer results in a state transition from IN_PROGRESS to INCOMPLETE. And the INCOMPLETE notification no longer passes "4104" (the internal DESTROYED state value) as "oldState".

cpratt
Offline
Joined: 2008-12-18
Points: 0

Note that you'll probably want change 15003 as well - as the above change caused an issue when delete()-ing a PENDING RecordingRequest.
Both of the changes are incorporated into 1.1.4 Rel-F.

svikrant
Offline
Joined: 2011-02-09
Points: 0

Thanks Pratt for this info.
This change will surely help the app developer from handling unwanted illegal state exception for delete() operation.