From f29be828de51dbe2f55508cd620142e35cd19cbd Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Wed, 10 Nov 2010 16:18:58 -0800 Subject: Make ADT use the new layoutlib API. ADT now exclusively use the new API. The older platforms that still use the old API are accessed through a compatibility layer provided by the class LayoutBridgeWrapper that converts the old to the new API (both input and output). The wrapper and the loading code for the bridge have moved to layoutlib_utils, but into the ide.common package. Layoutlib_utils is to be renamed ide-common later. .sdk.LoadStatus has moved into .ide.common too since it's used by the bridge loading code. As we'll move more code into ide-common it's ok to have it there anyway. Also did some minor fix to the API: - missing implementation of ViewInfo - Made a singleton for SUCCESS state of SceneResult. Change-Id: I5e7130ca03b92ad71dc9c293b2ffc40566df645c --- layoutlib_api/src/com/android/layoutlib/api/SceneResult.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'layoutlib_api/src/com/android/layoutlib/api/SceneResult.java') diff --git a/layoutlib_api/src/com/android/layoutlib/api/SceneResult.java b/layoutlib_api/src/com/android/layoutlib/api/SceneResult.java index 7214b3f..386eecc 100644 --- a/layoutlib_api/src/com/android/layoutlib/api/SceneResult.java +++ b/layoutlib_api/src/com/android/layoutlib/api/SceneResult.java @@ -29,13 +29,9 @@ public class SceneResult { public enum LayoutStatus { SUCCESS, ERROR, NOT_IMPLEMENTED }; /** - * Creates a successful {@link SceneResult} object. + * Singleton SUCCESS {@link SceneResult} object. */ - public SceneResult() { - mStatus = LayoutStatus.SUCCESS; - mErrorMessage = null; - mThrowable = null; - } + public static final SceneResult SUCCESS = new SceneResult(LayoutStatus.SUCCESS); /** * Creates an error {@link SceneResult} object with the given message. -- cgit v1.1