Loading tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java +18 −10 Original line number Diff line number Diff line Loading @@ -245,6 +245,13 @@ public class FontFamily_Delegate { return sFontLocation; } // ---- delegate methods ---- @LayoutlibDelegate /*package*/ static boolean addFont(FontFamily thisFontFamily, String path, int ttcIndex) { final FontFamily_Delegate delegate = getDelegate(thisFontFamily.mNativePtr); return delegate != null && delegate.addFont(path, ttcIndex); } // ---- native methods ---- @LayoutlibDelegate Loading @@ -270,16 +277,8 @@ public class FontFamily_Delegate { } @LayoutlibDelegate /*package*/ static boolean nAddFont(long nativeFamily, final String path, int ttcIndex) { // FIXME: support ttc fonts. Hack JRE?? final FontFamily_Delegate delegate = getDelegate(nativeFamily); if (delegate != null) { if (sFontLocation == null) { delegate.mPostInitRunnables.add(() -> delegate.addFont(path)); return true; } return delegate.addFont(path); } /*package*/ static boolean nAddFont(long nativeFamily, ByteBuffer font, int ttcIndex) { assert false : "The only client of this method has been overriden."; return false; } Loading Loading @@ -390,6 +389,15 @@ public class FontFamily_Delegate { mPostInitRunnables = null; } private boolean addFont(final String path, int ttcIndex) { // FIXME: support ttc fonts. Hack JRE?? if (sFontLocation == null) { mPostInitRunnables.add(() -> addFont(path)); return true; } return addFont(path); } private boolean addFont(@NonNull String path) { return addFont(path, DEFAULT_FONT_WEIGHT, path.endsWith(FONT_SUFFIX_ITALIC)); } Loading tools/layoutlib/bridge/src/android/util/PathParser_Delegate.java +2 −3 Original line number Diff line number Diff line Loading @@ -64,15 +64,14 @@ public class PathParser_Delegate { } @LayoutlibDelegate /*package*/ static boolean nParseStringForPath(long pathPtr, @NonNull String pathString, int /*package*/ static void nParseStringForPath(long pathPtr, @NonNull String pathString, int stringLength) { Path_Delegate path_delegate = Path_Delegate.getDelegate(pathPtr); if (path_delegate == null) { return false; return; } assert pathString.length() == stringLength; PathDataNode.nodesToPath(createNodesFromPathData(pathString), path_delegate); return true; } @LayoutlibDelegate Loading tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ public final class CreateInfo implements ICreateInfo { "android.graphics.BitmapFactory#setDensityFromOptions", "android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT#useLastSeenTarget", "android.graphics.drawable.GradientDrawable#buildRing", "android.graphics.FontFamily#addFont", "android.graphics.Typeface#getSystemFontConfigLocation", "android.graphics.Typeface#makeFamilyFromParsed", "android.os.Handler#sendMessageAtTime", Loading Loading
tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java +18 −10 Original line number Diff line number Diff line Loading @@ -245,6 +245,13 @@ public class FontFamily_Delegate { return sFontLocation; } // ---- delegate methods ---- @LayoutlibDelegate /*package*/ static boolean addFont(FontFamily thisFontFamily, String path, int ttcIndex) { final FontFamily_Delegate delegate = getDelegate(thisFontFamily.mNativePtr); return delegate != null && delegate.addFont(path, ttcIndex); } // ---- native methods ---- @LayoutlibDelegate Loading @@ -270,16 +277,8 @@ public class FontFamily_Delegate { } @LayoutlibDelegate /*package*/ static boolean nAddFont(long nativeFamily, final String path, int ttcIndex) { // FIXME: support ttc fonts. Hack JRE?? final FontFamily_Delegate delegate = getDelegate(nativeFamily); if (delegate != null) { if (sFontLocation == null) { delegate.mPostInitRunnables.add(() -> delegate.addFont(path)); return true; } return delegate.addFont(path); } /*package*/ static boolean nAddFont(long nativeFamily, ByteBuffer font, int ttcIndex) { assert false : "The only client of this method has been overriden."; return false; } Loading Loading @@ -390,6 +389,15 @@ public class FontFamily_Delegate { mPostInitRunnables = null; } private boolean addFont(final String path, int ttcIndex) { // FIXME: support ttc fonts. Hack JRE?? if (sFontLocation == null) { mPostInitRunnables.add(() -> addFont(path)); return true; } return addFont(path); } private boolean addFont(@NonNull String path) { return addFont(path, DEFAULT_FONT_WEIGHT, path.endsWith(FONT_SUFFIX_ITALIC)); } Loading
tools/layoutlib/bridge/src/android/util/PathParser_Delegate.java +2 −3 Original line number Diff line number Diff line Loading @@ -64,15 +64,14 @@ public class PathParser_Delegate { } @LayoutlibDelegate /*package*/ static boolean nParseStringForPath(long pathPtr, @NonNull String pathString, int /*package*/ static void nParseStringForPath(long pathPtr, @NonNull String pathString, int stringLength) { Path_Delegate path_delegate = Path_Delegate.getDelegate(pathPtr); if (path_delegate == null) { return false; return; } assert pathString.length() == stringLength; PathDataNode.nodesToPath(createNodesFromPathData(pathString), path_delegate); return true; } @LayoutlibDelegate Loading
tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ public final class CreateInfo implements ICreateInfo { "android.graphics.BitmapFactory#setDensityFromOptions", "android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT#useLastSeenTarget", "android.graphics.drawable.GradientDrawable#buildRing", "android.graphics.FontFamily#addFont", "android.graphics.Typeface#getSystemFontConfigLocation", "android.graphics.Typeface#makeFamilyFromParsed", "android.os.Handler#sendMessageAtTime", Loading