Skip to content

Commit

Permalink
MainActivity: update UserAgent
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Feb 15, 2021
1 parent 58fd59d commit 3895c9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/org/itxtech/flashmaster/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(R.layout.activity_main)
setContentView(binding.root)
with(binding.webview) {
settings.apply {
setAppCacheEnabled(true)
Expand All @@ -63,6 +63,8 @@ class MainActivity : AppCompatActivity() {
databaseEnabled = true
loadsImagesAutomatically = true
allowUniversalAccessFromFileURLs = true
allowFileAccessFromFileURLs = true
userAgentString = "FlashMasterAndroid/" + BuildConfig.VERSION_NAME
}
webViewClient = object : WebViewClient() {
override fun doUpdateVisitedHistory(view: WebView?, url: String?, isReload: Boolean) {
Expand Down

0 comments on commit 3895c9e

Please sign in to comment.