Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d8)" into oc-dev

This commit is contained in:
TreeHugger Robot
2018-01-12 05:23:45 +00:00
committed by Android (Google) Code Review

View File

@@ -763,7 +763,7 @@ public class ResourcesImpl {
dr = Drawable.createFromResourceStream(wrapper, value, is, file, null);
is.close();
}
} catch (Exception e) {
} catch (Exception | StackOverflowError e) {
Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
final NotFoundException rnf = new NotFoundException(
"File " + file + " from drawable resource ID #0x" + Integer.toHexString(id));