summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-05-05 20:04:49 +0000
committercyberta <cyberta@riseup.net>2022-05-05 20:04:49 +0000
commit9adaf9e2b925089dc169d8d6f9b3514e10674e3a (patch)
tree6b8be0aaecdc10d0d241a85180a7792216876777 /app/src/main/java/se/leap
parent0c3adf0ceff6c9fd4cd4910ae5257352ce5753c6 (diff)
parentd9237447d4ae301a7839720f06d218723b3a92cc (diff)
Merge branch 'fix_tile_service_crash' into 'master'
catch nullpointer exception in tile service Closes #9073 See merge request leap/bitmask_android!178
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java b/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java
index 65355a67..370a7af6 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/BitmaskTileService.java
@@ -71,6 +71,11 @@ public class BitmaskTileService extends TileService implements Observer {
@Override
public void update(Observable o, Object arg) {
Tile t = getQsTile();
+ // Tile t should never be null according to https://developer.android.com/reference/kotlin/android/service/quicksettings/TileService.
+ // Hovever we've got crash reports.
+ if (t == null) {
+ return;
+ }
if (o instanceof EipStatus) {
EipStatus status = (EipStatus) o;