From 0d6b5914b9a697aa491de3efc2837bd60b3c0b47 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 16 Dec 2011 19:02:20 -0800 Subject: [PATCH 01/13] revert to standard launchMode to get proper from-Launcher behavior and specify a pair of flags when background-launching GamesList that strips any stack it has and doesn't launch a new instance. Seems to fix the problems with launching from notifications and invite emails. But then I've thought this fixed before. --- xwords4/android/XWords4/AndroidManifest.xml | 2 +- .../eehouse/android/xw4/DispatchNotify.java | 27 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/xwords4/android/XWords4/AndroidManifest.xml b/xwords4/android/XWords4/AndroidManifest.xml index 701dd4189..7381d8a88 100644 --- a/xwords4/android/XWords4/AndroidManifest.xml +++ b/xwords4/android/XWords4/AndroidManifest.xml @@ -43,7 +43,7 @@ diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DispatchNotify.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DispatchNotify.java index 4455b12a1..f86dc281c 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DispatchNotify.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DispatchNotify.java @@ -67,22 +67,19 @@ public class DispatchNotify extends Activity { DbgUtils.logf( "DispatchNotify: nothing running" ); Intent intent = new Intent( this, GamesList.class ); - /* Flags. Tried Intent.FLAG_ACTIVITY_NEW_TASK. I don't - * remember what it fixes, but what it breaks is easy to - * duplicate. Launch Crosswords from the home screen making - * sure it's the only instance running. Get a networked game - * going, and with BoardActivity frontmost check the relay and - * select a relay notification. New BoardActivity will come - * up, but if you hit home button then Crosswords icon you're - * back to games list. Hit back button and you're back to - * BoardActivity, and back from there back to GamesList. - * That's because a new activity came up from the activity - * below thanks to the flag. - */ + // This combination of flags will bring an existing + // GamesList instance to the front, killing any children + // it has, or create a new one if none exists. Coupled + // with a "standard" launchMode it seems to work, meaning + // both that the app preserves its stack in normal use + // (you can go to Home with a stack of activities and + // return to the top activity on that stack if you + // relaunch the app) and that when I launch from here the + // stack gets nuked and we don't get a second GamesList + // instance. intent.setFlags( Intent.FLAG_ACTIVITY_CLEAR_TOP - // Intent.FLAG_ACTIVITY_NEW_TASK NO See above - ); + | Intent.FLAG_ACTIVITY_SINGLE_TOP ); if ( null != relayIDs ) { intent.putExtra( RELAYIDS_EXTRA, relayIDs ); } else if ( null != data ) { @@ -128,6 +125,7 @@ public class DispatchNotify extends Activity { } } } + DbgUtils.logf( "tryHandle(%s)=>%b", data.toString(), handled ); return handled; } @@ -148,6 +146,7 @@ public class DispatchNotify extends Activity { } } } + DbgUtils.logf( "tryHandle(%s)=>%b", relayIDs.toString(), handled ); return handled; } } From a86ffa39bad4a6f4a19e6db21fd70c38c94d3d4a Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 16 Dec 2011 20:59:40 -0800 Subject: [PATCH 02/13] up strings for next beta --- xwords4/android/XWords4/AndroidManifest.xml | 2 +- xwords4/android/XWords4/res/raw/changes | 21 +------------------ .../XWords4/res/values/common_rsrc.xml | 2 +- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/xwords4/android/XWords4/AndroidManifest.xml b/xwords4/android/XWords4/AndroidManifest.xml index 7381d8a88..695d4b152 100644 --- a/xwords4/android/XWords4/AndroidManifest.xml +++ b/xwords4/android/XWords4/AndroidManifest.xml @@ -22,7 +22,7 @@ to come from a domain that you own or have control over. --> diff --git a/xwords4/android/XWords4/res/raw/changes b/xwords4/android/XWords4/res/raw/changes index bd9a6859f..f0dd5b2fe 100644 --- a/xwords4/android/XWords4/res/raw/changes +++ b/xwords4/android/XWords4/res/raw/changes @@ -6,27 +6,8 @@ -Crosswords 4.4 beta 39 release +Crosswords 4.4 beta 40 release
    - -
  • Add "email author" menuitem to Games List screen. Please - do!
  • - -
  • Enable pinch-to-zoom for board
  • - -
  • Improve wordlist browser to filter by size, have larger - text, and not barf when given empty wordlist
  • - -
  • Add value/letter toggle button since space isn't so precious - now (and remove menuitem)
  • - -
  • Add Setting checkbox to disable crosshairs
  • - -
  • Replace Restore menus in Settings with buttons
  • - -
  • Fix problem with text color in word lookup dialog on HTC - MyTouch
  • -

Please remember that this is beta software. Please let me know (at diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index 5736b1f99..5975b6bcd 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -3,7 +3,7 @@ - 4.4 beta 39 + 4.4 beta 40 key_color_tiles From dd8da6d312e8ff73bb8645b5374fe48e1b277c70 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 18 Dec 2011 12:22:06 -0800 Subject: [PATCH 03/13] tweak wording --- xwords4/android/XWords4/res/values/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 229ad3354..17388763b 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -525,8 +525,7 @@ Commit exchange Cancel exchange - Tap to select tiles... - + Tap tiles to select... - Play Crosswords? Join this - game: %1$s . (But install Crosswords first if you haven\'t: - http://eehouse.org/market_redir.php ). + Play Crosswords? Join this game: %1$s + . (But install Crosswords http://eehouse.org/market_redir.php + first if you haven\'t.)