diff --git a/AniStream/VideoActivity.cs b/AniStream/VideoActivity.cs index a6d425f..d84fd5f 100644 --- a/AniStream/VideoActivity.cs +++ b/AniStream/VideoActivity.cs @@ -85,7 +85,7 @@ public class VideoActivity : AppCompatActivity, IPlayer.IListener, //private LinearLayout controls = default!; private TextView animeTitle = default!; private TextView episodeTitle = default!; - private TextView errorText = default!; + //private TextView errorText = default!; private TextView VideoInfo = default!; private TextView VideoName = default!; private TextView ServerInfo = default!; @@ -125,20 +125,20 @@ protected async override void OnCreate(Bundle? savedInstanceState) this.HideSystemBars(); //Enable unhandled exceptions for testing - //AndroidEnvironment.UnhandledExceptionRaiser += (s, e) => - //{ - // - //}; - // - //AppDomain.CurrentDomain.UnhandledException += (s, e) => - //{ - // - //}; - // - //TaskScheduler.UnobservedTaskException += (s, e) => - //{ - // - //}; + AndroidEnvironment.UnhandledExceptionRaiser += (s, e) => + { + + }; + + AppDomain.CurrentDomain.UnhandledException += (s, e) => + { + + }; + + TaskScheduler.UnobservedTaskException += (s, e) => + { + + }; await _playerSettings.LoadAsync(); @@ -176,7 +176,7 @@ protected async override void OnCreate(Bundle? savedInstanceState) videoChangerButton = FindViewById(Resource.Id.qualitychanger)!; nextEpisodeButton = FindViewById(Resource.Id.exo_nextvideo)!; previousEpisodeButton = FindViewById(Resource.Id.exo_prevvideo)!; - errorText = FindViewById(Resource.Id.errorText)!; + //errorText = FindViewById(Resource.Id.errorText)!; VideoInfo = FindViewById(Resource.Id.exo_video_info)!; VideoName = FindViewById(Resource.Id.exo_video_name)!; ServerInfo = FindViewById(Resource.Id.exo_server_info)!; @@ -754,8 +754,8 @@ public void OnPlayerError(PlaybackException? error) { CanSaveProgress = false; - errorText.Text = "Video not found."; - errorText.Visibility = ViewStates.Visible; + //errorText.Text = "Video not found."; + //errorText.Visibility = ViewStates.Visible; } public void OnIsPlayingChanged(bool isPlaying) @@ -861,8 +861,8 @@ public void OnPlayerErrorChanged(PlaybackException? error) { CanSaveProgress = false; - errorText.Text = "Video not found."; - errorText.Visibility = ViewStates.Visible; + //errorText.Text = "Video not found."; + //errorText.Visibility = ViewStates.Visible; if (error is not null && error.Message is not null) this.ShowToast("Failed to play video");