From 33d86de9239e98a0a13af569b695419a78398256 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Mon, 20 Apr 2015 22:39:35 +0200 Subject: [PATCH] move external receivers to externalevents/ directory --- app/src/main/AndroidManifest.xml | 10 +++++----- .../java/nodomain/freeyourgadget/gadgetbridge/GB.java | 5 +++++ .../gadgetbridge/{ => externalevents}/K9Receiver.java | 4 +++- .../{ => externalevents}/MusicPlaybackReceiver.java | 4 +++- .../{ => externalevents}/NotificationListener.java | 4 +++- .../{ => externalevents}/PhoneCallReceiver.java | 5 ++++- .../gadgetbridge/{ => externalevents}/SMSReceiver.java | 4 +++- 7 files changed, 26 insertions(+), 10 deletions(-) rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/{ => externalevents}/K9Receiver.java (95%) rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/{ => externalevents}/MusicPlaybackReceiver.java (87%) rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/{ => externalevents}/NotificationListener.java (96%) rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/{ => externalevents}/PhoneCallReceiver.java (93%) rename app/src/main/java/nodomain/freeyourgadget/gadgetbridge/{ => externalevents}/SMSReceiver.java (92%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 382f27b7f..cd263dadb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -58,7 +58,7 @@ @@ -68,7 +68,7 @@ @@ -78,14 +78,14 @@ @@ -93,7 +93,7 @@ diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GB.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GB.java index 5ec13901b..8ca6708b5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GB.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GB.java @@ -10,6 +10,11 @@ import android.content.pm.PackageManager; import android.support.v4.app.NotificationCompat; import android.util.Log; +import nodomain.freeyourgadget.gadgetbridge.externalevents.K9Receiver; +import nodomain.freeyourgadget.gadgetbridge.externalevents.MusicPlaybackReceiver; +import nodomain.freeyourgadget.gadgetbridge.externalevents.PhoneCallReceiver; +import nodomain.freeyourgadget.gadgetbridge.externalevents.SMSReceiver; + public class GB { public static final int NOTIFICATION_ID = 1; private static final String TAG = "GB"; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/K9Receiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/K9Receiver.java similarity index 95% rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/K9Receiver.java rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/K9Receiver.java index 765725cac..3997886c5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/K9Receiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/K9Receiver.java @@ -1,4 +1,4 @@ -package nodomain.freeyourgadget.gadgetbridge; +package nodomain.freeyourgadget.gadgetbridge.externalevents; import android.content.BroadcastReceiver; import android.content.Context; @@ -9,6 +9,8 @@ import android.net.Uri; import android.os.PowerManager; import android.preference.PreferenceManager; +import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService; + public class K9Receiver extends BroadcastReceiver { private final String TAG = this.getClass().getSimpleName(); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/MusicPlaybackReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java similarity index 87% rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/MusicPlaybackReceiver.java rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java index 491b44180..06df39e9e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/MusicPlaybackReceiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java @@ -1,10 +1,12 @@ -package nodomain.freeyourgadget.gadgetbridge; +package nodomain.freeyourgadget.gadgetbridge.externalevents; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; +import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService; + public class MusicPlaybackReceiver extends BroadcastReceiver { private final String TAG = this.getClass().getSimpleName(); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java similarity index 96% rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/NotificationListener.java rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java index 402ae3273..df51e1e2f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -1,4 +1,4 @@ -package nodomain.freeyourgadget.gadgetbridge; +package nodomain.freeyourgadget.gadgetbridge.externalevents; import android.app.ActivityManager; import android.app.Notification; @@ -11,6 +11,8 @@ import android.service.notification.NotificationListenerService; import android.service.notification.StatusBarNotification; import android.util.Log; +import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService; + public class NotificationListener extends NotificationListenerService { private String TAG = this.getClass().getSimpleName(); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/PhoneCallReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java similarity index 93% rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/PhoneCallReceiver.java rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java index 35f509249..e88c53e75 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/PhoneCallReceiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java @@ -1,10 +1,13 @@ -package nodomain.freeyourgadget.gadgetbridge; +package nodomain.freeyourgadget.gadgetbridge.externalevents; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.telephony.TelephonyManager; +import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService; +import nodomain.freeyourgadget.gadgetbridge.GBCommand; + public class PhoneCallReceiver extends BroadcastReceiver { diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SMSReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/SMSReceiver.java similarity index 92% rename from app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SMSReceiver.java rename to app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/SMSReceiver.java index 1c95d9660..709d3485a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/SMSReceiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/SMSReceiver.java @@ -1,4 +1,4 @@ -package nodomain.freeyourgadget.gadgetbridge; +package nodomain.freeyourgadget.gadgetbridge.externalevents; import android.content.BroadcastReceiver; import android.content.Context; @@ -9,6 +9,8 @@ import android.os.PowerManager; import android.preference.PreferenceManager; import android.telephony.SmsMessage; +import nodomain.freeyourgadget.gadgetbridge.BluetoothCommunicationService; + public class SMSReceiver extends BroadcastReceiver { @Override