From bf1f0485df1c2542f0c25dc41c2dc16d50746b89 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 13 Oct 2014 19:06:40 -0700 Subject: [PATCH 1/4] include git hash in name of .apk file --- xwords4/android/scripts/arelease.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/scripts/arelease.sh b/xwords4/android/scripts/arelease.sh index 4f78a4b6b..52814b787 100755 --- a/xwords4/android/scripts/arelease.sh +++ b/xwords4/android/scripts/arelease.sh @@ -80,7 +80,7 @@ for PACK_UNSIGNED in $FILES; do rm -f $PACK_SIGNED zipalign -v 4 $PACK_UNSIGNED $PACK_SIGNED [ -n "$XW_WWW_PATH" ] && cp $PACK_SIGNED $XW_WWW_PATH - TARGET="${PACK_SIGNED%.apk}_$(git describe).apk" + TARGET="${PACK_SIGNED%.apk}_$(git rev-parse --verify HEAD)_$(git describe).apk" cp $PACK_SIGNED "${TARGET}" echo "created ${TARGET}" >&2 [ -n "$LIST_FILE" ] && echo ${TARGET} >> $LIST_FILE From c73eec567b6b2a56330558a0171f2e0365e4385b Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 14 Oct 2014 06:24:41 -0700 Subject: [PATCH 2/4] fix some const confusion the stricter android gcc found --- xwords4/common/model.c | 4 ++-- xwords4/common/model.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/common/model.c b/xwords4/common/model.c index 74b2958be..a9fa450a2 100644 --- a/xwords4/common/model.c +++ b/xwords4/common/model.c @@ -1826,12 +1826,12 @@ XP_U16 model_getDividerLoc( const ModelCtxt* model, XP_S16 turn ) { XP_ASSERT( turn >= 0 ); - PlayerCtxt* player = &model->players[turn]; + const PlayerCtxt* player = &model->players[turn]; return player->dividerLoc; } void -model_setDividerLoc( const ModelCtxt* model, XP_S16 turn, XP_U16 loc ) +model_setDividerLoc( ModelCtxt* model, XP_S16 turn, XP_U16 loc ) { XP_ASSERT( turn >= 0 ); PlayerCtxt* player = &model->players[turn]; diff --git a/xwords4/common/model.h b/xwords4/common/model.h index 74f897120..cfaf0b27f 100644 --- a/xwords4/common/model.h +++ b/xwords4/common/model.h @@ -153,7 +153,7 @@ void model_addPlayerTile( ModelCtxt* model, XP_S16 turn, XP_S16 index, void model_moveTileOnTray( ModelCtxt* model, XP_S16 turn, XP_S16 indexCur, XP_S16 indexNew ); XP_U16 model_getDividerLoc( const ModelCtxt* model, XP_S16 turn ); -void model_setDividerLoc( const ModelCtxt* model, XP_S16 turn, XP_U16 loc ); +void model_setDividerLoc( ModelCtxt* model, XP_S16 turn, XP_U16 loc ); /* As an optimization, return a pointer to the model's array of tiles for a player. Don't even think about modifying the array!!!! */ From 5c4242ac62d335e346e8fa6e031096a1084c666b Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 14 Oct 2014 06:31:57 -0700 Subject: [PATCH 3/4] Fix (by inspection) NPE reported to google: test for null lock before trying to save its game. Also remove empty overridden method. --- .../org/eehouse/android/xw4/GameConfigDelegate.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java index 1876a17ff..fd74ecc75 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java @@ -431,11 +431,6 @@ public class GameConfigDelegate extends DelegateBase m_smartnessSpinner = (Spinner)findViewById( R.id.smart_robot ); } // init - protected void onStart() - { - loadGame(); - } - @Override protected void onResume() { @@ -1112,7 +1107,10 @@ public class GameConfigDelegate extends DelegateBase private void applyChanges( boolean forceNew ) { - GameUtils.applyChanges( m_activity, m_gi, m_car, m_gameLock, forceNew ); + if ( null != m_gameLock ) { + GameUtils.applyChanges( m_activity, m_gi, m_car, m_gameLock, + forceNew ); + } } private void launchGame() From 76db94effc4f1cb7335be772e74059616ac988cf Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 14 Oct 2014 06:35:12 -0700 Subject: [PATCH 4/4] move git rev pref to bottom --- xwords4/android/XWords4/res/xml/xwprefs.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index 65427f56f..f22751bad 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -307,10 +307,6 @@ - + +