report wrong alarm data
This commit is contained in:
parent
45a2eba0c2
commit
91e286b2ae
1 changed files with 8 additions and 1 deletions
|
@ -9,6 +9,7 @@ import android.os.HandlerThread;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
|
|
||||||
|
import com.crashlytics.android.Crashlytics;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.google.common.hash.Hashing;
|
import com.google.common.hash.Hashing;
|
||||||
import com.j256.ormlite.dao.CloseableIterator;
|
import com.j256.ormlite.dao.CloseableIterator;
|
||||||
|
@ -352,7 +353,13 @@ public class NSClientService extends Service {
|
||||||
public void call(final Object... args) {
|
public void call(final Object... args) {
|
||||||
if (Config.detailedLog)
|
if (Config.detailedLog)
|
||||||
MainApp.bus().post(new EventNSClientNewLog("ALARM", "received"));
|
MainApp.bus().post(new EventNSClientNewLog("ALARM", "received"));
|
||||||
JSONObject data = (JSONObject) args[0];
|
JSONObject data;
|
||||||
|
try {
|
||||||
|
data = (JSONObject) args[0];
|
||||||
|
} catch (ClassCastException e) {
|
||||||
|
Crashlytics.log("Wrong alarm from NS: " + args[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
BroadcastAlarm.handleAlarm(data, getApplicationContext());
|
BroadcastAlarm.handleAlarm(data, getApplicationContext());
|
||||||
log.debug(data.toString());
|
log.debug(data.toString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue