Commit Graph
37 Commits
Author SHA1 Message Date
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
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 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
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 8ad8631f0c Merge "Sort ParticipantsData in order of the slot id"
am: 00228481c9

Change-Id: If4cb521dc1523dad4427dcbfad062f75855b60a4
2019-08-12 13:10:07 -07: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 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 91e9df451b Merge "Fix SMS status handling" am: 4e3db63e41
am: 8f649c7078

Change-Id: I706b8d16949f4193fdbb02c1fa0144b971c22bc4
2019-06-11 17:33:16 -07:00
Taesu Lee 4b1c6eb2c9 Fix SMS status handling
Simple matching up CDMA status with GSM TP-Status for common handling.
And fix bugleStatusForSMS() for all the permanent error cases.

Note: Need to check SC operation for ERROR_TEMPORARY.
Test: Manual

Change-Id: Ic8136d273dc0c25a4f0690f951d4d8aca20579ff
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-03-15 16:22:48 +09:00
Raman Tenneti b29b72ea05 AOSP/Messaging - update the Messaging version to target P (28) or higher. Use JobIntentService to start the Backgroundworkerservice and ActionServiceImpl services. am: cdf40bb061 am: b966c435c6
am: 1d423c5fe5

Change-Id: Ibc75e9508f7c82368e282624ba8a06f41a6ce5f8
2019-02-20 03:16:31 -08:00
Raman Tenneti cdf40bb061 AOSP/Messaging - update the Messaging version to target P (28) or higher.
Use JobIntentService to start the Backgroundworkerservice and
ActionServiceImpl services.

+ Deleted WakeLock code.
+ Made changes to com.android.messaging.test tests so that all tests
  pass with the new JobService. I am not sure if these tests passed
  before these changes.
+ CTS tests passed without any changes.
+ Added TEST_MAPPING file for presubmit tests.

Bug: 115499280
Bug: 119503204

Test: manual - Tested the messaging UI. Ran the following CTS tests on Pixel phone.

$ make -j 40
  rw-r--r-- 1 rtenneti primarygroup 8624061 Feb 19 12:37 out/target/product/marlin/system/app/messaging/messaging.apk

$ make messagingtests -j
  -rw-r--r-- 1 rtenneti primarygroup 729713 Feb 19 12:52 out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb install -r -d out/target/product/marlin/system/app/messaging/messaging.apk

$ adb install -r -d out/target/product/marlin/testcases/messagingtests/messagingtests.apk

$ adb shell am instrument -w com.android.messaging.test
  Test results for InstrumentationTestRunner=...........
  Time: 13.353
  OK (113 tests)

CTS tests for Mesaging app
---------------------------
$ ./development/testrunner/runtest.py --path cts/tests/app/src/android/app/cts/NotificationTest.java
  android.app.cts.NotificationTest:...........................
  Time: 0.299
  OK (27 tests)

atest
-----
$ cd .../packages/apps/Messaging
$ atest
  Running Tests...
  messagingtests (113 Tests)
  -------------------------
  ...
  [113/113] com.android.messaging.util.YouTubeUtilTest#testGetYoutubePreviewImageLink: PASSED (2ms)

  Results from tests that require device:

  Summary
  -------
  messagingtests: Passed: 113, Failed: 0, Ignored: 0

  All tests passed!

Change-Id: I9494f0750954e6364abb695aa867494669ae54c4
2019-02-19 14:52:18 -08:00
Aurimas Liutikas 1b693ea7df Migrate Messaging to androidx.
Test: make messaging
Bug: 76692459
Change-Id: I9103450622f129311545648ac75f5b2f9fc2d04a
Merged-In: I9103450622f129311545648ac75f5b2f9fc2d04a
2019-02-14 22:59:57 +00:00
Aurimas Liutikas f38a1bdc3c Migrate Messaging to androidx.
Test: make messaging
Bug: 76692459
Change-Id: I9103450622f129311545648ac75f5b2f9fc2d04a
2018-04-09 17:17:41 -07:00
Vasu Nori 49d1460b97 putback go/ag/3671714.
Enable content observer notifications even for default SMS app, when the
build is for Android Auto

Bug: 71633682
Test: tested manually
Change-Id: If91f4f7b2a9b46cba4aa516304f0007a06852c50
2018-02-28 16:25:02 -08:00
Vasu Nori 871938aa2c Revert "Enable content observer notifications even for default SMS app, when the"
This reverts commit 2e0bf0af27.

Reason for revert: should not be in P

Change-Id: I457ebe79e66abb21a9d2fc1c168802b8505c5e9f
2018-02-28 17:34:49 +00:00
Vasu Nori 2e0bf0af27 Enable content observer notifications even for default SMS app, when the
build is for Android Auto

Bug: 71633682
Test: tested manually
Change-Id: Iee139fd7a65f60cd6c059f5c6d2ef78464e0dfce
2018-02-15 16:00:01 -08:00
Tom Taylor 467361dbcf 37742976 - Catch bad gifs
* A security researcher crafted a gif that would cause the Android
Bitmap code to throw an NPE. That would cause messaging to crash when
decoding the NPE. The frameworks team is changing the underlying code to
throw an OutOfMemoryError instead of a NullPointerException.
In order to catch both errors, the code needs to catch Throwable.

