Buggy code:
public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompassListener , OsmAndLocationListener { private static final int COMPASS_REFRESH_MSG_ID = ( OsmAndConstants . UI_HANDLER_SEARCH ) + 3 ; public static final String AMENITY_FILTER = "net.osmand.amenity_filter" ; public static final String SEARCH_LAT = SearchActivity . SEARCH_LAT ; public static final String SEARCH_LON = SearchActivity . SEARCH_LON ; private static final float MIN_DISTANCE_TO_RESEARCH = 20 ; private static final float MIN_DISTANCE_TO_REFRESH = 5 ; private static final int SEARCH_MORE = 0 ; private static final int SHOW_ON_MAP = 1 ; private static final int FILTER = 2 ; private static final int ORIENTATION_0 = 0 ; private static final int ORIENTATION_90 = 3 ; private static final int ORIENTATION_270 = 1 ; private static final int ORIENTATION_180 = 2 ; private PoiFilter filter ; private SearchPOIActivity . AmenityAdapter amenityAdapter ; private EditText searchFilter ; private View searchFilterLayout ; private boolean searchNearBy = false ; private Location location = null ; private Float heading = null ; private Handler uiHandler ; private OsmandSettings settings ; private float width = 24 ; private float height = 24 ; private SearchPOIActivity . SearchAmenityTask currentSearchTask = new SearchPOIActivity . SearchAmenityTask ( null ) ; private OsmandApplication app ; private MenuItem showFilterItem ; private MenuItem showOnMapItem ; private MenuItem searchPOILevel ; private Button searchFooterButton ; @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } private boolean searchMore ( ) { } @ Override public void onCreate ( Bundle icicle ) { <START_BUG> requestWindowFeature ( FEATURE_INDETERMINATE_PROGRESS ) ; <END_BUG> super . onCreate ( icicle ) ; setContentView ( searchpoi ) ; getSupportActionBar ( ) . setTitle ( searchpoi_activity ) ; getSupportActionBar ( ) . setIcon ( tab_search_poi_icon ) ; app = ( ( OsmandApplication ) ( getApplication ( ) ) ) ; uiHandler = new Handler ( ) ; searchFilter = ( ( EditText ) ( findViewById ( SearchFilter ) ) ) ; searchFilterLayout = findViewById ( SearchFilterLayout ) ; settings = ( ( OsmandApplication ) ( getApplication ( ) ) ) . getSettings ( ) ; searchFilter . addTextChangedListener ( new TextWatcher ( ) { @ Override public void afterTextChanged ( Editable s ) { if ( ( ! ( isNameFinderFilter ( ) ) ) && ( ! ( isSearchByNameFilter ( ) ) ) ) { amenityAdapter . getFilter ( ) . filter ( s ) ; } else { if ( ( searchPOILevel ) != null ) { searchPOILevel . setEnabled ( true ) ; searchPOILevel . setTitle ( search_button ) ; } searchFooterButton . setEnabled ( true ) ; searchFooterButton . setText ( search_button ) ; } } @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { } } ) ; searchFilter . setOnFocusChangeListener ( new View . OnFocusChangeListener ( ) { @ Override public void onFocusChange ( View v , boolean hasFocus ) { if ( hasFocus ) { getWindow ( ) . setSoftInputMode ( SOFT_INPUT_STATE_ALWAYS_VISIBLE ) ; } } } ) ; addFooterView ( ) ; amenityAdapter = new SearchPOIActivity . AmenityAdapter ( new ArrayList < Amenity > ( ) ) ; setListAdapter ( amenityAdapter ) ; } private void addFooterView ( ) { } @ Override protected void onResume ( ) { } private void updateShowFilterItem ( ) { } private void updateSubtitle ( ) { } private void showPoiCategoriesByNameFilter ( String query , net . osmand . Location loc ) { } private String typesToString ( Map < AmenityType , List < String > > map ) { } private void updateSearchPoiTextButton ( boolean taskAlreadyFinished ) { } private Location getSearchedLocation ( ) { } private synchronized void runNewSearchQuery ( SearchPOIActivity . SearchAmenityRequest request ) { } private synchronized void clearSearchQuery ( ) { } public boolean isNameFinderFilter ( ) { } public boolean isSearchByNameFilter ( ) { } @ Override public void updateLocation ( net . osmand . Location location ) { } @ Override public void updateCompassValue ( float value ) { } @ Override protected void onPause ( ) { } @ Override public void onItemClick ( AdapterView < ? > parent , final View view , int position , long id ) { } static class SearchAmenityRequest { private static final int SEARCH_AGAIN = 1 ; private static final int NEW_SEARCH_INIT = 2 ; private static final int SEARCH_FURTHER = 3 ; private int type ; private Location location ; public static SearchPOIActivity . SearchAmenityRequest buildRequest ( net . osmand . Location l , int type ) { } } class SearchAmenityTask extends AsyncTask < Void , Amenity , List < Amenity > > implements ResultMatcher < Amenity > { private SearchPOIActivity . SearchAmenityRequest request ; private TLongHashSet existingObjects = null ; private TLongHashSet updateExisting ; public SearchAmenityTask ( SearchPOIActivity . SearchAmenityRequest request ) { } Location getSearchedLocation ( ) { } @ Override protected void onPreExecute ( ) { } private long getAmenityId ( Amenity a ) { } @ Override protected void onPostExecute ( List < Amenity > result ) { } @ Override protected void onProgressUpdate ( Amenity ... values ) { } @ Override protected List < Amenity > doInBackground ( Void ... params ) { } @ Override public boolean publish ( Amenity object ) { } } class AmenityAdapter extends ArrayAdapter < Amenity > { private SearchPOIActivity . AmenityAdapter . AmenityFilter listFilter ; private List < Amenity > originalAmenityList ; AmenityAdapter ( List < Amenity > list ) { } public List < Amenity > getOriginalAmenityList ( ) { } public void setNewModel ( List < Amenity > amenityList , String filter ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } @ Override public Filter getFilter ( ) { } private final class AmenityFilter extends Filter { @ Override protected FilterResults performFiltering ( CharSequence constraint ) { }

Fix:
supportRequestWindowFeature ( FEATURE_INDETERMINATE_PROGRESS ) ;