1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 13:26:50 +01:00

App Manager: Only set up to date apps on FOSSILQHYBRID

This commit is contained in:
José Rebelo 2023-06-10 15:29:48 +01:00 committed by José Rebelo
parent 6dcd055d0d
commit c1339aa5c6

View File

@ -143,17 +143,20 @@ public abstract class AbstractAppManagerFragment extends Fragment {
GBDeviceApp app = new GBDeviceApp(uuid, appName, appCreator, appVersion, appType, previewImage); GBDeviceApp app = new GBDeviceApp(uuid, appName, appCreator, appVersion, appType, previewImage);
app.setOnDevice(true); app.setOnDevice(true);
if ((mGBDevice.getType() == DeviceType.FOSSILQHYBRID) && (app.getType() == GBDeviceApp.Type.WATCHFACE) && (!QHybridConstants.HYBRIDHR_WATCHFACE_VERSION.equals(appVersion))) { if (mGBDevice.getType() == DeviceType.FOSSILQHYBRID) {
app.setUpToDate(false); if ((app.getType() == GBDeviceApp.Type.WATCHFACE) && (!QHybridConstants.HYBRIDHR_WATCHFACE_VERSION.equals(appVersion))) {
}
try {
if ((app.getType() == GBDeviceApp.Type.APP_GENERIC) && ((new Version(app.getVersion())).smallerThan(new Version(QHybridConstants.KNOWN_WAPP_VERSIONS.get(app.getName()))))) {
app.setUpToDate(false); app.setUpToDate(false);
} }
} catch (IllegalArgumentException e) { try {
LOG.warn("App JSON: " + app.getJSON().toString()); if ((app.getType() == GBDeviceApp.Type.APP_GENERIC) && ((new Version(app.getVersion())).smallerThan(new Version(QHybridConstants.KNOWN_WAPP_VERSIONS.get(app.getName()))))) {
LOG.warn("Couldn't read app version", e); app.setUpToDate(false);
}
} catch (IllegalArgumentException e) {
LOG.warn("App JSON: " + app.getJSON().toString());
LOG.warn("Couldn't read app version", e);
}
} }
if (filterApp(app)) { if (filterApp(app)) {
appList.add(app); appList.add(app);
} }