[Libreoffice-commits] .: android/sdremote sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 29 03:59:07 PDT 2012
android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java | 19 ++++++++--
sd/source/ui/remotecontrol/Communicator.cxx | 2 +
2 files changed, 18 insertions(+), 3 deletions(-)
New commits:
commit 9f1716173ed8b859326e4d946e5a1909cd62b5fb
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Wed Aug 29 12:57:09 2012 +0200
Return to StartPresentationActivity when slideshow finishes.
Change-Id: Id91226046ecb89c2cd14d03eb4a99d0ad4b7b027
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
index 407540a..955459c 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
@@ -10,6 +10,9 @@ package org.libreoffice.impressremote.communication;
import java.util.ArrayList;
+import org.libreoffice.impressremote.PresentationActivity;
+import org.libreoffice.impressremote.StartPresentationActivity;
+
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;
@@ -43,9 +46,19 @@ public class Receiver {
int aCurrentSlide = Integer.parseInt(aCommand.get(2));
mSlideShow.setLength(aSlideShowlength);
mSlideShow.setCurrentSlide(aCurrentSlide);
- Intent aIntent = new Intent(
- CommunicationService.MSG_SLIDESHOW_STARTED);
- LocalBroadcastManager.getInstance(mContext).sendBroadcast(aIntent);
+ // Intent aIntent = new Intent(
+ // CommunicationService.MSG_SLIDESHOW_STARTED);
+ // LocalBroadcastManager.getInstance(mContext).sendBroadcast(aIntent);
+ Intent aIntent = new Intent(mContext.getApplicationContext(),
+ PresentationActivity.class);
+ aIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mContext.getApplicationContext().startActivity(aIntent);
+ } else if (aInstruction.equals("slideshow_finished")) {
+ mSlideShow = new SlideShow(mContext);
+ Intent aIntent = new Intent(mContext.getApplicationContext(),
+ StartPresentationActivity.class);
+ aIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mContext.getApplicationContext().startActivity(aIntent);
} else {
if (mSlideShow == null)
return;
diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index 58f2130..779ccf5 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -95,6 +95,8 @@ void Communicator::execute()
void Communicator::informListenerDestroyed()
{
+ pTransmitter->addMessage( "slideshow_finished\n\n",
+ Transmitter::PRIORITY_HIGH );
mListener.clear();
}
More information about the Libreoffice-commits
mailing list