Some native code (CEF) may cause SIGTRAP to be sent on fatal errors,
which brings down the entire server. Instead only kill the thread and
attempt to continue.
* Bitmap: Use provided config
* Bitmap: implement copy
* Bitmap: Simplify getPixels
This also fixes a bug where the returned data may not be in the correct
format
Android getPixels():
> The returned colors are non-premultiplied ARGB values in the sRGB color space.
BufferedImage getRGB():
> Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space
* Stub TextPaint and Paint
* Paint: Implement some required functions
* Stub StaticLayout and Layout
* Implement some Paint support
* Draw Bounds
* WebP write support
* First text rendering
* Paint: Fix text size, font metrics
* Paint: Fix not copying new properties
Fixes font size in draw
* Canvas: Stroke add cap/join for better aliasing
Otherwise we get bad artifacts on sharp corners
Based on https://stackoverflow.com/a/35222059/
* Remove logs
* Canvas: Implement other drawText methods
* Bitmap: support erase
* Layout: Fix text direction
Should be LTR, otherwise 0 is read, which is automatically interpreted
as RTL without explicit check
* Bitmap: scale to destination rectangle
* Canvas: drawBitmap with just x/y
* Bitmap: Convert image on JPEG export to RGB
JPEG does not support alpha, so will throw "bogus color space"
* Switch to newer fork
* LoadData: Use regular load but intercept request
The method we used before, `createBrowserWithHtml`, is implemented by
KCEF. This method creates a `file://` url and adds handlers for that.
Instead, use regular `createBrowser` and intercept the request later on.
This has the effect of creating the page with the correct origin, while
still setting the requested HTML instead of live data. This is important
for scripts due to CORS.
Also fixes a mistake in the ResourceRequestHandler, where (a) the status
was not set, resulting in ABORT, (b) the return value of `readResponse`
was correct (`false` too early) and (c) the callback was unnecessarily
called on the MainLoop.
Based on https://stackoverflow.com/a/52423252/
* Convince the compiler we're doing it right
Invoking "public final" methods would fail. Not sure why this only
happens for some extensions, but it does. We need to tell the compiler
we're sure we have access to it, for some reason...
* JS: Invoke result handler on the loop
Some extensions call WebView methods on the result, so this should be on
the same loop as the WebView itself
* JS: Await arguments
* Fix using wrong URL property for errors
* Export meta data
* Import meta data
* Add missing "opdsUseBinaryFileSize" setting to gql
* Export server settings
* Import server settings
* Streamline server config enum handling
* Use "restore amount" in backup import progress
It's possible that the cover changed, but the url is still the same.
In that case the cover never gets updated unless the downloaded/cached file gets deleted
* Fix setting initial global update delay
In case no update has run yet, and the "last automated update" defaulted to 0, the calculation always resulted in a multiple of the interval.
This resulted for e.g., interval 24, to always be scheduled at 00:00.
For e.g., interval 6, it was always one of the following times: 00:00, 06:00, 12:00, 18:00; depending on the current system time.
* Delete the existing "last automated update time"
So that the update will be triggered based on the time the server got started again after the update.
* Extract migrations into separate functions
* Cleanup migration execution logic