mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2026-08-27 08:00:25 +00:00
Add broadcast received to detect connectivity changes (only detect there is a change a this time, we need to know what change is it and if we need to do something)
* Also remove useless function into IncomingSms * Add new notification type DEBUG to debug program if no debogger was available when dev
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package fr.unix_experience.owncloud_sms.broadcast_receivers;
|
||||
|
||||
import fr.unix_experience.owncloud_sms.notifications.OCSMSNotificationManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
public class ConnectivityChanged extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Log.d(TAG,"ConnectivityChanged.onReceive");
|
||||
(new OCSMSNotificationManager(context)).setDebugMsg("ConnectivityChanged");
|
||||
}
|
||||
|
||||
private static final String TAG = ConnectivityChanged.class.getSimpleName();
|
||||
}
|
||||
@@ -29,10 +29,6 @@ public class IncomingSms extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
launchSmsObserver(context);
|
||||
}
|
||||
|
||||
public static void launchSmsObserver(Context context) {
|
||||
if (_mboxObserver == null) {
|
||||
Log.d(TAG,"_mboxObserver == null");
|
||||
_mboxObserver = new SmsObserver(new Handler(), context);
|
||||
|
||||
Reference in New Issue
Block a user