Merge "Do not deference before null check" into gingerbread
This commit is contained in:
@@ -587,7 +587,7 @@ public class PackageParser {
|
|||||||
* location from the apk location at the given file path.
|
* location from the apk location at the given file path.
|
||||||
* @param packageFilePath file location of the apk
|
* @param packageFilePath file location of the apk
|
||||||
* @param flags Special parse flags
|
* @param flags Special parse flags
|
||||||
* @return PackageLite object with package information.
|
* @return PackageLite object with package information or null on failure.
|
||||||
*/
|
*/
|
||||||
public static PackageLite parsePackageLite(String packageFilePath, int flags) {
|
public static PackageLite parsePackageLite(String packageFilePath, int flags) {
|
||||||
XmlResourceParser parser = null;
|
XmlResourceParser parser = null;
|
||||||
|
|||||||
@@ -125,8 +125,6 @@ public class DefaultContainerService extends IntentService {
|
|||||||
metrics.setToDefaults();
|
metrics.setToDefaults();
|
||||||
PackageParser.PackageLite pkg = packageParser.parsePackageLite(
|
PackageParser.PackageLite pkg = packageParser.parsePackageLite(
|
||||||
archiveFilePath, 0);
|
archiveFilePath, 0);
|
||||||
ret.packageName = pkg.packageName;
|
|
||||||
ret.installLocation = pkg.installLocation;
|
|
||||||
// Nuke the parser reference right away and force a gc
|
// Nuke the parser reference right away and force a gc
|
||||||
packageParser = null;
|
packageParser = null;
|
||||||
Runtime.getRuntime().gc();
|
Runtime.getRuntime().gc();
|
||||||
@@ -136,6 +134,7 @@ public class DefaultContainerService extends IntentService {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ret.packageName = pkg.packageName;
|
ret.packageName = pkg.packageName;
|
||||||
|
ret.installLocation = pkg.installLocation;
|
||||||
ret.recommendedInstallLocation = recommendAppInstallLocation(pkg.installLocation, archiveFilePath, flags);
|
ret.recommendedInstallLocation = recommendAppInstallLocation(pkg.installLocation, archiveFilePath, flags);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user