diff options
| author | 2018-12-14 14:41:57 +0000 | |
|---|---|---|
| committer | 2018-12-14 14:41:57 +0000 | |
| commit | bb28a036c3cd0ef6433efb16ed99ae703bcfe4a7 (patch) | |
| tree | 38d8f0e85ece1c1fee76582d0a4c7c05a2ab2316 | |
| parent | bebe37237238e89cef3111a4d61bca3c7c2a355c (diff) | |
| parent | f361123c871ea984023032b725f7f80c9e13f8a3 (diff) | |
Merge "Continue process boot even if 'idmap2 --scan' fails"
| -rw-r--r-- | core/java/android/content/res/AssetManager.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java index 740cdae0dd5b..f1a4db25cd14 100644 --- a/core/java/android/content/res/AssetManager.java +++ b/core/java/android/content/res/AssetManager.java @@ -203,11 +203,13 @@ public final class AssetManager implements AutoCloseable { if (FEATURE_FLAG_IDMAP2) { final String[] systemIdmapPaths = nativeCreateIdmapsForStaticOverlaysTargetingAndroid(); - if (systemIdmapPaths == null) { - throw new IOException("idmap2 scan failed"); - } - for (String idmapPath : systemIdmapPaths) { - apkAssets.add(ApkAssets.loadOverlayFromPath(idmapPath, true /*system*/)); + if (systemIdmapPaths != null) { + for (String idmapPath : systemIdmapPaths) { + apkAssets.add(ApkAssets.loadOverlayFromPath(idmapPath, true /*system*/)); + } + } else { + Log.w(TAG, "'idmap2 --scan' failed: no static=\"true\" overlays targeting " + + "\"android\" will be loaded"); } } else { nativeVerifySystemIdmaps(); |