summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de/bjusystems
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2012-06-13 12:49:25 +0200
committerlado <herrlado@gmail.com>2012-06-13 12:49:25 +0200
commitff1d14b6f0f37f76a0ed8685b616e0c13e3509e0 (patch)
treefa4a001bf4ccd457351b9d8efdb360d075c23d1f /vdrmanager/src/de/bjusystems
parent27bba584b9945d158671d377809f9d8477e38e56 (diff)
downloadvdr-manager-ff1d14b6f0f37f76a0ed8685b616e0c13e3509e0.tar.gz
vdr-manager-ff1d14b6f0f37f76a0ed8685b616e0c13e3509e0.tar.bz2
switch to channel
Diffstat (limited to 'vdrmanager/src/de/bjusystems')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java6
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java21
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java5
3 files changed, 13 insertions, 19 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
index 37b34d3..fce57f8 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
@@ -137,6 +137,12 @@ public abstract class BaseEventListActivity<T extends Event> extends
Utils.shareEvent(this, event);
break;
}
+
+ case R.id.epg_item_menu_switchto: {
+ Utils.switchTo(this, event.getChannelId(), event.getChannelName());
+ break;
+ }
+
default:
return super.onContextItemSelected(item);
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
index f185932..6a6e5b2 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/ChannelListActivity.java
@@ -371,25 +371,8 @@ public class ChannelListActivity extends
break;
case R.id.channel_item_menu_switch:
- final String name = channel.getName();
- final SwitchChannelClient scc = new SwitchChannelClient(channel.getId());
- SvdrpAsyncTask<String, SwitchChannelClient> task = new SvdrpAsyncTask<String, SwitchChannelClient>(scc);
- task.addListener(new SvdrpAsyncListener<String>() {
- public void svdrpEvent(SvdrpEvent event, String result) {
- if(event == SvdrpEvent.FINISHED_SUCCESS){
- say(getString(R.string.switching_success, name));
- } else if(event == SvdrpEvent.CONNECT_ERROR || event == SvdrpEvent.FINISHED_ABNORMALY || event == SvdrpEvent.ABORTED || event == SvdrpEvent.ERROR || event == SvdrpEvent.CACHE_HIT){
- say(getString(R.string.switching_failed, name, event.name()));
- }
-
- }
-
- public void svdrpException(SvdrpException e) {
- Log.w(TAG, e.getMessage(), e);
- say(e.getMessage());
- }
- });
- task.run();
+ Utils.switchTo(this, channel);
+ break;
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
index 6b957f5..2dea654 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
@@ -594,6 +594,11 @@ public class EpgDetailsActivity extends ICSBaseActivity implements OnClickListen
intent.putExtra(SearchManager.QUERY, cEvent.getTitle());
startActivity(intent);
return true;
+ }
+
+ if(item.getItemId() == R.id.epg_details_menu_switch){
+ Utils.switchTo(this, cEvent.getChannelId(), cEvent.getChannelName());
+ return true;
}
return super.onOptionsItemSelected(item);
}