diff options
| author | 2018-04-23 17:24:58 -0700 | |
|---|---|---|
| committer | 2018-04-23 17:24:58 -0700 | |
| commit | 09a80d1797b48946a9c7c0c4fc92896e7da2a417 (patch) | |
| tree | 2f10b96c67b32daa2cc0550609d33d7e1e99e875 | |
| parent | 5629dc784958b8f5fe14c361961f6700b8f62627 (diff) | |
| parent | 5faf7291f0f3b77b08cda580e86e302c68172861 (diff) | |
Merge "PackageManager: Skip dexopt on install for debuggable apps"
am: 5faf7291f0
Change-Id: I5cd62f4ac85dc16c1ff00233096b3b6ec60a3db2
| -rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index a54cf1a39f97..86fc0cf82507 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -18873,6 +18873,7 @@ public class PackageManagerService extends IPackageManager.Stub // 1) it is not forward locked. // 2) it is not on on an external ASEC container. // 3) it is not an instant app or if it is then dexopt is enabled via gservices. + // 4) it is not debuggable. // // Note that we do not dexopt instant apps by default. dexopt can take some time to // complete, so we skip this step during installation. Instead, we'll take extra time @@ -18884,7 +18885,8 @@ public class PackageManagerService extends IPackageManager.Stub && !forwardLocked && !pkg.applicationInfo.isExternalAsec() && (!instantApp || Global.getInt(mContext.getContentResolver(), - Global.INSTANT_APP_DEXOPT_ENABLED, 0) != 0); + Global.INSTANT_APP_DEXOPT_ENABLED, 0) != 0) + && ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0); if (performDexopt) { Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt"); |