mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
FOR DEBUGGING ONLY: Got some asserts, I think because a new instance
can be coming up before another goes away. Now we'll actually try finish()ing a duplicate activity.
This commit is contained in:
parent
808eb41d95
commit
e250fb003b
2 changed files with 9 additions and 5 deletions
|
@ -342,7 +342,9 @@ public class GamesList extends XWListActivity
|
|||
// XWApp.Finishable interface
|
||||
public void doFinish()
|
||||
{
|
||||
Assert.fail();
|
||||
if ( !isFinishing() ) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,14 +49,16 @@ public class XWApp extends Application {
|
|||
// hack to deal with a broken, or undocumented, aspect of Android.
|
||||
public void addFinishable( Finishable obj )
|
||||
{
|
||||
Assert.assertNull( m_finishable );
|
||||
if ( null != m_finishable ) {
|
||||
m_finishable.doFinish();
|
||||
}
|
||||
m_finishable = obj;
|
||||
}
|
||||
|
||||
public void clearFinishable( Finishable obj )
|
||||
{
|
||||
Assert.assertNotNull( m_finishable );
|
||||
Assert.assertTrue( m_finishable == obj );
|
||||
m_finishable = null;
|
||||
if ( m_finishable == obj ) {
|
||||
m_finishable = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue