Loading core/java/android/content/res/AssetManager.java +29 −23 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ public final class AssetManager implements AutoCloseable { */ final boolean getResourceValue(@AnyRes int resId, int densityDpi, @NonNull TypedValue outValue, boolean resolveRefs) { synchronized (this) { final int block = loadResourceValue(resId, (short) densityDpi, outValue, resolveRefs); if (block < 0) { return false; Loading @@ -236,6 +237,7 @@ public final class AssetManager implements AutoCloseable { } return true; } } /** * Retrieve the text array associated with a particular resource Loading @@ -244,6 +246,7 @@ public final class AssetManager implements AutoCloseable { * @param resId the resource id of the string array */ final CharSequence[] getResourceTextArray(@ArrayRes int resId) { synchronized (this) { final int[] rawInfoArray = getArrayStringInfo(resId); final int rawInfoArrayLen = rawInfoArray.length; final int infoArrayLen = rawInfoArrayLen / 2; Loading @@ -257,6 +260,7 @@ public final class AssetManager implements AutoCloseable { } return retArray; } } /** * Populates {@code outValue} with the data associated with a particular Loading Loading @@ -320,9 +324,11 @@ public final class AssetManager implements AutoCloseable { } /*package*/ final CharSequence getPooledStringForCookie(int cookie, int id) { synchronized (this) { // Cookies map to string blocks starting at 1. return mStringBlocks[cookie - 1].get(id); } } /** * Open an asset using ACCESS_STREAMING mode. This provides access to Loading Loading
core/java/android/content/res/AssetManager.java +29 −23 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ public final class AssetManager implements AutoCloseable { */ final boolean getResourceValue(@AnyRes int resId, int densityDpi, @NonNull TypedValue outValue, boolean resolveRefs) { synchronized (this) { final int block = loadResourceValue(resId, (short) densityDpi, outValue, resolveRefs); if (block < 0) { return false; Loading @@ -236,6 +237,7 @@ public final class AssetManager implements AutoCloseable { } return true; } } /** * Retrieve the text array associated with a particular resource Loading @@ -244,6 +246,7 @@ public final class AssetManager implements AutoCloseable { * @param resId the resource id of the string array */ final CharSequence[] getResourceTextArray(@ArrayRes int resId) { synchronized (this) { final int[] rawInfoArray = getArrayStringInfo(resId); final int rawInfoArrayLen = rawInfoArray.length; final int infoArrayLen = rawInfoArrayLen / 2; Loading @@ -257,6 +260,7 @@ public final class AssetManager implements AutoCloseable { } return retArray; } } /** * Populates {@code outValue} with the data associated with a particular Loading Loading @@ -320,9 +324,11 @@ public final class AssetManager implements AutoCloseable { } /*package*/ final CharSequence getPooledStringForCookie(int cookie, int id) { synchronized (this) { // Cookies map to string blocks starting at 1. return mStringBlocks[cookie - 1].get(id); } } /** * Open an asset using ACCESS_STREAMING mode. This provides access to Loading