-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebView Bug. http/https shcema URLs] due to Chromium bug 'crbug.com/…
…1244039', Sometimes WebView's onPageFinished method won't be called
- Loading branch information
Showing
11 changed files
with
304 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.mecofarid.pdfkit"> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<application | ||
tools:targetApi="m" | ||
android:usesCleartextTraffic="true"/> | ||
</manifest> |
32 changes: 32 additions & 0 deletions
32
pdfkit/src/main/java/android/print/InternalConversionHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package android.print | ||
|
||
import android.os.Handler | ||
import android.os.HandlerThread | ||
import android.os.Looper | ||
import android.os.Message | ||
import android.util.Log | ||
import java.util.concurrent.LinkedBlockingQueue | ||
import java.util.concurrent.ThreadFactory | ||
import java.util.concurrent.ThreadPoolExecutor | ||
import java.util.concurrent.TimeUnit | ||
|
||
internal object InternalConversionHandler{ | ||
|
||
private const val CORE_POOL_SIZE = 5 | ||
private const val MAXIMUM_POOL_SIZE = 20 | ||
private const val KEEP_ALIVE_SECONDS = 3L | ||
|
||
private val threadPoolExecutor = ThreadPoolExecutor( | ||
CORE_POOL_SIZE, | ||
MAXIMUM_POOL_SIZE, | ||
KEEP_ALIVE_SECONDS, | ||
TimeUnit.SECONDS, | ||
LinkedBlockingQueue() | ||
).also { | ||
it.allowCoreThreadTimeOut(true) | ||
} | ||
|
||
fun execute(runnable: Runnable){ | ||
threadPoolExecutor.execute(runnable) | ||
} | ||
} |
Oops, something went wrong.