From 93540d058690cdf90af8a3f64037ee02a3ba5409 Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Thu, 3 Oct 2019 13:06:52 +0200 Subject: [PATCH 1/2] Android 8 only: Set View.LAYER_TYPE_SOFTWARE on mReactRootView when switching to HTML mode --- .../mobile/WPAndroidGlue/WPAndroidGlueCode.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java b/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java index 45eb7c2789..df850f5b81 100644 --- a/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java +++ b/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java @@ -4,6 +4,7 @@ import android.app.Application; import android.content.Context; import android.content.MutableContextWrapper; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; @@ -521,7 +522,17 @@ public void appendMediaFile(int mediaId, final String mediaUrl, final boolean is } } - public void toggleEditorMode() { + public void toggleEditorMode(boolean htmlModeEnabled) { + // Turn off hardware acceleration for Oreo + // see https://github.com/wordpress-mobile/gutenberg-mobile/issues/1268#issuecomment-535887390 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O + && Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) { + if (htmlModeEnabled) { + mReactRootView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + } else { + mReactRootView.setLayerType(View.LAYER_TYPE_HARDWARE, null); + } + } mRnReactNativeGutenbergBridgePackage.getRNReactNativeGutenbergBridgeModule().toggleEditorMode(); } From d049940eb8a83fd38b924080e9f558465a350f8b Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Thu, 3 Oct 2019 13:11:40 +0200 Subject: [PATCH 2/2] Update release note --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 0caf96dda2..98e4a54836 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -2,6 +2,7 @@ ------ * Fix a bug on iOS 13.0 were tapping on a link opens Safari * Fix a link editing issue, where trying to add a empty link at the start of another link would remove the existing link. +* Fix missing content on long posts in html mode on Android 1.12.0 ------