Commit 38684d60 authored by Thomas Krex's avatar Thomas Krex
Browse files

fixed bug with chronometer

parent b393ba74
......@@ -22,6 +22,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.SystemClock;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import android.view.GestureDetector;
......@@ -198,6 +199,7 @@ public class MainActivity extends Activity {
b.setImageResource(R.drawable.record);
} else {
im.startRecording();
timer.setBase(SystemClock.elapsedRealtime());
timer.start();
annotationView.recording = true;
b.setImageResource(R.drawable.stop);
......
......@@ -122,7 +122,7 @@ public class TTTRecorderAndroid implements Runnable {
if (page > 127) {
page = 127;
}
whiteboardEnabled = page > 0;
whiteboardEnabled = true;
currentWhiteboardPage = page;
annotationView.setWhiteboardPage(currentWhiteboardPage);
rfbProtocol
......
......@@ -289,8 +289,6 @@ public class RfbProtocol extends GraphicsContext implements Runnable,
}
// whiteboard disables desktop repainting
// TODO Whiteboard & Android
// if (!isWhiteboardEnabled())
// request next update
Constants.writeFramebufferUpdateRequestMessage(os, 0, 0,
prefs.framebufferWidth, prefs.framebufferHeight,
......@@ -430,7 +428,6 @@ public class RfbProtocol extends GraphicsContext implements Runnable,
}
}
//
// notify all listeners
@Override
public void deliverMessage(Message message) {
......@@ -451,7 +448,6 @@ public class RfbProtocol extends GraphicsContext implements Runnable,
@Override
public ProtocolPreferences getProtocolPreferences() {
// TODO Auto-generated method stub
return this.prefs;
}
......
......@@ -89,7 +89,7 @@ public class AnnotationView extends View {
}
// whiteboard (blank page for annotations)
protected int whiteboardPage;
protected int whiteboardPage = 0;
public boolean isWhiteboardEnabled() {
return whiteboardPage > 0;
......
......@@ -28,7 +28,6 @@ import java.io.DataOutputStream;
import java.io.IOException;
import tttrec.core.Constants;
import tttrec.core.GraphicsContext;
import tttrec.core.ProtocolPreferences;
/**
......@@ -58,11 +57,6 @@ public class WhiteboardMessage extends FramebufferUpdateMessage {
return Constants.EncodingWhiteboard;
}
public void paint(GraphicsContext graphicsContext) {
graphicsContext.annotationView.setWhiteboardPage(pageNumber);
}
public boolean isWhiteboardEnabled() {
return pageNumber > 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment