Commit Graph

1419 Commits

Author SHA1 Message Date
Michael W
b0f59f9515 Messaging: Round AddContactsConfirmationDialog
Change-Id: Ib169d51e860c344182eeeb422b67f1d0d04c3887
2025-03-04 18:52:05 +01:00
Michael W
162c78fe1a Messaging: Replace fragment with FragmentContainerView
* Following recommendation of AS
* Also add the missing newlines at the end - they should be there and a
  separate change doesn't make sense

Change-Id: I90ce1574910275458f51a151c8dcd6da49433504
2025-03-04 18:52:05 +01:00
Michael W
4009b68386 Messaging: Heavily reduce the exif interface
* The only thing we need is reading one Tag, which the androidx
  implementation can do just fine.
* Apart from that there is so much unused code there...

Change-Id: I248a9e5450f1823e3eca589b8e17610940b26d01
2025-03-04 18:52:05 +01:00
Michael W
b2f5e3190e Messaging: Further code improvements
* Remove redundant casts
* getParcelable(ArrayList|Exra) without class argument is deprecated
* ViewPager.setOnPageChangeListener -> addOnPageChangeListener
* RecyclerView.setOnScrollListener -> addOnScrollListener
* Remove unused initializations
* Remove unused code

Change-Id: I21beb6c90c675a4f2cfd7e3d5ebbd18b745f5911
2025-03-04 18:52:05 +01:00
Michael W
47f5533a73 Messaging: Remove duplicate code
* mmslib contains basically the same code as android.support.v7.mms.pdu
  does, so align them code-wise and remove the mmslib duplicates
* Since mmslib contains a few usages that are now not accessible
  anymore, make the classes or methods public where it complains

Change-Id: I10b8716c0e45079e4795fda4489dc1a9535026f3
2025-03-04 18:52:05 +01:00
Michael W
f83b05ea0a Messages: Replace (Safe)AsyncTask
* AsyncTask is deprecated
* Executors and Handlers can achieve the same thing and
  are not deprecated

Change-Id: I5271bb73b848ce885eeaf5632c1da27853c56c4a
2025-03-04 18:52:05 +01:00
LineageOS Infra
94c0b8734b Automatic translation import
Change-Id: Ic10cf8ae6574bba350e8d12b0e217501e81cdc14
2025-03-01 17:50:25 +00:00
LineageOS Infra
ff479f4ca4 Automatic translation import
Change-Id: Iee2fccd125915894e7891247a681042d9c7556b2
2025-02-15 15:47:26 +00:00
LineageOS Infra
ee1c105fc1 Automatic translation import
Change-Id: Ie67d6cb6fda6a1c232a8bbd30cf58e25697e01db
2025-02-01 14:28:41 +00:00
Michael W
3b720fb586 Messaging: Move "Start chat" string to cm_strings.xml
* We don't have strings.xml in the translation pipe yet so move it to
  our own strings instead
* Add an explainer comment as well

Change-Id: I392837e194c7c5d5b4b44d5cbba2ef2f521857ed
2025-01-20 21:56:38 +01:00
LuK1337
28b9c1d2cd Messaging: Make SMS delivered and MMS sent intents mutable
Fixes MMS send status and SMS delivery reports.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8074
Change-Id: I55b98619ed2d477dcc232ebdaa23b5390b7570b2
2025-01-19 17:58:59 +01:00
LineageOS Infra
c3f90af163 Automatic translation import
Change-Id: Iae84ceffae7e3b10f58ad14dc7d2730783fd8bb3
2025-01-15 20:54:54 +00:00
Michael W
278c7e93af Messaging: Hide new chat button when forwarding messages
Change-Id: I511c9745c02bc7918bb38647bd6fb79332cfe523
2025-01-01 18:56:09 +01:00
Michael W
66d57e98a3 Messaging: Handle geo uri scheme
Change-Id: I19f1039d18441cb2bd013577c41e279327f806e6
2025-01-01 18:56:09 +01:00
Michael W
7f639e3652 Messaging: Use MaterialComponents everywhere instead of AppCompat
* This is the proper thing to do
* Also fixes crash when forwarding a message

Change-Id: Ib3f34477cc9b76b1979f9e6f2f39e0f9222c16ee
2025-01-01 13:12:32 +01:00
Michael W
b50c51d38f Messaging: Remove forgotten MmsVideoRecorder
Usages removed when removing the own camera handling in commit 7f464b4

Change-Id: I7904a5079e733331c9cfc780ff21bdda8bdb9455
2024-12-26 23:54:02 +01:00
Michael W
6cdd458b69 Messaging: Tint recipient field properly
We need to tint the underline ourselves, reyling on forceDarkAllowed
does nothing here

