now handling empty repo fingerprint during check
- also support icondownloading over bluetooth - also check for null repoUrl variable
This commit is contained in:
parent
c831cf77cc
commit
0a96d17dd1
@ -278,7 +278,7 @@ public class RepoUpdater {
|
|||||||
* actually in the index.jar itself. If no fingerprint, just store the
|
* actually in the index.jar itself. If no fingerprint, just store the
|
||||||
* signing certificate */
|
* signing certificate */
|
||||||
boolean trustNewSigningCertificate = false;
|
boolean trustNewSigningCertificate = false;
|
||||||
if (repo.fingerprint == null) {
|
if (repo.fingerprint == null || repo.fingerprint.length() == 0) {
|
||||||
// no info to check things are valid, so just Trust On First Use
|
// no info to check things are valid, so just Trust On First Use
|
||||||
trustNewSigningCertificate = true;
|
trustNewSigningCertificate = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -19,13 +19,25 @@ public class IconDownloader extends BaseImageDownloader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getStream(String imageUri, Object extra) throws IOException {
|
public InputStream getStream(String imageUri, Object extra) throws IOException {
|
||||||
switch (Scheme.ofUri(imageUri)) {
|
|
||||||
case HTTP:
|
Scheme scheme = Scheme.ofUri(imageUri);
|
||||||
case HTTPS:
|
|
||||||
|
switch (scheme) {
|
||||||
|
case HTTP:
|
||||||
|
case HTTPS:
|
||||||
|
Downloader downloader = DownloaderFactory.create(context, imageUri);
|
||||||
|
return downloader.getInputStream();
|
||||||
|
}
|
||||||
|
|
||||||
|
//bluetooth isn't a scheme in the Scheme. library, so we can add a check here
|
||||||
|
if (imageUri.toLowerCase().startsWith("bluetooth"))
|
||||||
|
{
|
||||||
Downloader downloader = DownloaderFactory.create(context, imageUri);
|
Downloader downloader = DownloaderFactory.create(context, imageUri);
|
||||||
return downloader.getInputStream();
|
return downloader.getInputStream();
|
||||||
default:
|
|
||||||
return super.getStream(imageUri, extra);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return super.getStream(imageUri, extra);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,8 @@ public class SwapAppsView extends ListView implements
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
Apk apk = getApkToInstall();
|
Apk apk = getApkToInstall();
|
||||||
String broadcastUrl = intent.getStringExtra(Downloader.EXTRA_ADDRESS);
|
String broadcastUrl = intent.getStringExtra(Downloader.EXTRA_ADDRESS);
|
||||||
if (!TextUtils.equals(Utils.getApkUrl(apk.repoAddress, apk), broadcastUrl)) {
|
|
||||||
|
if (apk.repoAddress != null && (!TextUtils.equals(Utils.getApkUrl(apk.repoAddress, apk), broadcastUrl))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user