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
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
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
Merge "Frameworks: Quiet Hours Automatic Switch (1/2)" into kk4.4
Merge "Frameworks: Lockscreen Rotation Optional (1/2)" into kk4.4
Merge "Framework: disable keyguard widget frame (1/2)" into kk4.4
Merge "Input: Fix Palm Rejection" into kk4.4
Merge "Keyguard: Fix Pin-Layout (squashed commits)" into kk4.4
Merge "Frameworks: Fix possible ANR and navigation bar freeze" into kk4.4
Revert "Frameworks: Enable Lockscreen orientation (1/2)"

This reverts commit e10f86b9512763227d883775c4bbac4d47ee41c0.
Merge branch 'kk4.4' of https://github.com/SlimRoms/frameworks_base into kk4.4
Insufficient ProcessRecord cleanup when persistent process is killed

When persistent process with Service restarts, ActivityManagerService
does not reset ProcessRecord#hasClientActivites to false
(because ProcessRecord of persistent process is continued using
after killing).

It disturbs updating LRU list in ActivityManagerService, and then,
when new process calls ActivityManagerProxy#publishContentProviders,
SecurityException happens because of no entry in the list.

Bug: 13517358

Change-Id: I46b064f71a4f7025ade1bf117801352a7ab22e6a
Don't register methods when there's nothing to register.

Change-Id: I6d0233f79bb90089426d702b4076ec5750e82475
Prevent Lockscreen album art from activating FLAG_KEEP_SCREEN_ON

This is a small fix to the showWallpaper method, in which a power
consumption problem has been introduced. This showWallpaper method
toggles the window flag FLAG_SHOW_WALLPAPER, when album art is being
shown in Lockscreen. It is important to set pixel format to
PixelFormat.OPAQUE if flag FLAG_SHOW_WALLPAPER is not being set.

If not, an application that uses window flag FLAG_KEEP_SCREEN_ON
will prevent the keyguard from going to sleep and drain battery.

Change-Id: I1808be28047977ae5ac4dd1168ea25cac8a55a78
Fix a system crash due to orphan HandlerThreads

In SeekBarVolumizer class a HandlerThread is
instantiated that is not halted after the object
is garbage collected. The final consumer of
this class is volumes adjustment dialog in Settings.
If the user invoke the dialog several times, many pipes
are opened in Settings process that it finally exceeds
the maximum permitted number and the system crashes.

Change-Id: Ifd777365b5779f5db92c605413eb0254a53c8b00