Merge "Adding API to allow async inflaiton of AppWidget"

This commit is contained in:
Sunny Goyal
2017-01-11 01:19:30 +00:00
committed by Android (Google) Code Review
5 changed files with 149 additions and 3 deletions

View File

@@ -347,11 +347,11 @@ public class AppWidgetHostView extends FrameLayout {
}
/**
* Sets an executor which can be used for asynchronously inflating and applying the remoteviews.
* @see {@link RemoteViews#applyAsync(Context, ViewGroup, RemoteViews.OnViewAppliedListener, Executor)}
* Sets an executor which can be used for asynchronously inflating. CPU intensive tasks like
* view inflation or loading images will be performed on the executor. The updates will still
* be applied on the UI thread.
*
* @param executor the executor to use or null.
* @hide
*/
public void setAsyncExecutor(Executor executor) {
if (mLastExecutionSignal != null) {