Fix deadlock of WebViewCoreThread

There was a deadlock in destroy process.
Investigation showed that WebViewCoreThread is waiting some
callbacks but in this case WebViewCoreThread can not resume
itself not to call notify method.

Flow:
1. CallbackProxy.sendMessageToUiThreadSync
2. WebViewClassic.destroy()
3. CallbackProxy.blockMessages()
4. CallbackProxy.handleMessage is called via MainThread
5. The WebViewCoreThread deadlock is occured.

The cases we have to call notify method are followings.
OVERRIDE_URL
CREATE_WINDOW
SAVE_PASSWORD
NOTIFY
OPEN_FILE_CHOOSER
JS_ALERT
JS_CONFIRM
JS_PROMPT
JS_UNLOAD
JS_TIMEOUT

Change-Id: I9d95ae500bf6338d77b32b5fa15de7cff5720d0f
Avoid adding FORWARD_LOCK flag to an updated system app

Consider the following case:
1. An app exists in /system/app or /vendor/app. (i.e, it's a system app)
2. If the app would be updated as a forward-lock app by downloading from
   market(google play), then it would be installed in /data/app-private.
3. Moreover, if it would be updated by the whole system image (i.e, FOTA
   or something like that), then the app would be applied a FORWARD_LOCK
   flag.

The app SHOULD NOT have a FORWARD_LCOK flag. Because the resource path
of such app does not refer to the proper resources to access.

Change-Id: I0750f69a93a3115f4201029796b598507de3555f
Lockscreen : Reference correct layout

Include correct layout for portrait.

Change-Id: I6de511357aec0f4364cd68c3ed740c7d4f47379d
Add a delimiter between scheme and host

Bug: 6923539
Change-Id: I49aac145e8e80a5af7475cfe93ef4a353d2d3fe6
libdrm: fix bad strncpy / snprintf calls

Fix the following bugs reported by IOActive:
* GOOGLE-AN01 - Android libdrm drm_parseDM.c Boundary-CRLF Buffer Overflow
* GOOGLE-AN02 - Android libdrm 'drm_parseDM.c' contentType-CRLF
		Buffer Overflow
* GOOGLE-AN03 - Android libdrm drm_parseDM.c contentID-CRLF Buffer Overflow
* GOOGLE-AN04 - Android libdrm 'parser_dcf.c' Multiple Headers
		Buffer Overflow
* GOOGLE-AN05 - Android libdrm 'parser_dcf.c' ContentType Buffer Overflow

Bug: 8727221
Change-Id: If386922e907567f54e26897beffaa1cfe4777896
Validate restored file paths against their nominal domain

Bug 8460775

Change-Id: Ib16d740a001adf4f9cb9ccaa31066ac7cadfb430
Ensure install-during-restore is like install-then-restore

When we've installed an apk from the archive, recheck whether
to apply the system-uid policy restrictions around file system
restores.

Bug 8833099

(cherry picked from commit 2baf6dcfcf7fc1705db25e64dc0cb11fa3509d39)

Change-Id: I972fe1543f2234aa76baf562d6f806175ac0248e
QuickSettings: FavContact & UserTile: Open full contact page

QuickContact popup can only be used for phoning/messaging/emailing,
which doesn't make sense when you're opening your own contact.

Opening the full contact directly makes it easier to beam or share
with other (one less click)

Also added this change to include FavContact

Change-Id: Ifd31b8c14ccb9f07e10e5bb2079bbc2f1296414b
Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
Set foreground priority for shutdown receivers.

The broadcast of ACTION_SHUTDOWN has a timeout of 10 seconds. To
reduce the risk of hitting the timeout and speeding up the
shutdown sequence in ShutdownThread we set the priority of the
BroadcastReceivers to FLAG_RECEIVER_FOREGROUND.

We have seen that this change reduces the shutdown time when
the system is under heavy load.

Change-Id: I22cbf6af8cf6fc4bdefaa1c3da8a7eed7e7b7674
New Event: ACTION_NEW_OUTGOING_SMS

Change-Id: I8be01ad6251ca25e4d00ebffd876bb6ce7f3c283
Add SMS Middleware layer.

Add fix so ordered broadcasts are delivered to system
apps first in the event of a tie. This works around
the issue where terrible apps steal SMS notifications
from the broadcast queue to simply prevent notifications
that could otherwise be removed by a toggle.

Change-Id: I4fff0c584f8fce9c5f2f4fe86a82fe6480c307c7
Revert "Frameworks:  Allow Custom Icon Tinting Option (1/2)"

This reverts commit I7b7085534ab2572807dc092cdb4b00e84ae97a02

Change-Id: I8d4151052d45071b8823d753e60ec6a5a15d78fe
QuietHours: Change Logic (2/2)

Makes sense to me that turning QuietHours
    on should TURN QUIET HOURS ON with
    default time constraints applied.
I.E. QuietHours between 12:00am && 12:00am
    means QuietHours all day.  Having to
    adjust end time to 11:59 is redundant
    and not exactly the clearest implementation.
    Especially when we have a QuickToggle that
    directly toggles the setting on/off.

PS2: Vibrations as well.

Change-Id: Ib4893f9b47cf60fc0c55bf01b5453579385039b5
Navbar: add spacer to lightsout layout

This will align the lightsout buttons with the normal ones.

Change-Id: I9a3008ae8f16f35efc595d2a2f1d07a3eef47c29
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>