private boolean removeObject ( ) { SharedPreferences prefs = loadSharedPreferences ( "objectList" ) ; List < String > objects = getObjectList ( ) ; int index = objects . indexOf ( getId ( ) ) ; if ( index == ArrayUtils . INDEX_NOT_FOUND ) return false ; objects . remove ( getId ( ) ) ; if ( objects . size ( ) == 0 ) { prefs . edit ( ) . putString ( "list" , null ) . commit ( ) ; } else { prefs . edit ( ) . putString ( "list" , StringUtils . join ( objects , "," ) ) . commit ( ) ; } return true ; }
Removes the object from the ids list .