potential fix for the whitescreen issue
This commit is contained in:
parent
80f5751d9a
commit
810b88f652
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fox.ttrss"
|
||||
android:versionCode="294"
|
||||
android:versionName="1.85" >
|
||||
android:versionCode="295"
|
||||
android:versionName="1.86" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="10"
|
||||
|
@ -19,6 +19,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebBackForwardList;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
@ -318,7 +319,6 @@ public class ArticleFragment extends Fragment {
|
||||
});
|
||||
|
||||
boolean acceleratedWebview = true;
|
||||
boolean enableFullscreenVideo = m_prefs.getBoolean("enable_fs_video", false);
|
||||
|
||||
// prevent flicker in ics
|
||||
if (!m_prefs.getBoolean("webview_hardware_accel", true) || useTitleWebView) {
|
||||
@ -377,11 +377,9 @@ public class ArticleFragment extends Fragment {
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
ws.setJavaScriptEnabled(true);
|
||||
|
||||
if (enableFullscreenVideo) {
|
||||
m_chromeClient = new FSVideoChromeClient(view);
|
||||
m_web.setWebChromeClient(m_chromeClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_prefs.getBoolean("justify_article_text", true)) {
|
||||
@ -445,10 +443,16 @@ public class ArticleFragment extends Fragment {
|
||||
//
|
||||
}
|
||||
|
||||
if (savedInstanceState == null || !acceleratedWebview || !enableFullscreenVideo)
|
||||
if (savedInstanceState == null || !acceleratedWebview) {
|
||||
m_web.loadDataWithBaseURL(baseUrl, content, "text/html", "utf-8", null);
|
||||
else
|
||||
m_web.restoreState(savedInstanceState);
|
||||
} else {
|
||||
WebBackForwardList rc = m_web.restoreState(savedInstanceState);
|
||||
|
||||
if (rc == null) {
|
||||
// restore failed...
|
||||
m_web.loadDataWithBaseURL(baseUrl, content, "text/html", "utf-8", null);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -259,6 +259,4 @@
|
||||
<string name="headline_display_mode_default">Default</string>
|
||||
<string name="headline_display_mode_no_images">No images</string>
|
||||
<string name="headline_display_mode_compact">Compact</string>
|
||||
<string name="prefs_enable_fs_video_summary">May cause graphical glitches on some devices.</string>
|
||||
<string name="prefs_enable_fs_video">Fullscreen video support</string>
|
||||
</resources>
|
||||
|
@ -143,12 +143,6 @@
|
||||
android:key="use_volume_keys"
|
||||
android:summary="@string/use_volume_keys_long"
|
||||
android:title="@string/use_volume_keys" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="enable_fs_video"
|
||||
android:summary="@string/prefs_enable_fs_video_summary"
|
||||
android:title="@string/prefs_enable_fs_video" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="full_screen_mode"
|
||||
|
Loading…
Reference in New Issue
Block a user