crash fixes

This commit is contained in:
Yuriy Liskov
2025-05-25 15:14:32 +03:00
parent 08125013bf
commit 77126be9f6
2 changed files with 3 additions and 1 deletions

View File

@@ -70,7 +70,7 @@ public class VideoLoaderController extends BasePlayerController implements OnDat
private final Runnable mRebootApp = () -> {
Video video = getVideo();
if (video != null && video.hasVideo()) {
if (getPlayer() != null && video != null && video.hasVideo()) {
Utils.restartTheApp(getContext(), video.videoId);
}
};

View File

@@ -34,6 +34,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.widget.Toast;
import androidx.activity.ComponentActivity;
import androidx.activity.OnBackPressedDispatcher;
@@ -667,6 +668,7 @@ public class FragmentActivity extends ComponentActivity implements
} catch (ActivityNotFoundException e) {
// ActivityNotFoundException: No Activity found to handle Intent { act=com.android.settings.USER_DICTIONARY_INSERT flg=0x10000000 (has extras) }
Log.e(TAG, e.getMessage());
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}