[Libreoffice-commits] .: android/sdremote
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 09:27:24 PDT 2012
android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java | 13 +++-------
android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java | 4 +--
2 files changed, 6 insertions(+), 11 deletions(-)
New commits:
commit 8f1199860b2ced080f24eeaeb5052d0b68a4b9aa
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Sep 14 16:27:09 2012 +0100
sdremote: unwind a couple of crasher / corner cases
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java
index 767bec5..ca595d5 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 6c24ad7..ba692c3 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: */
More information about the Libreoffice-commits
mailing list