Send acra report about crash we are getting, but don't crash F-Droid

This commit is contained in:
Peter Serwylo 2017-04-26 19:39:11 +10:00
parent 7375e09d19
commit 06088e2b35

View File

@ -24,8 +24,8 @@ import android.content.Context;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.pm.Signature; import android.content.pm.Signature;
import android.util.Log;
import org.acra.ACRA;
import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.Utils;
import org.spongycastle.util.encoders.Hex; import org.spongycastle.util.encoders.Hex;
@ -53,8 +53,11 @@ class ApkSignatureVerifier {
public boolean hasFDroidSignature(File apkFile) { public boolean hasFDroidSignature(File apkFile) {
if (!apkFile.exists()) { if (!apkFile.exists()) {
Log.e(TAG, "Failed to verify that " + apkFile.getName() + " has F-Droid signature, " + ACRA.getErrorReporter().handleException(
"because " + apkFile.getAbsolutePath() + " does not exist."); new Exception("Failed to install Privileged Extension, because " + apkFile.getAbsolutePath() + " does not exist."),
false
);
return false; return false;
} }