From dd292f4fab52f99d0b15fcf961864cd8186d662c Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Wed, 2 Dec 2015 14:29:27 -0800 Subject: Added support for async inflation of RemoteViews When enabled, the View inflation as well as some of the drawable loading is done on the background thread. It also assumes that all the views support inflation on the background thread, which is true for the default views supported by the platform For ViewGroup opetations, it maintains a virtual view tree which is used for findViewById. The final operations are applied on the UI thread in the end. Change-Id: Ib3ce55182ec04a344f2b2513981ee03afc8fa2e8 --- core/java/android/view/RemotableViewMethod.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/java/android/view/RemotableViewMethod.java') diff --git a/core/java/android/view/RemotableViewMethod.java b/core/java/android/view/RemotableViewMethod.java index 4318290affc4..e5cae84942f9 100644 --- a/core/java/android/view/RemotableViewMethod.java +++ b/core/java/android/view/RemotableViewMethod.java @@ -29,6 +29,12 @@ import java.lang.annotation.Target; @Target({ ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) public @interface RemotableViewMethod { + /** + * @return Method name which can be called on a background thread. It should have the + * same arguments as the original method and should return a {@link Runnable} (or null) + * which will be called on the UI thread. + */ + String asyncImpl() default ""; } -- cgit v1.2.3