mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-06 05:49:49 +02:00
Try fixing ANR when releasing ExoPlayer.
This commit is contained in:
@@ -635,6 +635,8 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
|
||||
protected void onDestroy() {
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
player.seekToDefaultPosition();
|
||||
player.stop(true);
|
||||
player.release();
|
||||
}
|
||||
|
||||
|
@@ -397,6 +397,8 @@ public class ViewVideoActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
player.seekToDefaultPosition();
|
||||
player.stop(true);
|
||||
player.release();
|
||||
}
|
||||
|
||||
|
@@ -278,6 +278,8 @@ public class ViewImgurVideoFragment extends Fragment {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
player.seekToDefaultPosition();
|
||||
player.stop(true);
|
||||
player.release();
|
||||
}
|
||||
|
||||
|
@@ -282,6 +282,8 @@ public class ViewRedditGalleryVideoFragment extends Fragment {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
player.seekToDefaultPosition();
|
||||
player.stop(true);
|
||||
player.release();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user