Merge branch 'bugfix-for-699' into 'master'
final fixes for 0.101 I think we can release 0.101 after this bug fix for #699 and support update. What do you think @mvdan @pserwylo @dschuermann ? See merge request !385
This commit is contained in:
commit
1599b3c1ae
@ -18,9 +18,9 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.android.support:support-v4:24.1.1'
|
compile 'com.android.support:support-v4:24.2.0'
|
||||||
compile 'com.android.support:appcompat-v7:24.1.1'
|
compile 'com.android.support:appcompat-v7:24.2.0'
|
||||||
compile 'com.android.support:support-annotations:24.1.1'
|
compile 'com.android.support:support-annotations:24.2.0'
|
||||||
|
|
||||||
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
||||||
compile 'com.google.zxing:core:3.2.1'
|
compile 'com.google.zxing:core:3.2.1'
|
||||||
@ -43,7 +43,7 @@ dependencies {
|
|||||||
|
|
||||||
testCompile "org.mockito:mockito-core:1.10.19"
|
testCompile "org.mockito:mockito-core:1.10.19"
|
||||||
|
|
||||||
androidTestCompile 'com.android.support:support-annotations:24.1.1'
|
androidTestCompile 'com.android.support:support-annotations:24.2.0'
|
||||||
androidTestCompile 'com.android.support.test:runner:0.5'
|
androidTestCompile 'com.android.support.test:runner:0.5'
|
||||||
androidTestCompile 'com.android.support.test:rules:0.5'
|
androidTestCompile 'com.android.support.test:rules:0.5'
|
||||||
}
|
}
|
||||||
@ -80,25 +80,33 @@ if (!hasProperty('sourceDeps')) {
|
|||||||
// Only do the libraries imported from maven repositories. Our own libraries
|
// Only do the libraries imported from maven repositories. Our own libraries
|
||||||
// (like privileged-api-lib) and the prebuilt jars already checked into the
|
// (like privileged-api-lib) and the prebuilt jars already checked into the
|
||||||
// source code don't need to be here.
|
// source code don't need to be here.
|
||||||
|
// generate using: `gradle -q calculateChecksums | sort -V`
|
||||||
dependencyVerification {
|
dependencyVerification {
|
||||||
verify = [
|
verify = [
|
||||||
'com.android.support:support-v4:246c99385a84fe179d7b833c9ddaf2576f217b0abba5e74b5353cc78756f5880',
|
'cc.mvdan.accesspoint:library:0837b38adb48b66bb1385adb6ade8ecce7002ad815c55abf13517c82193458ea',
|
||||||
'com.android.support:appcompat-v7:bf8db89d678286043778990fc967346e94321cc8d8bad99e9b0db20588509156',
|
'ch.acra:acra:98e71bd00a713b9f848abbae4874601533aaf8492bf9b508e14d07f844a53839',
|
||||||
'com.android.support:support-annotations:bac4e534657165b0c4c362c97db389dcb152e43273435d2ccaa939a82e03f42c',
|
'commons-io:commons-io:a10418348d234968600ccb1d988efcbbd08716e1d96936ccc1880e7d22513474',
|
||||||
'com.nostra13.universalimageloader:universal-image-loader:dbd5197ffec3a8317533190870a7c00ff3750dd6a31241448c6a5522d51b65b4',
|
'commons-net:commons-net:c25b0da668b3c5649f002d504def22d1b4cb30d206f05428d2fe168fa1a901c2',
|
||||||
'com.google.zxing:core:b4d82452e7a6bf6ec2698904b332431717ed8f9a850224f295aec89de80f2259',
|
'com.android.support:animated-vector-drawable:af39eb9a350084eae2a9e119db762633bbf1ad25eed5305dcc3af2411442ba68',
|
||||||
'eu.chainfire:libsuperuser:018344ff19ee94d252c14b4a503ee8b519184db473a5af83513f5837c413b128',
|
'com.android.support:appcompat-v7:29b1e21852ace88ad406bbe32d7791b518118f0a61a61453aca0affa8ef909e0',
|
||||||
'cc.mvdan.accesspoint:library:0837b38adb48b66bb1385adb6ade8ecce7002ad815c55abf13517c82193458ea',
|
'com.android.support:support-annotations:af5868da6750bdf42aec5d85fa87ac30de2b72939ca80437a6247e5753a07cad',
|
||||||
'commons-io:commons-io:a10418348d234968600ccb1d988efcbbd08716e1d96936ccc1880e7d22513474',
|
'com.android.support:support-compat:de70ac981118229b70ca29961b6df510d6f498c0ececd1e11e19a8073d1580c9',
|
||||||
'commons-net:commons-net:c25b0da668b3c5649f002d504def22d1b4cb30d206f05428d2fe168fa1a901c2',
|
'com.android.support:support-core-ui:6cd8723abdeafbd8d05816d7b4a307dd4dbebba9cb145f98e12834ab3ebd9212',
|
||||||
'info.guardianproject.netcipher:netcipher:611ec5bde9d799fd57e1efec5c375f9f460de2cdda98918541decc9a7d02f2ad',
|
'com.android.support:support-core-utils:20dd25988a360df5887e8ad5d9cf9b77b54fb014a17163f2125ecde8aa635846',
|
||||||
'org.openhab.jmdns:jmdns:7a4b34b5606bbd2aff7fdfe629edcb0416fccd367fb59a099f210b9aba4f0bce',
|
'com.android.support:support-fragment:50aa9d408d33b82acda71423ce2980e54186caaae50f689ecd90e6692dcc3ed4',
|
||||||
'com.madgag.spongycastle:pkix:6aba9b2210907a3d46dd3dcac782bb3424185290468d102d5207ebdc9796a905',
|
'com.android.support:support-media-compat:b6b4ed6dd8e0678bb5fd6457ea9155766cc12d5bc5df9c283c01e0dc782ffb19',
|
||||||
'com.madgag.spongycastle:prov:029f26cd6b67c06ffa05702d426d472c141789001bcb15b7262ed86c868e5643',
|
'com.android.support:support-v4:989888d1b48badd790b8386e9ab61ec793a453ce782faa11e89634d889db3a44',
|
||||||
'com.madgag.spongycastle:core:9b6b7ac856b91bcda2ede694eccd26cefb0bf0b09b89f13cda05b5da5ff68c6b',
|
'com.android.support:support-vector-drawable:049b53487c07d6270f4b85896c0871645cfb2c6300bbd83f7e5ebf91f069d6a4',
|
||||||
'ch.acra:acra:98e71bd00a713b9f848abbae4874601533aaf8492bf9b508e14d07f844a53839',
|
'com.google.zxing:core:b4d82452e7a6bf6ec2698904b332431717ed8f9a850224f295aec89de80f2259',
|
||||||
'io.reactivex:rxjava:2c162afd78eba217cdfee78b60e85d3bfb667db61e12bc95e3cf2ddc5beeadf6',
|
'com.madgag.spongycastle:core:9b6b7ac856b91bcda2ede694eccd26cefb0bf0b09b89f13cda05b5da5ff68c6b',
|
||||||
'io.reactivex:rxandroid:35c1a90f8c1f499db3c1f3d608e1f191ac8afddb10c02dd91ef04c03a0a4bcda',
|
'com.madgag.spongycastle:pkix:6aba9b2210907a3d46dd3dcac782bb3424185290468d102d5207ebdc9796a905',
|
||||||
|
'com.madgag.spongycastle:prov:029f26cd6b67c06ffa05702d426d472c141789001bcb15b7262ed86c868e5643',
|
||||||
|
'com.nostra13.universalimageloader:universal-image-loader:dbd5197ffec3a8317533190870a7c00ff3750dd6a31241448c6a5522d51b65b4',
|
||||||
|
'eu.chainfire:libsuperuser:018344ff19ee94d252c14b4a503ee8b519184db473a5af83513f5837c413b128',
|
||||||
|
'info.guardianproject.netcipher:netcipher:611ec5bde9d799fd57e1efec5c375f9f460de2cdda98918541decc9a7d02f2ad',
|
||||||
|
'io.reactivex:rxandroid:35c1a90f8c1f499db3c1f3d608e1f191ac8afddb10c02dd91ef04c03a0a4bcda',
|
||||||
|
'io.reactivex:rxjava:2c162afd78eba217cdfee78b60e85d3bfb667db61e12bc95e3cf2ddc5beeadf6',
|
||||||
|
'org.openhab.jmdns:jmdns:7a4b34b5606bbd2aff7fdfe629edcb0416fccd367fb59a099f210b9aba4f0bce',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,9 +160,12 @@ public class InstalledAppProviderService extends IntentService {
|
|||||||
if (ACTION_INSERT.equals(action)) {
|
if (ACTION_INSERT.equals(action)) {
|
||||||
PackageInfo packageInfo = getPackageInfo(intent, packageName);
|
PackageInfo packageInfo = getPackageInfo(intent, packageName);
|
||||||
if (packageInfo != null) {
|
if (packageInfo != null) {
|
||||||
String hashType = "sha256";
|
File apk = new File(packageInfo.applicationInfo.publicSourceDir);
|
||||||
String hash = Utils.getBinaryHash(new File(packageInfo.applicationInfo.publicSourceDir), hashType);
|
if (apk.exists() && apk.canRead()) {
|
||||||
insertAppIntoDb(this, packageInfo, hashType, hash);
|
String hashType = "sha256";
|
||||||
|
String hash = Utils.getBinaryHash(apk, hashType);
|
||||||
|
insertAppIntoDb(this, packageInfo, hashType, hash);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (ACTION_DELETE.equals(action)) {
|
} else if (ACTION_DELETE.equals(action)) {
|
||||||
deleteAppFromDb(this, packageName);
|
deleteAppFromDb(this, packageName);
|
||||||
|
@ -16,6 +16,7 @@ import android.support.v4.app.TaskStackBuilder;
|
|||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import org.acra.ACRA;
|
||||||
import org.fdroid.fdroid.AppDetails;
|
import org.fdroid.fdroid.AppDetails;
|
||||||
import org.fdroid.fdroid.R;
|
import org.fdroid.fdroid.R;
|
||||||
import org.fdroid.fdroid.Utils;
|
import org.fdroid.fdroid.Utils;
|
||||||
@ -140,6 +141,7 @@ public class InstallManagerService extends Service {
|
|||||||
|
|
||||||
if ((flags & START_FLAG_REDELIVERY) == START_FLAG_REDELIVERY
|
if ((flags & START_FLAG_REDELIVERY) == START_FLAG_REDELIVERY
|
||||||
&& !DownloaderService.isQueuedOrActive(urlString)) {
|
&& !DownloaderService.isQueuedOrActive(urlString)) {
|
||||||
|
// TODO is there a case where we should allow an active urlString to pass through?
|
||||||
Utils.debugLog(TAG, urlString + " finished downloading while InstallManagerService was killed.");
|
Utils.debugLog(TAG, urlString + " finished downloading while InstallManagerService was killed.");
|
||||||
cancelNotification(urlString);
|
cancelNotification(urlString);
|
||||||
return START_NOT_STICKY;
|
return START_NOT_STICKY;
|
||||||
@ -247,16 +249,22 @@ public class InstallManagerService extends Service {
|
|||||||
|
|
||||||
// show notification if app details is not visible
|
// show notification if app details is not visible
|
||||||
if (!TextUtils.isEmpty(errorMessage)) {
|
if (!TextUtils.isEmpty(errorMessage)) {
|
||||||
App app = getAppFromActive(downloadUrl);
|
try {
|
||||||
|
// temp setup to debug https://gitlab.com/fdroid/fdroidclient/issues/698
|
||||||
|
App app = getAppFromActive(downloadUrl);
|
||||||
|
|
||||||
// show notification if app details is not visible
|
// show notification if app details is not visible
|
||||||
if (AppDetails.isAppVisible(app.packageName)) {
|
if (AppDetails.isAppVisible(app.packageName)) {
|
||||||
cancelNotification(downloadUrl);
|
cancelNotification(downloadUrl);
|
||||||
} else {
|
} else {
|
||||||
String title = String.format(
|
String title = String.format(
|
||||||
getString(R.string.install_error_notify_title),
|
getString(R.string.install_error_notify_title),
|
||||||
app.name);
|
app.name);
|
||||||
notifyError(downloadUrl, title, errorMessage);
|
notifyError(downloadUrl, title, errorMessage);
|
||||||
|
}
|
||||||
|
} catch (NullPointerException e) { //NOPMD
|
||||||
|
ACRA.getErrorReporter().handleException(
|
||||||
|
new IllegalStateException(errorMessage, e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
removeFromActive(downloadUrl);
|
removeFromActive(downloadUrl);
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
package org.fdroid.fdroid.installer;
|
package org.fdroid.fdroid.installer;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import org.fdroid.fdroid.Preferences;
|
import org.fdroid.fdroid.Preferences;
|
||||||
import org.fdroid.fdroid.Utils;
|
import org.fdroid.fdroid.Utils;
|
||||||
@ -47,17 +46,11 @@ public class InstallerFactory {
|
|||||||
&& apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
|
&& apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
|
||||||
// special case for "F-Droid Privileged Extension"
|
// special case for "F-Droid Privileged Extension"
|
||||||
installer = new ExtensionInstaller(context);
|
installer = new ExtensionInstaller(context);
|
||||||
} else if (isPrivilegedInstallerEnabled()) {
|
} else if (isPrivilegedInstallerEnabled()
|
||||||
if (PrivilegedInstaller.isExtensionInstalledCorrectly(context)
|
&& PrivilegedInstaller.isExtensionInstalledCorrectly(context)
|
||||||
== PrivilegedInstaller.IS_EXTENSION_INSTALLED_YES) {
|
== PrivilegedInstaller.IS_EXTENSION_INSTALLED_YES) {
|
||||||
Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller");
|
Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller");
|
||||||
|
installer = new PrivilegedInstaller(context);
|
||||||
installer = new PrivilegedInstaller(context);
|
|
||||||
} else {
|
|
||||||
Log.e(TAG, "PrivilegedInstaller is enabled in prefs, but not working correctly!");
|
|
||||||
// fallback to default installer
|
|
||||||
installer = new DefaultInstaller(context);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
installer = new DefaultInstaller(context);
|
installer = new DefaultInstaller(context);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,6 @@ public class PrivilegedInstaller extends Installer {
|
|||||||
public static int isExtensionInstalledCorrectly(Context context) {
|
public static int isExtensionInstalledCorrectly(Context context) {
|
||||||
// check if installed
|
// check if installed
|
||||||
if (!isExtensionInstalled(context)) {
|
if (!isExtensionInstalled(context)) {
|
||||||
Log.e(TAG, "IS_EXTENSION_INSTALLED_NO");
|
|
||||||
return IS_EXTENSION_INSTALLED_NO;
|
return IS_EXTENSION_INSTALLED_NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user