Change-Id: I2c390a76df5aef6e16512295521d073dbe25d5fc
2024-12-26 17:43:06 +01:00
Michael W
8ae38097b0 Messaging: Style ViewPagerTabStrip's underline properly
White will be black on dark theme -> we want white there as well

Change-Id: I7ca3b3b39ea6acc1069878bb2df98ccb269fb7dc
2024-12-26 17:31:30 +01:00
Michael W
edb268697c Messaging: Get rid of storage permissions
Since these have no effect on sdk 33 and up and everything works without
them we can get rid of those

Change-Id: I0482d8b8772dc2c64bb1930fbc6ba4852f4b4c61
2024-12-26 16:13:52 +01:00
Michael W
161c3e9fd9 Messaging: Remove VisibleForTesting
Since we removed all tests, no need to keep those flags around either

Change-Id: Icaf71832c459cecbcbddc75f552c60e48ae95189
2024-12-26 15:54:38 +01:00
Michael W
bbf90339d2 Messaging: Style the subject line properly
It needs it's own dark-theme color and a bigger border radius

Change-Id: I4f8e3dfec07653332106b8535c7431402833f159
2024-12-26 15:54:38 +01:00
Michael W
e11745afd4 Messaging: Style the attachment choosers properly
On light background they stand out lighter, but on dark they just blend
in - we can reuse the attachment background to fix that!

Change-Id: I0e0f09d0cd305ce1bc8aa07c3a20b79993d40e60
2024-12-26 15:54:38 +01:00
Michael W
3788b9d318 Messaging: Style the attachments properly
* With dark theme, they suddenly don't stand out from the background
  anymore
* Give them more rounding but not as much as the chat bubbles

Change-Id: I32c1036bda348e0c58e1cb37edbe9c7fc72309e7
2024-12-26 15:54:37 +01:00
Michael W
6e9a803f1c Messaging: Handle default SMS app setting properly
* We don't need two settings basically doing the same
* Handling the change needs to happen via RoleIntent, not
  ACTION_CHANGE_DEFAULT
* Our own name sometimes can't be retrieved from package manager (?) -
  just use it from strings

Change-Id: I28abc52329f00b33a316533f12a54a517cba3514
2024-12-26 15:54:37 +01:00
Michael W
241b4cf833 Messaging: Style even more dialogs properly
Somehow some dialogs use the theme but some need the style set manually

Change-Id: I386a0e43c10d328088066961b75a162bf2c351c1
2024-12-26 15:54:37 +01:00
Michael W
0aa08c0c3b Messaging: Finish after no more contacts are blocked
The view doesn't have a "no items available" element and it doesn't
make sense to have one since the menu item is only visible once a contact
is blocked - so after removing the last blocked contact, simply return
back to the conversation list

Change-Id: I3372e26361f6919502cac6fd27ae849d559a4c05
2024-12-26 15:54:37 +01:00
Michael W
e5eb059fbd Messaging: Rename in german
Messaging is not translated "SMS/MMS", use the proper word "Nachrichten"

Change-Id: I7b5a42598e4eca1162a806d9634fa7cb793f62da
2024-12-26 15:54:37 +01:00
Michael W
68a3707173 Messaging: Get rid of deprecated PhoneStateListener
TelephonyCallback is the new thing to use

Change-Id: I3c44210bfc02814af5d4110f507b94d0f0e8a4a0
2024-12-26 15:54:37 +01:00
Michael W
590243f8a8 Messaging: ContactMediaChooser: Remove permission requesting
We never reach this state when we remove the permission, so it makes
no sense to have code for it

Change-Id: I97f2f5d438148234ea1887462ab65735721da2f8
2024-12-26 15:54:37 +01:00
Michael W
c73fdc5064 Messaging: Replace permission requests with launchers
Change-Id: I0d12fd05fb0abaeb9bd64c8c77e0e776d5459e4d
2024-12-26 15:54:37 +01:00
Michael W
7f464b401c Messaging: Replace own camera handling with pickers
We do not need to handle camera on our own - there are apps out there
that are made for that!

Change-Id: Ifeb70e46b17bff5eb8d85c8775589efac4f2c284
2024-12-26 15:54:37 +01:00
Michael W
6cc0e38bb5 Messaging: Get rid of onActivityResult()
We are supposed to use ActivityResultLaunchers, so do it that way

Change-Id: I070ec485097c927877b3e0eb4699addc9b9df873
2024-12-26 15:54:37 +01:00
Michael W
06bb0cc0e0 Messaging: Auto-format the manifest
... and remove two redundant app_name labels

