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

Commit bdc23654 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "Audio player delayed start: don't throw exception"

parents 49ddb3d5 10ffc783
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1956,7 +1956,13 @@ public class AudioTrack extends PlayerBase
                        e.printStackTrace();
                    }
                    baseSetStartDelayMs(0);
                    try {
                        startImpl();
                    } catch (IllegalStateException e) {
                        // fail silently for a state exception when it is happening after
                        // a delayed start, as the player state could have changed between the
                        // call to start() and the execution of startImpl()
                    }
                }
            }.start();
        }
+7 −1
Original line number Diff line number Diff line
@@ -1258,7 +1258,13 @@ public class MediaPlayer extends PlayerBase
                        e.printStackTrace();
                    }
                    baseSetStartDelayMs(0);
                    try {
                        startImpl();
                    } catch (IllegalStateException e) {
                        // fail silently for a state exception when it is happening after
                        // a delayed start, as the player state could have changed between the
                        // call to start() and the execution of startImpl()
                    }
                }
            }.start();
        }