diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2012-07-28 16:36:13 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-08-06 10:23:06 +0100 |
commit | 31891189cbd1866fd745a47630b7dcc090d3942b (patch) | |
tree | d8b602e4a8d678339091550f321ee985548a1ac5 /android | |
parent | 36c96dadc995831654935e0f9bd15737d3b2a510 (diff) |
Fixed some bugs affecting resuming of slideshow.
Change-Id: I I I8797eca1fc4f992374a09f74454a5f034b47a96a
Diffstat (limited to 'android')
5 files changed, 17 insertions, 7 deletions
diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml index b803ff088180..ac51b864f488 100644 --- a/android/sdremote/res/values/strings.xml +++ b/android/sdremote/res/values/strings.xml @@ -14,8 +14,11 @@ <string name="clock_timer_restart">Restart</string> <string name="clock_timer_reset">Reset</string> <string name="clock_timer_resume">Resume</string> - <string name="options_autodecline">Auto-decline calls</string> - <string name="options_volumeswitching">Change slides using volume buttons</string> + <string name="options_autodecline">Decline Calls</string> + <string name="options_description">Automatically decline all incoming calls.</string> + <string name="options_volumeswitching">Volume Switching</string> + <string name="options_volumeswitching_descripton">Change slides using volume buttons</string> <string name="options_switchcomputer">Switch computer</string> <string name="blankscreen_return">Return to Slide</string> + </resources>
\ No newline at end of file diff --git a/android/sdremote/res/xml/preferences.xml b/android/sdremote/res/xml/preferences.xml index e03999512e45..5d7e68b8b834 100644 --- a/android/sdremote/res/xml/preferences.xml +++ b/android/sdremote/res/xml/preferences.xml @@ -5,7 +5,8 @@ <SwitchPreference android:defaultValue="false" android:key="option_volumeswitching" - android:title="@string/options_volumeswitching" /> + android:title="@string/options_volumeswitching" + android:summary="@string/options_volumeswitching_descripton"/> <Preference android:key="option_switchcomputer" diff --git a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java index 74a806df3b2c..1de6c01feaea 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/ThumbnailFragment.java @@ -136,11 +136,14 @@ public class ThumbnailFragment extends Fragment { } public void handleMessage(Message aMessage) { + if (!isVisible()) { + return; + } + Bundle aData = aMessage.getData(); switch (aMessage.what) { case CommunicationService.MSG_SLIDE_CHANGED: int aSlide = aData.getInt("slide_number"); - setSelected(aSlide); break; case CommunicationService.MSG_SLIDE_PREVIEW: mGrid.invalidateViews(); diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java index 6a0496f00db0..e78f07ed4a06 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java +++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java @@ -20,7 +20,7 @@ public class Receiver { private Messenger mActivityMessenger; - private SlideShow mSlideShow = null; + private SlideShow mSlideShow = new SlideShow(); public SlideShow getSlideShow() { return mSlideShow; @@ -38,7 +38,7 @@ public class Receiver { if (aInstruction.equals("slideshow_started")) { int aSlideShowlength = Integer.parseInt(aCommand.get(1)); int aCurrentSlide = Integer.parseInt(aCommand.get(2)); - mSlideShow = new SlideShow(aSlideShowlength); + mSlideShow.setLength(aSlideShowlength); mSlideShow.setCurrentSlide(aCurrentSlide); Message aMessage = Message.obtain(null, diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java index 34cf8aa146d5..75b13a84f049 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java +++ b/android/sdremote/src/org/libreoffice/impressremote/communication/SlideShow.java @@ -18,7 +18,10 @@ public class SlideShow { private int mSize = 0; private int mCurrentSlide = 0; - protected SlideShow(int aSize) { + protected SlideShow() { + } + + protected void setLength(int aSize) { mSize = aSize; } |