diff options
| author | yingying <yingying@codeaurora.org> | 2014-09-04 10:36:54 +0800 |
|---|---|---|
| committer | Shaoxu Liu <shaoxu@codeaurora.org> | 2015-10-23 17:33:59 +0800 |
| commit | f1642d87c5cc6783f5ef16e3cbadbd098f086111 (patch) | |
| tree | fa7a57c0891ef35e19eed6ec40bed775adc44c40 /core | |
| parent | caaba96fcb34849406e362759931ffa4340a89c5 (diff) | |
| download | frameworks_base-f1642d87c5cc6783f5ef16e3cbadbd098f086111.zip frameworks_base-f1642d87c5cc6783f5ef16e3cbadbd098f086111.tar.gz frameworks_base-f1642d87c5cc6783f5ef16e3cbadbd098f086111.tar.bz2 | |
base: Fix the problems for runtime overlay.
- There is no need to make the string blocking when adding the asset
path, as it will be made by the resources.
- After adding the overlay path, it also needs to update the string
blocks.
- Scan all the sub folders for framework overlay res.
Change-Id: Iaad019111ae364c319e58dce57dbf4647b38d4c3
CRs-Fixed: 763809
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/content/res/AssetManager.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java index 8d96f5c..17b662a 100644 --- a/core/java/android/content/res/AssetManager.java +++ b/core/java/android/content/res/AssetManager.java @@ -612,7 +612,9 @@ public final class AssetManager implements AutoCloseable { public final int addAssetPath(String path) { synchronized (this) { int res = addAssetPathNative(path); - makeStringBlocks(mStringBlocks); + if (mStringBlocks != null) { + makeStringBlocks(mStringBlocks); + } return res; } } @@ -627,11 +629,12 @@ public final class AssetManager implements AutoCloseable { * * {@hide} */ - public final int addOverlayPath(String idmapPath) { synchronized (this) { int res = addOverlayPathNative(idmapPath); - makeStringBlocks(mStringBlocks); + if (mStringBlocks != null) { + makeStringBlocks(mStringBlocks); + } return res; } } |
