mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
add icon for activity tracker type apps. Thanks xphnx!
This commit is contained in:
@@ -42,6 +42,9 @@ public class GBDeviceAppAdapter extends ArrayAdapter<GBDeviceApp> {
|
||||
deviceStatusLabel.setText(deviceApp.getVersion() + " by " + deviceApp.getCreator());
|
||||
deviceNameLabel.setText(deviceApp.getName());
|
||||
switch (deviceApp.getType()) {
|
||||
case APP_ACTIVITYTRACKER:
|
||||
deviceImageView.setImageResource(R.drawable.ic_activitytracker);
|
||||
break;
|
||||
case WATCHFACE:
|
||||
deviceImageView.setImageResource(R.drawable.ic_watchface);
|
||||
break;
|
||||
|
||||
@@ -437,13 +437,12 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
int flags = buf.getInt();
|
||||
|
||||
GBDeviceApp.Type appType;
|
||||
switch (flags) {
|
||||
case 1:
|
||||
appType = GBDeviceApp.Type.WATCHFACE;
|
||||
break;
|
||||
default:
|
||||
appType = GBDeviceApp.Type.APP_GENERIC;
|
||||
break;
|
||||
if ((flags & 16) == 16) { // FIXME: verify this assumption
|
||||
appType = GBDeviceApp.Type.APP_ACTIVITYTRACKER;
|
||||
} else if ((flags & 1) == 1) { // FIXME: verify this assumption
|
||||
appType = GBDeviceApp.Type.WATCHFACE;
|
||||
} else {
|
||||
appType = GBDeviceApp.Type.APP_GENERIC;
|
||||
}
|
||||
Short appVersion = buf.getShort();
|
||||
appInfoCmd.apps[i] = new GBDeviceApp(id, index, new String(appName).trim(), new String(appCreator).trim(), appVersion.toString(), appType);
|
||||
|
||||
Reference in New Issue
Block a user