Commit Graph
204 Commits
Author SHA1 Message Date
Michael W 3b7f05ba67 Messaging: Replace ExifInterface with its androidx counterpart
Change-Id: I35ba14886b9f837d576f1cd385869614454c921f
2024-12-26 14:55:12 +01:00
Michael W d869533f6f Messaging: Use xml drawables
Replace the pngs with xml drawables

Change-Id: I71be32c36194d3b34b54287a09789f73087600ef
2024-12-26 14:55:12 +01:00
Michael W 7c55a6d56a Messaging: Remove compatibility for old android versions
Change-Id: Id9065d60525a509271a0e64c0e349e857cb998e2
2024-12-26 14:55:12 +01:00
Michael W 9bbc7a8f99 Messaging: Fix file permissions
No need to be executable

Change-Id: I71d4c03eed558a15489f71fa9ac69d42bdcef474
2024-12-26 14:55:12 +01:00
Michael W a65de2aee3 Messaging: Rename androidx.appcompat.mms
* Someone apparently decided to "Replace-In-Files" these before, but
  they are not correct according to the folder structure
* Since it is just annoying to read the code in AS when it does not
  match the folder, change the package name back

Change-Id: Iea5c51aeb9e1f5b650a1009348065c7c38cddbeb
2024-12-26 14:55:12 +01:00
Michael W 009df43b06 Messaging: Remove cell broadcasts
* Packagemanager doesn't tell us about its' availability anymore
* It's accessible from notification settings, no need for the app to
  be able to launch them

Change-Id: I10b7742917f8639c94b0187f158cc30156f90e92
2024-12-26 14:55:12 +01:00
Michael W bc93ce392e Messaging: Bump sdk (>=33, <=34)
* Since we already compile with sdk "current", this is just the next
  logical step
* We skip 35 for now since edge-to-edge stuff can be done later
* It also gives AS the possibility to recognize necessary steps
* WRITE_SMS permission removed in API 23

Change-Id: Ia567fa9e42772f0b6d6e6fdc0d21b5635ff9dcc5
2024-12-26 14:55:12 +01:00
Michael W f3863c9a39 Messaging: Remove tests
Nobody runs them anyway

Change-Id: I2b07847509269af31430abc6cb0fb190f08d45f9
2024-12-26 14:55:00 +01:00
minarypenguin 5ce3a1b2db Messaging: Fix activity bar menu icons tint
Change-Id: Ife5af067eb39a3a75e67fd0d7241f4b2e13e23a6
2024-12-22 17:04:27 +01:00
Pranav Vashi e0a037c09e Messaging: Improve letter render decisioning for avatar
Change-Id: I263e617cf6fc058301537a6f2dc7d052bed6487a
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-12-22 17:04:27 +01:00
LibXZR e46a7b2475 SimIconView: Don't intercept touch events when there's nothing to do
Fix unable to switch conversation sim card by clicking on the sim icon.

Change-Id: I9359cfc4f730186d8709251856899efa8484f6d9
2024-12-22 17:04:27 +01:00
LibXZR d53a425244 Messaging: Do not check preferred sim if conversation sim exist
Fix unable to send message when preferred sms sim is set to
"Ask every time".

Change-Id: I0406985e29ded8157ae5252db2dd814856a93376
2024-12-22 17:04:27 +01:00
Chris Talbot 87cd6873d7 Add support for text/vCard and text/vCalendar MIME type
A vcf file can alias to both "text/vCard" and "text/x-vCard" MIME
types and an ics file can alias to "text/vCalendar" as well as
"text/x-vCalendar". However, if LineageOS does not get the "x-"
MIME type, it will incorrectly display an empty MMS.

Change-Id: I0b63767092c0e7422ff3592983d94b903d9e8cc5
2024-12-22 17:04:27 +01:00
Ido Ben-Hur 96ef363da8 Messaging: Fix handling of default SMS app
Use RoleManager to Launch the correct activity and check the default app
Get rid of deprecated methods used here to do the same
Also add queries in manifest to allow the former method to work as well

Change-Id: I4702aaa4b35a994e225e63534da8fb4975b9717a
2024-10-20 01:36:57 +03:00
Ido Ben-Hur d8a0bf022d Messaging: FrameSequence -> ImageDecoder
fixes playing / displaying gifs
replaces old deprecated FrameSequence & FrameSequenceDrawable libs

