Pebble: Show correct icon for activity tracker and watchfaces in app installer (language and fw icons still missing)

master
Andreas Shimokawa 2015-12-08 18:32:17 +01:00
parent 18726eca33
commit f59382e3c8
2 changed files with 14 additions and 0 deletions

View File

@ -5,6 +5,7 @@
* Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x
* Pebble: Support installing .pbl (language files) on firmware 3.x
* Pebble: Correct setting the timezone on firmware 3.x (pebble expects the "ID" eg. Europe/Berlin)
* Pebble: Show correct icon for activity tracker and watchfaces in app installer (language and fw icons still missing)
####Version 0.6.8
* Mi Band support for Firmware upgrade/downgrade on Mi Band 1A (white LEDs, no heartrate sensor)

View File

@ -95,6 +95,19 @@ public class PBWInstallHandler implements InstallHandler {
if (app != null) {
installItem.setName(app.getName());
installItem.setDetails(mContext.getString(R.string.pbwinstallhandler_app_item, app.getCreator(), app.getVersion()));
int drawable;
switch (app.getType()) {
case WATCHFACE:
drawable = R.drawable.ic_watchface;
break;
case APP_ACTIVITYTRACKER:
drawable = R.drawable.ic_activitytracker;
break;
default:
drawable = R.drawable.ic_device_pebble;
}
installItem.setIcon(drawable);
installActivity.setInfoText(mContext.getString(R.string.app_install_info, app.getName(), app.getVersion(), app.getCreator()));
installActivity.setInstallEnabled(true);
} else {