From af6aa81ee61d8baa0b4b1b6e83e8e8994f3a21f6 Mon Sep 17 00:00:00 2001 From: lado Date: Fri, 4 Nov 2011 01:32:04 +0100 Subject: getting ready for profiles --- .../bjusystems/vdrmanager/gui/VdrListActivity.java | 8 ++++++++ .../vdrmanager/gui/VdrPreferencesActivity.java | 21 +++++++++++++++++++++ .../vdrmanager/utils/svdrp/ChannelClient.java | 8 ++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java create mode 100644 vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java (limited to 'vdrmanager/src') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java new file mode 100644 index 0000000..d0955cf --- /dev/null +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrListActivity.java @@ -0,0 +1,8 @@ +package de.bjusystems.vdrmanager.gui; + +import android.app.ListActivity; +import android.preference.PreferenceActivity; + +public class VdrListActivity extends ListActivity { + +} diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java new file mode 100644 index 0000000..62f9953 --- /dev/null +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/VdrPreferencesActivity.java @@ -0,0 +1,21 @@ +package de.bjusystems.vdrmanager.gui; + +import de.bjusystems.vdrmanager.R; +import de.bjusystems.vdrmanager.data.Preferences; +import android.os.Bundle; + +public class VdrPreferencesActivity extends BasePreferencesActivity { + + + @Override + protected void onCreate(Bundle savedInstanceState) { + + super.onCreate(savedInstanceState); + + this.getPreferenceManager().setSharedPreferencesName( + Preferences.getPreferenceFile(this)); + this.addPreferencesFromResource(R.xml.vdr_prefs); + + + } +} diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java index 741250f..9f93525 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/utils/svdrp/ChannelClient.java @@ -82,7 +82,7 @@ public class ChannelClient extends SvdrpClient implements * parameter for lste */ @Override - public void run() throws SvdrpException { + synchronized public void run() throws SvdrpException { if (inited == true) { informListener(SvdrpEvent.CACHE_HIT, null); } else { @@ -100,7 +100,7 @@ public class ChannelClient extends SvdrpClient implements return R.string.progress_channels_loading; } - ArrayList currentChannels = null; + ArrayList currentChannels = new ArrayList(); private void received(Channel c) { if (c.isGroupSeparator()) { @@ -108,6 +108,10 @@ public class ChannelClient extends SvdrpClient implements currentChannels = new ArrayList(); groupChannels.put(c.getName(), currentChannels); } else { + if(channelGroups.isEmpty()){//receiver channel with no previous group + channelGroups.add(""); + groupChannels.put("", currentChannels); + } channels.add(c); currentChannels.add(c); String provider = c.getProvider(); -- cgit v1.2.3