log values showing up in the occasional crash

This commit is contained in:
Eric House 2017-01-09 20:55:14 -08:00
parent 084a45296e
commit 26b4c7da8e

View file

@ -143,7 +143,12 @@ public class GamesListDelegate extends ListDelegateBase
if ( ggi.m_expanded ) { if ( ggi.m_expanded ) {
List<Object> children = makeChildren( groupID ); List<Object> children = makeChildren( groupID );
alist.addAll( children ); alist.addAll( children );
Assert.assertTrue( ggi.m_count == children.size() );
if ( BuildConfig.DEBUG && ggi.m_count != children.size() ) {
DbgUtils.loge( TAG, "m_count: %d != size: %d",
ggi.m_count, children.size() );
Assert.fail();
}
} }
} }
@ -271,6 +276,7 @@ public class GamesListDelegate extends ListDelegateBase
int getGroupPosition( long groupID ) int getGroupPosition( long groupID )
{ {
int posn = -1; int posn = -1;
if ( -1 != groupID ) {
long[] positions = getGroupPositions(); long[] positions = getGroupPositions();
for ( int ii = 0; ii < positions.length; ++ii ) { for ( int ii = 0; ii < positions.length; ++ii ) {
if ( positions[ii] == groupID ) { if ( positions[ii] == groupID ) {
@ -281,6 +287,7 @@ public class GamesListDelegate extends ListDelegateBase
if ( -1 == posn ) { if ( -1 == posn ) {
DbgUtils.logd( TAG, "getGroupPosition: group %d not found", groupID ); DbgUtils.logd( TAG, "getGroupPosition: group %d not found", groupID );
} }
}
return posn; return posn;
} }