Test: I added code to GifImageResource.getDrawable to throw a new
OutOfMemoryError and then used the debugger to verify it was caught by the
new catch Throwable statement. I did the same test with NullPointerException.
I tested attaching gif images and sending them to verify the gif path still
worked.

BUG=37742976

Change-Id: If71a7e65f8c0b083fe6c4b79f78358666338d59d
2017-10-05 11:27:21 -07:00
Tom Taylor 3671fd94ae 37742976 - Catch bad gifs
* A security researcher crafted a gif that would cause the Android
Bitmap code to throw an NPE. That would cause messaging to crash when
decoding the NPE. Catch the NPE.

Test: manually tested the "crash.gif" attached to the bug. Stepped
through the debugger to verify we're catching the NPE and logging
the attempt. Verified normal gifs still work.

BUG=37742976

Change-Id: Iab814d5b0b514bed0cecddd9a76f1fc095f90892
2017-06-23 14:09:12 -07:00
Paul Duffin 3cce9e3644 Use com.android.messaging.util.Assert instead of junit.framework.Assert
am: 991c2e5ab8

Change-Id: Ifb50be13961d566c58c25c3f9f6e7a4ac4b6a260
2017-02-21 18:01:15 +00:00
Paul Duffin 991c2e5ab8 Use com.android.messaging.util.Assert instead of junit.framework.Assert
Bug: 35234379
Bug: 30188076
Test: make checkbuild
Change-Id: I3aa9b72393d128877c86c9a116495f76f3e50e18
2017-02-21 11:23:14 +00:00
Tom Taylor 4dfcff98da 32807795 Security Vulnerability - AOSP Messaging App: thirdparty can attach private files from "/data/data/com.android.messaging/" directory to the messaging app. am: a2aa53f83a am: 90bf70396d am: 305a004e19 am: 2397f2fbef
am: 313284eee7

Change-Id: Iaa18124b7f9090efe55a0a46a1851ff5c0b6fe28
2016-12-06 22:27:37 +00:00
Tom Taylor 313284eee7 32807795 Security Vulnerability - AOSP Messaging App: thirdparty can attach private files from "/data/data/com.android.messaging/" directory to the messaging app. am: a2aa53f83a am: 90bf70396d am: 305a004e19
am: 2397f2fbef

Change-Id: I16b590f76c9856d1407b336973ba86ff681415c6
2016-12-06 22:24:07 +00:00
Tom Taylor a2aa53f83a 32807795 Security Vulnerability - AOSP Messaging App: thirdparty can
attach private files from "/data/data/com.android.messaging/"
directory to the messaging app.

* This is a manual merge from ag/871758 -- backporting a security fix from
Bugle to Kazoo.
* Don't export the MediaScratchFileProvider or the MmsFileProvider. This
will block external access from third party apps. In addition, make both
providers more robust in handling path names. Make sure the file paths
handled in the providers point to the expected directory.

Change-Id: I9e6b3ae0e122e3f5022243418f2893d4a0859edb
Fixes: 32807795
2016-12-05 16:39:55 -08:00
Tony Mak 7ad7ac27f1 Show badge icon if any participant in the conversation is work contact
Precompute is_enterprise and stored the value in conversation table.
Include is_enterprise in the ConversationList view.

Change-Id: I2e31bd61c08d25a296aaa3e99cb24631ae2e7976
2016-06-29 10:58:33 +01:00
Tony Mak 2a50ffe57c Add badge in conversation view if the participant is a work contact
TODO: To handle conversation having more than one participants.

Bug: 29065176
Change-Id: I3820454bf2b76c151dc3a13d9be270502029160d
2016-06-28 15:44:27 +01:00
Tony Mak c4073ff4ce Add badge icon for work contact in search result
BUG=26021888
BUG=28016344
(cherry picked from commit 6e00763823cd1b27ff88d25d0eb11f8addc3b2e6)

Change-Id: If0e2f7b1c58cd064ebfdae8a9b735b391c5009fc
2016-05-16 16:35:06 +01:00
Shri Borde eba0949bc6 Access incoming audio files after user taps Play
For platforms with insecure handling of media files, media files should
be opened only after the user chooses to play the media.

Change-Id: I5f9bbd1f8468a704a5962f0dddd3c8b11bba8bea
2015-08-21 10:17:46 -07:00
Mike Dodd d3b009ae55 Initial checkin of AOSP Messaging app.
b/23110861

Change-Id: I11db999bd10656801e618f78ab2b2ef74136fff1
2015-08-12 12:47:26 -07:00
Mike Dodd ef8c7abbcf Revert "Initial checkin of AOSP Messaging app."
This reverts commit 461a34b466.

Change-Id: Iac4ca77eeaa94989e91dead49a7959c905bd3078
2015-08-12 18:48:39 +00:00
Mike Dodd 461a34b466 Initial checkin of AOSP Messaging app.
b/23110861

Change-Id: I9aa980d7569247d6b2ca78f5dcb4502e1eaadb8a
2015-08-12 08:58:28 -07:00