Switch to main thread when execute update colors
Test: manual Bug: 288491055 Change-Id: I9c4c560e04f5c7a57d156743907684480d92d1e1
This commit is contained in:
@@ -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) }
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user