@@ -105,9 +105,7 @@ public static PersistentQueryProvider getInstance(Context context) {
105105 */
106106 public List <Suggestion <RoutePlanningRequest >> getAllRoutes () {
107107
108- //noinspection ConstantConditions
109108 int recentLimit = Integer .valueOf (sharedPreferences .getString (PREF_ROUTES_HISTORY_COUNT , "3" ));
110- //noinspection ConstantConditions
111109 int order = Integer .valueOf (sharedPreferences .getString (PREF_ROUTES_ORDER , "0" ));
112110 // 0: recents before favorites
113111 // 1: favorites before recents
@@ -143,11 +141,9 @@ public List<Suggestion<RoutePlanningRequest>> getAllRoutes() {
143141 * @return Sorted array with favorite and recent liveboard requests
144142 */
145143 public List <Suggestion <LiveboardRequest >> getAllStations () {
146- //noinspection ConstantConditions
147- int recentLimit = Integer .valueOf (
144+ int recentLimit = Integer .parseInt (
148145 sharedPreferences .getString (PREF_STOPLOCATIONS_HISTORY_COUNT , "3" ));
149- //noinspection ConstantConditions
150- int order = Integer .valueOf (sharedPreferences .getString (PREF_STATIONS_ORDER , "0" ));
146+ int order = Integer .parseInt (sharedPreferences .getString (PREF_STATIONS_ORDER , "0" ));
151147 // 0 || 2: recents before favorites
152148 // 1 || 3: favorites before recents
153149
@@ -182,9 +178,7 @@ public List<Suggestion<LiveboardRequest>> getAllStations() {
182178 * @return Sorted array with favorite and recent vehicle requests
183179 */
184180 public List <Suggestion <VehicleRequest >> getAllTrains () {
185- //noinspection ConstantConditions
186181 int recentLimit = Integer .valueOf (sharedPreferences .getString ("trains_history_count" , "3" ));
187- //noinspection ConstantConditions
188182 int order = Integer .valueOf (sharedPreferences .getString ("trains_order" , "0" ));
189183 // 0: recents before favorites
190184 // 1: favorites before recents
0 commit comments