Merge "Renaming setAsyncExecutor to setExecutor" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
82629345c8
@@ -7083,7 +7083,7 @@ package android.appwidget {
|
||||
method protected android.view.View getErrorView();
|
||||
method protected void prepareView(android.view.View);
|
||||
method public void setAppWidget(int, android.appwidget.AppWidgetProviderInfo);
|
||||
method public void setAsyncExecutor(java.util.concurrent.Executor);
|
||||
method public void setExecutor(java.util.concurrent.Executor);
|
||||
method public void updateAppWidget(android.widget.RemoteViews);
|
||||
method public void updateAppWidgetOptions(android.os.Bundle);
|
||||
method public void updateAppWidgetSize(android.os.Bundle, int, int, int, int);
|
||||
|
||||
@@ -7549,7 +7549,7 @@ package android.appwidget {
|
||||
method protected android.view.View getErrorView();
|
||||
method protected void prepareView(android.view.View);
|
||||
method public void setAppWidget(int, android.appwidget.AppWidgetProviderInfo);
|
||||
method public void setAsyncExecutor(java.util.concurrent.Executor);
|
||||
method public void setExecutor(java.util.concurrent.Executor);
|
||||
method public void updateAppWidget(android.widget.RemoteViews);
|
||||
method public void updateAppWidgetOptions(android.os.Bundle);
|
||||
method public void updateAppWidgetSize(android.os.Bundle, int, int, int, int);
|
||||
|
||||
@@ -7114,7 +7114,7 @@ package android.appwidget {
|
||||
method protected android.view.View getErrorView();
|
||||
method protected void prepareView(android.view.View);
|
||||
method public void setAppWidget(int, android.appwidget.AppWidgetProviderInfo);
|
||||
method public void setAsyncExecutor(java.util.concurrent.Executor);
|
||||
method public void setExecutor(java.util.concurrent.Executor);
|
||||
method public void updateAppWidget(android.widget.RemoteViews);
|
||||
method public void updateAppWidgetOptions(android.os.Bundle);
|
||||
method public void updateAppWidgetSize(android.os.Bundle, int, int, int, int);
|
||||
|
||||
@@ -353,7 +353,7 @@ public class AppWidgetHostView extends FrameLayout {
|
||||
*
|
||||
* @param executor the executor to use or null.
|
||||
*/
|
||||
public void setAsyncExecutor(Executor executor) {
|
||||
public void setExecutor(Executor executor) {
|
||||
if (mLastExecutionSignal != null) {
|
||||
mLastExecutionSignal.cancel();
|
||||
mLastExecutionSignal = null;
|
||||
|
||||
@@ -47,11 +47,6 @@ import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* An adapter to a RemoteViewsService which fetches and caches RemoteViews
|
||||
* to be later inflated as child views.
|
||||
@@ -1114,7 +1109,7 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback
|
||||
layout = (RemoteViewsFrameLayout) convertView;
|
||||
} else {
|
||||
layout = new RemoteViewsFrameLayout(parent.getContext(), mCache);
|
||||
layout.setAsyncExecutor(mAsyncViewLoadExecutor);
|
||||
layout.setExecutor(mAsyncViewLoadExecutor);
|
||||
}
|
||||
|
||||
if (isInCache) {
|
||||
|
||||
@@ -83,7 +83,7 @@ public class AppWidgetHostViewTest {
|
||||
@Test
|
||||
public void asyncInflation() throws Exception {
|
||||
RunnableList executor = new RunnableList();
|
||||
mHostView.setAsyncExecutor(executor);
|
||||
mHostView.setExecutor(executor);
|
||||
|
||||
mHostView.updateAppWidget(mViews);
|
||||
assertNull(mHostView.findViewById(R.id.image));
|
||||
@@ -100,7 +100,7 @@ public class AppWidgetHostViewTest {
|
||||
@Test
|
||||
public void asyncInflation_cancelled() throws Exception {
|
||||
RunnableList executor = new RunnableList();
|
||||
mHostView.setAsyncExecutor(executor);
|
||||
mHostView.setExecutor(executor);
|
||||
|
||||
mHostView.updateAppWidget(mViews.clone());
|
||||
mHostView.updateAppWidget(mViews.clone());
|
||||
|
||||
Reference in New Issue
Block a user