OSDN Git Service

Be more accepting of dex2oat errors.
authorNarayan Kamath <narayan@google.com>
Thu, 7 May 2015 16:48:42 +0000 (17:48 +0100)
committerNarayan Kamath <narayan@google.com>
Thu, 7 May 2015 17:15:09 +0000 (18:15 +0100)
commit01dcb76fec4ee2ff3a3dc4516a37c144d771f18c
treefae8f6f311824809edbdb61a837b839baa579440
parentdbf62ace0dcb671f5eaa97c0dfa75e39bc9c88be
Be more accepting of dex2oat errors.

- Narrow down the scope of caught exceptions. StaleDexCacheError has been
  removed (nobody was throwing it) and we shouldn't be catching the
  general "Exception".
- Make try {} catch blocks for IOExceptions more fine-grained, only
  surrounding the code that throws them.

And finally, don't return DEX_OPT_FAILED if installd couldn't run
dex2oat successfully. We return DEX_OPT_SKIPPED instead.

bug: 20888973
Change-Id: I25701e16157f42981ca767e343545cfe1d9cfbb2
services/core/java/com/android/server/pm/PackageDexOptimizer.java