mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Pebble: Allow installing apps compiled with SDK 2.x also on the balast platform (pebble time, pebble time steel)
This commit is contained in:
parent
854a7ee1ac
commit
4528aaf22f
@ -1,5 +1,8 @@
|
|||||||
###Changelog
|
###Changelog
|
||||||
|
|
||||||
|
####Next Version
|
||||||
|
* Pebble: Allow installing apps compiled with SDK 2.x also on the balast platform (Time, Time Steel)
|
||||||
|
|
||||||
####Version 0.6.9
|
####Version 0.6.9
|
||||||
* Pebble: Store app details in pbw-cache and display them in app manager on firmware 3.x
|
* Pebble: Store app details in pbw-cache and display them in app manager on firmware 3.x
|
||||||
* Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x
|
* Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x
|
||||||
|
@ -96,16 +96,21 @@ public class PBWReader {
|
|||||||
if (!uri.toString().endsWith(".pbz")) {
|
if (!uri.toString().endsWith(".pbz")) {
|
||||||
platformDir = platform + "/";
|
platformDir = platform + "/";
|
||||||
|
|
||||||
if (platform.equals("aplite")) {
|
/*
|
||||||
boolean hasApliteDir = false;
|
* for aplite and basalt it is possible to install 2.x apps which have no subfolder
|
||||||
|
* we still prefer the subfolders if present.
|
||||||
|
* chalk needs to be its subfolder
|
||||||
|
*/
|
||||||
|
if (platform.equals("aplite") || platform.equals("basalt")) {
|
||||||
|
boolean hasPlatformDir = false;
|
||||||
InputStream afin = new BufferedInputStream(cr.openInputStream(uri));
|
InputStream afin = new BufferedInputStream(cr.openInputStream(uri));
|
||||||
|
|
||||||
ZipInputStream zis = new ZipInputStream(afin);
|
ZipInputStream zis = new ZipInputStream(afin);
|
||||||
ZipEntry ze;
|
ZipEntry ze;
|
||||||
try {
|
try {
|
||||||
while ((ze = zis.getNextEntry()) != null) {
|
while ((ze = zis.getNextEntry()) != null) {
|
||||||
if (ze.getName().startsWith("aplite/")) {
|
if (ze.getName().startsWith(platformDir)) {
|
||||||
hasApliteDir = true;
|
hasPlatformDir = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,7 +119,7 @@ public class PBWReader {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasApliteDir) {
|
if (!hasPlatformDir) {
|
||||||
platformDir = "";
|
platformDir = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user