Change-Id: Id65fff90bdd09af86480636a8a0e404aeb39580f
2024-09-16 02:25:12 +03:00
Michael W b11039ed8c Messaging: Allow deletion of messages without a sim inserted
* Currently there is a check in place checking for the presence of a
  preferred sim card
* For deletion of a conversation and message this is unnecessary and
  deleting a conversation from the main view does also not have that check
  already, so replace the check with just checking for being the default
  messaging app

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/5974
Test: Try deleting a single message or conversation from within
 conversation before and after
Change-Id: Icd47882eb29e16a17ad57a79ea5e0c0f7855ffc6
2024-09-09 05:47:00 +03:00
Michael W 37b7f1a539 Messaging: All contacts: Remove space for sections
* Due to the sections not working anymore since we removed the duplicate
  numbers, we are left with a rather large empty space left of the
  contacts
* Disable sectioning to make it look properly again

Change-Id: Iff1849b80d70269933708e5440809c657f0d70d9
2024-09-09 05:47:00 +03:00
nift4 46ee5ce5e0 Messaging: fix crash
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.messaging/com.android.messaging.ui.SmsStorageLowWarningActivity}: java.lang.IllegalStateException: Fragment com.android.messaging.ui.SmsStorageLowWarningFragment$ChooseActionDialogFragment must be a public static class to be  properly recreated from instance state.

Change-Id: I78d46a6f74383a4b865759bc980240f6f73ff20d
2024-09-09 05:47:00 +03:00
nift4 77203378cc Messaging: Add notification channels where missing
Change-Id: I1cb3177704542fc48c42dc18a9e1f4d3118d4193
2024-09-09 05:46:59 +03:00
Tommy Webb 5784795fe2 Fix crash on forwarding messages
onAttachFragment in ForwardMessageActivity does not necessarily have
to be provided with a ConversationListFragment, so there is no need to
assert this. Just move along, as is done in VCardDetailActivity, etc.

Change-Id: I41825c9c118d71d447b820d29f60fb10ef2d5fdf
2024-09-09 05:46:59 +03:00
Michael W 09e4b197ff Messages: Only youuuuu...
* Removing the arrow from the message bubbles and adding a little
  rounding to them and the input bar already does a lot in
  modernizing the look of the app

Change-Id: Ia6466968553856fdf2ea15c10cfed79402e36a5d
2024-09-09 05:46:59 +03:00
Michael W c416c287eb Messaging: Don't show numbers of contacts multiple times
* Somehow there are multiple entries per some numbers, sometimes stored
  with, sometimes without spaces and/or invisible characters
* This leads to the same number being shown multiple times
* Don't add those entries by comparing number and type of all
  already added entries with the staging one

Change-Id: Ic815393d3d4f4ba56107f42c9d8940309564554c
2024-09-09 05:46:59 +03:00
Han Wang 1970f9ea99 Messaging: Show quick reply choices only on wearable devices
Change-Id: I4b81643c051a9b1377f2046c1aa0515c590736fc
2024-09-09 05:46:58 +03:00
z3DD3r e51017a0f2 Messaging: Update cellbroadcast package name
As part of mainline effort, AOSP cellbroadcast package name was changed
from com.android.cellbroadcast to com.android.cellbroadcast.module

Change-Id: Ie1f27abb0f645dd53c26d164b03c5e93c3c13cdc
2024-09-09 05:46:58 +03:00
Blaise a4cbbd9039 Messaging: Contact Colors
Adds the option to use individual colors for contacts.
Matches the colors used in Contacts.

Change-Id: I9f222308a900c5d47ec16f83232bd7f6d9af6cd7
2024-09-09 05:46:58 +03:00
Scott Warner 657e0460fe Messaging: Use a DayNight launch theme
This prevents the white launch screen from appearing when the system theme
is dark

Change-Id: I861f9e5a58b4bb52385c75459fc4de73532d15a8
2024-09-09 05:46:58 +03:00
Luca Stefani 4246987beb Messaging: Implement per conversation channels. Update API level to 28.
* Get rid of in-app settings for notifications, replaced by channels features
* Remove all the notification plumbing and dead code

