Keyguard: smooth background change.

Change-Id: Ia0e4d0000db72b5cdb6fede03791805e34fa311d
frameworks/base: forward port DC-HSPAP support from cm-10

PS10: add new drawables, I need to add new QS drawables and also RTL support
PS11: fix blank space and prevents checkapi to fail
PS13: fixed tile icon and rebase

Change-Id: I1503c464b2db841fc193e57311e62415f5ff40f2
Squashed Sync Omni Active Display [1/2]

all credits goes to omni team and AD orginal author

[1/2] Base: Fix pimp up ActiveDisplay
This is a fix for the new features added with change: https://gerrit.omnirom.org/#/c/2819/

1. Fix the bug when Pocket mode is set to Notifications only and you
unlock your device with power key and if you put your hands over
proximity sensor the device will turn off (very annoying). The problem
was that mWakedByPocketMode it was put in wrong place.

2. Added an option in active display settings for "turn off display if
device gets pocketed again" (it's annoying for me, because i cover
the proximity very often).

3. Added an option in active display settings for proximity threshold.
I use this active display feature as an replacement for "sweep2wake",
and when my phone it's on the table, i just want to pass my hand over
it to show me the clock or notification (this was ok before the pimp up
commit), and now, you can choose how many seconds for proximity
threshold.

Practicaly, this commit fix one bug, and add settings for the
features added in 'pimp up' commit.
base: ActiveDisplay: fix for disappearing notification bar

PS2
dont do it on secure lockscreens
PS4
check if lookscreen is enabled

Base: Fix ActiveDisplay problem
follow kitkat changes
fix ActiveDisplay never disabled after using turn off display option

Base: ActiveDisplay check for Immersive Mode Enable
As we know, Immersive Mode will force StatusBar and NavigationBar to Hide
while ActivieDisplay always setSystemUiVisibility flags for Both if enabled,
and will cause a conflict for that flags

// how to reproduce bug:
// set ImmersiveMode enable
// set ActiveDisplay enable
// Turn Off screen, swipe to sensor, ActiveDisplay showing
// Turn Off screen again (using Power button)
// Turn On screen (using Power button)
// pull Quicksettings, disable ImmersiveMode from ImmersiveTile
// Turn Off screen again, swipe to sensor, ActiveDisplay showing
// unlock via ActiveDisplay
// voila.... random flags will be set into setSystemUiVisibility
// (sometimes navbar or statusbar or both are gone)

lets make ActiveDisplay check for ImmersiveMode enable/disable,
so ActiveDisplay will not always setSystemUiVisibility flags
if ImmersiveMode enable
also workaround fix for unknown icon (?) sometimes appears
(if Show All Notification enabled)
(based from user report at XDA thread, why they always report there not in JIRA :/)

Base: fix ClockView ActiveDisplay
why no body report this bug?
this happen since AD merger into omnirom for the first time
i found this bug after using 24 time format LOL

ActiveDisplay: Fix for flo and other devices
The changes made to layout/active_display_content.xml were not
made to its layout-land and layout-sw600dp counterparts
Make them here too to stop flo from crashlooping in systemui.
These values may need to be tweaked later, but preventing crashloops
is top priority.

[1/2] Base: fix ActiveDisplay for WifiOnly Devices
also fix for devices with unsupported Proximity sensor and Light sensor

Base: Disable proximity sensor when screen goes on in ActiveDisplay/PocketMode.
Active Display (in Pocket Mode) currently only switches off the proximity sensor in some cases.
If the user switches on the screen itself, the sensor is left running. This change
stops the sensor as soon as the screen goes on. Active Display already started the sensor each
time the screen goes off.
PS2: In the mode that turns the screen off again when the device is pocketed,
the sensor stays on until you leave ActiveDisplay.

Base: more fix Active Display

Base: more fix Active Display (again)

[1/2] Base: ActiveDisplay (rework interface)
really fix AD buggy stuff
tested with Music play
tested with No lockscreen
tested with faster screen turn off
check all sensor going off if AD not Showing or Disabled
fix notification posted/removed
make AD using System Window so it will covered all screen
fix Navbar translucent if Lockscreen Blur merged :P
now using Rounded Image
also introduce new RoundedImageView widget
fix build
fix sometimes screen turn off after unlock because screen timeout (hopefully)
now using new parser to get Notification data (thanks @Achep for the parser)
rework lightsensor manager
add NotificationUtils
fix brightness sometimes not changing
add support applications privacy mode (will not show content message if enable on each app)
allow bypass AD if no notification and lockscreen is secure
fix proximity always enable after adding new feature allow bypass AD
fix parsing notification data from app with targetSDK < 17
fix excluded app value (no body notice this broken since AD merged into OmniRom xD )
add option to allow bypass AD
make AD multiuser support

more improve Active display [1/2]

