work around crash on Android 8 (#731)

main
Konrad Pozniak 6 years ago committed by GitHub
parent 30d9204586
commit 6bf0c14a74
  1. 6
      app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

@ -31,6 +31,7 @@ import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Parcel;
@ -496,6 +497,11 @@ public final class ComposeActivity
textEditor.setSelection(textEditor.length());
}
// work around Android platform bug -> https://issuetracker.google.com/issues/67102093
if(Build.VERSION.SDK_INT == Build.VERSION_CODES.O || Build.VERSION.SDK_INT == Build.VERSION_CODES.O_MR1 ) {
textEditor.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
// Initialise the content warning editor.
contentWarningEditor.addTextChangedListener(new TextWatcher() {
@Override

Loading…
Cancel
Save