Change-Id: Iebcb0e73e63478b1909bea7fadf81bdd2695113f
2024-12-26 15:54:37 +01:00
Michael W
d940ab74ad Messaging: Fix a few android related things
* NotificationBuilder.addPerson(String) -> .addPerson(Person)
* Wearableextenter.addPage deprecated without replacement
* Html.fromHtml(String) -> .fromHtml(String, int)
* Handlers need Loopers
* Resource-IDs are not final by default (if-else instead of switch-case)
* call super.onFinishInflate() in override of onFinishInflate()
* Configuration.locale -> configuration.getLocales().get(0)
* SimpleDateFormat needs localization as well
* AudioAttributes instead of setAudioStreamType()
* isDataEnabled() is a public method, no need for reflection anymore

Change-Id: Icd830768b86edca3e0b44f1edc6c57facc9f731a
2024-12-26 15:54:37 +01:00
Michael W
e128bff457 Messaging: Language cleanup
No unnecessary boxing, enhanced for loops, redundant checks and throws,
imports (removal, reordering), possible void returns

Change-Id: I7a8e1b2007e3b0906e01b41785c518d02c2f3fab
2024-12-26 15:54:37 +01:00
Michael W
e335f6bec8 Messaging: Use ActivityResultContracts for media and contacts
Instead of handling showing and picking the media ourselves,
use existing AcitivityResultContracts to pick images, videos
or contacts

Change-Id: I20079ad94882cc6bbfeae8d57ca0e4aa30612c01
2024-12-26 15:54:37 +01:00
Michael W
7f9087a49e Messaging: Properly hide and show FAB
When starting or stopping action mode, the FAB should hide and show again

Change-Id: I94b12cbd3190df90189dc02c39ac7db78d58d090
2024-12-26 15:54:37 +01:00
Michael W
d4ac014a74 Messaging: Use an extended FAB
With proper color scheme and "Start chat" text

Change-Id: I320b169b2bec354db7b0ebc3e81149aaf575092f
2024-12-26 15:54:37 +01:00
Pranav Vashi
056cf5f79e Messaging: Fix navigation bar theming
Change-Id: I6a346063eb4420738561bd0ffe44cd5629f9f59f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-12-26 15:54:37 +01:00
Michael W
b12a4f8a3a Messaging: Fix loader not auto-restarting
When suspending and resuming the app, somehow the loader returns
immediately after onResume() with onLoadFinished() but somehow has no
data left (data.moveToNext() returns false) which makes the conversation
close immediately.
Restarting the loader has the desired result: We can leave the app
temporarily and come back to the same conversation again

This also fixes adding a vcard attachment (since that temporarily
leaves the app)

Change-Id: Id52e55563a11474fa776323477aa900ca4be0bbe
2024-12-26 15:54:37 +01:00
Michael W
6d11a6658c Messaging: Fix C-style array declarations
Change-Id: Ie7381dc5280ab4d907000ef551df9ea80553ddb4
2024-12-26 15:54:37 +01:00
Michael W
5403d02b5d Messaging: Fix javadoc
Change-Id: Ia1b0a8fa9a5e74078a68a55ca1953b6f085521b1
2024-12-26 15:54:37 +01:00
Michael W
e29b158fba Messaging: Remove unused code
Change-Id: I8093bb3e305ae323f7069bf42f9e83f8c8647cc7
2024-12-26 15:54:37 +01:00
Michael W
0069df879a Messaging: Replace explicit types
Change-Id: I2165b3dec73973a2a82d8b3c7c364b5f011e597d
2024-12-26 15:54:37 +01:00
Michael W
9538179c75 Messaging: Use try-with-resource
Change-Id: I6649517cbd990502dfcb54f078764cf05f210268
2024-12-26 15:54:37 +01:00
Michael W
2a09fa3cb9 Messaging: Fix indicated issues in layouts
Follow AS recommendations

Change-Id: I7a5241651ccd3fd5ea5efce44db848e3bc3a1c12
2024-12-26 15:54:37 +01:00
Michael W
bd46716d1a Messaging: Remove unused static libs
... and reorder the list alphabetically, while at it

Change-Id: I3bbd83bf49a8840dd646012448d93dd475f34754
2024-12-26 15:54:37 +01:00
Michael W
f31b198928 Messaging: Remove usages of DataUsageStatUpdater
Since Q, contacts affinity isn't supported anymore, as reflected by
the documentation plus DataUsageStatUpdater code itself

Change-Id: I35e00d0fa743525c3b977c9756126ae764726afa
2024-12-26 15:54:37 +01:00
Michael W
5ed268cee1 Messaging: Style the SwitchPreferences
Use the newer style of A15

Change-Id: I75a0e54f70f837d21d3aaa746f2e0ec7af226eda
2024-12-26 15:54:35 +01:00
Michael W
1914db5ea4 Messaging: Convert further parts to androidx
CursorLoader, LoaderManager, Preferences, Fragments, ...

Change-Id: I8787b2db365249839547c6d5c21ab7cd5ff42082
2024-12-26 14:55:13 +01:00