Commit Graph
167 Commits
Author SHA1 Message Date
Taesu Lee 9635b646d8 Fix NPE on MultiConversationNotificationState
Use the most recent notification's state to print out log because
mContent is null in case of a notification for multiple messages in at
least 2 different conversations.
And no need sanitizePII() since this log is only for VERBOSE already.

Test: 1) adb shell setprop log.tag.MessagingAppNotif VERBOSE
      2) Receive SMS from different senders

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: Ie300620f0014577ca65b9a7e3a4c397a39717992
2020-05-08 19:01:59 +09:00
Taesu Lee 95ceb12cdb Hide APN prefs if platform APIs are used
The APN prefs is available if legacy APIs are used with local APN db
only.

Test: Manual

Change-Id: I5883dcb2c406acc601787edd02e0d3272732e6d7
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-05-04 19:30:12 +09:00
Taesu Lee 116073d016 Use ic_add_white for consistency instead
Test: Check "New APN" icon in ApnSettingsActivity.

Change-Id: I0fc29384e0714a780842652178e3e88ff311456a
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-05-04 18:48:30 +09:00
Taesu Lee 14853cb490 Fix to show APN prefs correctly
Test: Settings -> Advanced -> Access Point Names

Change-Id: Ia3ad443ac056a877abd6cd258c2219d8ee6ff181
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-05-04 18:48:30 +09:00
Taesu Lee 1a0f1591de Fix NPE
Check whether SMS delivery report preference is available first because
it could be removed if carriers don't support it.

Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I9e0049dd61713f7a9638fb19a37aaa261f35d768
2020-04-28 17:28:42 +09:00
Taesu Lee 7ccb748e61 Handle delivered messages as completed messages
Delivered messages could be forwarded and sent time can be shown on
MessageDetailsDialog.

Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I6e24bdfe6a037ab588914327dbd8abf3f30512ea
2020-04-24 10:22:39 +09:00
Taesu Lee aa23161c03 Dismiss SnackBar when detached
SnackBarManager state is not cleared when SnackBar is detached from a
window without dismiss(). After then it is remained as dismissing state
forever.

Test: 1) Long-press a conversation and click archive action.
      2) Press back key before the snackbar is dismissed.
      3) Repeat 1) and check the snackbar is shown or not.

Change-Id: Icf2cdcd30aea42685db68e5ac36436a34c9c94ae
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-04-01 09:58:13 +09:00
Treehugger Robot 2af5b4b045 Merge "Fix assert fail during onSaveInstanceState()" 2020-03-31 19:02:43 +00:00
Taesu Lee b41ce08cab Fix assert fail during onSaveInstanceState()
Selected attachment from GalleryGridView will be destroyed when same
attachment is already existed in DraftMessageData. It will make assert
fail during onSaveInstanceState() because mDestroyed in MessagePartData
is true already.
It destroys existing attachment and replaces with new attachment instead
so that selected attachments could be maintained correctly.

Test: 1) Select one image in GalleryMediaChooser.
      2) Reopen the chooser and long-press same image again to enter to
      the multi-selection mode.
      3) Long-press the attachment on draft message to open
      AttachmentChooser.
      4) Check Assert fail.

Change-Id: I029d778779260d0097ce30bf5338fceba05e1f77
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-03-31 18:34:54 +09:00
Han Wang dffc4fa578 Messaging: Show quick reply choices only on wearable devices
Change-Id: I4b81643c051a9b1377f2046c1aa0515c590736fc
2020-03-28 14:39:04 +01:00
Paul Keith f19e916a0d Messaging: Add "Mark as read" quick action for message notifications
Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com>
Change-Id: I7194dca022e5062926fa35709de282721ca64320
2020-03-16 15:14:40 +01:00
Treehugger Robot 1dc43f0e09 Merge "New interface to pick a contact as attachment" 2020-03-09 21:44:59 +00:00
Taesu Lee 1412b40ec6 Fix WindowLeaked issue on AttachmentPreview
Stop attaching animation before removal attachment views and hiding the
AttachmentPreview.

