mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Bumped a bunch of library and sdk versions
This commit is contained in:
parent
1ca09d7f58
commit
2421abea22
24
build.gradle
24
build.gradle
@ -3,15 +3,15 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.3.0'
|
classpath 'com.android.tools.build:gradle:1.5.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 23
|
||||||
buildToolsVersion '22.0.1'
|
buildToolsVersion '23.0.2'
|
||||||
dexOptions {
|
dexOptions {
|
||||||
javaMaxHeapSize "4g"
|
javaMaxHeapSize "4g"
|
||||||
}
|
}
|
||||||
@ -38,6 +38,7 @@ android {
|
|||||||
pickFirst "META-INF/BCKEY.SF"
|
pickFirst "META-INF/BCKEY.SF"
|
||||||
pickFirst "META-INF/BCKEY.DSA"
|
pickFirst "META-INF/BCKEY.DSA"
|
||||||
pickFirst "META-INF/INDEX.LIST"
|
pickFirst "META-INF/INDEX.LIST"
|
||||||
|
pickFirst "META-INF/io.netty.versions.properties"
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
@ -55,18 +56,21 @@ dependencies {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
compile 'com.android.support:support-v4:22.2.1'
|
compile 'com.android.support:support-v4:23.1.1'
|
||||||
compile 'com.android.support:appcompat-v7:22.2.1'
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||||
compile 'com.android.support:design:22.2.1'
|
compile 'com.android.support:design:23.1.1'
|
||||||
|
|
||||||
compile 'org.apache.sshd:sshd-core:0.8.0'
|
compile 'org.apache.sshd:sshd-core:0.8.0'
|
||||||
compile 'com.madgag.spongycastle:pkix:1.52.0.0'
|
compile 'com.madgag.spongycastle:pkix:1.54.0.0'
|
||||||
compile 'org.bouncycastle:bcprov-jdk16:1.46'
|
//compile 'org.bouncycastle:bcpkix-jdk15on:1.54'
|
||||||
// compile 'io.netty:netty-handler:4.0.30.Final' // We use a custom-built netty in libs directory due to ssl related bug
|
//compile 'org.bouncycastle:bcprov-jdk15on:1.54'
|
||||||
compile fileTree(include: '*.jar', dir: 'libs')
|
|
||||||
|
compile 'io.netty:netty-handler:4.0.33.Final' // Update to 4.1 when released, for compat with Android 5.0
|
||||||
|
|
||||||
androidTestCompile 'org.mockito:mockito-core:1.10.19'
|
androidTestCompile 'org.mockito:mockito-core:1.10.19'
|
||||||
// Because mockito has some problems with dex environment
|
// Because mockito has some problems with dex environment
|
||||||
androidTestCompile 'com.google.dexmaker:dexmaker:1.1'
|
androidTestCompile 'com.google.dexmaker:dexmaker:1.1'
|
||||||
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.1'
|
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.1'
|
||||||
|
|
||||||
|
//compile fileTree(include: '*.jar', dir: 'libs')
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -21,11 +21,8 @@
|
|||||||
package org.kde.kdeconnect.Backends.LanBackend;
|
package org.kde.kdeconnect.Backends.LanBackend;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.apache.mina.core.future.WriteFuture;
|
|
||||||
import org.apache.mina.core.session.IoSession;
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.kde.kdeconnect.Backends.BaseLink;
|
import org.kde.kdeconnect.Backends.BaseLink;
|
||||||
import org.kde.kdeconnect.Backends.BaseLinkProvider;
|
import org.kde.kdeconnect.Backends.BaseLinkProvider;
|
||||||
@ -43,17 +40,13 @@ import java.net.InetSocketAddress;
|
|||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.nio.channels.NotYetConnectedException;
|
import java.nio.channels.NotYetConnectedException;
|
||||||
import java.security.PrivateKey;
|
|
||||||
import java.security.PublicKey;
|
import java.security.PublicKey;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
import javax.net.ssl.SSLServerSocketFactory;
|
import javax.net.ssl.SSLServerSocketFactory;
|
||||||
|
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelFutureListener;
|
|
||||||
import io.netty.util.AttributeKey;
|
|
||||||
|
|
||||||
public class LanLink extends BaseLink {
|
public class LanLink extends BaseLink {
|
||||||
|
|
||||||
|
@ -27,18 +27,6 @@ import android.support.v4.util.LongSparseArray;
|
|||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.apache.mina.core.future.ConnectFuture;
|
|
||||||
import org.apache.mina.core.future.IoFuture;
|
|
||||||
import org.apache.mina.core.future.IoFutureListener;
|
|
||||||
import org.apache.mina.core.service.IoHandler;
|
|
||||||
import org.apache.mina.core.service.IoHandlerAdapter;
|
|
||||||
import org.apache.mina.core.session.IoSession;
|
|
||||||
import org.apache.mina.filter.codec.ProtocolCodecFilter;
|
|
||||||
import org.apache.mina.filter.codec.textline.LineDelimiter;
|
|
||||||
import org.apache.mina.filter.codec.textline.TextLineCodecFactory;
|
|
||||||
import org.apache.mina.transport.socket.nio.NioDatagramAcceptor;
|
|
||||||
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
|
|
||||||
import org.apache.mina.transport.socket.nio.NioSocketConnector;
|
|
||||||
import org.kde.kdeconnect.Backends.BaseLink;
|
import org.kde.kdeconnect.Backends.BaseLink;
|
||||||
import org.kde.kdeconnect.Backends.BaseLinkProvider;
|
import org.kde.kdeconnect.Backends.BaseLinkProvider;
|
||||||
import org.kde.kdeconnect.BackgroundService;
|
import org.kde.kdeconnect.BackgroundService;
|
||||||
|
@ -23,7 +23,6 @@ package org.kde.kdeconnect.Plugins.SftpPlugin;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.apache.http.conn.util.InetAddressUtils;
|
|
||||||
import org.apache.sshd.SshServer;
|
import org.apache.sshd.SshServer;
|
||||||
import org.apache.sshd.common.NamedFactory;
|
import org.apache.sshd.common.NamedFactory;
|
||||||
import org.apache.sshd.common.Session;
|
import org.apache.sshd.common.Session;
|
||||||
@ -42,6 +41,7 @@ import org.apache.sshd.server.sftp.SftpSubsystem;
|
|||||||
import org.kde.kdeconnect.Device;
|
import org.kde.kdeconnect.Device;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
@ -161,7 +161,7 @@ class SimpleSftpServer {
|
|||||||
InetAddress inetAddress = enumIpAddr.nextElement();
|
InetAddress inetAddress = enumIpAddr.nextElement();
|
||||||
if (!inetAddress.isLoopbackAddress()) {
|
if (!inetAddress.isLoopbackAddress()) {
|
||||||
String address = inetAddress.getHostAddress();
|
String address = inetAddress.getHostAddress();
|
||||||
if (InetAddressUtils.isIPv4Address(address)) { //Prefer IPv4 over IPv6, because sshfs doesn't seem to like IPv6
|
if(inetAddress instanceof Inet4Address) { //Prefer IPv4 over IPv6, because sshfs doesn't seem to like IPv6
|
||||||
return address;
|
return address;
|
||||||
} else {
|
} else {
|
||||||
ip6 = address;
|
ip6 = address;
|
||||||
|
@ -41,6 +41,7 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
private NavigationView mNavigationView;
|
private NavigationView mNavigationView;
|
||||||
private DrawerLayout mDrawerLayout;
|
private DrawerLayout mDrawerLayout;
|
||||||
private ActionBarDrawerToggle mDrawerToggle;
|
private ActionBarDrawerToggle mDrawerToggle;
|
||||||
|
private View mDrawerHeader;
|
||||||
|
|
||||||
private String mCurrentDevice;
|
private String mCurrentDevice;
|
||||||
|
|
||||||
@ -54,6 +55,7 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
mNavigationView = (NavigationView) findViewById(R.id.navigation_drawer);
|
mNavigationView = (NavigationView) findViewById(R.id.navigation_drawer);
|
||||||
|
mDrawerHeader = mNavigationView.getHeaderView(0);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
@ -74,7 +76,7 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
mDrawerToggle.syncState();
|
mDrawerToggle.syncState();
|
||||||
|
|
||||||
String deviceName = DeviceHelper.getDeviceName(this);
|
String deviceName = DeviceHelper.getDeviceName(this);
|
||||||
TextView nameView = (TextView) mDrawerLayout.findViewById(R.id.device_name);
|
TextView nameView = (TextView) mDrawerHeader.findViewById(R.id.device_name);
|
||||||
nameView.setText(deviceName);
|
nameView.setText(deviceName);
|
||||||
|
|
||||||
View.OnClickListener renameListener = new View.OnClickListener() {
|
View.OnClickListener renameListener = new View.OnClickListener() {
|
||||||
@ -83,8 +85,8 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
renameDevice();
|
renameDevice();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mDrawerLayout.findViewById(R.id.kdeconnect_label).setOnClickListener(renameListener);
|
mDrawerHeader.findViewById(R.id.kdeconnect_label).setOnClickListener(renameListener);
|
||||||
mDrawerLayout.findViewById(R.id.device_name).setOnClickListener(renameListener);
|
mDrawerHeader.findViewById(R.id.device_name).setOnClickListener(renameListener);
|
||||||
|
|
||||||
mNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
|
mNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -261,7 +263,7 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void renameDevice() {
|
public void renameDevice() {
|
||||||
final TextView nameView = (TextView) mDrawerLayout.findViewById(R.id.device_name);
|
final TextView nameView = (TextView) mNavigationView.findViewById(R.id.device_name);
|
||||||
final EditText deviceNameEdit = new EditText(MaterialActivity.this);
|
final EditText deviceNameEdit = new EditText(MaterialActivity.this);
|
||||||
String deviceName = DeviceHelper.getDeviceName(MaterialActivity.this);
|
String deviceName = DeviceHelper.getDeviceName(MaterialActivity.this);
|
||||||
deviceNameEdit.setText(deviceName);
|
deviceNameEdit.setText(deviceName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user