mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-12-30 18:40:27 -06:00
crash fixes
This commit is contained in:
@@ -60,6 +60,10 @@ public class PlayerUIController extends BasePlayerController {
|
||||
private long mOverlayHideTimeMs;
|
||||
private final Runnable mSuggestionsResetHandler = () -> getPlayer().resetSuggestedPosition();
|
||||
private final Runnable mUiAutoHideHandler = () -> {
|
||||
if (getPlayer() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Playing the video and dialog overlay isn't shown
|
||||
if (getPlayer().isPlaying() && !getAppDialogPresenter().isDialogShown()) {
|
||||
if (getPlayer().isControlsShown()) { // don't hide when suggestions is shown
|
||||
|
||||
@@ -510,6 +510,10 @@ public class VideoStateController extends BasePlayerController {
|
||||
}
|
||||
|
||||
private void restoreSpeedAndPositionIfNeeded() {
|
||||
if (getPlayer() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Video item = getVideo();
|
||||
|
||||
boolean liveEnd = isLiveEnd();
|
||||
|
||||
@@ -256,7 +256,13 @@ public final class VideoFrameReleaseTimeHelper {
|
||||
@Override
|
||||
public void onDisplayChanged(int displayId) {
|
||||
if (displayId == Display.DEFAULT_DISPLAY) {
|
||||
updateDefaultDisplayRefreshRateParams();
|
||||
// MOD: swallow an exception
|
||||
try {
|
||||
updateDefaultDisplayRefreshRateParams();
|
||||
} catch (IllegalStateException e) {
|
||||
// IllegalStateException: Unable to locate mode -1
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,8 @@ public abstract class SearchTagsFragmentBase extends SearchSupportFragment
|
||||
// speech recognition, and then you can simply call:
|
||||
try {
|
||||
SpeechUtil.redirectUserToGoogleAppOnPlayStore(getContext());
|
||||
} catch (ActivityNotFoundException e) {
|
||||
} catch (ActivityNotFoundException | NullPointerException e) {
|
||||
// NullPointerException: android.os.Parcel.readException (Parcel.java:1478)
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user