Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java
Show All 33 Lines | |||||
34 | 34 | | |||
35 | public class SftpPlugin extends Plugin { | 35 | public class SftpPlugin extends Plugin { | ||
36 | 36 | | |||
37 | public final static String PACKAGE_TYPE_SFTP = "kdeconnect.sftp"; | 37 | public final static String PACKAGE_TYPE_SFTP = "kdeconnect.sftp"; | ||
38 | public final static String PACKAGE_TYPE_SFTP_REQUEST = "kdeconnect.sftp.request"; | 38 | public final static String PACKAGE_TYPE_SFTP_REQUEST = "kdeconnect.sftp.request"; | ||
39 | 39 | | |||
40 | private static final SimpleSftpServer server = new SimpleSftpServer(); | 40 | private static final SimpleSftpServer server = new SimpleSftpServer(); | ||
41 | 41 | | |||
42 | private int sftpPermissionExplanation = R.string.sftp_permission_explanation; | | |||
43 | | ||||
44 | @Override | 42 | @Override | ||
45 | public String getDisplayName() { | 43 | public String getDisplayName() { | ||
46 | return context.getResources().getString(R.string.pref_plugin_sftp); | 44 | return context.getResources().getString(R.string.pref_plugin_sftp); | ||
47 | } | 45 | } | ||
48 | 46 | | |||
49 | @Override | 47 | @Override | ||
50 | public String getDescription() { | 48 | public String getDescription() { | ||
51 | return context.getResources().getString(R.string.pref_plugin_sftp_desc); | 49 | return context.getResources().getString(R.string.pref_plugin_sftp_desc); | ||
52 | } | 50 | } | ||
53 | 51 | | |||
54 | @Override | 52 | @Override | ||
55 | public boolean onCreate() { | 53 | public boolean onCreate() { | ||
56 | server.init(context, device); | 54 | server.init(context, device); | ||
57 | permissionExplanation = sftpPermissionExplanation; | 55 | permissionExplanation = R.string.sftp_permission_explanation; | ||
58 | return true; | 56 | return true; | ||
59 | } | 57 | } | ||
60 | 58 | | |||
61 | @Override | 59 | @Override | ||
62 | public void onDestroy() { | 60 | public void onDestroy() { | ||
63 | server.stop(); | 61 | server.stop(); | ||
64 | } | 62 | } | ||
65 | 63 | | |||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |