diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java index 090cee81bf95a..e1fc5ec2944c3 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java @@ -92,8 +92,7 @@ public final class Bitmap_Delegate { @Nullable public static Bitmap_Delegate getDelegate(@Nullable Bitmap bitmap) { - // refSkPixelRef is a hack to get the native pointer: see #nativeRefPixelRef() - return bitmap == null ? null : getDelegate(bitmap.refSkPixelRef()); + return bitmap == null ? null : getDelegate(bitmap.getNativeInstance()); } /**