Skip to content

Commit

Permalink
更新V1.3.6
Browse files Browse the repository at this point in the history
- 修改仅第一次使用验证激活,后续不在检测
  • Loading branch information
mingzhixian committed Jan 22, 2024
1 parent dc0c0b8 commit f6671d5
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 76 deletions.
4 changes: 2 additions & 2 deletions easycontrol/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "top.saymzx.easycontrol.app"
minSdk 21
targetSdk 34
versionCode 10305
versionName "1.3.5"
versionCode 10306
versionName "1.3.6"
ndk {
abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package top.saymzx.easycontrol.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import top.saymzx.easycontrol.app.databinding.ActivityActiveBinding;
import top.saymzx.easycontrol.app.databinding.ActivityIpBinding;
import top.saymzx.easycontrol.app.entity.AppData;
import top.saymzx.easycontrol.app.helper.ActiveHelper;
import top.saymzx.easycontrol.app.helper.PublicTools;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.util.Log;
import android.widget.Toast;

import java.util.UUID;

import top.saymzx.easycontrol.app.databinding.ActivityMainBinding;
import top.saymzx.easycontrol.app.entity.AppData;
import top.saymzx.easycontrol.app.entity.Device;
import top.saymzx.easycontrol.app.helper.ActiveHelper;
import top.saymzx.easycontrol.app.helper.DeviceListAdapter;
import top.saymzx.easycontrol.app.helper.MyBroadcastReceiver;
import top.saymzx.easycontrol.app.helper.PublicTools;
Expand Down Expand Up @@ -70,9 +68,7 @@ protected void onDestroy() {

// 检测激活
private void checkActive() {
new Thread(() -> {
if (!ActiveHelper.checkOk(AppData.setting.getActiveKey())) AppData.uiHandler.post(() -> startActivity(new Intent(this, ActiveActivity.class)));
}).start();
if (AppData.setting.getActiveKey().equals("")) startActivity(new Intent(this, ActiveActivity.class));
}

// 检查权限
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package top.saymzx.easycontrol.app.adb;

import android.util.Log;
import android.widget.Toast;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
Expand All @@ -19,8 +16,6 @@

import javax.crypto.Cipher;

import top.saymzx.easycontrol.app.entity.AppData;

public class AdbKeyPair {

private final PrivateKey privateKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbRequest;
import android.util.Log;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public BufferStream(UnderlySocketFunction underlySocketFunction) {
this.underlySocketFunction = underlySocketFunction;
}

public void pushSource(byte[] bytes) {
public void pushSource(byte[] bytes) throws IOException {
if (bytes != null) source.write(ByteBuffer.wrap(bytes));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
import android.media.MediaFormat;
import android.media.audiofx.LoudnessEnhancer;
import android.os.Build;
import android.os.Handler;
import android.util.Log;

import androidx.annotation.NonNull;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.LinkedBlockingQueue;

import top.saymzx.easycontrol.app.buffer.BufferNew;

public class AudioDecode {
private MediaCodec decodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@
import android.app.Dialog;
import android.content.ClipData;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbDeviceConnection;
import android.hardware.usb.UsbInterface;
import android.net.LocalServerSocket;
import android.os.Build;
import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
import android.util.Pair;

import java.io.DataInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;

import top.saymzx.easycontrol.app.BuildConfig;
import top.saymzx.easycontrol.app.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
import android.widget.Toast;

import java.io.File;

import top.saymzx.easycontrol.app.R;
import top.saymzx.easycontrol.app.adb.AdbBase64;
import top.saymzx.easycontrol.app.adb.AdbKeyPair;
import top.saymzx.easycontrol.app.helper.DbHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public class Device {
public boolean useH265;
public boolean useOpus;
public int small_x;
public static int SMALL_X =100;
public static int SMALL_X = 100;
public int small_y;
public static int SMALL_Y =100;
public static int SMALL_Y = 100;
public int small_length;
public static int SMALL_LENGTH =1000;
public static int SMALL_LENGTH = 1000;
public int mini_y;
public static int MINI_Y =200;
public static int MINI_Y = 200;

public Device(String uuid,
int type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import android.content.ClipData;
import android.content.Context;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbDeviceConnection;
import android.hardware.usb.UsbInterface;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbManager;
import android.os.Build;
import android.util.Log;

import java.util.Map;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ private static String decodeIntToIp(int ip, int len) {
}

// 浏览器打开
public static void startUrl(Context context,String url) {
public static void startUrl(Context context, String url) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
Expand Down
12 changes: 6 additions & 6 deletions easycontrol/app/src/main/res/drawable/link.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="#FF000000"
android:pathData="M917.7,148.8l-42.4,-42.4c-1.6,-1.6 -3.6,-2.3 -5.7,-2.3s-4.1,0.8 -5.7,2.3l-76.1,76.1c-33.7,-22.9 -72.9,-34.3 -112.1,-34.3 -51.2,0 -102.4,19.5 -141.5,58.6L432.3,308.7c-3.1,3.1 -3.1,8.2 0,11.3L704,591.7c1.6,1.6 3.6,2.3 5.7,2.3 2,0 4.1,-0.8 5.7,-2.3l101.9,-101.9c68.9,-69 77,-175.7 24.3,-253.5l76.1,-76.1c3.1,-3.2 3.1,-8.3 0,-11.4zM769.1,441.7l-59.4,59.4 -186.8,-186.8 59.4,-59.4c24.9,-24.9 58.1,-38.7 93.4,-38.7 35.3,0 68.4,13.7 93.4,38.7 24.9,24.9 38.7,58.1 38.7,93.4 0,35.3 -13.8,68.4 -38.7,93.4zM578.9,546.7c-3.1,-3.1 -8.2,-3.1 -11.3,0L501,613.3 410.7,523l66.7,-66.7c3.1,-3.1 3.1,-8.2 0,-11.3L441,408.6c-3.1,-3.1 -8.2,-3.1 -11.3,0L363,475.3l-43,-43c-1.6,-1.6 -3.6,-2.3 -5.7,-2.3 -2,0 -4.1,0.8 -5.7,2.3L206.8,534.2c-68.9,69 -77,175.7 -24.3,253.5l-76.1,76.1c-3.1,3.1 -3.1,8.2 0,11.3l42.4,42.4c1.6,1.6 3.6,2.3 5.7,2.3s4.1,-0.8 5.7,-2.3l76.1,-76.1c33.7,22.9 72.9,34.3 112.1,34.3 51.2,0 102.4,-19.5 141.5,-58.6l101.9,-101.9c3.1,-3.1 3.1,-8.2 0,-11.3l-43,-43 66.7,-66.7c3.1,-3.1 3.1,-8.2 0,-11.3l-36.6,-36.2zM441.7,769.1c-24.9,24.9 -58.1,38.7 -93.4,38.7 -35.3,0 -68.4,-13.7 -93.4,-38.7 -24.9,-24.9 -38.7,-58.1 -38.7,-93.4 0,-35.3 13.7,-68.4 38.7,-93.4l59.4,-59.4 186.8,186.8 -59.4,59.4z"/>
android:fillColor="#FF000000"
android:pathData="M917.7,148.8l-42.4,-42.4c-1.6,-1.6 -3.6,-2.3 -5.7,-2.3s-4.1,0.8 -5.7,2.3l-76.1,76.1c-33.7,-22.9 -72.9,-34.3 -112.1,-34.3 -51.2,0 -102.4,19.5 -141.5,58.6L432.3,308.7c-3.1,3.1 -3.1,8.2 0,11.3L704,591.7c1.6,1.6 3.6,2.3 5.7,2.3 2,0 4.1,-0.8 5.7,-2.3l101.9,-101.9c68.9,-69 77,-175.7 24.3,-253.5l76.1,-76.1c3.1,-3.2 3.1,-8.3 0,-11.4zM769.1,441.7l-59.4,59.4 -186.8,-186.8 59.4,-59.4c24.9,-24.9 58.1,-38.7 93.4,-38.7 35.3,0 68.4,13.7 93.4,38.7 24.9,24.9 38.7,58.1 38.7,93.4 0,35.3 -13.8,68.4 -38.7,93.4zM578.9,546.7c-3.1,-3.1 -8.2,-3.1 -11.3,0L501,613.3 410.7,523l66.7,-66.7c3.1,-3.1 3.1,-8.2 0,-11.3L441,408.6c-3.1,-3.1 -8.2,-3.1 -11.3,0L363,475.3l-43,-43c-1.6,-1.6 -3.6,-2.3 -5.7,-2.3 -2,0 -4.1,0.8 -5.7,2.3L206.8,534.2c-68.9,69 -77,175.7 -24.3,253.5l-76.1,76.1c-3.1,3.1 -3.1,8.2 0,11.3l42.4,42.4c1.6,1.6 3.6,2.3 5.7,2.3s4.1,-0.8 5.7,-2.3l76.1,-76.1c33.7,22.9 72.9,34.3 112.1,34.3 51.2,0 102.4,-19.5 141.5,-58.6l101.9,-101.9c3.1,-3.1 3.1,-8.2 0,-11.3l-43,-43 66.7,-66.7c3.1,-3.1 3.1,-8.2 0,-11.3l-36.6,-36.2zM441.7,769.1c-24.9,24.9 -58.1,38.7 -93.4,38.7 -35.3,0 -68.4,-13.7 -93.4,-38.7 -24.9,-24.9 -38.7,-58.1 -38.7,-93.4 0,-35.3 13.7,-68.4 38.7,-93.4l59.4,-59.4 186.8,186.8 -59.4,59.4z" />
</vector>
14 changes: 7 additions & 7 deletions easycontrol/app/src/main/res/drawable/lock.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:strokeWidth="1"
android:pathData="m228.9,411.8l0,-150.3a283.1,250.5 0,1 1,566.2 0l0,150.3l56.6,0a113.2,100.2 0,0 1,113.2 100.2l0,400.9a113.2,100.2 0,0 1,-113.2 100.2l-679.4,0a113.2,100.2 0,0 1,-113.2 -100.2l0,-400.9a113.2,100.2 0,0 1,113.2 -100.2l56.6,0zM172.3,512l0,400.9l679.4,0l0,-400.9l-679.4,0zM342.1,411.8l339.7,0l0,-150.3a169.9,150.3 0,0 0,-339.7 0l0,150.3zM625.2,612.2l113.2,0l0,200.4l-113.2,0l0,-200.4z"
android:fillColor="#000000"/>
android:strokeWidth="1"
android:pathData="m228.9,411.8l0,-150.3a283.1,250.5 0,1 1,566.2 0l0,150.3l56.6,0a113.2,100.2 0,0 1,113.2 100.2l0,400.9a113.2,100.2 0,0 1,-113.2 100.2l-679.4,0a113.2,100.2 0,0 1,-113.2 -100.2l0,-400.9a113.2,100.2 0,0 1,113.2 -100.2l56.6,0zM172.3,512l0,400.9l679.4,0l0,-400.9l-679.4,0zM342.1,411.8l339.7,0l0,-150.3a169.9,150.3 0,0 0,-339.7 0l0,150.3zM625.2,612.2l113.2,0l0,200.4l-113.2,0l0,-200.4z"
android:fillColor="#000000" />
</vector>
14 changes: 7 additions & 7 deletions easycontrol/app/src/main/res/drawable/unlock.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:strokeWidth="1"
android:pathData="m252.8,413.9l0,-147.2a259.2,245.4 0,1 1,518.5 0c0,27 -23.3,49.1 -51.8,49.1s-51.8,-22.1 -51.8,-49.1a155.5,147.2 0,0 0,-311.1 0l0,147.2l466.6,0a103.7,98.1 0,0 1,103.7 98.1l0,392.6a103.7,98.1 0,0 1,-103.7 98.1l-622.2,0a103.7,98.1 0,0 1,-103.7 -98.1l0,-392.6a103.7,98.1 0,0 1,103.7 -98.1l51.8,0zM200.9,512l0,392.6l622.2,0l0,-392.6l-622.2,0zM615.7,610.1l103.7,0l0,196.3l-103.7,0l0,-196.3z"
android:fillColor="#000000"/>
android:strokeWidth="1"
android:pathData="m252.8,413.9l0,-147.2a259.2,245.4 0,1 1,518.5 0c0,27 -23.3,49.1 -51.8,49.1s-51.8,-22.1 -51.8,-49.1a155.5,147.2 0,0 0,-311.1 0l0,147.2l466.6,0a103.7,98.1 0,0 1,103.7 98.1l0,392.6a103.7,98.1 0,0 1,-103.7 98.1l-622.2,0a103.7,98.1 0,0 1,-103.7 -98.1l0,-392.6a103.7,98.1 0,0 1,103.7 -98.1l51.8,0zM200.9,512l0,392.6l622.2,0l0,-392.6l-622.2,0zM615.7,610.1l103.7,0l0,196.3l-103.7,0l0,-196.3z"
android:fillColor="#000000" />
</vector>
20 changes: 10 additions & 10 deletions easycontrol/app/src/main/res/drawable/wifi.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
android:width="200dp"
android:height="200dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="#FF000000"
android:pathData="M723,620.5C666.8,571.6 593.4,542 513,542s-153.8,29.6 -210.1,78.6c-3.2,2.8 -3.6,7.8 -0.8,11.2l36,42.9c2.9,3.4 8,3.8 11.4,0.9C393.1,637.2 450.3,614 513,614s119.9,23.2 163.5,61.5c3.4,2.9 8.5,2.5 11.4,-0.9l36,-42.9c2.8,-3.3 2.4,-8.3 -0.9,-11.2zM840.4,480.4C751.7,406.5 637.6,362 513,362s-238.7,44.5 -327.5,118.4c-3.4,2.8 -3.8,7.9 -1,11.3l36,42.9c2.8,3.4 7.9,3.8 11.2,1C308,472.2 406.1,434 513,434s205,38.2 281.2,101.6c3.4,2.8 8.4,2.4 11.2,-1l36,-42.9c2.8,-3.4 2.4,-8.5 -1,-11.3z"/>
android:fillColor="#FF000000"
android:pathData="M723,620.5C666.8,571.6 593.4,542 513,542s-153.8,29.6 -210.1,78.6c-3.2,2.8 -3.6,7.8 -0.8,11.2l36,42.9c2.9,3.4 8,3.8 11.4,0.9C393.1,637.2 450.3,614 513,614s119.9,23.2 163.5,61.5c3.4,2.9 8.5,2.5 11.4,-0.9l36,-42.9c2.8,-3.3 2.4,-8.3 -0.9,-11.2zM840.4,480.4C751.7,406.5 637.6,362 513,362s-238.7,44.5 -327.5,118.4c-3.4,2.8 -3.8,7.9 -1,11.3l36,42.9c2.8,3.4 7.9,3.8 11.2,1C308,472.2 406.1,434 513,434s205,38.2 281.2,101.6c3.4,2.8 8.4,2.4 11.2,-1l36,-42.9c2.8,-3.4 2.4,-8.5 -1,-11.3z" />
<path
android:fillColor="#FF000000"
android:pathData="M957.1,341.4C835.7,241.8 680.3,182 511,182c-168.2,0 -322.6,59 -443.7,157.4 -3.5,2.8 -4,7.9 -1.1,11.4l36,42.9c2.8,3.3 7.8,3.8 11.1,1.1C222,306.7 360.3,254 511,254c151.8,0 291,53.5 400,142.7 3.4,2.8 8.4,2.3 11.2,-1.1l36,-42.9c2.9,-3.4 2.4,-8.5 -1.1,-11.3z"/>
android:fillColor="#FF000000"
android:pathData="M957.1,341.4C835.7,241.8 680.3,182 511,182c-168.2,0 -322.6,59 -443.7,157.4 -3.5,2.8 -4,7.9 -1.1,11.4l36,42.9c2.8,3.3 7.8,3.8 11.1,1.1C222,306.7 360.3,254 511,254c151.8,0 291,53.5 400,142.7 3.4,2.8 8.4,2.3 11.2,-1.1l36,-42.9c2.9,-3.4 2.4,-8.5 -1.1,-11.3z" />
<path
android:fillColor="#FF000000"
android:pathData="M512,778m-64,0a64,64 0,1 0,128 0,64 64,0 1,0 -128,0Z"/>
android:fillColor="#FF000000"
android:pathData="M512,778m-64,0a64,64 0,1 0,128 0,64 64,0 1,0 -128,0Z" />
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.annotation.SuppressLint;
import android.net.LocalServerSocket;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.os.IBinder;
import android.os.IInterface;
import android.system.ErrnoException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static void encodeOut() throws IOException, ErrnoException {
return;
}
}
ControlPacket.sendAudioEvent(buffer.remaining() , buffer);
ControlPacket.sendAudioEvent(buffer.remaining(), buffer);
encedec.releaseOutputBuffer(outIndex, false);
} catch (IllegalStateException ignored) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;

@SuppressLint("PrivateApi")
public final class SurfaceControl {
Expand Down Expand Up @@ -69,7 +68,7 @@ public static void setDisplayLayerStack(IBinder displayToken, int layerStack) th
}

public static void setDisplaySurface(IBinder displayToken, Surface surface) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
CLASS.getMethod("setDisplaySurface", IBinder.class, Surface.class).invoke(null, displayToken, surface);
CLASS.getMethod("setDisplaySurface", IBinder.class, Surface.class).invoke(null, displayToken, surface);
}

public static IBinder createDisplay(String name, boolean secure) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
Expand Down

0 comments on commit f6671d5

Please sign in to comment.