check if permission exists

This commit is contained in:
greenart7c3
2024-04-12 07:47:23 -03:00
parent 439cab2c36
commit c3689a2604
12 changed files with 107 additions and 0 deletions
+97
View File
@@ -0,0 +1,97 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.greenart7c3.nostrsigner",
"variantName": "playRelease",
"elements": [
{
"type": "UNIVERSAL",
"filters": [],
"attributes": [],
"versionCode": 48,
"versionName": "1.0.0",
"outputFile": "app-play-universal-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "arm64-v8a"
}
],
"attributes": [],
"versionCode": 48,
"versionName": "1.0.0",
"outputFile": "app-play-arm64-v8a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86"
}
],
"attributes": [],
"versionCode": 48,
"versionName": "1.0.0",
"outputFile": "app-play-x86-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 48,
"versionName": "1.0.0",
"outputFile": "app-play-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "armeabi-v7a"
}
],
"attributes": [],
"versionCode": 48,
"versionName": "1.0.0",
"outputFile": "app-play-armeabi-v7a-release.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/app-play-universal-release.dm",
"baselineProfiles/1/app-play-arm64-v8a-release.dm",
"baselineProfiles/1/app-play-x86-release.dm",
"baselineProfiles/1/app-play-x86_64-release.dm",
"baselineProfiles/1/app-play-armeabi-v7a-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/app-play-universal-release.dm",
"baselineProfiles/0/app-play-arm64-v8a-release.dm",
"baselineProfiles/0/app-play-x86-release.dm",
"baselineProfiles/0/app-play-x86_64-release.dm",
"baselineProfiles/0/app-play-armeabi-v7a-release.dm"
]
}
],
"minSdkVersionForDexing": 26
}
@@ -235,6 +235,16 @@ class EventNotificationConsumer(private val applicationContext: Context) {
}
}
if (permission == null && applicationWithSecret == null) {
IntentUtils.sendBunkerResponse(
acc,
bunkerRequest.localKey,
BunkerResponse(bunkerRequest.id, "", "no permission"),
relays
) { }
return@nip04Decrypt
}
val cursor = applicationContext.contentResolver.query(
Uri.parse("content://${BuildConfig.APPLICATION_ID}.$type"),
arrayOf(data, pubKey, acc.keyPair.pubKey.toNpub()),