Merge "Switch to main thread when execute update colors" into udc-qpr-dev

This commit is contained in:
Treehugger Robot
2023-07-12 23:45:01 +00:00
committed by Android (Google) Code Review

View File

@@ -32,7 +32,7 @@ open class RegionSampler
@JvmOverloads
constructor(
val sampledView: View,
mainExecutor: Executor?,
val mainExecutor: Executor?,
val bgExecutor: Executor?,
val regionSamplingEnabled: Boolean,
val isLockscreen: Boolean = false,
@@ -166,7 +166,7 @@ constructor(
if (isLockscreen) WallpaperManager.FLAG_LOCK
else WallpaperManager.FLAG_SYSTEM
)
onColorsChanged(sampledRegionWithOffset, initialSampling)
mainExecutor?.execute { onColorsChanged(sampledRegionWithOffset, initialSampling) }
}
)
}