Commit graph

2490 commits

Author SHA1 Message Date
Naveen Singh
545439f353
Add names to call arguments 2025-01-03 19:37:16 +05:30
Naveen Singh
58169dfd2c
Never show 'Settings' options as actions
Closes https://github.com/FossifyOrg/Messages/issues/268
2024-12-29 11:59:52 +05:30
Naveen Singh
011dc3393e
Merge branch 'master' into pr/import-fix-timestamps 2024-12-27 17:46:11 +05:30
Naveen Singh
43c30eda08
Remove unnecessary check 2024-12-27 17:30:27 +05:30
Tom Levy
3ad36c0021 Fix conversation dates on import
When we insert a message, Android's Telephony provider sets the
conversation date to the current time rather than the time of the
message that was inserted.[1] This commit implements a workaround that
fixes the conversation timestamps.

Fixes #146, #42.

[1] https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android14-release/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java#134
2024-12-27 11:58:41 +00:00
Tom Levy
bfd5450435 Add bulk version of updateLastConversationMessage()
In situations where we want to update multiple conversations (e.g.
during import), we can make it faster by only calling
contentResolver.delete() once.

(We still make separate calls to getConversations() because it doesn't
support multiple IDs, and likewise insertOrUpdateConversation()
doesn't support bulk insert.)
2024-12-27 11:58:41 +00:00
Naveen Singh
787f4cb2e1
Clear typed messages for short codes 2024-12-27 16:39:53 +05:30
Naveen Singh
be553f0b10
Use queryCursor extension for deleting drafts 2024-12-27 16:38:55 +05:30
Naveen Singh
757d849875
Add divider between toolbar and messages 2024-12-27 16:30:07 +05:30
Naveen Singh
6fba0bfdd8
Clear drafts before saving new one
This may resolve https://github.com/FossifyOrg/Messages/issues/13
2024-12-27 15:35:19 +05:30
Naveen Singh
0294ada284
Replace checkboxes with switches
See https://github.com/orgs/FossifyOrg/discussions/78
2024-12-26 14:22:28 +05:30
Naveen Singh
3b4f084a83
Disable language splits
See https://github.com/FossifyOrg/General-Discussion/issues/242
2024-12-26 14:11:38 +05:30
Naveen Singh
6936a10345
Update prepaid flavor config 2024-12-26 14:11:16 +05:30
Naveen Singh
7d2b87adc1
Remove support for Android and older versions
See https://github.com/orgs/FossifyOrg/discussions/241
2024-12-26 14:09:12 +05:30
Naveen Singh
3f17c2d94c
Setup full screen app lock
- Updated commons
2024-12-26 13:16:44 +05:30
Agnieszka C
bec1919821
Translated using Weblate (Polish)
Currently translated at 99.0% (109 of 110 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/pl/
2024-12-25 18:05:02 +01:00
109247019824
de71562b04
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/bg/
2024-12-25 17:17:55 +01:00
Trond Kjetil Bremnes
da39552a5b
Translated using Weblate (Norwegian Bokmål)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/nb_NO/
2024-12-25 17:17:55 +01:00
109247019824
71e97804bc
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/bg/
2024-12-25 17:17:55 +01:00
Aindriú Mac Giolla Eoin
d71bcd7179
Translated using Weblate (Irish)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/ga/
2024-12-25 17:17:55 +01:00
Aindriú Mac Giolla Eoin
5fe4a76e2d
Added translation using Weblate (Irish) 2024-12-25 17:17:55 +01:00
Naveen Singh
ebe7e92982
Limit subscription id workaround to Android 14+ 2024-12-25 21:47:45 +05:30
Naveen Singh
5683087ca0
Format code 2024-12-25 21:35:29 +05:30
Naveen Singh
025a3a2729
Merge branch 'master' into import_export_keywords 2024-12-25 20:46:51 +05:30
Naveen Singh
c19277a28f
Merge pull request #192 from tom93/pr/fix-subscriptionId-android-14
Fix missing messages after import on Android 14 due to subscriptionId
2024-12-25 20:46:28 +05:30
Naveen Singh
9d60c516d0
Merge branch 'master' into fix-deletion 2024-12-25 19:44:32 +05:30
Naveen Singh
188e8f9ea4
Merge branch 'master' into json-streams 2024-12-25 18:10:09 +05:30
Naveen Singh
29520d5a2d
Construct import mime type based on API level
Format code.
2024-12-25 18:01:03 +05:30
Naveen Singh
8d306941a0
Merge branch 'master' into fix-import-binary-mime-type 2024-12-25 17:20:44 +05:30
Agnieszka C
48dcb05554 Added sorting blocked keywords (#256) 2024-12-08 09:50:49 +01:00
Naveen Singh
15a521df7c
Merge pull request #210 from gardener2/mms-blocking-fix
Implemented blocking logic on MMS received
2024-11-29 19:02:16 +05:30
Naveen Singh
826a7d684c
Merge pull request #136 from tom93/fix-export-missing-file-extension
Fix missing .json file extension when exporting messages
2024-11-29 18:47:51 +05:30
CyanWolf
9f36d82fb0
Translated using Weblate (Spanish)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/es/
2024-11-17 19:16:11 +01:00
Sergio Marques
4d199d2334
Translated using Weblate (Portuguese)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/pt/
2024-11-17 19:16:10 +01:00
Yeasin Hossain
cca9159279
Translated using Weblate (Bengali (Bangladesh))
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/bn_BD/
2024-11-17 19:16:07 +01:00
Suguru Hirahara
eeb630911b
Translated using Weblate (Japanese)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/ja/
2024-11-17 19:16:06 +01:00
Hosted Weblate
109be8da6e
Update translation files
Updated by "Remove blank strings" hook in Weblate.

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/
2024-11-17 19:16:03 +01:00
Yeasin Hossain
dd22ad541d
Translated using Weblate (Bengali (Bangladesh))
Currently translated at 76.6% (82 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/bn_BD/
2024-11-17 19:16:02 +01:00
Sérgio Marques
7999fc0f14
Translated using Weblate (Portuguese (Portugal))
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/pt_PT/
2024-11-17 19:16:01 +01:00
Assem Askarova
17bd8fe046
Translated using Weblate (Japanese)
Currently translated at 88.7% (95 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/ja/
2024-11-17 19:16:00 +01:00
Naveen Singh
bfa1f879a2
Merge pull request #150 from tom93/refactor-extensions-Context
Refactor extensions/Context.kt slightly
2024-11-15 15:21:01 +05:30
Ensar Sarajčić
c425db736f Add reusable workflows for PRs and testing builds 2024-09-28 12:36:38 +02:00
gardener2
23080debfe Implemented blocking logic on MMS received, for both unknown numbers and keyword filtering 2024-08-24 17:43:39 -06:00
Tom Levy
3b389c5a3f Fix missing messages after import on Android 14 due to subscriptionId
On Android 14, imported messages are not visible if their
subscriptionId[1] does not correspond to one of the SIMs in the
device. As a workaround, we set subscriptionId to -1 ("unknown") on
all messages during import.

This does mean that when exporting then importing on the same device,
the SIM associations will be lost. But that doesn't seem noticeable.

Credit: SMS Import / Export app,
https://www.github.com/tmo1/sms-ie/issues/128

Fixes #191.

[1] https://developer.android.com/identity/user-data-ids#mobile-subscription-status
2024-07-15 13:42:36 +00:00
ERYpTION
b8b86634c9
Translated using Weblate (Danish)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/da/
2024-07-14 10:09:18 +02:00
Alexander Gabilondo
b6fb257983
Translated using Weblate (Basque)
Currently translated at 17.7% (19 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/eu/
2024-06-26 00:09:47 +02:00
Dan
c8112adf30
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (107 of 107 strings)

Translation: Fossify/Messages
Translate-URL: https://hosted.weblate.org/projects/fossify/sms-messenger/uk/
2024-05-22 23:02:08 +02:00
Tom Levy
99cea602c8 Fix deletion of random SMS when trying to update threads
Commit 44c540b9 (Fixed updating last message after deleting (#167),
2021-09-04) introduced a hack to update the conversation snippet,
however there is a bug in that code: it tries to delete by thread ID,
but the condition is applied to the SMS table, not to the threads
table.[1] So instead of deleting the thread with that ID, it deletes
whichever SMS happens to have that ID.

The fix is to change the condition to an always-false condition, so
that no messages will be deleted. The threads will still get
updated.[2]

Fixes #148.

[1] https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android14-release/src/com/android/providers/telephony/MmsSmsProvider.java#1405
[2] https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android14-release/src/com/android/providers/telephony/MmsSmsProvider.java#1409
2024-05-20 01:43:25 +00:00
Tom Levy
a7edeae6f3 Use streams to encode and decode the JSON backups
This significantly reduces memory usage.

(We buffer the OutputStream because kotlinx.serialization flushes its
internal buffers excessively[1]. We also buffer the InputStream for
consistency, even though kotlinx.serialization uses adequate
buffering; there is no performance impact because BufferedInputStream
cascades harmlessly[2].)

The functions encodeToStream() and decodeFromStream() are marked as
experimental, but this is a pretty fundamental use case so surely it
will continue to be supported in the future (maybe with minor
changes).

Fixes #6.

[1] https://github.com/Kotlin/kotlinx.serialization/blob/v1.6.3/formats/json/jvmMain/src/kotlinx/serialization/json/internal/JvmJsonStreams.kt#L46
[2] https://github.com/openjdk/jdk/blob/jdk-23%2B14/src/java.base/share/classes/java/io/BufferedInputStream.java#L339
2024-05-20 01:43:25 +00:00
Tom Levy
b18e8aa11e Allow importing files with MIME type "application/octet-stream"
Sometimes Android reports the MIME type as "application/octet-stream"
even if the file has a .json extension (specifically, on Android 8 and
9 for backups exported outside the Download folder). Previously, such
files could not be selected in the file picker when importing.

As a workaround, allow files with that MIME type.

Fixes #88.
2024-05-20 01:43:25 +00:00