Skip to content

Commit

Permalink
Fix media browser service and enable android auto support
Browse files Browse the repository at this point in the history
Fix media browser service and enable android auto support
  • Loading branch information
vdbhb59 authored Oct 6, 2023
1 parent d8106d7 commit 565b3fd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.programmierecke.radiodroid2.FragmentBase;
import net.programmierecke.radiodroid2.R;
import net.programmierecke.radiodroid2.RadioDroidApp;
import net.programmierecke.radiodroid2.StationSaveManager;
import net.programmierecke.radiodroid2.Utils;
import net.programmierecke.radiodroid2.interfaces.IFragmentSearchable;
import net.programmierecke.radiodroid2.utils.CustomFilter;
Expand All @@ -48,6 +49,7 @@ public class FragmentStations extends FragmentBase implements IFragmentSearchabl
private StationsFilter stationsFilter;
private StationsFilter.SearchStyle lastSearchStyle = StationsFilter.SearchStyle.ByName;
private String lastQuery = "";
private StationSaveManager queue;

void onStationClick(DataRadioStation theStation, int pos) {
RadioDroidApp radioDroidApp = (RadioDroidApp) getActivity().getApplication();
Expand All @@ -71,6 +73,8 @@ protected void RefreshListGui() {

ArrayList<DataRadioStation> filteredStationsList = new ArrayList<>();
List<DataRadioStation> radioStations = DataRadioStation.DecodeJson(getUrlResult());
queue.clear();
queue.addAll(radioStations);

if (BuildConfig.DEBUG) Log.d(TAG, "station count:" + radioStations.size());

Expand All @@ -93,6 +97,7 @@ protected void RefreshListGui() {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Log.d("STATIONS","onCreateView()");
queue = new StationSaveManager(getContext());
Bundle bundle = getArguments();
if (bundle != null) {
searchEnabled = bundle.getBoolean(KEY_SEARCH_ENABLED, false);
Expand Down Expand Up @@ -219,4 +224,4 @@ protected void DownloadFinished() {
swipeRefreshLayout.setRefreshing(false);
}
}
}
}

0 comments on commit 565b3fd

Please sign in to comment.