File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
app/src/main/java/org/schabi/newpipe Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 38
38
import android .view .MenuItem ;
39
39
import android .view .View ;
40
40
import android .view .ViewGroup ;
41
+ import android .webkit .WebView ;
41
42
import android .widget .AdapterView ;
42
43
import android .widget .ArrayAdapter ;
43
44
import android .widget .FrameLayout ;
@@ -140,6 +141,19 @@ protected void onCreate(final Bundle savedInstanceState) {
140
141
ThemeHelper .setDayNightMode (this );
141
142
ThemeHelper .setTheme (this , ServiceHelper .getSelectedServiceId (this ));
142
143
144
+ // Fixes text color turning black in dark/black mode:
145
+ // https://github.com/TeamNewPipe/NewPipe/issues/12016
146
+ // For further reference see: https://issuetracker.google.com/issues/37124582
147
+ if (DeviceUtils .supportsWebView ()) {
148
+ try {
149
+ new WebView (this );
150
+ } catch (final Throwable e ) {
151
+ if (DEBUG ) {
152
+ Log .e (TAG , "Failed to create WebView" , e );
153
+ }
154
+ }
155
+ }
156
+
143
157
assureCorrectAppLanguage (this );
144
158
super .onCreate (savedInstanceState );
145
159
You can’t perform that action at this time.
0 commit comments