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 )
|
protected void onMessage( Context context, Intent intent )
|
||||||
{
|
{
|
||||||
DbgUtils.logf( "GCMIntentService.onMessage()" );
|
DbgUtils.logf( "GCMIntentService.onMessage()" );
|
||||||
|
notifyRelayService( true );
|
||||||
|
|
||||||
String value;
|
String value;
|
||||||
boolean ignoreIt = XWPrefs.getGCMIgnored( this );
|
boolean ignoreIt = XWPrefs.getGCMIgnored( this );
|
||||||
if ( ignoreIt ) {
|
if ( ignoreIt ) {
|
||||||
DbgUtils.logf( "received GCM but ignoring it" );
|
DbgUtils.logf( "received GCM but ignoring it" );
|
||||||
} else {
|
} else {
|
||||||
notifyRelayService( true );
|
|
||||||
|
|
||||||
value = intent.getStringExtra( "checkUpdates" );
|
value = intent.getStringExtra( "checkUpdates" );
|
||||||
if ( null != value && Boolean.parseBoolean( value ) ) {
|
if ( null != value && Boolean.parseBoolean( value ) ) {
|
||||||
UpdateCheckReceiver.checkVersions( context, true );
|
UpdateCheckReceiver.checkVersions( context, true );
|
||||||
|
|
|
@ -308,6 +308,7 @@ public class RelayService extends XWService
|
||||||
long interval_millis = m_maxIntervalSeconds * 1000;
|
long interval_millis = m_maxIntervalSeconds * 1000;
|
||||||
RelayReceiver.RestartTimer( this, interval_millis );
|
RelayReceiver.RestartTimer( this, interval_millis );
|
||||||
}
|
}
|
||||||
|
stopThreads();
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1074,7 +1075,7 @@ public class RelayService extends XWService
|
||||||
|
|
||||||
private boolean shouldMaintainConnection()
|
private boolean shouldMaintainConnection()
|
||||||
{
|
{
|
||||||
boolean result = !s_gcmWorking;
|
boolean result = XWPrefs.getGCMIgnored( this ) || !s_gcmWorking;
|
||||||
if ( result ) {
|
if ( result ) {
|
||||||
long interval = Utils.getCurSeconds() - m_lastGamePacketReceived;
|
long interval = Utils.getCurSeconds() - m_lastGamePacketReceived;
|
||||||
result = interval < MAX_KEEPALIVE_SECS;
|
result = interval < MAX_KEEPALIVE_SECS;
|
||||||
|
|
Loading…
Reference in a new issue