Skip to content

Commit

Permalink
See RN5.1.1 (20240729)
Browse files Browse the repository at this point in the history
- Change NotificationActionService to extend Service to work in foreground; to resolve unhandled markAsRead with JobIntentService.
- Remove unused permissions: ACCESS_MEDIA_LOCATION, GET_ACCOUNTS, and WRITE_CONTACTS.
- Need to add READ_EXTERNAL_STORAGE permission (Files and Media) request for android API-32.
- Implement newly added READ_MEDIA_VISUAL_USER_SELECTED permission for android API-34.
- Do not launch BatteryOptimization permission request within a dialog, else parseResult is based on dialog click.
- ActivityResultContract#parseResult on BatteryOptimization request must return isOptimizingBattery() state.
- Must set both shrinkResources and minifyEnabled to false for release build under API-34;
  else xmail crashes in Moshi with cannot serialize abstract class MessagingControllerCommands$PendingDelete
- UpdateServiceImpl#isLatestVersion need to close inputStream after access end.
- Update all app used libraries to the latest releases.
  • Loading branch information
cmeng-git committed Jul 29, 2024
1 parent f880d43 commit 45c73c0
Show file tree
Hide file tree
Showing 26 changed files with 892 additions and 1,245 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ XryptoMail is an email client designed for android with the following features:
Libraries used in this project
------------------------------
* [Android Support Library](https://developer.android.com/topic/libraries/support-library/index.html)
* [butterknife](https://github.com/JakeWharton/butterknife)
* [ckChangeLog](https://github.com/cketti/ckChangeLog)
* [Commons IO](http://commons.apache.org/io/)
* [Dexter](https://github.com/Karumi/Dexter)
Expand Down
14 changes: 14 additions & 0 deletions XryptoMail/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
XryptoMail Release Notes:
=============================
Version: 5.1.1
Upload Date: 07/29/2024
- Change NotificationActionService to extend Service to work in foreground; to resolve unhandled markAsRead with JobIntentService.
- Remove unused permissions: ACCESS_MEDIA_LOCATION, GET_ACCOUNTS, and WRITE_CONTACTS.
- Need to add READ_EXTERNAL_STORAGE permission (Files and Media) request for android API-32.
- Implement newly added READ_MEDIA_VISUAL_USER_SELECTED permission for android API-34.
- Do not launch BatteryOptimization permission request within a dialog, else parseResult is based on dialog click.
- ActivityResultContract#parseResult on BatteryOptimization request must return isOptimizingBattery() state.
- Must set both shrinkResources and minifyEnabled to false for release build under API-34;
else xmail crashes in Moshi with cannot serialize abstract class MessagingControllerCommands$PendingDelete
- UpdateServiceImpl#isLatestVersion need to close inputStream after access end.
- Update all app used libraries to the latest releases.

=============================
Version: 5.1.0
Upload Date: 07/20/2024
Expand Down
32 changes: 16 additions & 16 deletions XryptoMail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ android {
applicationId "org.atalk.xryptomail"
testApplicationId "org.atalk.xryptomail.tests"

versionCode 19101
versionName '5.1.0'
versionCode 19110
versionName '5.1.1'

minSdkVersion rootProject.minSdk
targetSdkVersion rootProject.compileSdk
Expand Down Expand Up @@ -65,8 +65,10 @@ android {

buildTypes {
release {
shrinkResources true
minifyEnabled true
// Must set below two to flase in API-34 release, else crashes in Moshi with
// Cannot serialize abstract class MessagingControllerCommands$PendingDelete
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "DEVELOPER_MODE", "false"
}
Expand Down Expand Up @@ -146,23 +148,21 @@ dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')

implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.annotation:annotation:1.8.0"
implementation "androidx.annotation:annotation:1.8.1"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "com.google.android.material:material:1.12.0"

implementation project(':plugins:openpgp-api-lib:openpgp-api')
// implementation 'org.sufficientlysecure:openpgp-api:11.0'

implementation 'commons-io:commons-io:2.16.0'
implementation 'commons-io:commons-io:2.16.1'
implementation 'com.beetstra.jutf7:jutf7:1.0.0'
implementation 'com.github.amlcurran.showcaseview:library:5.4.1'

// ContactPictureLoader source is not compatible with v4.x.x
implementation 'com.github.bumptech.glide:glide:3.8.0'

implementation 'com.jakewharton:butterknife:10.2.3'
implementation 'com.google.firebase:firebase-crashlytics-buildtools:3.0.2'

implementation('com.jakewharton.timber:timber:5.0.1') {
transitive = false
}
Expand All @@ -172,8 +172,8 @@ dependencies {
// ImapConnection.open().enableCompressionIfRequested() does not work with jzlib version 1.1.3
implementation 'com.jcraft:jzlib:1.0.7'

implementation 'com.squareup.moshi:moshi:1.13.0'
implementation 'com.squareup.okio:okio:3.1.0'
implementation 'com.squareup.moshi:moshi:1.15.1'
implementation 'com.squareup.okio:okio:3.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.splitwise:tokenautocomplete:2.0.8'
Expand All @@ -184,18 +184,18 @@ dependencies {
implementation 'dnsjava:dnsjava:3.0.2'

implementation 'me.zhanghai.android.materialprogressbar:library:1.4.1'
implementation "me.leolin:ShortcutBadger:1.1.22@aar"
implementation "me.leolin:ShortcutBadger:1.1.22"
implementation 'net.jcip:jcip-annotations:1.0'


implementation 'org.apache.james:apache-mime4j-core:0.8.7'
implementation 'org.apache.james:apache-mime4j-dom:0.8.6'
compileOnly "org.apache.httpcomponents:httpclient:4.5.6"
implementation 'org.apache.httpcomponents.client5:httpclient5:5.1.3'
implementation 'org.apache.james:apache-mime4j-core:0.8.9'
implementation 'org.apache.james:apache-mime4j-dom:0.8.9'
compileOnly "org.apache.httpcomponents:httpclient:4.5.14"
implementation 'org.apache.httpcomponents.client5:httpclient5:5.3.1'
implementation 'org.apache.httpcomponents:httpcore:4.4.16'

// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21"
implementation 'org.jsoup:jsoup:1.15.1'
implementation 'org.jsoup:jsoup:1.17.2'

// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// testImplementation "com.google.truth:truth:${truthVersion}"
Expand Down
6 changes: 3 additions & 3 deletions XryptoMail/release/version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Date: Sat Jul 20 08:47:24 SGT 2024
Date: Mon Jul 29 09:02:43 SGT 2024

last_version=5.1.0
last_version_code=19101
last_version=5.1.1
last_version_code=19110
21 changes: 12 additions & 9 deletions XryptoMail/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@
android:name="android.hardware.wifi"
android:required="false" />

<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission
android:name="android.permission.GET_ACCOUNTS"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!-- Devices running Android 12L (API level 32) or lower -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />

<!-- Devices running Android 13 (API level 33) or higher -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<!-- To handle the reselection within the app on devices running Android 14
or higher if your app targets Android 14 (API level 34) or higher. -->
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Needed to mark a contact as contacted -->
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />

<permission-group
android:name="android.permission-group.MESSAGES"
Expand Down Expand Up @@ -486,6 +488,7 @@
android:name="org.atalk.xryptomail.service.PushService"
android:enabled="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- android:foregroundServiceType="dataSync"-->
<service
android:name="org.atalk.xryptomail.service.PollService"
android:enabled="true"
Expand Down
8 changes: 3 additions & 5 deletions XryptoMail/src/main/java/org/atalk/xryptomail/XryptoMail.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ public interface ApplicationAware {
public static Application mInstance = null;

/**
* Name of the {@link SharedPreferences} file used to store the last known version of the
* accounts' databases.
*
* Name of the {@link SharedPreferences} file used to store the last known version of the accounts' databases.
* See {@link UpgradeDatabases} for a detailed explanation of the database upgrade process.
*/
private static final String DATABASE_VERSION_CACHE = "database_version_cache";
Expand Down Expand Up @@ -679,7 +677,6 @@ public void checkCachedDatabaseVersion() {

/**
* Load preferences into our statics.
*
* If you're adding a preference here, odds are you'll need to add it to
* {@link .preferences.GlobalSettings}, too.
*
Expand Down Expand Up @@ -1484,8 +1481,9 @@ public static String getResString(int id, Object... arg) {
*/
public static void showToastMessage(final String message) {
new Handler(Looper.getMainLooper()).post(() -> {
if (toast != null)
if (toast != null && toast.getView() != null) {
toast.cancel();
}
toast = Toast.makeText(mInstance, message, Toast.LENGTH_LONG);
toast.show();
});
Expand Down
Loading

0 comments on commit 45c73c0

Please sign in to comment.