build: update to openpgp-ktx 2.0 (#749)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
f9c310e93a
commit
edc6dcda88
3 changed files with 188 additions and 203 deletions
|
@ -9,15 +9,6 @@ plugins {
|
||||||
|
|
||||||
final def keystorePropertiesFile = rootProject.file 'keystore.properties'
|
final def keystorePropertiesFile = rootProject.file 'keystore.properties'
|
||||||
|
|
||||||
final def gitHash = { ->
|
|
||||||
final def stdout = new ByteArrayOutputStream()
|
|
||||||
exec {
|
|
||||||
commandLine 'git', 'describe', '--tags'
|
|
||||||
standardOutput = stdout
|
|
||||||
}
|
|
||||||
stdout.toString().trim()
|
|
||||||
}
|
|
||||||
|
|
||||||
static final def isSnapshot() {
|
static final def isSnapshot() {
|
||||||
return System.env['GITHUB_WORKFLOW'] != null && System.env['SNAPSHOT'] != null
|
return System.env['GITHUB_WORKFLOW'] != null && System.env['SNAPSHOT'] != null
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,8 +365,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
val oStream = ByteArrayOutputStream()
|
val oStream = ByteArrayOutputStream()
|
||||||
|
|
||||||
lifecycleScope.launch(IO) {
|
lifecycleScope.launch(IO) {
|
||||||
api?.executeApiAsync(data, iStream, oStream, object : OpenPgpApi.IOpenPgpCallback {
|
api?.executeApiAsync(data, iStream, oStream) { result ->
|
||||||
override fun onReturn(result: Intent?) {
|
|
||||||
when (result?.getIntExtra(RESULT_CODE, RESULT_CODE_ERROR)) {
|
when (result?.getIntExtra(RESULT_CODE, RESULT_CODE_ERROR)) {
|
||||||
RESULT_CODE_SUCCESS -> {
|
RESULT_CODE_SUCCESS -> {
|
||||||
try {
|
try {
|
||||||
|
@ -382,7 +381,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
|
|
||||||
if (intent.getStringExtra("OPERATION") == "EDIT") {
|
if (intent.getStringExtra("OPERATION") == "EDIT") {
|
||||||
editPassword()
|
editPassword()
|
||||||
return
|
return@executeApiAsync
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry.password.isEmpty()) {
|
if (entry.password.isEmpty()) {
|
||||||
|
@ -533,7 +532,6 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
RESULT_CODE_ERROR -> handleError(result)
|
RESULT_CODE_ERROR -> handleError(result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,8 +589,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
}
|
}
|
||||||
|
|
||||||
lifecycleScope.launch(IO) {
|
lifecycleScope.launch(IO) {
|
||||||
api?.executeApiAsync(data, iStream, oStream, object : OpenPgpApi.IOpenPgpCallback {
|
api?.executeApiAsync(data, iStream, oStream) { result ->
|
||||||
override fun onReturn(result: Intent?) {
|
|
||||||
when (result?.getIntExtra(RESULT_CODE, RESULT_CODE_ERROR)) {
|
when (result?.getIntExtra(RESULT_CODE, RESULT_CODE_ERROR)) {
|
||||||
RESULT_CODE_SUCCESS -> {
|
RESULT_CODE_SUCCESS -> {
|
||||||
try {
|
try {
|
||||||
|
@ -632,7 +629,6 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
RESULT_CODE_ERROR -> handleError(result)
|
RESULT_CODE_ERROR -> handleError(result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -715,8 +711,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
val data = receivedIntent ?: Intent()
|
val data = receivedIntent ?: Intent()
|
||||||
data.action = OpenPgpApi.ACTION_GET_KEY_IDS
|
data.action = OpenPgpApi.ACTION_GET_KEY_IDS
|
||||||
lifecycleScope.launch(IO) {
|
lifecycleScope.launch(IO) {
|
||||||
api?.executeApiAsync(data, null, null, object : OpenPgpApi.IOpenPgpCallback {
|
api?.executeApiAsync(data, null, null) { result ->
|
||||||
override fun onReturn(result: Intent?) {
|
|
||||||
when (result?.getIntExtra(RESULT_CODE, RESULT_CODE_ERROR)) {
|
when (result?.getIntExtra(RESULT_CODE, RESULT_CODE_ERROR)) {
|
||||||
RESULT_CODE_SUCCESS -> {
|
RESULT_CODE_SUCCESS -> {
|
||||||
try {
|
try {
|
||||||
|
@ -739,7 +734,6 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
|
||||||
RESULT_CODE_ERROR -> handleError(result)
|
RESULT_CODE_ERROR -> handleError(result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ ext.deps = [
|
||||||
jsch: 'com.jcraft:jsch:0.1.55',
|
jsch: 'com.jcraft:jsch:0.1.55',
|
||||||
jgit: 'org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r',
|
jgit: 'org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r',
|
||||||
leakcanary: 'com.squareup.leakcanary:leakcanary-android:2.2',
|
leakcanary: 'com.squareup.leakcanary:leakcanary-android:2.2',
|
||||||
openpgp_ktx: 'com.github.android-password-store:openpgp-ktx:1.2.0',
|
openpgp_ktx: 'com.github.android-password-store:openpgp-ktx:2.0.0',
|
||||||
// The library is updated every two weeks to include the most recent version of the Public
|
// The library is updated every two weeks to include the most recent version of the Public
|
||||||
// suffix list. Its API is expected to remain stable for the foreseeable future, and thus
|
// suffix list. Its API is expected to remain stable for the foreseeable future, and thus
|
||||||
// a reference to the latest version is warranted.
|
// a reference to the latest version is warranted.
|
||||||
|
|
Loading…
Reference in a new issue