Loading core/java/android/content/res/ApkAssets.java +10 −9 Original line number Diff line number Diff line Loading @@ -101,14 +101,11 @@ public final class ApkAssets { public @interface FormatType {} @GuardedBy("this") private final long mNativePtr; private long mNativePtr; // final, except cleared in finalizer. @Nullable @GuardedBy("this") private final StringBlock mStringBlock; @GuardedBy("this") private boolean mOpen = true; private final StringBlock mStringBlock; // null or closed if mNativePtr = 0. @PropertyFlags private final int mFlags; Loading Loading @@ -380,13 +377,17 @@ public final class ApkAssets { /** @hide */ @Nullable public OverlayableInfo getOverlayableInfo(String overlayableName) throws IOException { synchronized (this) { return nativeGetOverlayableInfo(mNativePtr, overlayableName); } } /** @hide */ public boolean definesOverlayable() throws IOException { synchronized (this) { return nativeDefinesOverlayable(mNativePtr); } } /** * Returns false if the underlying APK was changed since this ApkAssets was loaded. Loading @@ -412,12 +413,12 @@ public final class ApkAssets { */ public void close() { synchronized (this) { if (mOpen) { mOpen = false; if (mNativePtr != 0) { if (mStringBlock != null) { mStringBlock.close(); } nativeDestroy(mNativePtr); mNativePtr = 0; } } } Loading Loading
core/java/android/content/res/ApkAssets.java +10 −9 Original line number Diff line number Diff line Loading @@ -101,14 +101,11 @@ public final class ApkAssets { public @interface FormatType {} @GuardedBy("this") private final long mNativePtr; private long mNativePtr; // final, except cleared in finalizer. @Nullable @GuardedBy("this") private final StringBlock mStringBlock; @GuardedBy("this") private boolean mOpen = true; private final StringBlock mStringBlock; // null or closed if mNativePtr = 0. @PropertyFlags private final int mFlags; Loading Loading @@ -380,13 +377,17 @@ public final class ApkAssets { /** @hide */ @Nullable public OverlayableInfo getOverlayableInfo(String overlayableName) throws IOException { synchronized (this) { return nativeGetOverlayableInfo(mNativePtr, overlayableName); } } /** @hide */ public boolean definesOverlayable() throws IOException { synchronized (this) { return nativeDefinesOverlayable(mNativePtr); } } /** * Returns false if the underlying APK was changed since this ApkAssets was loaded. Loading @@ -412,12 +413,12 @@ public final class ApkAssets { */ public void close() { synchronized (this) { if (mOpen) { mOpen = false; if (mNativePtr != 0) { if (mStringBlock != null) { mStringBlock.close(); } nativeDestroy(mNativePtr); mNativePtr = 0; } } } Loading