Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java +6 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import com.android.ide.common.rendering.api.Result; import com.android.ide.common.rendering.api.ViewInfo; import com.android.layoutlib.bridge.impl.RenderSessionImpl; import com.android.tools.layoutlib.java.System_Delegate; import com.android.util.PropertiesMap; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -69,6 +70,11 @@ public class BridgeRenderSession extends RenderSession { return mSession.getSystemViewInfos(); } @Override public Map<Object, PropertiesMap> getDefaultProperties() { return mSession.getDefaultProperties(); } @Override public Result render(long timeout, boolean forceMeasure) { try { Loading Loading @@ -196,10 +202,6 @@ public class BridgeRenderSession extends RenderSession { } } public RenderSessionImpl getSessionImpl() { return mSession; } /*package*/ BridgeRenderSession(RenderSessionImpl scene, Result lastResult) { mSession = scene; if (scene != null) { Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +4 −5 Original line number Diff line number Diff line Loading @@ -27,12 +27,13 @@ import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.StyleResourceValue; import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.BridgeConstants; import com.android.layoutlib.bridge.android.PropertiesMap.Property; import com.android.layoutlib.bridge.android.view.WindowManagerImpl; import com.android.layoutlib.bridge.impl.ParserFactory; import com.android.layoutlib.bridge.impl.Stack; import com.android.resources.ResourceType; import com.android.util.Pair; import com.android.util.PropertiesMap; import com.android.util.PropertiesMap.Property; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading Loading @@ -153,7 +154,6 @@ public final class BridgeContext extends Context { private IBinder mBinder; private PackageManager mPackageManager; /** * Some applications that target both pre API 17 and post API 17, set the newer attrs to * reference the older ones. For example, android:paddingStart will resolve to Loading Loading @@ -276,8 +276,8 @@ public final class BridgeContext extends Context { return mRenderResources; } public PropertiesMap getDefaultPropMap(Object key) { return mDefaultPropMaps.get(key); public Map<Object, PropertiesMap> getDefaultProperties() { return mDefaultPropMaps; } public Configuration getConfiguration() { Loading Loading @@ -1862,7 +1862,6 @@ public final class BridgeContext extends Context { return false; } /** * The cached value depends on * <ol> Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/PropertiesMap.javadeleted 100644 → 0 +0 −37 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.layoutlib.bridge.android; import com.android.layoutlib.bridge.android.PropertiesMap.Property; import java.util.HashMap; /** * An alias used for the value in {@link BridgeContext#mDefaultPropMaps} */ public class PropertiesMap extends HashMap<String, Property> { public static class Property { public final String resource; public final String value; public Property(String resource, String value) { this.resource = resource; this.value = value; } } } tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso return mParams; } public BridgeContext getContext() { protected BridgeContext getContext() { return mContext; } Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import com.android.layoutlib.bridge.impl.binding.FakeExpandableAdapter; import com.android.resources.ResourceType; import com.android.tools.layoutlib.java.System_Delegate; import com.android.util.Pair; import com.android.util.PropertiesMap; import android.animation.AnimationThread; import android.animation.Animator; Loading Loading @@ -1415,6 +1416,10 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { return mSystemViewInfoList; } public Map<Object, PropertiesMap> getDefaultProperties() { return getContext().getDefaultProperties(); } public void setScene(RenderSession session) { mScene = session; } Loading Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeRenderSession.java +6 −4 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import com.android.ide.common.rendering.api.Result; import com.android.ide.common.rendering.api.ViewInfo; import com.android.layoutlib.bridge.impl.RenderSessionImpl; import com.android.tools.layoutlib.java.System_Delegate; import com.android.util.PropertiesMap; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -69,6 +70,11 @@ public class BridgeRenderSession extends RenderSession { return mSession.getSystemViewInfos(); } @Override public Map<Object, PropertiesMap> getDefaultProperties() { return mSession.getDefaultProperties(); } @Override public Result render(long timeout, boolean forceMeasure) { try { Loading Loading @@ -196,10 +202,6 @@ public class BridgeRenderSession extends RenderSession { } } public RenderSessionImpl getSessionImpl() { return mSession; } /*package*/ BridgeRenderSession(RenderSessionImpl scene, Result lastResult) { mSession = scene; if (scene != null) { Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +4 −5 Original line number Diff line number Diff line Loading @@ -27,12 +27,13 @@ import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.StyleResourceValue; import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.BridgeConstants; import com.android.layoutlib.bridge.android.PropertiesMap.Property; import com.android.layoutlib.bridge.android.view.WindowManagerImpl; import com.android.layoutlib.bridge.impl.ParserFactory; import com.android.layoutlib.bridge.impl.Stack; import com.android.resources.ResourceType; import com.android.util.Pair; import com.android.util.PropertiesMap; import com.android.util.PropertiesMap.Property; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading Loading @@ -153,7 +154,6 @@ public final class BridgeContext extends Context { private IBinder mBinder; private PackageManager mPackageManager; /** * Some applications that target both pre API 17 and post API 17, set the newer attrs to * reference the older ones. For example, android:paddingStart will resolve to Loading Loading @@ -276,8 +276,8 @@ public final class BridgeContext extends Context { return mRenderResources; } public PropertiesMap getDefaultPropMap(Object key) { return mDefaultPropMaps.get(key); public Map<Object, PropertiesMap> getDefaultProperties() { return mDefaultPropMaps; } public Configuration getConfiguration() { Loading Loading @@ -1862,7 +1862,6 @@ public final class BridgeContext extends Context { return false; } /** * The cached value depends on * <ol> Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/PropertiesMap.javadeleted 100644 → 0 +0 −37 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.layoutlib.bridge.android; import com.android.layoutlib.bridge.android.PropertiesMap.Property; import java.util.HashMap; /** * An alias used for the value in {@link BridgeContext#mDefaultPropMaps} */ public class PropertiesMap extends HashMap<String, Property> { public static class Property { public final String resource; public final String value; public Property(String resource, String value) { this.resource = resource; this.value = value; } } }
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java +1 −1 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso return mParams; } public BridgeContext getContext() { protected BridgeContext getContext() { return mContext; } Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ import com.android.layoutlib.bridge.impl.binding.FakeExpandableAdapter; import com.android.resources.ResourceType; import com.android.tools.layoutlib.java.System_Delegate; import com.android.util.Pair; import com.android.util.PropertiesMap; import android.animation.AnimationThread; import android.animation.Animator; Loading Loading @@ -1415,6 +1416,10 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { return mSystemViewInfoList; } public Map<Object, PropertiesMap> getDefaultProperties() { return getContext().getDefaultProperties(); } public void setScene(RenderSession session) { mScene = session; } Loading