Test: Long-press to attach a media from GalleryGridView and uncheck the
      media to detach immediately.

Change-Id: Ia1014609c056c9f35e428f8968b58dc2c1b704f9
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-03-06 10:55:44 +00:00
Taesu Lee 45d1e1d044 New interface to pick a contact as attachment
New ContactMediaChooser allows the user to pick a contact from contacts
apps as attachment.

Test: Manual

Change-Id: Idb00cd8a3164a3cac859947affd5cbcc7e41b8c2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-03-05 18:57:22 +09:00
Taesu Lee 4e99cc0a02 ProcessPendingMessagesAction works based on subscriptions
PorcessPendingMessagesAction queues one message for sending/downloading
associated with a subscription triggering current action at a time. And
the ConnectivityUtil also works based on subscriptions so that pending
messages can be processed regardless of other phones' state in multi-sim
case.

It includes cleanup code as well.

Test: Manual

Change-Id: Id6b4f4a0aa6a3291e7a4d8a5d3f0fbb9db3c5b86
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-28 18:16:54 +09:00
Marco Sirabella c5cb15c9d8 Allow intent shared subject or title to be mms subject
Test: m, manual
Change-Id: Ibb5eba030320467774cdac1d502ec36c98abcb43
2020-02-22 02:41:01 +00:00
Taesu Lee a8b76eafc4 Allow acceptable media types only for sharing
Test: Manual

Change-Id: I20d5f8abf2ba7b7b620aa2a4ec1e0a43091f98c2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-20 08:52:53 +09:00
Taesu Lee 2716c26c23 Support audio attachments through GalleryMediaChooser
GalleryMediaChooser supports audio types also. It displays simple audio
icon and file info for audio files on grid views.

Test: Manual

Change-Id: I98b605156af3c1909c0141a2b99380b5da11c1e2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-20 08:52:44 +09:00
Taesu Lee 6c77158718 Support video attachments through GalleryMediaChooser
GalleryMediaChooser supports video types and more image types also. And
video thumbnails are overlaid with the play button image to distinguish
between images and videos.

Note:
 1. EXTRA_ALLOW_MULTIPLE is not specified for ACTION_GET_CONTENT.
 2. Files, methods and variables' name are still including "image".
 3. Content descriptions are not updated.

Test: Manual

Change-Id: I961928f150e4ae8ee80a1fba2f20c37fb5426669
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-19 18:36:32 +09:00
Taesu Lee a531636ae3 Do not show the fail icon for a group conversation
Test: Check an widget

Change-Id: Ie1ea35e0bd36891abf8b476b5409a99fa439a1b6
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-18 15:53:06 +09:00
Taesu Lee 519ae7e902 Show attachments size during composing MMS
It shows attachments size during composing MMS.
Note: Images could be resized before sending.

Test: Manual

Change-Id: I63eafe0d57259a7742ab839c4d96d595675e70e9
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-18 15:53:06 +09:00
Taesu Lee c00d290df7 Actual attachments size is the minimum size except images
Only images can be compressed before sending. Actual size got from a
content uri is used for computing the minimum size for others.

Test: Manual

Change-Id: Id8d6ec24f80fe0eae70b6b1686ca7b199c70e313
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-17 12:08:45 +09:00
tnmy-cyngn c12077e4fb Messaging app crashes after a few MMS
In some scenarios, data not bound when SIM state
change local broadcasts are received. See stacktrace
for more info. Protect against/skip call to update()
in such scenarios.

Test: m
Change-Id: Iee7775a74d22808cb262e8973ca70e5e1f0acfc9
Bug-Id: CYNGNOS-3062, KIPPER-718
2020-02-12 20:36:52 +01:00
Diogo Ferreira 91abcc6c8e MessageQueue: Process pending messages per subscription
The message dispatcher will only queue one message at a time for
both sending and downloading. On multi-sim scenarios this causes
failures in a subscription to delay all messages added after the
one that fails.

