From 0dacc1f9c70c77ed219c0463585a4a2b45c21dd9 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Fri, 27 Mar 2015 12:13:19 +0100 Subject: [PATCH] make sure Intent broadcasts do not leave Gadgetbridge, add missing xml file --- CHANGELOG.md | 5 +++++ app/src/main/AndroidManifest.xml | 12 +++++++++--- .../gadgetbridge/BluetoothCommunicationService.java | 3 ++- app/src/main/res/menu/appmanager_context.xml | 6 ++++++ 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/menu/appmanager_context.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index f4c01cc5..6efe9e57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ###Changelog +####Version 0.1.4 +* New AppManager shows installed Apps/Watchfaces (removal possible via context menu) +* Allow back navigation in ActionBar (Debug and AppMananger Activities) +* Make sure Intent broadcasts do not leave Gadgetbridge + ####Version 0.1.3 * Remove the connect button, list all suported devices and connect on tap instead * Display connection status and firmware of connected devices in the device list diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 063cfd5d..656af593 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -76,17 +76,23 @@ - + - + - + diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java index ab3e10fc..096f1aac 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/BluetoothCommunicationService.java @@ -135,6 +135,7 @@ public class BluetoothCommunicationService extends Service { GBDeviceCommandMusicControl musicCmd = (GBDeviceCommandMusicControl) deviceCmd; Intent musicIntent = new Intent(GBMusicControlReceiver.ACTION_MUSICCONTROL); musicIntent.putExtra("command", musicCmd.command.ordinal()); + musicIntent.setPackage(this.getPackageName()); sendBroadcast(musicIntent); break; case CALL_CONTROL: @@ -142,6 +143,7 @@ public class BluetoothCommunicationService extends Service { GBDeviceCommandCallControl callCmd = (GBDeviceCommandCallControl) deviceCmd; Intent callIntent = new Intent(GBCallControlReceiver.ACTION_CALLCONTROL); callIntent.putExtra("command", callCmd.command.ordinal()); + callIntent.setPackage(this.getPackageName()); sendBroadcast(callIntent); break; case VERSION_INFO: @@ -165,7 +167,6 @@ public class BluetoothCommunicationService extends Service { appInfoIntent.putExtra("app_id" + i.toString(), appInfoCmd.apps[i].getId()); appInfoIntent.putExtra("app_index" + i.toString(), appInfoCmd.apps[i].getIndex()); } - LocalBroadcastManager.getInstance(this).sendBroadcast(appInfoIntent); break; case APP_MANAGEMENT_RES: diff --git a/app/src/main/res/menu/appmanager_context.xml b/app/src/main/res/menu/appmanager_context.xml new file mode 100644 index 00000000..d2dd4f5d --- /dev/null +++ b/app/src/main/res/menu/appmanager_context.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file