mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-12-21 14:10:25 -06:00
crash fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user