Kaydet (Commit) ae4f4b71 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Miklos Vajna

android: remove unneeded layerView stuff

Change-Id: Ide81f4b5dd7f71a3dda21ff51d02a12d7fe9a315
üst 2bbf630d
......@@ -14,8 +14,8 @@ public abstract class SelectionHandle extends BitmapHandle {
private static final long MINIMUM_HANDLE_UPDATE_TIME = 50 * 1000000;
private final PointF mDragStartPoint = new PointF();
private long mLastTime = 0;
private final PointF mDragDocumentPosition = new PointF();
private long mLastTime = 0;
public SelectionHandle(Bitmap bitmap) {
super(bitmap);
......
......@@ -127,15 +127,9 @@ public class TextCursorView extends View implements View.OnTouchListener {
* @param selectionRects - list of text selection rectangles
*/
public void changeSelections(List<RectF> selectionRects) {
LayerView layerView = LOKitShell.getLayerView();
if (layerView == null) {
Log.e(LOGTAG, "Can't position selections because layerView is null");
return;
}
mSelections = selectionRects;
ImmutableViewportMetrics metrics = layerView.getViewportMetrics();
ImmutableViewportMetrics metrics = mLayerView.getViewportMetrics();
repositionWithViewport(metrics.viewportRectLeft, metrics.viewportRectTop, metrics.zoomFactor);
}
......@@ -147,15 +141,10 @@ public class TextCursorView extends View implements View.OnTouchListener {
if (RectUtils.fuzzyEquals(mGraphicSelection.mRectangle, rectangle)) {
return;
}
LayerView layerView = LOKitShell.getLayerView();
if (layerView == null) {
Log.e(LOGTAG, "Can't position selections because layerView is null");
return;
}
mGraphicSelection.mRectangle = rectangle;
ImmutableViewportMetrics metrics = layerView.getViewportMetrics();
ImmutableViewportMetrics metrics = mLayerView.getViewportMetrics();
repositionWithViewport(metrics.viewportRectLeft, metrics.viewportRectTop, metrics.zoomFactor);
}
......@@ -348,10 +337,6 @@ public class TextCursorView extends View implements View.OnTouchListener {
return false;
}
public void setLayerView(LayerView layerView) {
this.mLayerView = layerView;
}
public void positionHandle(SelectionHandle.HandleType type, RectF position) {
SelectionHandle handle = getHandleForType(type);
if (RectUtils.fuzzyEquals(handle.mDocumentPosition, position)) {
......
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