Code cleanup in Installer

This commit is contained in:
Dominik Schürmann 2016-05-01 23:14:29 +02:00
parent 17f712870b
commit 834c08db3c

View File

@ -162,10 +162,7 @@ public abstract class Installer {
return false; return false;
} }
Hasher hasher = new Hasher(hashType, apkFile); Hasher hasher = new Hasher(hashType, apkFile);
if (hasher != null && hasher.match(hash)) { return hasher.match(hash);
return true;
}
return false;
} }
/** /**
@ -173,7 +170,7 @@ public abstract class Installer {
*/ */
public void installPackage(File apkFile, String packageName, String urlString) public void installPackage(File apkFile, String packageName, String urlString)
throws InstallFailedException { throws InstallFailedException {
SanitizedFile apkToInstall = null; SanitizedFile apkToInstall;
try { try {
Map<String, Object> attributes = AndroidXMLDecompress.getManifestHeaderAttributes(apkFile.getAbsolutePath()); Map<String, Object> attributes = AndroidXMLDecompress.getManifestHeaderAttributes(apkFile.getAbsolutePath());