mirror of
https://github.com/eclipse/paho.mqtt.android.git
synced 2025-05-08 18:39:31 +08:00
Removing buggy EXTRA_ALARM_COUNT call and useless log statement (#139)
* Removing ALARM_EXTRA_COUNT code as it was just being used for a non essential log message Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
This commit is contained in:
parent
3c87e55625
commit
ad1ea94d51
@ -138,19 +138,8 @@ class AlarmPingSender implements MqttPingSender {
|
||||
// This guarantees that the phone will not sleep until you have
|
||||
// finished handling the broadcast.", but this class still get
|
||||
// a wake lock to wait for ping finished.
|
||||
int count;
|
||||
try {
|
||||
count = intent.getIntExtra(Intent.EXTRA_ALARM_COUNT, -1);
|
||||
} catch (ClassCastException ex){
|
||||
// This is a Motorola Phone (Probably a Moto G or X)
|
||||
// And so Intent.EXTRA_ALARM_COUNT is actually a Long!
|
||||
Long longCount = intent.getLongExtra(Intent.EXTRA_ALARM_COUNT, -1);
|
||||
count = longCount.intValue();
|
||||
}
|
||||
|
||||
Log.d(TAG, "Ping " + count + " times.");
|
||||
|
||||
Log.d(TAG, "Check time :" + System.currentTimeMillis());
|
||||
Log.d(TAG, "Sending Ping at:" + System.currentTimeMillis());
|
||||
|
||||
PowerManager pm = (PowerManager) service
|
||||
.getSystemService(Service.POWER_SERVICE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user