Loading core/java/android/appwidget/AppWidgetHostView.java +3 −3 Original line number Diff line number Diff line Loading @@ -377,13 +377,13 @@ public class AppWidgetHostView extends FrameLayout { * AppWidget provider. Will animate into these new views as needed */ public void updateAppWidget(RemoteViews remoteViews) { applyRemoteViews(remoteViews); applyRemoteViews(remoteViews, true); } /** * @hide */ protected void applyRemoteViews(RemoteViews remoteViews) { protected void applyRemoteViews(RemoteViews remoteViews, boolean useAsyncIfPossible) { if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld); boolean recycled = false; Loading Loading @@ -423,7 +423,7 @@ public class AppWidgetHostView extends FrameLayout { mLayoutId = -1; mViewMode = VIEW_MODE_DEFAULT; } else { if (mAsyncExecutor != null) { if (mAsyncExecutor != null && useAsyncIfPossible) { inflateAsync(remoteViews); return; } Loading core/java/android/widget/AbsListView.java +12 −1 Original line number Diff line number Diff line Loading @@ -6284,6 +6284,17 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * @param intent the intent used to identify the RemoteViewsService for the adapter to connect to. */ public void setRemoteViewsAdapter(Intent intent) { setRemoteViewsAdapter(intent, false); } /** @hide **/ public Runnable setRemoteViewsAdapterAsync(final Intent intent) { return new RemoteViewsAdapter.AsyncRemoteAdapterAction(this, intent); } /** @hide **/ @Override public void setRemoteViewsAdapter(Intent intent, boolean isAsync) { // Ensure that we don't already have a RemoteViewsAdapter that is bound to an existing // service handling the specified intent. if (mRemoteAdapter != null) { Loading @@ -6296,7 +6307,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteAdapter = new RemoteViewsAdapter(getContext(), intent, this); mRemoteAdapter = new RemoteViewsAdapter(getContext(), intent, this, isAsync); if (mRemoteAdapter.isDataReady()) { setAdapter(mRemoteAdapter); } Loading core/java/android/widget/AdapterViewAnimator.java +13 −2 Original line number Diff line number Diff line Loading @@ -975,8 +975,19 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> * @param intent the intent used to identify the RemoteViewsService for the adapter to * connect to. */ @android.view.RemotableViewMethod @android.view.RemotableViewMethod(asyncImpl="setRemoteViewsAdapterAsync") public void setRemoteViewsAdapter(Intent intent) { setRemoteViewsAdapter(intent, false); } /** @hide **/ public Runnable setRemoteViewsAdapterAsync(final Intent intent) { return new RemoteViewsAdapter.AsyncRemoteAdapterAction(this, intent); } /** @hide **/ @Override public void setRemoteViewsAdapter(Intent intent, boolean isAsync) { // Ensure that we don't already have a RemoteViewsAdapter that is bound to an existing // service handling the specified intent. if (mRemoteViewsAdapter != null) { Loading @@ -989,7 +1000,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteViewsAdapter = new RemoteViewsAdapter(getContext(), intent, this); mRemoteViewsAdapter = new RemoteViewsAdapter(getContext(), intent, this, isAsync); if (mRemoteViewsAdapter.isDataReady()) { setAdapter(mRemoteViewsAdapter); } Loading core/java/android/widget/GridView.java +1 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ public class GridView extends AbsListView { * through the specified intent. * @param intent the intent used to identify the RemoteViewsService for the adapter to connect to. */ @android.view.RemotableViewMethod @android.view.RemotableViewMethod(asyncImpl="setRemoteViewsAdapterAsync") public void setRemoteViewsAdapter(Intent intent) { super.setRemoteViewsAdapter(intent); } Loading core/java/android/widget/ImageView.java +11 −2 Original line number Diff line number Diff line Loading @@ -455,7 +455,16 @@ public class ImageView extends View { /** @hide **/ public Runnable setImageResourceAsync(@DrawableRes int resId) { return new ImageDrawableCallback(getContext().getDrawable(resId), null, resId); Drawable d = null; if (resId != 0) { try { d = getContext().getDrawable(resId); } catch (Exception e) { Log.w(LOG_TAG, "Unable to find resource: " + resId, e); resId = 0; } } return new ImageDrawableCallback(d, null, resId); } /** Loading Loading @@ -865,7 +874,7 @@ public class ImageView extends View { } catch (Exception e) { Log.w(LOG_TAG, "Unable to find resource: " + mResource, e); // Don't try again. mUri = null; mResource = 0; } } else if (mUri != null) { d = getDrawableFromUri(mUri); Loading Loading
core/java/android/appwidget/AppWidgetHostView.java +3 −3 Original line number Diff line number Diff line Loading @@ -377,13 +377,13 @@ public class AppWidgetHostView extends FrameLayout { * AppWidget provider. Will animate into these new views as needed */ public void updateAppWidget(RemoteViews remoteViews) { applyRemoteViews(remoteViews); applyRemoteViews(remoteViews, true); } /** * @hide */ protected void applyRemoteViews(RemoteViews remoteViews) { protected void applyRemoteViews(RemoteViews remoteViews, boolean useAsyncIfPossible) { if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld); boolean recycled = false; Loading Loading @@ -423,7 +423,7 @@ public class AppWidgetHostView extends FrameLayout { mLayoutId = -1; mViewMode = VIEW_MODE_DEFAULT; } else { if (mAsyncExecutor != null) { if (mAsyncExecutor != null && useAsyncIfPossible) { inflateAsync(remoteViews); return; } Loading
core/java/android/widget/AbsListView.java +12 −1 Original line number Diff line number Diff line Loading @@ -6284,6 +6284,17 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * @param intent the intent used to identify the RemoteViewsService for the adapter to connect to. */ public void setRemoteViewsAdapter(Intent intent) { setRemoteViewsAdapter(intent, false); } /** @hide **/ public Runnable setRemoteViewsAdapterAsync(final Intent intent) { return new RemoteViewsAdapter.AsyncRemoteAdapterAction(this, intent); } /** @hide **/ @Override public void setRemoteViewsAdapter(Intent intent, boolean isAsync) { // Ensure that we don't already have a RemoteViewsAdapter that is bound to an existing // service handling the specified intent. if (mRemoteAdapter != null) { Loading @@ -6296,7 +6307,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteAdapter = new RemoteViewsAdapter(getContext(), intent, this); mRemoteAdapter = new RemoteViewsAdapter(getContext(), intent, this, isAsync); if (mRemoteAdapter.isDataReady()) { setAdapter(mRemoteAdapter); } Loading
core/java/android/widget/AdapterViewAnimator.java +13 −2 Original line number Diff line number Diff line Loading @@ -975,8 +975,19 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> * @param intent the intent used to identify the RemoteViewsService for the adapter to * connect to. */ @android.view.RemotableViewMethod @android.view.RemotableViewMethod(asyncImpl="setRemoteViewsAdapterAsync") public void setRemoteViewsAdapter(Intent intent) { setRemoteViewsAdapter(intent, false); } /** @hide **/ public Runnable setRemoteViewsAdapterAsync(final Intent intent) { return new RemoteViewsAdapter.AsyncRemoteAdapterAction(this, intent); } /** @hide **/ @Override public void setRemoteViewsAdapter(Intent intent, boolean isAsync) { // Ensure that we don't already have a RemoteViewsAdapter that is bound to an existing // service handling the specified intent. if (mRemoteViewsAdapter != null) { Loading @@ -989,7 +1000,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteViewsAdapter = new RemoteViewsAdapter(getContext(), intent, this); mRemoteViewsAdapter = new RemoteViewsAdapter(getContext(), intent, this, isAsync); if (mRemoteViewsAdapter.isDataReady()) { setAdapter(mRemoteViewsAdapter); } Loading
core/java/android/widget/GridView.java +1 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ public class GridView extends AbsListView { * through the specified intent. * @param intent the intent used to identify the RemoteViewsService for the adapter to connect to. */ @android.view.RemotableViewMethod @android.view.RemotableViewMethod(asyncImpl="setRemoteViewsAdapterAsync") public void setRemoteViewsAdapter(Intent intent) { super.setRemoteViewsAdapter(intent); } Loading
core/java/android/widget/ImageView.java +11 −2 Original line number Diff line number Diff line Loading @@ -455,7 +455,16 @@ public class ImageView extends View { /** @hide **/ public Runnable setImageResourceAsync(@DrawableRes int resId) { return new ImageDrawableCallback(getContext().getDrawable(resId), null, resId); Drawable d = null; if (resId != 0) { try { d = getContext().getDrawable(resId); } catch (Exception e) { Log.w(LOG_TAG, "Unable to find resource: " + resId, e); resId = 0; } } return new ImageDrawableCallback(d, null, resId); } /** Loading Loading @@ -865,7 +874,7 @@ public class ImageView extends View { } catch (Exception e) { Log.w(LOG_TAG, "Unable to find resource: " + mResource, e); // Don't try again. mUri = null; mResource = 0; } } else if (mUri != null) { d = getDrawableFromUri(mUri); Loading