Make bitmap nullable in ViewCapture

Fixes local compilation in SysUI studio.
The callback interface has @NullableDecl
annotation that Kotlin compiler treats as
Kotlin nullable.
Not sure why it compiles successfully in
soong though (different compiler version?).

Bug: 236188940
Change-Id: Ia8cf1dd25c3ea6a162ad3dddd58b4bf4c0f889a9
Test: build from sysui studio
This commit is contained in:
Nick Chameyev
2022-09-27 09:39:24 +00:00
parent f201b1bc4d
commit 5f2bce3e20

View File

@@ -93,8 +93,8 @@ fun View.toBitmap(window: Window? = null): Bitmap {
Futures.addCallback(
captureToBitmap(window),
object : FutureCallback<Bitmap> {
override fun onSuccess(result: Bitmap) {
continuation.resumeWith(Result.success(result))
override fun onSuccess(result: Bitmap?) {
continuation.resumeWith(Result.success(result!!))
}
override fun onFailure(t: Throwable) {