This patch changes the pending messages processor to queue one
message per subscription for both sending and received, instead of
one globally.

Test: m
Change-Id: Ia54906089dccbbe694aab7bf995ac08480d3e4f8
Ticket: CRACKLING-877
2020-02-12 20:33:56 +01:00
Altaf-Mahdi cce5e8de2f Messaging: change Avatar fontFamily to sans-serif-medium
Match the changes in ContactsCommon

Test: m
Change-Id: Ica94f00e6121c550ea0bc1dfe73a52162dccda71
2020-02-12 20:33:53 +01:00
Taesu Lee 050bc461fc Fix android.os.strictmode.LeakedClosableViolation
Test: Check log.

Change-Id: I488fc6c4288bc3843a2be35a8e2988738441263e
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-12 09:54:01 +09:00
Taesu Lee 711bed5c23 Register implicit broadcasts at runtime for updating widgets
It resolves Broadcast Limitations issue if target API level is changed
as 26 or higher later.
It includes fixing code style also.

Test: Check messaging widgets' changes.

Change-Id: I6e08027b1d6a5a19cfd17f8ec3e9a895dbb3c44a
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-11 15:12:01 +09:00
Treehugger Robot e8827131fc Merge "Support sharing with image/video/audio/vcard and text fully" 2020-02-07 03:09:52 +00:00
Taesu Lee defea9dea1 Support sharing with image/video/audio/vcard and text fully
ACTION_SEND and ACTION_SEND_MULTIPLE support image, video, audio, text
and vcard files.

Test: Manual

Change-Id: I1c08070f89877140aba9087717bb663ee2990467
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-07 08:55:20 +09:00
Treehugger Robot 47bcb7f2a7 Merge "Fix bad RecyclerView issue" 2020-02-06 22:21:08 +00:00
Treehugger Robot d3ea4ec384 Merge "Fix NPE caused by invalid IFD0 offset" 2020-02-06 20:51:01 +00:00
Treehugger Robot 5c8f5fdeb1 Merge "Use file extension based on MIME type" 2020-02-06 20:41:08 +00:00
Taesu Lee 0770975c8a Use file extension based on MIME type
It uses the most common extension for the given MIME type.

Test: Manual

Change-Id: I3d4aea85fcd42088ed19898054db7225954d3401
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-05 16:08:02 +09:00
Taesu Lee 36a41d3e9d Fix showing wrong image on document picker item
Set mDetachedRequestDescriptor as null for document picker to prevent
calling setImageResourceId() in onAttachedToWindow().

Test: Manual

Change-Id: Ied5ca200cac350ef4b2420269763dfc240fc97c4
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-05 15:53:23 +09:00
Taesu Lee 3d6d1f6193 Fix bad RecyclerView issue
dispatchAddFinished() must be called by subclasses when done, either
immediately(if no animation will occur) or after the animation actually
finishes.

Test: Manual

Change-Id: I72b9da41f52b381e3531842aa1fb07e573c120cb
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-05 15:51:43 +09:00
Taesu Lee 710fe2f2ae Fix NPE caused by invalid IFD0 offset
NPE occurs when current IFD0 offset is smaller than default IFD offset.
Just skip invalid tag instead.

Test: Manual

Change-Id: I184794e7ee227849da7d2ecf3cf647e69dc91610
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-05 15:47:13 +09:00
Taesu Lee 8ad8631f0c Merge "Sort ParticipantsData in order of the slot id"
am: 00228481c9

Change-Id: If4cb521dc1523dad4427dcbfad062f75855b60a4
2019-08-12 13:10:07 -07:00
Treehugger Robot 00228481c9 Merge "Sort ParticipantsData in order of the slot id" 2019-08-12 19:40:44 +00:00
Taesu Lee 6da2bf2c03 Ignore unexpected ACTION_DOWN for SIM avatar icons
am: 7ccc6d1b9f

