Skip to content

Commit 5b48b50

Browse files
wanjianwanjian
wanjian
authored and
wanjian
committed
no message
1 parent 6654e62 commit 5b48b50

File tree

12 files changed

+91
-22
lines changed

12 files changed

+91
-22
lines changed

.idea/gradle.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/res/layout/x.xml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:background="#e1e1e1"
6+
android:orientation="vertical">
7+
8+
9+
<LinearLayout
10+
android:layout_width="match_parent"
11+
android:layout_height="50dp"
12+
android:background="#fff"
13+
android:weightSum="5">
14+
15+
<View
16+
android:layout_width="0dp"
17+
android:layout_height="match_parent"
18+
android:layout_weight="2"
19+
android:background="#f00"
20+
/>
21+
</LinearLayout>
22+
</LinearLayout>

build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ buildscript {
88
classpath 'com.android.tools.build:gradle:2.2.0'
99

1010
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
1211
}
1312
}
1413

lib/src/main/java/com/client/Client.java

-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public void mouseClicked(MouseEvent e) {
8989
@Override
9090
public void mouseClicked(MouseEvent mouseEvent) {
9191
super.mouseClicked(mouseEvent);
92-
// System.out.println("down " + mouseEvent);
9392
int x = mouseEvent.getX();
9493
int y = mouseEvent.getY();
9594
try {
@@ -106,7 +105,6 @@ public void mouseClicked(MouseEvent mouseEvent) {
106105
@Override
107106
public void mouseReleased(MouseEvent mouseEvent) {
108107
super.mouseReleased(mouseEvent);
109-
// System.out.println("up mouseReleased");
110108
try {
111109
int x = mouseEvent.getX();
112110
int y = mouseEvent.getY();
@@ -128,11 +126,9 @@ public void mouseDragged(MouseEvent mouseEvent) {
128126
int y = mouseEvent.getY();
129127
if (!isMove) {
130128
isMove = true;
131-
// System.out.println("down mouseDragged " + mouseEvent.getX() + " " + mouseEvent.getY());
132129

133130
writer.write("DOWN" + (x * 1.0f / label.getWidth()) + "#" + (y * 1.0f / label.getHeight()));
134131
} else {
135-
// System.out.println("move mouseDragged " + mouseEvent.getX() + " " + mouseEvent.getY());
136132

137133
writer.write("MOVE" + (x * 1.0f / label.getWidth()) + "#" + (y * 1.0f / label.getHeight()));
138134
}
@@ -260,7 +256,6 @@ public void run() {
260256
label.setIcon(new ScaleIcon(new ImageIcon(image)));
261257
long s3 = System.currentTimeMillis();
262258

263-
// System.out.println("读取: " + (s2 - s1) + " 解码: " + (s3 - s2) + " " + length);
264259
}
265260

266261
} catch (IOException e) {

lib/src/main/java/com/client/Install.java

-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
import java.io.BufferedReader;
44
import java.io.BufferedWriter;
5-
import java.io.DataOutputStream;
6-
import java.io.File;
75
import java.io.IOException;
86
import java.io.InputStream;
97
import java.io.InputStreamReader;
108
import java.io.OutputStreamWriter;
11-
import java.io.Reader;
129
import java.util.Arrays;
1310

1411
/**

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':app', ':lib', ':shareandcontrollib'
1+
include ':lib', ':shareandcontrollib'

shareandcontrollib/src/androidTest/java/com/wanjian/puppet/ExampleInstrumentedTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.junit.Test;
88
import org.junit.runner.RunWith;
99

10-
import static org.junit.Assert.*;
10+
import static org.junit.Assert.assertEquals;
1111

1212
/**
1313
* Instrumentation test, which will execute on an Android device.

shareandcontrollib/src/main/java/com/wanjian/puppet/Main.java

-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package com.wanjian.puppet;
22

33
import android.graphics.Bitmap;
4-
import android.graphics.Canvas;
54
import android.graphics.Matrix;
65
import android.graphics.Point;
76
import android.hardware.input.InputManager;
87
import android.net.LocalServerSocket;
98
import android.net.LocalSocket;
109
import android.os.Build;
11-
import android.os.Handler;
1210
import android.os.IBinder;
1311
import android.os.SystemClock;
1412
import android.support.v4.view.InputDeviceCompat;
@@ -19,11 +17,7 @@
1917

2018
import java.io.BufferedOutputStream;
2119
import java.io.BufferedReader;
22-
import java.io.BufferedWriter;
2320
import java.io.ByteArrayOutputStream;
24-
import java.io.File;
25-
import java.io.FileNotFoundException;
26-
import java.io.FileOutputStream;
2721
import java.io.IOException;
2822
import java.io.InputStreamReader;
2923
import java.io.OutputStream;

shareandcontrollib/src/main/java/com/wanjian/puppet/VirtualDisplayFactory.java

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import android.os.Handler;
44
import android.view.Surface;
55

6-
import com.wanjian.puppet.VirtualDisplay;
7-
86
public interface VirtualDisplayFactory {
97
VirtualDisplay createVirtualDisplay(String str, int i, int i2, int i3, int i4, Surface surface, Handler handler);
108

shareandcontrollib/src/test/java/com/wanjian/puppet/ExampleUnitTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.Test;
44

5-
import static org.junit.Assert.*;
5+
import static org.junit.Assert.assertEquals;
66

77
/**
88
* Example local unit test, which will execute on the development machine (host).

0 commit comments

Comments
 (0)