mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 05:02:45 +01:00
Fix slow upload by turning on hardware accelleration on the webview (#1173)
This commit is contained in:
parent
beeb0d16c0
commit
5b03c64e8d
@ -14,6 +14,7 @@ import android.webkit.WebView
|
||||
import android.webkit.WebMessage
|
||||
import android.util.Log
|
||||
import android.util.Base64
|
||||
import android.view.View
|
||||
import android.webkit.ConsoleMessage
|
||||
import android.webkit.JavascriptInterface
|
||||
import android.webkit.WebChromeClient
|
||||
@ -60,6 +61,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
|
||||
mWebView!!.setListener(this, this)
|
||||
mWebView!!.setWebChromeClient(LoggingWebChromeClient())
|
||||
mWebView!!.addJavascriptInterface(WebAppInterface(this), "Android")
|
||||
mWebView!!.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
|
||||
val webSettings = mWebView!!.getSettings()
|
||||
webSettings.setUserAgentString("Send Android")
|
||||
|
Loading…
Reference in New Issue
Block a user