remove firing assertion (per Play store)

Looks like clock skew or maybe even a timezone issue (I'm not doing
enough research :-) is causing an assert. Just drop the notification
instead.
This commit is contained in:
Eric House 2017-05-18 06:19:25 -07:00
parent 098de83b04
commit 7f4d8b1a44

View file

@ -145,16 +145,18 @@ public class NagTurnReceiver extends BroadcastReceiver {
{
long result = 0;
long now = new Date().getTime(); // in milliseconds
Assert.assertTrue( now >= moveTimeMillis );
long[] intervals = getIntervals( context );
for ( long nSecs : intervals ) {
long asMillis = moveTimeMillis + (nSecs * 1000);
if ( asMillis >= now ) {
result = asMillis;
break;
if ( now >= moveTimeMillis ) {
long[] intervals = getIntervals( context );
for ( long nSecs : intervals ) {
long asMillis = moveTimeMillis + (nSecs * 1000);
if ( asMillis >= now ) {
result = asMillis;
break;
}
}
} else {
Assert.assertFalse( BuildConfig.DEBUG );
}
return result;
}