add icon for activity tracker type apps. Thanks xphnx!

live-sensor-data
Andreas Shimokawa 2015-04-10 22:26:52 +02:00
parent 521dad8c14
commit 4a697edced
3 changed files with 10 additions and 7 deletions

View File

@ -3,6 +3,7 @@ The following artwork is licensed under the following licenses
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0): Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0):
ic_device_pebble.png (pebble.svg from https://gitlab.com/xphnx/twelf_cm12_theme/issues/13) ic_device_pebble.png (pebble.svg from https://gitlab.com/xphnx/twelf_cm12_theme/issues/13)
ic_device_miband.png (miband.svg from https://gitlab.com/xphnx/twelf_cm12_theme/issues/13) ic_device_miband.png (miband.svg from https://gitlab.com/xphnx/twelf_cm12_theme/issues/13)
ic_activitytracker.png (androidrun.png from https://gitlab.com/xphnx/twelf_cm12_theme/)
ic_watchface.png (clock.png from https://gitlab.com/xphnx/twelf_cm12_theme/) ic_watchface.png (clock.png from https://gitlab.com/xphnx/twelf_cm12_theme/)
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0): Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0):

View File

@ -42,6 +42,9 @@ public class GBDeviceAppAdapter extends ArrayAdapter<GBDeviceApp> {
deviceStatusLabel.setText(deviceApp.getVersion() + " by " + deviceApp.getCreator()); deviceStatusLabel.setText(deviceApp.getVersion() + " by " + deviceApp.getCreator());
deviceNameLabel.setText(deviceApp.getName()); deviceNameLabel.setText(deviceApp.getName());
switch (deviceApp.getType()) { switch (deviceApp.getType()) {
case APP_ACTIVITYTRACKER:
deviceImageView.setImageResource(R.drawable.ic_activitytracker);
break;
case WATCHFACE: case WATCHFACE:
deviceImageView.setImageResource(R.drawable.ic_watchface); deviceImageView.setImageResource(R.drawable.ic_watchface);
break; break;

View File

@ -437,13 +437,12 @@ public class PebbleProtocol extends GBDeviceProtocol {
int flags = buf.getInt(); int flags = buf.getInt();
GBDeviceApp.Type appType; GBDeviceApp.Type appType;
switch (flags) { if ((flags & 16) == 16) { // FIXME: verify this assumption
case 1: appType = GBDeviceApp.Type.APP_ACTIVITYTRACKER;
appType = GBDeviceApp.Type.WATCHFACE; } else if ((flags & 1) == 1) { // FIXME: verify this assumption
break; appType = GBDeviceApp.Type.WATCHFACE;
default: } else {
appType = GBDeviceApp.Type.APP_GENERIC; appType = GBDeviceApp.Type.APP_GENERIC;
break;
} }
Short appVersion = buf.getShort(); Short appVersion = buf.getShort();
appInfoCmd.apps[i] = new GBDeviceApp(id, index, new String(appName).trim(), new String(appCreator).trim(), appVersion.toString(), appType); appInfoCmd.apps[i] = new GBDeviceApp(id, index, new String(appName).trim(), new String(appCreator).trim(), appVersion.toString(), appType);