diff options
author | Todd Kennedy <toddke@google.com> | 2015-07-16 16:39:46 -0700 |
---|---|---|
committer | Todd Kennedy <toddke@google.com> | 2015-07-16 16:39:46 -0700 |
commit | 2a89545739b4efef4bd6535206ad0f5a813df39f (patch) | |
tree | 0d073faadc5df72fa21bc05c91aa2ece4cdf9a9e /services | |
parent | 6a4014104e85bf4154b353cd0be337f7967cdaeb (diff) | |
download | frameworks_base-2a89545739b4efef4bd6535206ad0f5a813df39f.zip frameworks_base-2a89545739b4efef4bd6535206ad0f5a813df39f.tar.gz frameworks_base-2a89545739b4efef4bd6535206ad0f5a813df39f.tar.bz2 |
clear calling identity to dexopt
Bug: 22067670
Change-Id: I3596f26a079660f6898401ed679463193b00c799
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 4b2c1ff..556146a 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -6159,12 +6159,16 @@ public class PackageManagerService extends IPackageManager.Stub { return false; } } - - synchronized (mInstallLock) { - final String[] instructionSets = new String[] { targetInstructionSet }; - int result = mPackageDexOptimizer.performDexOpt(p, instructionSets, - false /* forceDex */, false /* defer */, true /* inclDependencies */); - return result == PackageDexOptimizer.DEX_OPT_PERFORMED; + long callingId = Binder.clearCallingIdentity(); + try { + synchronized (mInstallLock) { + final String[] instructionSets = new String[] { targetInstructionSet }; + int result = mPackageDexOptimizer.performDexOpt(p, instructionSets, + false /* forceDex */, false /* defer */, true /* inclDependencies */); + return result == PackageDexOptimizer.DEX_OPT_PERFORMED; + } + } finally { + Binder.restoreCallingIdentity(callingId); } } |