Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "增加链接 wifi 的功能" #40

Merged
merged 1 commit into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ android {
}

dependencies {
implementation fileTree(include: ['*.aar'], dir: 'libs')

//TODO consider migrating to androidx
//noinspection GradleCompatible
implementation 'com.android.support:percent:28.0.0'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.alibaba:fastjson:1.2.79'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'

compileOnly fileTree(dir: '../shim/libs', include: ['*.jar'])

}
Binary file removed app/libs/android-proxy-library-4.0.0.aar
Binary file not shown.
30 changes: 11 additions & 19 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.cloud.sonic.android">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission
android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
Expand All @@ -30,64 +28,58 @@
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>

<queries>
<intent>
<action android:name="android.intent.action.VIEW" />

<data android:scheme="http" />
</intent>
</queries>

<application
android:theme="@style/AppTheme"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:persistent="true"
android:theme="@style/AppTheme">
<activity
android:name=".wifi.SonicJoinWifiActivity"
android:exported="true" />
android:persistent="true">

<meta-data
android:name="android.max_aspect"
android:value="3.0" />

<activity
android:name=".AppListActivity"
android:name="org.cloud.sonic.android.AppListActivity"
android:exported="true" />

<activity
android:name=".MainActivity"
android:name="org.cloud.sonic.android.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".AudioActivity"
android:name="org.cloud.sonic.android.AudioActivity"
android:exported="true"
android:showWhenLocked="true"
android:turnScreenOn="true" />
android:turnScreenOn="true"></activity>

<service
android:name=".AudioService"
android:name="org.cloud.sonic.android.AudioService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="mediaProjection" />
android:foregroundServiceType="mediaProjection"></service>

<activity
android:name=".SearchActivity"
android:name="org.cloud.sonic.android.SearchActivity"
android:excludeFromRecents="true"
android:exported="true"
android:finishOnTaskLaunch="true"
android:noHistory="true"
android:stateNotNeeded="true">
<intent-filter>
<action android:name="org.cloud.sonic.android.ACTION_IDENTIFY" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Expand Down
54 changes: 18 additions & 36 deletions app/src/main/java/org/cloud/sonic/android/SonicTouchService.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public class SonicTouchService extends Thread {
private static final String SOCKET = "sonictouchservice";
private static final int DEFAULT_MAX_CONTACTS = 10;
private static final int DEFAULT_MAX_PRESSURE = 0;
private static final int MAX_POINTERS = 2;
private final int width;
private final int height;
private LocalServerSocket serverSocket;
Expand Down Expand Up @@ -256,47 +255,30 @@ public SonicTouchService(int width, int height, Handler handler) {
this.handler = handler;
inputManager = new InputManagerWrapper();
windowManager = new WindowManagerWrapper();
initPointers();
MotionEvent.PointerProperties pointerProps0 = new MotionEvent.PointerProperties();
pointerProps0.id = 0;
pointerProps0.toolType = MotionEvent.TOOL_TYPE_FINGER;
MotionEvent.PointerProperties pointerProps1 = new MotionEvent.PointerProperties();
pointerProps1.id = 1;
pointerProps1.toolType = MotionEvent.TOOL_TYPE_FINGER;
pointerProperties[0] = pointerProps0;
pointerProperties[1] = pointerProps1;

// MotionEvent.PointerProperties pointerProps0 = new MotionEvent.PointerProperties();
// pointerProps0.id = 0;
// pointerProps0.toolType = MotionEvent.TOOL_TYPE_FINGER;
// MotionEvent.PointerProperties pointerProps1 = new MotionEvent.PointerProperties();
// pointerProps1.id = 1;
// pointerProps1.toolType = MotionEvent.TOOL_TYPE_FINGER;
// pointerProperties[0] = pointerProps0;
// pointerProperties[1] = pointerProps1;

// MotionEvent.PointerCoords pointerCoords0 = new MotionEvent.PointerCoords();
// MotionEvent.PointerCoords pointerCoords1 = new MotionEvent.PointerCoords();
// pointerCoords0.orientation = 0;
// pointerCoords0.pressure = 1;
// pointerCoords0.size = 1;
// pointerCoords1.orientation = 0;
// pointerCoords1.pressure = 1;
// pointerCoords1.size = 1;
// pointerCoords[0] = pointerCoords0;
// pointerCoords[1] = pointerCoords1;
MotionEvent.PointerCoords pointerCoords0 = new MotionEvent.PointerCoords();
MotionEvent.PointerCoords pointerCoords1 = new MotionEvent.PointerCoords();
pointerCoords0.orientation = 0;
pointerCoords0.pressure = 1;
pointerCoords0.size = 1;
pointerCoords1.orientation = 0;
pointerCoords1.pressure = 1;
pointerCoords1.size = 1;
pointerCoords[0] = pointerCoords0;
pointerCoords[1] = pointerCoords1;

events[0] = new PointerEvent();
events[1] = new PointerEvent();
}

public void initPointers(){
for (int i=0; i < MAX_POINTERS; i++){
MotionEvent.PointerProperties props = new MotionEvent.PointerProperties();
props.toolType = MotionEvent.TOOL_TYPE_FINGER;

MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords();
coords.orientation = 0;
coords.size = 0;

pointerProperties[i] = props;
pointerCoords[i] = coords;
}
}


@Override
public void run() {
try {
Expand Down
95 changes: 0 additions & 95 deletions app/src/main/java/org/cloud/sonic/android/util/Elvis.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ImgUtil {

public static String bitmapToDataUri(Bitmap bitmap) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 40, out);
bitmap.compress(Bitmap.CompressFormat.PNG, 10, out);
String base64 = Base64.encodeToString(out.toByteArray(), Base64.NO_WRAP);
return base64;
}
Expand Down
21 changes: 0 additions & 21 deletions app/src/main/java/org/cloud/sonic/android/util/SSIDUtils.java

This file was deleted.

25 changes: 0 additions & 25 deletions app/src/main/java/org/cloud/sonic/android/util/VersionUtils.java

This file was deleted.

Loading