summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}