From 61ce24a32087b6e0784ca4e259363fc2792eb40a Mon Sep 17 00:00:00 2001 From: MrPiglr Date: Thu, 12 Feb 2026 13:40:22 -0700 Subject: [PATCH] fix(webview): restore hardware acceleration and load test_red.html to establish baseline --- .../main/java/com/aethex/os/MainActivity.java | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/android/app/src/main/java/com/aethex/os/MainActivity.java b/android/app/src/main/java/com/aethex/os/MainActivity.java index 6299f94..5deb9f6 100644 --- a/android/app/src/main/java/com/aethex/os/MainActivity.java +++ b/android/app/src/main/java/com/aethex/os/MainActivity.java @@ -30,14 +30,11 @@ public class MainActivity extends BridgeActivity { private void loadCustomUrl() { WebView webView = this.bridge.getWebView(); - runOnUiThread(() -> { - // DISABLE HARDWARE ACCELERATION - Common fix for black screens on specific devices - webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); - Toast.makeText(MainActivity.this, "Software Rendering Enabled", Toast.LENGTH_SHORT).show(); - }); - - // Set WebView background to BLUE to distinguish from default black - webView.setBackgroundColor(0xFF0000FF); + // Disable software rendering (Revert) + // webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + + // Set WebView background to BLACK + webView.setBackgroundColor(0xFF000000); WebSettings settings = webView.getSettings(); settings.setJavaScriptEnabled(true); @@ -73,14 +70,8 @@ public class MainActivity extends BridgeActivity { // NUCLEAR CACHE CLEAR webView.clearCache(true); webView.clearHistory(); - webView.clearFormData(); - webView.clearSslPreferences(); - // TEST 1: Direct HTML Injection (Bypasses File System) - String htmlData = "

SOFTWARE RENDERING WORKING

"; - webView.loadDataWithBaseURL(null, htmlData, "text/html", "UTF-8", null); - - // Force load our local test file - // webView.loadUrl("file:///android_asset/public/test_red.html"); + // LOAD THE RED FILE + webView.loadUrl("file:///android_asset/public/test_red.html"); } }