1. fix http://jira.omnirom.org/browse/OMNI-651
2. fix http://jira.omnirom.org/browse/OMNI-641
3. add http://jira.omnirom.org/browse/OMNI-652
4. Add option Double tap to sleep every where
5. Add option to show wallpaper blur behind active display
6. Allow to show numbers of notification on Handle (only show if notification count is enabled in bar settings)
7. minor improvements
8. add battery circle around handle (only show if battery circle around lockscreen handle enabled, see security settings)
9. fix http://jira.omnirom.org/browse/OMNI-665
10. fix whitespace

Signed-off-by: hany <hany.alsamman@gmail.com>
Fix SystemUI because Activedisplay

Change-Id: I8079a2af728f3367d3532d798819d7ddc98ebdc0
Active display bugfixes [1/2]

1. fix respect QuietHour changes
2. fix compute background bound for background image
3. fix http://jira.omnirom.org/browse/OMNI-724
4. fix http://jira.omnirom.org/browse/OMNI-722
5. fix http://jira.omnirom.org/browse/OMNI-709
6. remove useless layout
7. fix invalidation when sunlight mode disabled
8. fix fetch wallpaper
9. fix glowpad ring after configuration changes
10. disable wallpaper blur until we find fix for problem in OMNI-715
11. make sure when configuration changes, all view is rebuild, so there is double background window
    is showing
12. remove Wallpaper

Change-Id: I186926feee97479c0e220f51f10ee88c8e0a45bd
Signed-off-by: hany <hany.alsamman@gmail.com>
Fix compile error due to recent changes in Slim Recents
thanks @spezi77
Add an ethernet network icon to the statusbar network area. Merge of r44948 into cm-11.0 with updated icons.

Change-Id: If1f0c3122f634154afde8529ded167ab2eb2644f
SystemUI: ES translations

Change-Id: I0237f5fcd9ee924653524546208ef02e3cd57410
SystemUI: translation too long fix

see here: https://plus.google.com/u/0/116635047487375994737/posts/JLfLjXwrp9w

Change-Id: Ieae2c2578178f3c82d3535f5bd0b7c6e30729ce3
Keyguard: Fix configuration change observer

Change I9e5dfdb12df522dc7dd50c26f35aba26b1bbe44e made recreations
only happen when a stored copy of the previous configuration differs
from the current one. But "configuration = otherConfiguration" creates
a reference to the original object, not a copy, so newConfig.diff(mLastConfiguration)
always returned zero. Fixit by creating an actual deep copy of the
Configuration object.

Change-Id: I236932dfc0e121dd83212882b4fe71306c8a3fab
Core/Keyguard: Cleanup CAF additions

Change-Id: I12619aedc459ffed514b1eb2c19dd57e6f535522
Avoid collision with RIL constant 1138, used in some Samsung devices for RIL_UNSOL_TETHERED_MODE_STATE_CHANGED.
Needs http://review.cyanogenmod.org/#/c/61292/
Thanks to iptux on XDA for pointing out the change in constants between
CM-10.2 and CM-11.0.

Change-Id: I64011408f4cce9aeb1b56e325226f8e649eff2b6
msim: Add support for H+ icons

Change-Id: I9e0cb93b0414f55c51aea7425ab8e02ef5f12095
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>
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Fix WifiHandler for MSim

Commit 7c26a5cce74332bc48da9e894a835f2fe795431c attempted to fix
this issue by adding back the old code, but it needs to be a method
that can be called by MSimNetworkController. So sync it back to caf
to fix the merge issue.

Change-Id: Ifc721cbf372ec50810924d7ac6d55f54663458a1
Fix CYAN-3555 bug

This commit fixes typo which is in AOSP tree.
I hope it's possible to merge it.

Change-Id: Ifdf9c5d90b9850b6112ee11a9b1aa3b1576348a0
Signed-off-by: jereksel <jereksel@gmail.com>
base: Add theme support to Ringtone and Profile pickers activities

Patchset 3: Add support for theme RingtonePreference view. The dialog is
            automatically adjusted to the caller activity base theme.
Patchset 4: Don't break the android api

For Ringtones:

http://review.cyanogenmod.org/#/c/61393/

For Profiles:

Usage:

Intent intent = new Intent(ProfileManager.ACTION_PROFILE_PICKER);
intent.putExtra(ProfileManager.EXTRA_PROFILE_DIALOG_THEME, R.style.CustomDialogTheme); <<< Add your custom dialog theme here
startActivityForResult(intent, 0);

Style Usage:

Define an style that inherits from an android base theme

<style name="CustomDialogThemeDark" parent="@*android:style/Theme.Holo.Dialog.Alert">

or

<style name="CustomDialogThemeLight" parent="@*android:style/Theme.Holo.Light.Dialog.Alert">

or define your own dialog style

Change-Id: Icadbcf2c617c51177466989acdab9435066a47a0
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
SystemUI: NL translation

Change-Id: I3471bc2333cb9e9e8d5f2325dd91239c37dc4d5d