mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
check for moves when come to foreground
This commit is contained in:
parent
e61d7a5629
commit
c611919876
1 changed files with 5 additions and 1 deletions
|
@ -94,12 +94,16 @@ public class XWApp extends Application implements LifecycleObserver {
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnLifecycleEvent(ON_ANY)
|
@OnLifecycleEvent(ON_ANY)
|
||||||
public void onAny( LifecycleOwner source, Lifecycle.Event event )
|
public void onAny( LifecycleOwner source, Lifecycle.Event event )
|
||||||
{
|
{
|
||||||
Log.d( TAG, "onAny(%s)", event );
|
Log.d( TAG, "onAny(%s)", event );
|
||||||
switch( event ) {
|
switch( event ) {
|
||||||
case ON_RESUME:
|
case ON_RESUME:
|
||||||
BTService.onAppToForeground( this );
|
BTService.onAppToForeground( this );
|
||||||
|
// Do here what checkForMoves does
|
||||||
|
if ( null != DBUtils.getRelayIDs( this, null ) ) {
|
||||||
|
RelayService.timerFired( this );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ON_STOP:
|
case ON_STOP:
|
||||||
BTService.onAppToBackground( this );
|
BTService.onAppToBackground( this );
|
||||||
|
|
Loading…
Add table
Reference in a new issue