keyguard: add smart cover support   (I think we have a winner)

Change-Id: I18f312373767d1ec970d323ddd626cf0ab1edf93
Automatic translation import

Change-Id: I1939d2825ddbd2fe30e264edfa18bd52e9d9b4f9

Conflicts:
	core/res/res/values-vi/liquid_strings.xml
	core/res/res/values-zh-rHK/liquid_strings.xml
	packages/Keyguard/res/values-it/liquid_strings.xml
	packages/Keyguard/res/values-pt-rBR/liquid_strings.xml
	packages/Keyguard/res/values-uk/liquid_strings.xml
	packages/Keyguard/res/values-zh-rHK/liquid_strings.xml
	packages/SystemUI/res/values-cs/liquid_strings.xml
	packages/SystemUI/res/values-de/liquid_strings.xml
	packages/SystemUI/res/values-fr/liquid_strings.xml
	packages/SystemUI/res/values-hu/liquid_strings.xml
	packages/SystemUI/res/values-it/liquid_strings.xml
	packages/SystemUI/res/values-pt-rBR/liquid_strings.xml
	packages/SystemUI/res/values-uk/liquid_strings.xml
	packages/SystemUI/res/values-zh-rHK/liquid_strings.xml
Themes: Only process themes that are applied during boot

Currently, the PackageManagerService will process all themes and
ensure their resources are compiled and available to the system.
This is highly inefficient and can bog the system down when booting.

This patch will only process the themes that are currently applied
durring boot and lets the ThemeService take care of queuing up the
others for processing.   This reduces boot time considerably,
especially when the user has many themes installed.

Change-Id: I52168a1751ad3bfc458048dd1558ad71cc16317a
Augment SELinuxMMAC functionality.

* No longer support a package name stanza outside of
  a signature tag. Package names, by themselves, have
  no security associated with them in Android and thus we
  should not be allowing or encouraging this
  type of policy.

* Allow for nested package name stanzas inside
  signature stanzas. There are cases where a finer
  distinction needs to be made among apps signed with
  the same cert. New code allows a different seinfo
  tag to be assigned to the listed package names
  signed by the parent cert. When a determination needs
  to be made concerning seinfo assignments, the inner
  seinfo tag takes precedence over the outer seinfo
  labels which are assigned to just the signature.

* Temp structures are now used to parse new policy files
  until the entire xml file is parsed and deemed correct,
  at which time the temp structures are copied over to the
  permanent class structures. This ensures that any structural
  errors with the policy will not result in partial loads.

* Valid stanzas look like the following with the inner
  package piece being optional.

   <signer signature="">
     <seinfo value=""/>
     <package name="">
       <seinfo value=""/>
     </package>
   <signer>

   <default>
     <seinfo value=""/>
   </default>

Change-Id: Ia204d71211776dcf9b2dcc86ad6d77c4ad39dc25
Allow PMS to restorecon directories under /data.

This change applies a relabel to both /data/data and
/data/user directories on boot. Not every boot will
apply this relabeling however. The appropriate
seapp_contexts is hashed and compared to
/data/system/seapp_hash to decide if the relabel
should occur.

Change-Id: I05e8b438950ddb908e46c9168ea6ee601e6d674f
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Proper security labeling of multi-user data directories.

This patch covers 2 cases. When an app is installed
and the resulting data directory is created for all
existing users. And when a new user is created and
all existing app data directories are created for
the new user.

Change-Id: Iaba7c40645bc7b6cc823d613da0c3782acf6ddd5
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
systemui: Unbreak the planet

 * Not sure who to blame, but it's probably themes... :)

Change-Id: I0c534354a699f756d809aff10843ebea21f3f369
frameworks/base: Fix delay in sending AUDIO_BECOMING_NOISY intent

AUDIO_BECOMING_NOISY intent is sent as background intent which causes
delay in receiving pause event. This delay caused audio leak. By
marking the event as FLAG_RECEIVER_FOREGROUND, this intent is
received sooner by Application.

Change-Id: Ib978cf8322dcddbc01f59824f95fa7800f9c35af
CRs-Fixed: 652549
Themes: Let ThemeService handle all theme processing [1/3]

Only themes that are applied will be processed inside of the
PackageManagerService, all others will be sent off to the
ThemeService.

Change-Id: I5f2ec628e1d22a05accc6727efb0c1387455f82f
[1/2] Immersive mode: option to disable force navbar when ime shows

Change-Id: I6ebeceb7e87084f0eeb47215aa837bf26d0d1f63
Update the volume panel color to match Hover

The volume panel slides in from the top currently making it look similar to Hove
r. As both the elements slide down from the top, there should be consistency in
terms of design.

Change-Id: Ifa4439f593b390014a3efb672bc2d00eef6fb869
Fixing memory leak in RenderBufferCache

In our devices with higher resolution we have observed a memory
leak in the HWUI code. When there is GC or tree modification
and buffer size is greater than the default size, we make sure
buffer is deleted.

Change-Id: Idf7052ccaf43c8a784ce0e7bdab336dca29bffd8
Signed-off-by: Samsung <aosp@samsung.com>
Base: Custom Statusbar/icons color

Change-Id: I2cb8702916f4ae8e867fd1b67ffa9df73f715f48