mirror of
https://github.com/revanced/jadb.git
synced 2024-11-19 10:39:23 +01:00
Replace hardcoded method with constant
This commit is contained in:
parent
eb853f2b01
commit
c39c0d16ee
@ -16,6 +16,8 @@ public class JadbDevice {
|
||||
BootLoader
|
||||
}
|
||||
|
||||
//noinspection OctalInteger
|
||||
private static final int DEFAULT_MODE = 0664;
|
||||
private final String serial;
|
||||
private final ITransportFactory transportFactory;
|
||||
|
||||
@ -146,11 +148,6 @@ public class JadbDevice {
|
||||
return result;
|
||||
}
|
||||
|
||||
private int getMode(File file) {
|
||||
//noinspection OctalInteger
|
||||
return 0664;
|
||||
}
|
||||
|
||||
public void push(InputStream source, long lastModified, int mode, RemoteFile remote) throws IOException, JadbException {
|
||||
Transport transport = getTransport();
|
||||
SyncTransport sync = transport.startSync();
|
||||
@ -164,7 +161,7 @@ public class JadbDevice {
|
||||
|
||||
public void push(File local, RemoteFile remote) throws IOException, JadbException {
|
||||
try (FileInputStream fileStream = new FileInputStream(local)) {
|
||||
push(fileStream, local.lastModified(), getMode(local), remote);
|
||||
push(fileStream, local.lastModified(), DEFAULT_MODE, remote);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user