Test: m, manual

Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com>
Signed-off-by: Joey <joey@lineageos.org>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: Arne Coucheron <arco68@gmail.com>
Signed-off-by: Lyubo <lyubodzhamov@gmail.com>
Change-Id: Idb39ca32751d40b3376934775d2119dd6cc7e297
2024-09-09 05:46:38 +03:00
Ankit Gupta 1967aa9fc8 MediaPicker: Check for NPE
make sure view has been created before asking for
its visibility.

Change-Id: I0f0c36f8edf83c518bf07ef05399eda5d6b0f78a
Issue-id: FEIJ-1135
2024-09-09 05:46:37 +03:00
Arun Valiaparambil 4b218d1561 Play an audible notification on receiving a class zero message.
Changes ported from http://review.cyanogenmod.org/#/c/125457/

PAELLA-123

Change-Id: I1289790d32a3b69bf7892025bac5fa3bd74eeefc
2024-09-09 05:46:37 +03:00
Adnan Begovic 086bb5c3f5 Messaging: Implement option for swipe right to delete.
Squashed commit of the following:

Author: Adnan Begovic <adnan@cyngn.com>
Date:   Thu Jan 14 17:20:43 2016 -0800
Messaging: Implement option for swipe to delete.

  No one wants to swipe to archive, that's stupid.

Change-Id: Ia8f0fc675582ef343311e60b755e284322f25102

Author: chengzhi.hou <chengzhi.hou@ck-telecom.com>
Date:   Wed Feb 24 20:01:17 2016 +0800
Messaging: Swipe right to delete conversation

Change "swipe delete" to "swipe right delete", so SwipeArchive and SwipeDelete
can exist at the same time.

Change-Id: Id66167c2e749f8ab0ee917e0138027c7404b8c90

Author: Michael Bestas <mikeioannina@cyanogenmod.org>
Date:   Tue Mar 1 02:27:16 2016 +0200
Improve swipe to delete strings

Change-Id: I180d09a6680084d9fd87c6dafd56db18ca5a580a

Author: Joey Rizzoli <joey@cyanogenmoditalia.it>
Date:   Mon Oct 17 16:32:25 2016 +0200
Messaging: show snackbar instead of toast when deleting conversation

more consistency with archive action

Change-Id: I06129850860a2a51c10ade65fb87c9f37a0c2bfa
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>

Change-Id: Ia8f0fc675582ef343311e60b755e284322f25102
2024-09-09 05:45:11 +03:00
Colin Cross a53cd33778 Fix Messaging for use_resource_processor: true
Reference resources using the package name of the library that
includes them.

Bug: 294256649
Test: m javac-check
Change-Id: I8fa72ec452ce6a7f8101022fbb35b3fc89073952
2023-10-17 16:12:15 -07:00
Jake Klinker 4b16af13f7 Trim recipient addresses that are unreasonably long.
This ensures that bad input does not affect the db - the fallback is a reasonable one where we just launch the new conversation screen and have the user select the recipient.

TESTED=manually confirmed that I could no longer repro b/278556945 after this change.
BUG=278556945

Change-Id: I705a304a92cb46b20d916c6f5c2db81e6fa84f06
2023-05-11 21:59:32 +00:00
Jake Klinker f1b8f9a226 Fix exposing private messages files through attachments with a content URI.
Change-Id: I30b2a06c67af4a347d03c7504d13b9b9365acafd
Tested: Was no longer able to repro b/275552292.
Bug: 275552292
2023-05-09 14:00:51 +00:00
TreeHugger Robot 6ac4faba39 Merge "Add unaudited exported flag to exposed runtime receivers" 2022-11-04 13:03:45 +00:00
Cole Faust 50b73ca58a Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8b1533cbea835343dcf589cbaa57c63794be58bd
2022-10-15 21:33:28 -07:00
Michael Groover 4b17ed7f80 Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting U or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the U release.

Bug: 234659204
Test: Build
Change-Id: I15aba10fe12dfcd2e67330ca844491341ef6d920
2022-10-04 17:18:17 -05:00
Chaohui Wang b1401d612f Update DrawableWrapper to DrawableWrapperCompat
Api changed in aosp/2120177

Bug: 235727273
Test: TAP
Change-Id: I1645dab6000dc760b4de2bb625e0af8df014c8c8
2022-08-31 05:05:10 +00:00
Chaohui Wang 79481ab146 Update DrawableWrapper to DrawableWrapperCompat
Api changed in aosp/2120177

Bug: 235727273
Test: TAP
Change-Id: I1645dab6000dc760b4de2bb625e0af8df014c8c8
2022-08-26 20:58:50 +08:00
Almaz Mingaleev 8edea90f7f Remove uses of Time. am: 909a0763c6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Messaging/+/2149693

Change-Id: Ifb1497b8c212866284a9c138e58612aa7bde3f28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 09:03:17 +00:00
Almaz Mingaleev 909a0763c6 Remove uses of Time.
android.text.format.Time is deprecated since 2014 and there are
better alternatives.

Bug: 16550209
Test: presubmit
Change-Id: Ibbc4fb11e96b5179ff5dec906e74c9d582b6fb97
2022-07-11 11:10:18 +01:00
Jake Klinker c8e4ab2b22 Fix url:file:// style URIs from not being detected in UriUtil.
Change-Id: I81c01202306d856f6f8f8b74a5a28d7c1011fcec
Tested: Was no longer able to repro b/222091734.
Bug: 222091734
(cherry picked from commit 2283165c23)
2022-04-26 16:38:11 +00:00
Aman Gupta f62c3cd35a Updating the DATA_ROAMING flag acceess from Settings to TelephonyManager
API.

Bug: 172467621
Test: Build
Change-Id: Ide0db6ecacaabc29b5c4c53a2868d4a2ae27c646
2022-03-24 07:03:10 +00:00
Jake Klinker a3f2d65241 [automerge] Use UriUtil when checking if a URI is a file. 2p: 27e27d944b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16764000

Bug: 215212561
Change-Id: I59e1aa0f1799fb1eb993bd4e1089b665d0965099
2022-01-31 20:30:29 +00:00
Jake Klinker 27e27d944b Use UriUtil when checking if a URI is a file.
UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE.

Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2
Bug: 215212561
2022-01-31 20:30:24 +00:00
Jake Klinker ebc64c5bae Use UriUtil when checking if a URI is a file.
UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE.

Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2
Bug: 215212561
2022-01-31 20:29:42 +00:00
Jake Klinker 391770a376 Fix isFileUri to recognize URIs with spaces. am: 6e0ca56095
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16603852

Change-Id: Ic248ca97e7c775e7cef298bf03cdf13c53fb9351
2022-01-12 01:22:35 +00:00
Jake Klinker 6e0ca56095 Fix isFileUri to recognize URIs with spaces.
The underlying framework recognizes " file://..." as a valid URI and fetches the file, allowing for a possible exploit (see b/209965112). This trims the URI so that we can properly recognize it as a file from within our code.

Bug: 209965112
Change-Id: I8d9d9100e9a8c3bd64d19015d2177a14ec2306f3
Test: See repro steps on http://b/209965112, was no longer able to repro.
2022-01-11 00:41:38 +00:00
Jake Klinker 0b258f030a Fix isFileUri to recognize URIs with spaces.
The underlying framework recognizes " file://..." as a valid URI and fetches the file, allowing for a possible exploit (see b/209965112). This trims the URI so that we can properly recognize it as a file from within our code.

Bug: 209965112
Change-Id: I8d9d9100e9a8c3bd64d19015d2177a14ec2306f3
Test: See repro steps on http://b/209965112, was no longer able to repro.
2022-01-11 00:38:25 +00:00
Jake Klinker f40ef350b4 Convert URI scheme to lower case before checking if it is a file. am: 56bacbcb13
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/15998907

Change-Id: I708af5f19396bfcbbd6ee0ccea4f38c19c3c4dae
2021-10-07 04:53:55 +00:00
Jake Klinker 56bacbcb13 Convert URI scheme to lower case before checking if it is a file.
This fixes an edge case where a "File://" style URI could be passed in
but not pass this check, even though the underlying framework recognizes
this as a legitimate file.

Bug: 197328178
Test: See repro steps on http://b/197328178, was no longer able to
repro.

Change-Id: Id837744a79d1aca91b41d24207dc9b98f2b5b5e9
(cherry picked from commit 9607c95e71)
2021-10-06 22:38:45 +00:00