Change-Id: I776323b4fa701202c39be57b08411cea01b540fa
2019-08-02 16:09:19 -07:00
Taesu Lee 7ccc6d1b9f Ignore unexpected ACTION_DOWN for SIM avatar icons
Unexpected ACTION_DOWN raises setColorFilter() for SIM avatar icons in
the SIM switcher. However, other actions to clear the filter cannot be
received due to no clickable attribute.

Test: Click SIM icon in SimSelectorView.

Change-Id: Ic5972522a3442e3087c474b65add38a6d00511a5
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-08-02 16:05:47 +09:00
Taesu Lee b22bc643ce Sort ParticipantsData in order of the slot id
getSelfParticipants() returns the ParticipantData list arranged in
ascending order of the slot id to show SIM UIs from lowest to highest id
consistently.

Test: Verify SettingsFragment and SimSelector order in multi-sim device

Change-Id: I0f5f27c6467cb21a6d11271d1a0a6beef36630a6
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-08-01 18:38:40 +09:00
Taesu Lee 22d93c0406 Merge "Replace no error code '0' for SMS with '-1'"
am: b7f93e6f10

Change-Id: I0e3d28d6d8849bd855b057aceaedf19f54d52171
2019-07-03 16:23:10 -07:00
Taesu Lee da8b67be0c Replace no error code '0' for SMS with '-1'
Use '-1' for no error instead of '0' since the '0' has been one of the
valid error codes in 3GPP2.

Test: Manual

Change-Id: I02ba391a5cd178491868565c10bb3a35ba88e19a
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-06-25 12:31:39 +09:00
Taesu Lee 8ded71f805 Merge "Fix assertion failures caused by different instance type" am: 5500d33555
am: f390d17b40

Change-Id: I3c04d7dcfbaf99bac711a3f1eff8ee1791d8f438
2019-06-21 15:41:00 -07:00
Taesu Lee f9b474c443 Merge "Fix MMS Config issues in Debug menu" am: 0e3986db52
am: eb4206aea1

Change-Id: Ic9a0662a80b4a82a10aeb293136ebbd25e31c98a
2019-06-21 15:40:22 -07:00
Treehugger Robot 5500d33555 Merge "Fix assertion failures caused by different instance type" 2019-06-21 22:21:40 +00:00
Treehugger Robot 0e3986db52 Merge "Fix MMS Config issues in Debug menu" 2019-06-21 22:09:41 +00:00
Taesu Lee a22a68f41f Apply new duplication detection logic for M-Notification.ind am: 77a839f1ef
am: cf5dcfef5a

Change-Id: I66f05f83a35c54e35488d86f44e2286a52abca68
2019-06-21 12:22:24 -07:00
Taesu Lee 77a839f1ef Apply new duplication detection logic for M-Notification.ind
The X-Mms-Transaction-ID of the M-Notification.ind identifies each
M-Notification.ind message. New duplication detection logic compares
the new X-Mms-Transaction-ID with the stored value to identify the
Network duplicate M-Notification.ind message when it receives a new
M-Notification.ind message.

Following SQL WHERE clause is used to query from the DB.
 ((m_type=NOTIFICATION_IND) OR (m_type=RETRIEVE_CONF)) AND (exp>NOW))
 AND (t_id=xxxxxx)

For this, when the M-Retrieve.conf is received, updates the t_id and the
exp from the corresponding M-Notification.ind so that new logic would
work even after the M-Notification.ind is deleted.

Test: Manual

Change-Id: I86e1eee62ea612d96ca16e5384b044cb6541ff6a
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-06-14 16:45:30 +09:00
Taesu Lee 71e2706105 Merge "Use correct format info for SMS" am: a6f1ae137d
am: 5089da9e20

Change-Id: I3df58c53ecfe38fccb9be80a8003e5540ac2e478
2019-06-11 19:14:00 -07:00