Add permission that allows cancelling notifications from other apps.

Change-Id: I055b17873e174f71174898a7649b1e221fd8c436

Conflicts:
	core/res/res/values/cm_strings.xml
Notification cancellation fixes:
Permission should only allow cancellation of other app notifications, not enqueueing.
Fix checkapi breakage.

Change-Id: Idbcfd4617057984250dc4d4fa32ff55bfbb155e2
Prevent notification acces via HALO on protected lockscreens
Don't show pinned Halo))) apps on PIE (hide count, icons and text)
Enable Bare style PIE on protected lock screen
FileUtils: add method to get UUID of a volume

Change-Id: I41b76c5e01c82a2f8e67b33133a76947877a2814
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
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
Fix typo in AlertController.java

If whichButtons is BIT_BUTTON_NEGATIVE, the negative button should be centered.

Change-Id: Ia34daf8c80704204a4f1cf71c642114005559d5d
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
FastScroller: Fix to use appropriate index

Fix FastScroller to use appropriate index to determine the
the position of a section while calculating the y coordinates
of thumb. In case of last section, use totalItemCount to determine
next section position.

Change-Id: I89bfd483949b5c14f85303b50380a73b4a4e635e
The order of child windows is switched

By calling WindowManagerService#reAddWindowLocked(), the window object
in DisplayContent.mWindows is rearranged. If this window has children,
the window objects belonging to WindowState.mChildWindows are also
rearranged together. At this time, while DisplayContent.mWindows is
arranged in ascending order of Z-Order, WindowState.mChildWindows is
arranged in descending order. Therefore, if children
(= WindowState.mChildWindows) are added to DisplayContent.mWindows
in the original order, the order of children is switched. I think
that children must be sorted before they are added.

Change-Id: I28a506f17fcd99c801a3faa17cca66fffb291596
Fix NPE when switching signal status style.

Change-Id: I3bd6e827c9f4a03b60364b0b4569c537ffd2d284
Fix requery behaviour of MemoryCursor.

As we can't restore the contents of the cursor window, we need to keep
it on deactivation so we can restore it on requery().

Change-Id: I06f688bbe9120c307bdc3ddbc3833416becdec82
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
Enable Halo pressed image in expanded status bar
Add additional Method that check whether a table is empty or not

Application Devleopers are using queryNumEntries API
implemented by "COUNT(*)" to check whether a table is empty or not.
COUNT(*)  has to process the entire table to compute the result.
But, "EXISTS" can stop after a single matching row has been found.
So, Using "EXISTS" is more faster than "COUNT(*)"
I added new API using "EXISTS" to check whether a table is empty or not

Change-Id: Idcc2633d0a5349c59f41e125cf34c9dc6622cdbe