summaryrefslogtreecommitdiff
path: root/android/sdremote
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdremote')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java13
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java5
2 files changed, 7 insertions, 11 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
index 767bec5a4f57..ca595d5c3bdc 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
@@ -349,17 +349,12 @@ public class PresentationActivity extends SherlockFragmentActivity {
@Override
public void run() {
CharSequence aTimeString;
- long aTime = mCommunicationService.getSlideShow().getTimer()
- .getTimeMillis();
- if (mTimerOn) {
- aTimeString = DateFormat.format(aTimerFormat, aTime);
- } else {
- aTimeString = DateFormat.format(aTimeFormat,
- System.currentTimeMillis());
- }
+ long aTime = System.currentTimeMillis();
+ if (mTimerOn && mCommunicationService != null)
+ aTime = mCommunicationService.getSlideShow().getTimer().getTimeMillis();
+ aTimeString = DateFormat.format(aTimerFormat, aTime);
mTimeLabel.setText(aTimeString);
timerHandler.postDelayed(this, 50);
-
}
};
diff --git a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
index 6c24ad7b73ae..ba692c31008b 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
@@ -130,7 +130,8 @@ public class SelectorActivity extends SherlockActivity {
@Override
public void onBackPressed() {
- mCommunicationService.stopSearching();
+ if (mCommunicationService != null)
+ mCommunicationService.stopSearching();
Intent aIntent = new Intent(this, CommunicationService.class);
stopService(aIntent);
super.onBackPressed();
@@ -325,4 +326,4 @@ public class SelectorActivity extends SherlockActivity {
return super.onContextItemSelected(item);
}
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */