diff options
author | Kenny Root <kroot@google.com> | 2010-07-30 16:52:29 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2010-08-02 07:52:56 -0700 |
commit | 930d3af75f9e9663222f4c4a1d75b326cf811e35 (patch) | |
tree | 30950867a1eec93131934190d0faae893cacd4e3 /packages/DefaultContainerService/src | |
parent | 7c600369c9695de73ca37db552eb81b8b89d5e76 (diff) | |
download | frameworks_base-930d3af75f9e9663222f4c4a1d75b326cf811e35.zip frameworks_base-930d3af75f9e9663222f4c4a1d75b326cf811e35.tar.gz frameworks_base-930d3af75f9e9663222f4c4a1d75b326cf811e35.tar.bz2 |
Do not deference before null check
The return of parsePackageLite wasn't checked until after it was
deferenced. Move the deference below the null check and remove redundant
set.
Bug: 2852726
Change-Id: I3eaaea5050948145eed44b64507dc846993d98eb
Diffstat (limited to 'packages/DefaultContainerService/src')
-rw-r--r-- | packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java index 6eaf0cc..f1c6532 100644 --- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java +++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java @@ -125,8 +125,6 @@ public class DefaultContainerService extends IntentService { metrics.setToDefaults(); PackageParser.PackageLite pkg = packageParser.parsePackageLite( archiveFilePath, 0); - ret.packageName = pkg.packageName; - ret.installLocation = pkg.installLocation; // Nuke the parser reference right away and force a gc packageParser = null; Runtime.getRuntime().gc(); @@ -136,6 +134,7 @@ public class DefaultContainerService extends IntentService { return ret; } ret.packageName = pkg.packageName; + ret.installLocation = pkg.installLocation; ret.recommendedInstallLocation = recommendAppInstallLocation(pkg.installLocation, archiveFilePath, flags); return ret; } |