Frameworks: Quiet Hours Automatic Switch (1/2)

Change-Id: I3e09891a60ffc5a11f5b5fabef8e06fb02dc9f5d
Keyguard: Fix Pin-Layout (squashed commits)

Squashed commits of the following:

commit fa06992ab7e49fe1e056787dd281384d92290be1
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   2012-12-10 09:19:40 +0700

    keyguard: fix layout for sw320dp devices

    800x480px dpi devices have less screen space than the xhdpi devices
    Google designed the layout for and the layout needs adjustment.

    - Reduce the lockscreen security container size such that the clock
      widget has enough space to display its content.
    - In the SIM PIN/PUK view, Google put an empty widget on top, but
      we don't have space for that, increase its size such that the
      widget practically disappears.

    This should not have any effect on devices with larger screens.

    Ported from cm-10.2.
    * Removed invalid mdpi layout leftover from framework-res
    * Fix keyguard for mdpi devices too

commit 9c9c6d17772f4fa4681f43bea11fb5074e24093a
Author: Lorenzo M <djmesias@yahoo.es>
Date:  2013-12-08 23:05:32 +0100

    keyguard: fix-fix layout for sw320dp devices

    Default values need to be defined in sw360dp or larger devices will
    pick up sw320dp values automatically.

    On the maguro device the keyguard isn't properly centered.

    - Before http://review.cyanogenmod.org/54758:
        http://i.imgur.com/F6sokhA.jpg
    - After http://review.cyanogenmod.org/54758:
        http://i.imgur.com/OdTkZLL.jpg
    - With this commit:
        http://i.imgur.com/TThq9da.jpg

Keyguard: Fix PIN layout on sw320dp-mdpi devices

Commit: 294d0867079d21c0bcfb704315cdbb68a150dba4
Author: Michael Bestas <mikeioannina@gmail.com>
Date Jan 15, 2014 5:21 AM
    Fix a long standing lockscreen layout problem that
    was introduced in 4.2

    Before: http://i.imgur.com/9sVKHRR.png
    After: http://i.imgur.com/DLY4DRu.png

Change-Id: I3001e5678bc10ea7f287548c7d189fe0c45210ec
Frameworks: Lockscreen Rotation Optional (1/2)

PS2: Change method to allow disable, enable
	portrait, landscape rotation.

PS3: Just clean up...same code.  Different
	style.

Change-Id: I164d31b8980562eb5df68dcb2846410d932a4e73

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Input: Fix Palm Rejection

A "bad merge" appears to have broken 'Palm Rejection' for devices
that use a stylus. This commit:

https://gerrit.slimroms.net/#/c/62/

appears to have only implemented half of the necessary changes in
InputReader.cpp for 'Palm Rejection' to work properly. This commit
adds in the missing pieces.

PS2: whitespace derp

Change-Id: I402df6ed45b53cf02299f0b6588c763c3cb3de48
Frameworks: Fix possible ANR and navigation bar freeze

Big thanks to ralpheboyo which provided us the first time a usable
anr trace where we can see what the actual problem is.

The random ANR is caused due of to much work on the navigationBarCanMove
feature. We call way to often the provider value even though it is only
needed on initiliazing or on update of the value. Currently we call it on every
possible navigation bar change and this multiple times.

To fix it just call it on init and on contentobserver changes and pass
the new value to the navigation bar view and the search panel view

PS:
- remove another call
PS
- add one security check just to be sure
PS
- get one step further and put out the navigation ring config as well
  and reduce it to just one call.

Change-Id: Ica6116289d5bc50e9bedcd34b4b165062fa3468d

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Signed-off-by: dragon <dragon7780@hotmail.nl>
Framework: disable keyguard widget frame (1/2)

And another user request.  But...I can understand
	it now that I see it without.  They actually
	look quite nice this way.

Change-Id: Id0222140a41eec9e5cd27b769cf860ac62ede1c0
Revert "Frameworks: Lockscreen Rotation Optional (1/2)"

This reverts commit 1c08c46d3211ac46f7545c96306b5f829c363b92.
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 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>