- String name = file.getName();
- for (int i = 0; i < pair_programmed.length; i++) {
- if (name.startsWith(pair_programmed[i]))
+
+ if (file != null) {
+ String name = file.getName();
+ for (int i = 0; i < pair_programmed.length; i++) {
+ if (name.startsWith(pair_programmed[i]))
+ return true;
+ }
+ }
+ if (device != null) {
+ if (!device.matchProduct(AltosLib.product_altusmetrum) &&
+ (device.matchProduct(AltosLib.product_teledongle) ||
+ device.matchProduct(AltosLib.product_telebt)))