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
|
||||
* signing certificate */
|
||||
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
|
||||
trustNewSigningCertificate = true;
|
||||
} else {
|
||||
|
@ -19,13 +19,25 @@ public class IconDownloader extends BaseImageDownloader {
|
||||
|
||||
@Override
|
||||
public InputStream getStream(String imageUri, Object extra) throws IOException {
|
||||
switch (Scheme.ofUri(imageUri)) {
|
||||
case HTTP:
|
||||
case HTTPS:
|
||||
|
||||
Scheme scheme = Scheme.ofUri(imageUri);
|
||||
|
||||
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);
|
||||
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) {
|
||||
Apk apk = getApkToInstall();
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user