From 4c0750e75aaf1666d208f5085d8869cd3ab3bf2a Mon Sep 17 00:00:00 2001 From: Arjan Schrijver Date: Thu, 21 Dec 2023 11:16:23 +0100 Subject: [PATCH] Add missing navigation actions to GMaps handler --- .../GoogleMapsNotificationHandler.java | 274 +++++++++++++++++- .../model/NavigationInfoSpec.java | 1 + 2 files changed, 274 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/notifications/GoogleMapsNotificationHandler.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/notifications/GoogleMapsNotificationHandler.java index 74d68d36d..e2777ff97 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/notifications/GoogleMapsNotificationHandler.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/notifications/GoogleMapsNotificationHandler.java @@ -209,7 +209,75 @@ public class GoogleMapsNotificationHandler { 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, 0b00000000000000000000000000000000 - })); + })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_LEFT_SLIGHTLY, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000011111111111000000000000000, + 0b00000111111111111000000000000000, + 0b00000111111111111000000000000000, + 0b00000111111100000000000000000000, + 0b00000111111100000000000000000000, + 0b00000111111110000000000000000000, + 0b00000111111111000000000000000000, + 0b00000111101111100000000000000000, + 0b00000111100011110000000000000000, + 0b00000111100011111000000000000000, + 0b00000111100001111100000000000000, + 0b00000011000000111110000000000000, + 0b00000000000000011110000000000000, + 0b00000000000000011111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_LEFT_SLIGHTLY, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000111111111111000000000000000, + 0b00000111111111111000000000000000, + 0b00000111111111111000000000000000, + 0b00000111111000000000000000000000, + 0b00000111111100000000000000000000, + 0b00000111111110000000000000000000, + 0b00000111111111000000000000000000, + 0b00000111101111100000000000000000, + 0b00000111100111110000000000000000, + 0b00000111100011111000000000000000, + 0b00000111100001111100000000000000, + 0b00000011000000111100000000000000, + 0b00000000000000011110000000000000, + 0b00000000000000011110000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000001111000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_RIGHT_SLIGHTLY, new int[]{ 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, @@ -244,6 +312,142 @@ public class GoogleMapsNotificationHandler { 0b00000000000000000000000000000000, 0b00000000000000000000000000000000 })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_RIGHT_SLIGHTLY, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000111110000000000, + 0b00000000000000000111111000000000, + 0b00000000000000000011111110000000, + 0b00000000000000000000111111100000, + 0b00000000000000000000011111110000, + 0b00000000000000000001111111110000, + 0b00000000000000001111111111110000, + 0b00000000000000111111111111100000, + 0b00000000000011111111101111100000, + 0b00000000000111111100001111000000, + 0b00000000011111100000001110000000, + 0b00000011111110000000011110000000, + 0b00000011111100000000111100000000, + 0b00000011111000000000011100000000, + 0b00000011111000000000001000000000, + 0b00000011110000000000000000000000, + 0b00000011100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_RIGHT_SLIGHTLY, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000011111111111100000, + 0b00000000000000011111111111100000, + 0b00000000000000011111111111100000, + 0b00000000000000000000011111100000, + 0b00000000000000000000111111100000, + 0b00000000000000000001111111100000, + 0b00000000000000000011111111100000, + 0b00000000000000000111110111100000, + 0b00000000000000001111100111100000, + 0b00000000000000011111000111100000, + 0b00000000000000111110000111100000, + 0b00000000000000111100000011000000, + 0b00000000000001111000000000000000, + 0b00000000000001111000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_RIGHT_SLIGHTLY, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000011000000000000, + 0b00000000000000000011100000000000, + 0b00000000000000000111111000000000, + 0b00000000000000000011111110000000, + 0b00000000000000000000111111100000, + 0b00000000000000000000001111110000, + 0b00000000000000000000111111110000, + 0b00000000000000001111111111110000, + 0b00000000000000111111111111100000, + 0b00000000000011111111110111100000, + 0b00000000000111111100001111000000, + 0b00000000001111100000001111000000, + 0b00000000111110000000011110000000, + 0b00000001111100000000011100000000, + 0b00000001111000000000111100000000, + 0b00000011111000000000001000000000, + 0b00000011110000000000000000000000, + 0b00000011110000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000111100000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_TURN_RIGHT_SLIGHTLY, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000011111111111100000, + 0b00000000000000011111111111100000, + 0b00000000000000011111111111100000, + 0b00000000000000000000011111100000, + 0b00000000000000000000111111100000, + 0b00000000000000000001111111100000, + 0b00000000000000000011111111100000, + 0b00000000000000000111110111100000, + 0b00000000000000001111100111100000, + 0b00000000000000011111000111100000, + 0b00000000000000111110000111100000, + 0b00000000000000111100000011000000, + 0b00000000000001111000000000000000, + 0b00000000000001111000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000011110000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); knownImages.add(new IconType(NavigationInfoSpec.ACTION_UTURN_LEFT, new int[]{ 0b00000000000000000000000000000000, // LHD 0b00000000000000000000000000000000, @@ -891,6 +1095,74 @@ public class GoogleMapsNotificationHandler { 0b00000000000000000000000000000000, 0b00000000000000000000000000000000, })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_MERGE, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000011000000000000000, + 0b00000000000000111100000000000000, + 0b00000000000001111110000000000000, + 0b00000000000011111111000000000000, + 0b00000000000111111111100000000000, + 0b00000000001111111111110000000000, + 0b00000000011111111111111000000000, + 0b00000000011111111111111000000000, + 0b00000000111100111100111100000000, + 0b00000000011000111100011000000000, + 0b00000000000000111100000000000000, + 0b00000000000000111100000000000000, + 0b00000000000001111110000000000000, + 0b00000000000001111110000000000000, + 0b00000000000011111111000000000000, + 0b00000000000111100111100000000000, + 0b00000000001111100111110000000000, + 0b00000000011111000011110000000000, + 0b00000000011110000001111000000000, + 0b00000000011100000000111000000000, + 0b00000000111100000000111100000000, + 0b00000000111100000000111100000000, + 0b00000000111000000000011100000000, + 0b00000000111000000000011100000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); + knownImages.add(new IconType(NavigationInfoSpec.ACTION_MERGE, new int[]{ + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000011000000000000000, + 0b00000000000000111100000000000000, + 0b00000000000001111110000000000000, + 0b00000000000011111111000000000000, + 0b00000000000111111111100000000000, + 0b00000000001111111111110000000000, + 0b00000000011111111111111000000000, + 0b00000000111110111101111100000000, + 0b00000000111100111100111100000000, + 0b00000000011000111100011000000000, + 0b00000000000000111100000000000000, + 0b00000000000000111100000000000000, + 0b00000000000001111110000000000000, + 0b00000000000001111110000000000000, + 0b00000000000011111111000000000000, + 0b00000000000111100111100000000000, + 0b00000000001111000011110000000000, + 0b00000000001111000011110000000000, + 0b00000000011110000001111000000000, + 0b00000000011100000000111000000000, + 0b00000000111100000000111100000000, + 0b00000000111000000000011100000000, + 0b00000000111000000000011100000000, + 0b00000000111000000000011100000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000, + 0b00000000000000000000000000000000 + })); } public boolean handle(Context context, StatusBarNotification sbn) { diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NavigationInfoSpec.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NavigationInfoSpec.java index 297861fbc..134e37e04 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NavigationInfoSpec.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NavigationInfoSpec.java @@ -34,6 +34,7 @@ public class NavigationInfoSpec { public static final int ACTION_ROUNDABOUT_STRAIGHT = 15; public static final int ACTION_ROUNDABOUT_UTURN = 16; public static final int ACTION_FINISH = 17; + public static final int ACTION_MERGE = 18; // ETA? Total Distance? public String instruction;