Fix app crashing when opening video from outside and changing the orientation
The issue was introduced in !1738 (merged)
The intent of this MR was to implement the following behavior:
sequenceDiagram
participant A as ExternalApp
box Purple VLC
participant S as StartActivity
participant V as VideoPlayerActivity
end
A->>+S: startActivityForResult
Note over S: prevent closing
S->>+V: startActivityForResult
Note over V: playing then user closes
V->>+S: setResult
S->>+A: setResult
Now if the user changes the orientation during the playback
sequenceDiagram
participant A as ExternalApp
box Purple VLC
participant S as StartActivity
participant V as VideoPlayerActivity
end
A->>+S: startActivityForResult
Note over S: prevent closing
S->>+V: startActivityForResult
Note over V: playing and the user<br>changes the orientation
Note over S: DESTROYED
Note over V: Not destroyed because<br>of configChanges
Note over V: playing then user closes
V->>+S:
loop
Note over S: onCreate again
S->>+V: startActivityForResult again
end
That's why the proposed solution is to give the StartActivity
the exact same configChanges
as the VideoPlayerActivity
so it's not destroyed when the configuration is changed during the playback
Edited by Nicolas Pomepuy
Merge request reports
Activity
Filter activity
changed milestone to %3.6.x
added Crash label
requested review from @Skantes
mentioned in issue #3099 (closed)
Please register or sign in to reply