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
|
### 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
|
#### Version 1.1
|
||||||
* presettings correction to avoid connection problems
|
* presettings correction to avoid connection problems
|
||||||
* some text corrections
|
* 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 "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"
|
||||||
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.14.0"
|
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.14.0"
|
||||||
classpath 'com.novoda:bintray-release:0.8.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
|
// archivesBaseName += "$versionNameSuffix" // activate for beta versions
|
||||||
applicationId "de.monocles.chat"
|
applicationId "de.monocles.chat"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
versionName grgit.describe(always: true)
|
//versionName grgit.describe(always: true)
|
||||||
buildConfigField("String", "LOGTAG", '"monocles chat"')
|
buildConfigField("String", "LOGTAG", '"monocles chat"')
|
||||||
buildConfigField("String", "DOMAIN_LOCK", 'null')
|
buildConfigField("String", "DOMAIN_LOCK", 'null')
|
||||||
buildConfigField("String", "MAGIC_CREATE_DOMAIN", '"monocles.eu"')
|
buildConfigField("String", "MAGIC_CREATE_DOMAIN", '"monocles.eu"')
|
||||||
|
@ -204,6 +205,7 @@ android {
|
||||||
applicationId "de.monocles.chat"
|
applicationId "de.monocles.chat"
|
||||||
buildConfigField("boolean", "SHOW_MIGRATION_INFO", 'false')
|
buildConfigField("boolean", "SHOW_MIGRATION_INFO", 'false')
|
||||||
resValue "string", "applicationId", applicationId
|
resValue "string", "applicationId", applicationId
|
||||||
|
//apply plugin: 'com.google.gms.google-services' // TODO: activate for playstore release
|
||||||
}
|
}
|
||||||
git {
|
git {
|
||||||
dimension "distribution"
|
dimension "distribution"
|
||||||
|
@ -229,7 +231,8 @@ android {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
runProguard 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 {
|
debug {
|
||||||
|
@ -238,7 +241,8 @@ android {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
runProguard 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) {
|
if (baseAbiVersionCode != null) {
|
||||||
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
|
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
|
||||||
} else {
|
} 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",
|
"type": "UNIVERSAL",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 138,
|
"versionCode": 16480,
|
||||||
"versionName": "4135a60",
|
"versionName": "1.7.6.1",
|
||||||
"outputFile": "monocles chat-1.7.6-git-universal-release.apk"
|
"outputFile": "monocles chat-1.7.6.1-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"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ONE_OF_MANY",
|
"type": "ONE_OF_MANY",
|
||||||
|
@ -50,9 +24,35 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 13804,
|
"versionCode": 13904,
|
||||||
"versionName": "4135a60",
|
"versionName": "1.7.6.1",
|
||||||
"outputFile": "monocles chat-1.7.6-git-arm64-v8a-release.apk"
|
"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",
|
"type": "ONE_OF_MANY",
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 13803,
|
"versionCode": 13903,
|
||||||
"versionName": "4135a60",
|
"versionName": "1.7.6.1",
|
||||||
"outputFile": "monocles chat-1.7.6-git-x86_64-release.apk"
|
"outputFile": "monocles chat-1.7.6.1-git-x86_64-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"elementType": "File"
|
"elementType": "File"
|
||||||
|
|
|
@ -11,35 +11,9 @@
|
||||||
"type": "UNIVERSAL",
|
"type": "UNIVERSAL",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 138,
|
"versionCode": 139,
|
||||||
"versionName": "4135a60-playstore",
|
"versionName": "6086d4a-playstore",
|
||||||
"outputFile": "monocles chat-1.7.6-playstore-universal-release.apk"
|
"outputFile": "monocles chat-1.7.6.1-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"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ONE_OF_MANY",
|
"type": "ONE_OF_MANY",
|
||||||
|
@ -50,9 +24,35 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 13803,
|
"versionCode": 13903,
|
||||||
"versionName": "4135a60-playstore",
|
"versionName": "6086d4a-playstore",
|
||||||
"outputFile": "monocles chat-1.7.6-playstore-x86_64-release.apk"
|
"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",
|
"type": "ONE_OF_MANY",
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 13802,
|
"versionCode": 13902,
|
||||||
"versionName": "4135a60-playstore",
|
"versionName": "6086d4a-playstore",
|
||||||
"outputFile": "monocles chat-1.7.6-playstore-x86-release.apk"
|
"outputFile": "monocles chat-1.7.6.1-playstore-x86-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"elementType": "File"
|
"elementType": "File"
|
||||||
|
|
|
@ -531,7 +531,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
return false;
|
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());
|
attachEditorContentToConversation(inputContentInfo.getContentUri());
|
||||||
} else {
|
} else {
|
||||||
mPendingEditorContent = inputContentInfo.getContentUri();
|
mPendingEditorContent = inputContentInfo.getContentUri();
|
||||||
|
@ -1355,7 +1355,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
|
|
||||||
private void commitAttachments() {
|
private void commitAttachments() {
|
||||||
final List<Attachment> attachments = mediaPreviewAdapter.getAttachments();
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (trustKeysIfNeeded(conversation, REQUEST_TRUST_KEYS_ATTACHMENTS)) {
|
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)) {
|
if (!hasPermissions(attachmentChoice, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_FILE || attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_IMAGE || attachmentChoice == ATTACHMENT_CHOICE_CHOOSE_VIDEO) {
|
} 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) && !Compatibility.runsThirtyThree()) {
|
if (!hasPermissions(attachmentChoice, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue