Skip to content

Commit

Permalink
fix: disable tcpip
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 committed Feb 7, 2024
1 parent bf5fdaa commit 3152f46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/xtr/keymapper/server/RemoteService.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ public static void loadLibraries() {
}

public static IRemoteService getInstance(){
// return IRemoteService.Stub.asInterface(ServiceManager.getService("xtmapper"));
return new RemoteServiceSocketClient();
// return new RemoteServiceSocketClient();
return IRemoteService.Stub.asInterface(ServiceManager.getService("xtmapper"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ private <T> T readTypedObject(android.os.Parcelable.Creator<T> c) {
try {
int length = inputStream.read();
byte[] bytes = new byte[length];
System.out.println(length);
inputStream.read(bytes);
System.out.println(bytes.toString());
parcel.unmarshall(bytes, 0, length);
parcel.setDataPosition(0);
} catch (IOException e) {
Expand All @@ -43,8 +45,10 @@ public RemoteServiceSocketServer(RemoteService mService) {
outputStream = socket.getOutputStream();
while (true) {
int code = inputStream.read();
if (code == -1) continue;

int length = inputStream.read();
if (length == -1) continue;
byte[] b = new byte[length];
inputStream.read(b);

Expand Down

0 comments on commit 3152f46

Please sign in to comment.