diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java index c2e006612..78aaa2bc1 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java @@ -71,7 +71,7 @@ public class GameListAdapter implements ExpandableListAdapter { m_fieldID = fieldToID( fieldName ); } - public long[] getPositions() + public long[] getGroupPositions() { Set keys = gameInfo().keySet(); // do not modify!!!! if ( null == m_positions || m_positions.length != keys.size() ) { @@ -103,7 +103,7 @@ public class GameListAdapter implements ExpandableListAdapter { { int src = getGroupPosition( groupid ); int dest = src + moveBy; - long[] positions = getPositions(); + long[] positions = getGroupPositions(); boolean success = 0 <= dest && dest < positions.length; if ( success ) { long tmp = positions[src]; @@ -127,7 +127,7 @@ public class GameListAdapter implements ExpandableListAdapter { public long getRowIDFor( int group, int child ) { long rowid = DBUtils.ROWID_NOTFOUND; - long[] rows = getRows( getPositions()[group] ); + long[] rows = getRows( getGroupPositions()[group] ); if ( child < rows.length ) { rowid = rows[child]; } @@ -145,7 +145,7 @@ public class GameListAdapter implements ExpandableListAdapter { public long getGroupIDFor( int groupPos ) { - long id = getPositions()[groupPos]; + long id = getGroupPositions()[groupPos]; return id; } @@ -284,7 +284,7 @@ public class GameListAdapter implements ExpandableListAdapter { public int getChildrenCount( int groupPosition ) { - return getChildrenCount( getPositions()[groupPosition] ); + return getChildrenCount( getGroupPositions()[groupPosition] ); } public int getChildrenCount( long groupID ) @@ -336,7 +336,7 @@ public class GameListAdapter implements ExpandableListAdapter { public String[] groupNames() { HashMap info = gameInfo(); - long[] positions = getPositions(); + long[] positions = getGroupPositions(); String[] names = new String[ positions.length ]; for ( int ii = 0; ii < names.length; ++ii ) { names[ii] = info.get(positions[ii]).m_name; @@ -347,7 +347,7 @@ public class GameListAdapter implements ExpandableListAdapter { public int getGroupPosition( long groupid ) { int result = -1; - long[] positions = getPositions(); + long[] positions = getGroupPositions(); for ( int pos = 0; pos < positions.length; ++pos ) { if ( positions[pos] == groupid ) { result = pos; @@ -376,7 +376,7 @@ public class GameListAdapter implements ExpandableListAdapter { private GameGroupInfo getInfoForGroup( int groupPosition ) { - return gameInfo().get( getPositions()[groupPosition] ); + return gameInfo().get( getGroupPositions()[groupPosition] ); } private void deselectRows( long[] rowids ) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 715b96245..1125571b9 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -411,7 +411,7 @@ public class GamesList extends XWExpandableListActivity // (TelephonyManager)getSystemService( Context.TELEPHONY_SERVICE ); // mgr.listen( m_phoneStateListener, PhoneStateListener.LISTEN_NONE ); // m_phoneStateListener = null; - long[] positions = m_adapter.getPositions(); + long[] positions = m_adapter.getGroupPositions(); XWPrefs.setGroupPositions( this, positions ); super.onStop(); } @@ -771,7 +771,8 @@ public class GamesList extends XWExpandableListActivity case R.id.list_item_new_from: showNotAgainDlgThen( R.string.not_again_newfrom, R.string.key_notagain_newfrom, - GamesActions.NEW_FROM.ordinal(), selRowIDs[0] ); + GamesActions.NEW_FROM.ordinal(), + selRowIDs[0] ); break; case R.id.list_item_copy: GameSummary summary = DBUtils.getSummary( this, selRowIDs[0] );