mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Simplifying pending widget inflation path
Instead of adding a PendingView in appWidgetHost, attaching a listener in PendingView for widget-updates. This moves the view inflation as the last stage of widget binding. Eventually we can separate the model update and view inflation to different threads Bug: 318539160 Test: atest TaplBinderTests Flag: None Change-Id: I124edaa9622fa367302b80969036d128a978396e
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.android.launcher3.widget;
|
||||
|
||||
import android.appwidget.AppWidgetHostView;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
@@ -117,7 +116,7 @@ public class WidgetHostViewLoader implements DragController.DragListener {
|
||||
return;
|
||||
}
|
||||
AppWidgetHostView hostView = mLauncher.getAppWidgetHolder().createView(
|
||||
(Context) mLauncher, mWidgetLoadingId, pInfo);
|
||||
mWidgetLoadingId, pInfo);
|
||||
mInfo.boundWidget = hostView;
|
||||
|
||||
// We used up the widget Id in binding the above view.
|
||||
|
||||
Reference in New Issue
Block a user