From 5fc7836eca554fc33160f5ed083e4804da677426 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 21 Jul 2011 04:52:12 -0700 Subject: [PATCH 1/2] when not using FLAG_ACTIVITY_NEW_TASK need to look for invite-launched intents in onCreate too. --- .../XWords4/src/org/eehouse/android/xw4/GamesList.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 18c063d69..9d2e6f993 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -205,6 +205,7 @@ public class GamesList extends XWListActivity setContentView(R.layout.game_list); registerForContextMenu( getListView() ); + DBUtils.setDBChangeListener( this ); boolean isUpgrade = FirstRunDialog.show( this, false ); PreferenceManager.setDefaultValues( this, R.xml.xwprefs, isUpgrade ); @@ -229,9 +230,9 @@ public class GamesList extends XWListActivity Intent intent = getIntent(); startFirstHasDict( intent ); - askDefaultNameIf(); + startNewNetGame( intent ); - DBUtils.setDBChangeListener( this ); + askDefaultNameIf(); } // onCreate @Override From 698d549fd1e7f01bf6ec8f9ebcb14d34b077ff6b Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 21 Jul 2011 05:07:41 -0700 Subject: [PATCH 2/2] assert fired for unknown reason. Fix behavior in non-assert-enabled build to do the right thing in that case. --- xwords4/android/XWords4/jni/utilwrapper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/jni/utilwrapper.c b/xwords4/android/XWords4/jni/utilwrapper.c index ea84097aa..416b51749 100644 --- a/xwords4/android/XWords4/jni/utilwrapper.c +++ b/xwords4/android/XWords4/jni/utilwrapper.c @@ -249,7 +249,8 @@ utilTimerFired( XW_UtilCtxt* uc, XWTimerReason why, int handle ) AndUtil* util = (AndUtil*)uc; TimerStorage* timerStorage = &util->timerStorage[why]; XP_ASSERT( handle == (int)timerStorage ); - return (*timerStorage->proc)( timerStorage->closure, why ); + return (handle == (int)timerStorage) + && (*timerStorage->proc)( timerStorage->closure, why ); } static void