Loading core/java/android/app/ResourcesManager.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -224,7 +224,7 @@ public class ResourcesManager { * @return a new AssetManager. * @return a new AssetManager. */ */ @VisibleForTesting @VisibleForTesting protected AssetManager createAssetManager(@NonNull final ResourcesKey key) { protected @NonNull AssetManager createAssetManager(@NonNull final ResourcesKey key) { AssetManager assets = new AssetManager(); AssetManager assets = new AssetManager(); // resDir can be null if the 'android' package is creating a new Resources object. // resDir can be null if the 'android' package is creating a new Resources object. Loading @@ -232,14 +232,15 @@ public class ResourcesManager { // already. // already. if (key.mResDir != null) { if (key.mResDir != null) { if (assets.addAssetPath(key.mResDir) == 0) { if (assets.addAssetPath(key.mResDir) == 0) { return null; throw new IllegalArgumentException("failed to add asset path " + key.mResDir); } } } } if (key.mSplitResDirs != null) { if (key.mSplitResDirs != null) { for (final String splitResDir : key.mSplitResDirs) { for (final String splitResDir : key.mSplitResDirs) { if (assets.addAssetPath(splitResDir) == 0) { if (assets.addAssetPath(splitResDir) == 0) { return null; throw new IllegalArgumentException( "failed to add split asset path " + splitResDir); } } } } } } Loading Loading
core/java/android/app/ResourcesManager.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -224,7 +224,7 @@ public class ResourcesManager { * @return a new AssetManager. * @return a new AssetManager. */ */ @VisibleForTesting @VisibleForTesting protected AssetManager createAssetManager(@NonNull final ResourcesKey key) { protected @NonNull AssetManager createAssetManager(@NonNull final ResourcesKey key) { AssetManager assets = new AssetManager(); AssetManager assets = new AssetManager(); // resDir can be null if the 'android' package is creating a new Resources object. // resDir can be null if the 'android' package is creating a new Resources object. Loading @@ -232,14 +232,15 @@ public class ResourcesManager { // already. // already. if (key.mResDir != null) { if (key.mResDir != null) { if (assets.addAssetPath(key.mResDir) == 0) { if (assets.addAssetPath(key.mResDir) == 0) { return null; throw new IllegalArgumentException("failed to add asset path " + key.mResDir); } } } } if (key.mSplitResDirs != null) { if (key.mSplitResDirs != null) { for (final String splitResDir : key.mSplitResDirs) { for (final String splitResDir : key.mSplitResDirs) { if (assets.addAssetPath(splitResDir) == 0) { if (assets.addAssetPath(splitResDir) == 0) { return null; throw new IllegalArgumentException( "failed to add split asset path " + splitResDir); } } } } } } Loading