aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/AndroidManifest.xml1
-rw-r--r--app/src/main/java/org/connectbot/TerminalView.java14
2 files changed, 14 insertions, 1 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index dd9db1f..ceaffd2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -170,7 +170,6 @@
<activity
android:name=".ConsoleActivity"
android:configChanges="keyboardHidden|orientation"
- android:hardwareAccelerated="false"
android:launchMode="singleTop"
android:theme="@style/Theme.AppCompat"
android:windowSoftInputMode="stateAlwaysVisible|adjustResize">
diff --git a/app/src/main/java/org/connectbot/TerminalView.java b/app/src/main/java/org/connectbot/TerminalView.java
index 026fac7..44b5810 100644
--- a/app/src/main/java/org/connectbot/TerminalView.java
+++ b/app/src/main/java/org/connectbot/TerminalView.java
@@ -57,6 +57,7 @@ import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
+import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup.LayoutParams;
import android.view.accessibility.AccessibilityEvent;
@@ -137,6 +138,14 @@ public class TerminalView extends TextView implements FontSizeChangedListener {
setFocusable(true);
setFocusableInTouchMode(true);
+ // Some things TerminalView uses is unsupported in hardware acceleration
+ // so this is using software rendering until we can replace all the
+ // instances.
+ // See: https://developer.android.com/guide/topics/graphics/hardware-accel.html#unsupported
+ if (Build.VERSION.SDK_INT >= 11) {
+ setLayerTypeToSoftware();
+ }
+
paint = new Paint();
cursorPaint = new Paint();
@@ -251,6 +260,11 @@ public class TerminalView extends TextView implements FontSizeChangedListener {
}
@TargetApi(11)
+ private void setLayerTypeToSoftware() {
+ setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+ }
+
+ @TargetApi(11)
private void closeSelectionActionMode() {
if (selectionActionMode != null) {
selectionActionMode.finish();