mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
Merge remote-tracking branch 'origin/android_branch' into android_branch
This commit is contained in:
commit
e2f689765b
2 changed files with 4 additions and 3 deletions
|
@ -60,13 +60,13 @@ public class GCMIntentService extends GCMBaseIntentService {
|
|||
protected void onMessage( Context context, Intent intent )
|
||||
{
|
||||
DbgUtils.logf( "GCMIntentService.onMessage()" );
|
||||
notifyRelayService( true );
|
||||
|
||||
String value;
|
||||
boolean ignoreIt = XWPrefs.getGCMIgnored( this );
|
||||
if ( ignoreIt ) {
|
||||
DbgUtils.logf( "received GCM but ignoring it" );
|
||||
} else {
|
||||
notifyRelayService( true );
|
||||
|
||||
value = intent.getStringExtra( "checkUpdates" );
|
||||
if ( null != value && Boolean.parseBoolean( value ) ) {
|
||||
UpdateCheckReceiver.checkVersions( context, true );
|
||||
|
|
|
@ -308,6 +308,7 @@ public class RelayService extends XWService
|
|||
long interval_millis = m_maxIntervalSeconds * 1000;
|
||||
RelayReceiver.RestartTimer( this, interval_millis );
|
||||
}
|
||||
stopThreads();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
@ -1074,7 +1075,7 @@ public class RelayService extends XWService
|
|||
|
||||
private boolean shouldMaintainConnection()
|
||||
{
|
||||
boolean result = !s_gcmWorking;
|
||||
boolean result = XWPrefs.getGCMIgnored( this ) || !s_gcmWorking;
|
||||
if ( result ) {
|
||||
long interval = Utils.getCurSeconds() - m_lastGamePacketReceived;
|
||||
result = interval < MAX_KEEPALIVE_SECS;
|
||||
|
|
Loading…
Reference in a new issue