From a580335feaa26e847bec5f6483a85064cd5c8abe Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 28 Aug 2020 09:58:28 -0700 Subject: [PATCH] remove obsolete method --- .../eehouse/android/xw4/GamesListDelegate.java | 6 ++---- .../java/org/eehouse/android/xw4/XWPrefs.java | 15 --------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index 12a29ec94..0a83a0517 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -315,7 +315,6 @@ public class GamesListDelegate extends ListDelegateBase final Set dbGroups = DBUtils.getGroups( m_activity ).keySet(); if ( null == m_groupPositions || m_groupPositions.length != dbGroups.size() ) { - long[] groupPositions = loadGroupPositions(); // If the stored order is out-of-sync with the DB, e.g. if // there have been additions or deletions, keep the ordering @@ -323,6 +322,7 @@ public class GamesListDelegate extends ListDelegateBase m_groupPositions = new long[dbGroups.size()]; Set added = new HashSet<>(); + long[] groupPositions = loadGroupPositions(); int nextIndx = 0; for ( long posn : groupPositions ) { if ( dbGroups.contains(posn) ) { @@ -1937,12 +1937,10 @@ public class GamesListDelegate extends ListDelegateBase private long[] loadGroupPositions() { - long[] result; + long[] result = {}; Serializable obj = DBUtils.getSerializableFor( m_activity, GROUP_POSNS_KEY ); if ( null != obj && obj instanceof long[] ) { result = (long[])obj; - } else { - result = XWPrefs.getGroupPositions( m_activity ); } // Log.d( TAG, "loadGroupPositions() => %s", DbgUtils.toString(result) ); return result; diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java index c34e2d478..3528103e2 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWPrefs.java @@ -392,21 +392,6 @@ public class XWPrefs { setPrefsLong( context, R.string.key_default_group, val ); } - // PENDING: remove this in a release or two. - public static long[] getGroupPositions( Context context ) - { - long[] posns = null; - String[] longStrs = getPrefsStringArray( context, - R.string.key_group_posns ); - if ( null != longStrs ) { - posns = new long[longStrs.length]; - for ( int ii = 0; ii < longStrs.length; ++ii ) { - posns[ii] = Long.parseLong(longStrs[ii]); - } - } - return posns; - } - public static boolean getThumbEnabled( Context context ) { return 0 < getThumbPct( context );