add debugging output
This commit is contained in:
		| @@ -24,6 +24,7 @@ import com.jcraft.jsch.UserInfo; | ||||
| import android.content.Context; | ||||
| import android.content.Intent; | ||||
| import android.os.Bundle; | ||||
| import android.util.Log; | ||||
|  | ||||
| public class SftpStorage extends JavaFileStorageBase { | ||||
|  | ||||
| @@ -323,6 +324,8 @@ public class SftpStorage extends JavaFileStorageBase { | ||||
| 		jsch = new JSch(); | ||||
| 		ConnectionInfo ci = splitStringToConnectionInfo(filename); | ||||
|  | ||||
| 		Log.e("KP2AJFS", "init SFTP"); | ||||
|  | ||||
| 		String base_dir = getBaseDir(); | ||||
| 		jsch.setKnownHosts(base_dir + "/known_hosts"); | ||||
|  | ||||
| @@ -340,7 +343,9 @@ public class SftpStorage extends JavaFileStorageBase { | ||||
|  | ||||
| 		} | ||||
|  | ||||
| 		Log.e("KP2AJFS[thread]", "getting session..."); | ||||
| 		Session session = jsch.getSession(ci.username, ci.host, ci.port); | ||||
| 		Log.e("KP2AJFS", "creating SftpUserInfo"); | ||||
| 		UserInfo ui = new SftpUserInfo(ci.password,_appContext); | ||||
| 		session.setUserInfo(ui); | ||||
|  | ||||
|   | ||||
| @@ -34,7 +34,6 @@ public class SftpUserInfo implements UserInfo { | ||||
| 				builder.setContentText("SFTP prompt"); | ||||
| 				builder.setSmallIcon(R.drawable.ic_logo_green_foreground); | ||||
|  | ||||
|  | ||||
| 				Handler h = new Handler() { | ||||
| 					public void handleMessage(Message M) { | ||||
| 						msg.copyFrom(M); | ||||
| @@ -51,8 +50,12 @@ public class SftpUserInfo implements UserInfo { | ||||
| 				intent.putExtra("keepass2android.sftp.prompt", text); | ||||
| 				intent.setData((Uri.parse("suckit://"+SystemClock.elapsedRealtime()))); | ||||
|  | ||||
|  | ||||
| 				Log.e("KP2AJFS[thread]", "built after 2023-03-14"); | ||||
|  | ||||
| 				int flags = 0; | ||||
| 				if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { | ||||
| 					Log.e("KP2AJFS[thread]", "Setting mutable flag..."); | ||||
| 					flags |= PendingIntent.FLAG_MUTABLE; | ||||
| 				} | ||||
| 				PendingIntent contentIntent = PendingIntent.getActivity(_appContext, 0, intent, flags); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Philipp Crocoll
					Philipp Crocoll