From 39298931d287581b77a5fa7a7b9a756dd15d1a04 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 3 Jun 2015 06:27:09 -0700 Subject: [PATCH] revert calling finish() to avoid there being two activity instances, as it leads to there often being none. --- .../src/org/eehouse/android/xw4/GamesListActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListActivity.java index be0e21f99..c1b747414 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListActivity.java @@ -45,11 +45,12 @@ public class GamesListActivity extends XWListActivity { m_dlgt = new GamesListDelegate( this, savedInstanceState ); super.onCreate( savedInstanceState, m_dlgt ); + // Trying to debug situation where two of this activity are running at + // once. finish()ing when Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT is + // passed is not the fix, but perhaps there's another int flags = getIntent().getFlags(); - if (0 != (flags & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)) { - // DbgUtils.logf( "GamesListActivity.onCreate(); bad duplicate case; exiting" ); - finish(); - } + DbgUtils.logf( "GamesListActivity.onCreate(this=%H): flags=0x%x", + this, flags ); } // onCreate // called when we're brought to the front (probably as a result of