summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2011-11-04 10:28:07 +0100
committerlado <herrlado@gmail.com>2011-11-04 10:28:07 +0100
commit3dd85fbf45ef072082fe096e8df857f39f315f23 (patch)
tree23de3481fd065a5454d402e27216f7e621325587 /vdrmanager
parent219a800b756d5e3eff4140d2859ee0aa5fb98f47 (diff)
downloadvdr-manager-3dd85fbf45ef072082fe096e8df857f39f315f23.tar.gz
vdr-manager-3dd85fbf45ef072082fe096e8df857f39f315f23.tar.bz2
avoid npe on compare
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
index 463e03d..a5679c6 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseEventListActivity.java
@@ -106,7 +106,8 @@ public abstract class BaseEventListActivity<T extends Event> extends
}
/**
- * Prepare the current event and the chained events for
+ * Prepare the current event and the chained events for
+ *
* @param event
*/
protected void prepareDetailsViewData(EventListItem event) {
@@ -314,15 +315,16 @@ public abstract class BaseEventListActivity<T extends Event> extends
if (c != 0) {
return c;
}
- if(item1.getChannelNumber() == null && item2.getChannelNumber() == null){
+ if (item1.getChannelNumber() == null
+ && item2.getChannelNumber() == null) {
return 0;
}
- if(item1.getChannelNumber() == null){
- return -1;
- }
- if(item2.getChannelNumber() == null){
+ if (item1.getChannelNumber() == null) {
return 1;
}
+ if (item2.getChannelNumber() == null) {
+ return -1;
+ }
return Integer.valueOf(item1.getChannelNumber()).compareTo(
Integer.valueOf(item2.getChannelNumber()));
}
@@ -338,7 +340,8 @@ public abstract class BaseEventListActivity<T extends Event> extends
abstract protected boolean finishedSuccessImpl();
protected final boolean finishedSuccess() {
- setTitle(getString(R.string.epg_window_title_count, getWindowTitle(), results.size()));
+ setTitle(getString(R.string.epg_window_title_count, getWindowTitle(),
+ results.size()));
return finishedSuccessImpl();
}