forked from mirror/monocles_chat
prepare 1.7.6 improve permission requests
This commit is contained in:
parent
6086d4a1cf
commit
6a24d2e54a
5 changed files with 90 additions and 78 deletions
|
@ -1,5 +1,13 @@
|
|||
### Changelog
|
||||
|
||||
#### Version 1.7.6
|
||||
* Introduction of Material 3
|
||||
* Option to get square avatars back
|
||||
* Option to show only needed avatars in chats
|
||||
* Improved layouts and design
|
||||
* Fixed and improved permissions for Android > 13
|
||||
* Reviving internal updater
|
||||
|
||||
#### Version 1.1
|
||||
* presettings correction to avoid connection problems
|
||||
* some text corrections
|
||||
|
|
12
build.gradle
12
build.gradle
|
@ -10,6 +10,7 @@ buildscript {
|
|||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"
|
||||
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.14.0"
|
||||
classpath 'com.novoda:bintray-release:0.8.0'
|
||||
//classpath 'com.google.gms:google-services:4.4.0' // TODO: activate for playstore release
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +164,7 @@ android {
|
|||
// archivesBaseName += "$versionNameSuffix" // activate for beta versions
|
||||
applicationId "de.monocles.chat"
|
||||
multiDexEnabled true
|
||||
versionName grgit.describe(always: true)
|
||||
//versionName grgit.describe(always: true)
|
||||
buildConfigField("String", "LOGTAG", '"monocles chat"')
|
||||
buildConfigField("String", "DOMAIN_LOCK", 'null')
|
||||
buildConfigField("String", "MAGIC_CREATE_DOMAIN", '"monocles.eu"')
|
||||
|
@ -204,6 +205,7 @@ android {
|
|||
applicationId "de.monocles.chat"
|
||||
buildConfigField("boolean", "SHOW_MIGRATION_INFO", 'false')
|
||||
resValue "string", "applicationId", applicationId
|
||||
//apply plugin: 'com.google.gms.google-services' // TODO: activate for playstore release
|
||||
}
|
||||
git {
|
||||
dimension "distribution"
|
||||
|
@ -229,7 +231,8 @@ android {
|
|||
minifyEnabled true
|
||||
shrinkResources true
|
||||
runProguard true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
debug {
|
||||
|
@ -238,7 +241,8 @@ android {
|
|||
minifyEnabled true
|
||||
shrinkResources true
|
||||
runProguard true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -271,7 +275,7 @@ android {
|
|||
if (baseAbiVersionCode != null) {
|
||||
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
|
||||
} else {
|
||||
// output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + grgit.log(includes: ["HEAD"], excludes: [tags.last()]).size()
|
||||
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + grgit.log(includes: ["HEAD"], excludes: [tags.last()]).size()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,35 +11,9 @@
|
|||
"type": "UNIVERSAL",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 138,
|
||||
"versionName": "4135a60",
|
||||
"outputFile": "monocles chat-1.7.6-git-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13802,
|
||||
"versionName": "4135a60",
|
||||
"outputFile": "monocles chat-1.7.6-git-x86-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13801,
|
||||
"versionName": "4135a60",
|
||||
"outputFile": "monocles chat-1.7.6-git-armeabi-v7a-release.apk"
|
||||
"versionCode": 16480,
|
||||
"versionName": "1.7.6.1",
|
||||
"outputFile": "monocles chat-1.7.6.1-git-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
|
@ -50,9 +24,35 @@
|
|||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13804,
|
||||
"versionName": "4135a60",
|
||||
"outputFile": "monocles chat-1.7.6-git-arm64-v8a-release.apk"
|
||||
"versionCode": 13904,
|
||||
"versionName": "1.7.6.1",
|
||||
"outputFile": "monocles chat-1.7.6.1-git-arm64-v8a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "x86"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13902,
|
||||
"versionName": "1.7.6.1",
|
||||
"outputFile": "monocles chat-1.7.6.1-git-x86-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13901,
|
||||
"versionName": "1.7.6.1",
|
||||
"outputFile": "monocles chat-1.7.6.1-git-armeabi-v7a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
|
@ -63,9 +63,9 @@
|
|||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13803,
|
||||
"versionName": "4135a60",
|
||||
"outputFile": "monocles chat-1.7.6-git-x86_64-release.apk"
|
||||
"versionCode": 13903,
|
||||
"versionName": "1.7.6.1",
|
||||
"outputFile": "monocles chat-1.7.6.1-git-x86_64-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
|
|
|
@ -11,35 +11,9 @@
|
|||
"type": "UNIVERSAL",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 138,
|
||||
"versionName": "4135a60-playstore",
|
||||
"outputFile": "monocles chat-1.7.6-playstore-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "arm64-v8a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13804,
|
||||
"versionName": "4135a60-playstore",
|
||||
"outputFile": "monocles chat-1.7.6-playstore-arm64-v8a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13801,
|
||||
"versionName": "4135a60-playstore",
|
||||
"outputFile": "monocles chat-1.7.6-playstore-armeabi-v7a-release.apk"
|
||||
"versionCode": 139,
|
||||
"versionName": "6086d4a-playstore",
|
||||
"outputFile": "monocles chat-1.7.6.1-playstore-universal-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
|
@ -50,9 +24,35 @@
|
|||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13803,
|
||||
"versionName": "4135a60-playstore",
|
||||
"outputFile": "monocles chat-1.7.6-playstore-x86_64-release.apk"
|
||||
"versionCode": 13903,
|
||||
"versionName": "6086d4a-playstore",
|
||||
"outputFile": "monocles chat-1.7.6.1-playstore-x86_64-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "armeabi-v7a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13901,
|
||||
"versionName": "6086d4a-playstore",
|
||||
"outputFile": "monocles chat-1.7.6.1-playstore-armeabi-v7a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
"filters": [
|
||||
{
|
||||
"filterType": "ABI",
|
||||
"value": "arm64-v8a"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13904,
|
||||
"versionName": "6086d4a-playstore",
|
||||
"outputFile": "monocles chat-1.7.6.1-playstore-arm64-v8a-release.apk"
|
||||
},
|
||||
{
|
||||
"type": "ONE_OF_MANY",
|
||||
|
@ -63,9 +63,9 @@
|
|||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"versionCode": 13802,
|
||||
"versionName": "4135a60-playstore",
|
||||
"outputFile": "monocles chat-1.7.6-playstore-x86-release.apk"
|
||||
"versionCode": 13902,
|
||||
"versionName": "6086d4a-playstore",
|
||||
"outputFile": "monocles chat-1.7.6.1-playstore-x86-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
|
|
|
@ -531,7 +531,7 @@ public class ConversationFragment extends XmppFragment
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if ((Compatibility.runsThirtyThree() && hasPermissions(REQUEST_ADD_EDITOR_CONTENT)) || (hasPermissions(REQUEST_ADD_EDITOR_CONTENT, Manifest.permission.WRITE_EXTERNAL_STORAGE) && hasPermissions(REQUEST_ADD_EDITOR_CONTENT, Manifest.permission.READ_EXTERNAL_STORAGE))) {
|
||||
if ((Compatibility.runsThirtyThree()) || (hasPermissions(REQUEST_ADD_EDITOR_CONTENT, Manifest.permission.WRITE_EXTERNAL_STORAGE) && hasPermissions(REQUEST_ADD_EDITOR_CONTENT, Manifest.permission.READ_EXTERNAL_STORAGE))) {
|
||||
attachEditorContentToConversation(inputContentInfo.getContentUri());
|
||||
} else {
|
||||
mPendingEditorContent = inputContentInfo.getContentUri();
|
||||
|
@ -1355,7 +1355,7 @@ public class ConversationFragment extends XmppFragment
|
|||
|
||||
private void commitAttachments() {
|
||||
final List<Attachment> attachments = mediaPreviewAdapter.getAttachments();
|
||||
if (anyNeedsExternalStoragePermission(attachments) && !hasPermissions(REQUEST_COMMIT_ATTACHMENTS, Manifest.permission.WRITE_EXTERNAL_STORAGE) && Compatibility.runsThirtyThree()) {
|
||||
if ((anyNeedsExternalStoragePermission(attachments) && !hasPermissions(REQUEST_COMMIT_ATTACHMENTS, Manifest.permission.WRITE_EXTERNAL_STORAGE)) && !Compatibility.runsThirtyThree()) {
|
||||
return;
|
||||
}
|
||||
if (trustKeysIfNeeded(conversation, REQUEST_TRUST_KEYS_ATTACHMENTS)) {
|
||||
|
@ -2554,8 +2554,8 @@ public class ConversationFragment extends XmppFragment
|
|||
if (!hasPermissions(attachmentChoice, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION)) {
|
||||
return;
|
||||
}
|
||||
} else if (attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_FILE || attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_IMAGE || attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_VIDEO) {
|
||||
if (!hasPermissions(attachmentChoice, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE) && !Compatibility.runsThirtyThree()) {
|
||||
} else if ((attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_FILE || attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_IMAGE || attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_VIDEO) && !Compatibility.runsThirtyThree()) {
|
||||
if (!hasPermissions(attachmentChoice, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue