public void setCurrentSearch(Search newSearch, String result) { Action.Type actionType = null; yesNoSearch.setActive(true); yesNoSearch.setPotentialField(result); yesNoSearch.setResponse("Did you mean " + result + "?"); // Set parent search for re-routing after user response if (Search.getCurrentSearch() != null && Search.getCurrentSearch() != yesNoSearch) { yesNoSearch.setParentSearch(Search.getCurrentSearch()); Log.d(TAG, "parent search of yesNo search set to " + Search.getCurrentSearch().getName()); } if (newSearch == binSearch) { actionType = Action.Type.LOG_BIN_ITEM; } else if (newSearch == typeSearch) { actionType = Action.Type.LOG_LITTER_TYPE; } else if (newSearch == brandSearch) { actionType = Action.Type.LOG_LITTER_BRAND; } else if (newSearch == yesNoSearch) { yesNoSearch.setYesAction(mActionHandler.getCurrentAction().getActionType()); yesNoSearch.setNoAction(getActionFromSearch(yesNoSearch.getParentSearch())); } if (actionType != null) { mActionHandler.getCurrentAction().setActionType(actionType); } Search.setCurrentSearch(newSearch); }