summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-29 12:57:09 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-29 12:58:41 +0200
commit9f1716173ed8b859326e4d946e5a1909cd62b5fb (patch)
treea2e6cd98e0392fa7ea8bb264baab725a93b660ff /android
parent7a1bac5cca8257e9ec35b59be1ddb7b492f465f3 (diff)
Return to StartPresentationActivity when slideshow finishes.
Change-Id: Id91226046ecb89c2cd14d03eb4a99d0ad4b7b027
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Receiver.java
index 407540a19721..955459c5c3e9 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;