diff options
author | Evisceration <eviscerationls@gmail.com> | 2014-12-26 15:03:08 +0100 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-26 16:09:12 -0700 |
commit | 8ec350e227e95ae11c0f3d11c994395313cf35e6 (patch) | |
tree | 3a9040e6de2a7b3697cfacdfc7e07369130e544a | |
parent | 184b72bd80ef73b230cd6626a7a7d94d6fdbe743 (diff) | |
download | frameworks_base-8ec350e227e95ae11c0f3d11c994395313cf35e6.zip frameworks_base-8ec350e227e95ae11c0f3d11c994395313cf35e6.tar.gz frameworks_base-8ec350e227e95ae11c0f3d11c994395313cf35e6.tar.bz2 |
services: AssetAtlasService: prevent IndexOutOfBoundsException
Change-Id: Ie48435bf41c6c9738a4f87045d018c03fc612c35
-rw-r--r-- | services/core/java/com/android/server/AssetAtlasService.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/AssetAtlasService.java b/services/core/java/com/android/server/AssetAtlasService.java index 4569dae..ff4456e 100644 --- a/services/core/java/com/android/server/AssetAtlasService.java +++ b/services/core/java/com/android/server/AssetAtlasService.java @@ -391,6 +391,11 @@ public class AssetAtlasService extends IAssetAtlas.Stub { } } + if (results.size() == 0) { + if (DEBUG_ATLAS) Log.w(LOG_TAG, "No atlas configuration found!"); + return null; + } + // Maximize the number of packed bitmaps, minimize the texture size Collections.sort(results, new Comparator<WorkerResult>() { @Override |