projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a42713
)
altoslib: Protect has_monitor_battery from unset product
author
Keith Packard
<keithp@keithp.com>
Wed, 19 May 2021 17:52:47 +0000
(10:52 -0700)
committer
Keith Packard
<keithp@keithp.com>
Wed, 19 May 2021 17:53:45 +0000
(10:53 -0700)
AltosDroid can query has_monitor_battery before the product data has
been set.
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosConfigData.java
patch
|
blob
|
history
diff --git
a/altoslib/AltosConfigData.java
b/altoslib/AltosConfigData.java
index 7b78f760cbf43646fd5923f2fbce0aa7a695a0f6..b6105f92fc3cb27265e087fb530d84da2f2f79e8 100644
(file)
--- a/
altoslib/AltosConfigData.java
+++ b/
altoslib/AltosConfigData.java
@@
-223,6
+223,8
@@
public class AltosConfigData {
}
public boolean has_monitor_battery() {
}
public boolean has_monitor_battery() {
+ if (product == null)
+ return false;
if (product.startsWith("TeleBT"))
return true;
return false;
if (product.startsWith("TeleBT"))
return true;
return false;