Android denial of service attack using class 0 SMS messages

Bug 9702645
Bug 11970403 - Change to ClassZeroActivity to singleTask

Cherry pick the change from master.

Making every AlertDialog immediately visible can lead to exhaustion
of graphics-related resources, typically memory, resulting in a
broken bufferqueue/hw renderer, and subsequent system crash.

Make ClassZeroActivity a singleTask activity, and queue incoming
messages if one is already being displayed.

Change-Id: I0aef7b857364acc404e79581ba5e503571065483
Import translations. DO NOT MERGE

Change-Id: Id82f32c4e67b791c497dac8a5366e83a3c3befee
Auto-generated-cl: translation import
Import translations. DO NOT MERGE

Change-Id: Ib81400a83d3319e1a69a620ac64dba04a0324aaf
Auto-generated-cl: translation import
Import translations. DO NOT MERGE

Change-Id: I3ad993c5a135428dc543d30bc08eb9139127bf6e
Auto-generated-cl: translation import
Import translations. DO NOT MERGE

Change-Id: Ib50c04b62425bf3cc09512ef63c28430ddd0706b
Auto-generated-cl: translation import
mms: Add CHANGE_PHONE_BLACKLIST permission

Fixes permission denial and subsequent FC when adding a contact to
blacklist from an SMS thread.

Change-Id: I3b33602684077d11f8d6473c538dc919c771127b
Move message blacklist to framework (3/3).

Change-Id: Ieb02ee5aea26900d829aae72de249c4efc7f549f
Signed-off-by: aways <aways@c-rom.org>
MSIM: Replace SUBs with real operator name.

  Add Sim slot number after Operator name
  Remove unused strings

Change-Id: If7947e2bf8bc6ace182a6ab3955afd3573e5017f
Avoid ConversationList/ComposeMessage activity leaks

First, ConversationList activity leak, Contact.mListeners are only unbound
when ListItemViews are recycled, without considering the activity exit case
or message delete case.
Second, ComposeMessage activity leak: use SoftReferences instead of
HardReferences for the slideshow cache.

Change-Id: Ic235b31403b26aba16bf6b8b51bff7b4c6f68d98
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
Stop previous TaskStack worker

Each time we delete all threads, a new TaskStack thread is started.
We need stop the previous one to avoid over memory consumption.

Change-Id: Ibee8dd7b8e757df0686c7989dc7d9878f9ef5102
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
Clear notification when tapped

Change-Id: I1e660088436e36efdf4bfb000f273b63f5462ae0
Mms: Mark messages read if they are on-screen when phone is unlocked

Previous behavior: Open Messaging app, open one of the existing conversations, 
and then lock the phone. Receive a new text message in that conversation. 
Unlock the phone to reveal the new message, but the notification does not 
disappear despite the new message having been read.

This is due to onResume() not getting called read when returning to
the app from the lockscreen, so the new message never gets marked as read!

The solution is to use onWindowFocusChanged() as a failsafe for this scenario, 
as this DOES get called when you come in from the lockscreen. Now the notification 
disappears correctly. 

Change-Id: I225a31bea9abe553c1466e070f4c9b50245f05c5
Merge tag 'android-4.4.3_r1.1' into kk

Android 4.4.3 release 1.1
Mms: disable SplitActionBar

This makes the UI more consistent with newer Email app look.

Screenshots:
  https://dl.dropboxusercontent.com/u/16268774/cm_temp/email.jpg
  https://dl.dropboxusercontent.com/u/16268774/cm_temp/mms.jpg

Change-Id: I71c287f258b9cb8f4b94456ecc9d4034d4680525
Mms: Prevent popup window from closing

Popup window will close if pressed outside of it.

This commit disables touches outside the popup.

10x Revertron

Change-Id: Ife491d8b58d1b32d59760eb10a6e10cb67969974
Mms: update new messages notification count

Mms should notify the system about how many new sms/mms has (including those ones under conversations)
to the notification system. This allow the system to display the number of events for Mms app according its
settings

Change-Id: I15953283ae657b770869f611a886452199550d67
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Mms: add MobilePaperShowActivity

This activity is from CAF, which allows incoming MMS messages which
appear as slide shows to be broken up into their separate images, while
still exposing the slideshow functinoality via an overflow menu button.

This helps alleviate the symptom of when an iPhone will send more than
one image in one MMS message and Mms app interpreting it as a slideshow
instead of separate images.

This commit is essentially a squash of:
https://www.codeaurora.org/cgit/quic/la/platform/packages/apps/Mms/log/src/com/android/mms/ui/MobilePaperShowActivity.java?h=LNX.LA.3.7.1&showmsg=1

Change-Id: I131a7b6203a071fc4adfc0efc80811a1e51aa995
Mms: Handle null inputstream from missing file but valid uri.

  - For when you adb restore, an image may corrupt or be missing,
    therefore, we can't always assume that our inputstream from a
    what appears to be a valid file uri won't be null.

Change-Id: I78367c4808fb9967bb750b8713f2cec75805dc05
mms: do not update seen field in markAsUnread operation

This prevents to a seen thread to be notified again after mark as unread

Change-Id: Ib97ded493cdddb261666cffb37bf2f82e827d6a3
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
mms: markAsUnread only read items (ignore seen flag)

Do not mark threads that are only seen

Change-Id: Iffef7823663918ee0dcbecc0241cde71e5a25bca
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>