SystemUI: StayAwake Toggle

Instead of overcomplicating toggle, onLongClick simply takes the user to
Settings$DisplaySettingsActivity instead. onClick (on) sets screen timeout to
int MAX_VALUE(approx 24 days), and restores user value onClick (off).

** Icon Credit to Nitroz(Thanks a ton!)

Change-Id: Ifd2051b2a6e8235160713cad3b4385dbb6d66b8f
Signed-off-by: bmc08gt <bmc08gt.teamb00sted@gmail.com>
FX: NavRing fix longpress derp.

Change-Id: Icebb34612b65ff30e427f237780b366f94a9b24e
Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>
FW: Ribbons Padding, Click options, autohide updates 1/2

Adjustable padding
vibrate on click optional
if no short action set use long action icon and
  dont set short click listener - long press only mode...
Autohide flakiness fixed
Don't unlock on torch

Change-Id: I45c9f29453220e80249300b66bb61d5a7afc784f
Fix NavBar & SystemBar sizing issues

PhoneWindowManager makes some decisions regarding
portrait & landscape based on screen sizes.  Since we poke
this routine everytime we change something on the NavBar, this
can result in PWN changing the orientation of the device.  This
was causing strange behavior in resizing of the NavBar & SystemBar.
It might also have been causing other strange orientation issues.

PS2:  Attempts to decode the actual device type based on the screen
   dimensions and the rotation at time of setInitialDisplaySize.
   This is needed because large tablets (that default to a landscape
   orientation, need to have the dimensions swapped)

PS3: Whitespace

ps 4: Restore the stock calculations for orientation, but restrict
    them to running only one time (at initial boot).  This will allow
    the normal detection routines to set up the proper rotation variables,
    but will not reset (and change them incorrectly) everytime we poke
   setInitialDisplaySize.

Signed-off-by: Zaphod <mwilson@acesappraisal.com>
Change-Id: Iaec0e8ba623f10bd0d4118b4d5a99a42ab0564f6
Dynamic glowScale adjustment and spacing of NavBar.

This adjust the Glowscale for the NavBar buttons based on
the number of buttons on the bar.  I also added spacer
views to the outer edges of the NavBar.  This helps alleviate
conditions where the glow was cut off on outer buttons (especially
in tablet UI).  It also makes the Glow more appropriately sized
as the number of buttons increase.

There are still some cases where an excess number of buttons,
and a small navbar percentage (TabUI) is going to create some
glow cut-off conditions.  That's just going to be unavoidable when
the user tries to squeeze it down that small.

ps 2: Adding the spacers now only occurs on TabUI.  This prevents
    major changes to the look/layout of buttons on Phone/Phablet,
    but still provides glow cutoff release for tablets, as they
    were the worst effected.
ps3 : adjust the size of the separators to not squeeze navbar too much

PS4 : whitespaces

Change-Id: Ic6d9deb4ae49c87251b8b258ff0f42da46910986
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
Merge "Dynamic glowScale adjustment and spacing of NavBar." into jb-mr1
Merge "FW: Ribbons Padding, Click options, autohide updates 1/2" into jb-mr1
Merge "FX: NavRing fix longpress derp." into jb-mr1
Update Japanese translation

- Add missing translations

Change-Id: Ib1951beaa15c658fd8bc3e70dc203d8f81fb3e71
Signed-off-by: rdgate <rdgate@gmail.com>
Fix Watchdog HeartbeatHandler to run on correct thread

The HeartbeatHandler for the System Server Watchdog has been running
on the wrong thread due to a race condition in initialization.  It's
designed to run on ServerThread, so that it can catch lockups in the
main looper of the System Server.  It has been running on
ActivityManagerThread instead, so it does not detect lockups on the
ServerThread as it should.

ActivityManagerService is calling Watchdog.getInstance() before
ServerThread calls Watchdog.getInstance().init(), so the handler is
being bound to the ActivityManagerThread instead of the ServerThread.

Explicitly bind HeartbeatHandler to ServerThread, so that the Watchdog
catches lockups on this critical thread.

Change-Id: Iccb184ac3adb817feb86ed4ee0e50e443bf74636
Merge "Update Japanese translation" into jb-mr1
Frameworks: Add Permissions Management to AOKP [3/4]

Allows the user to revoke individual permissions on a per app basis.  Adapted from
CM7 commits 949eb057d81da7cd0a79fc1fe9cc9c4d989d1c27 and 4a0a352b36b21d0d22713c232baccca84ce13a2d
to work with 4.2.2

Change-Id: Ibc7be45b88838a2fffaff80514e77702d330de0f
Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>
FW - Restore Padding in NavBar Buttons.

In a prior patch to adjust NavBar glow I removed extra padding
that was inserted when there was only 3 buttons.  This caused
the NavBar to tighten up a bit on this case.  This restores
the previous condition of adding a little extra space when
only 3 buttons involved.

Change-Id: I9177cd7eaa795c3705f4e83362648aca992d2fe3
Signed-off-by: Zaphod <mwilson@acesappraisal.com>
xFW: Ribbons Colorize action icons, unlockmethod

Unlock method for if action should be unlock or not.

now torch, notification, and power shouldnt unlock.

Change-Id: Ic0978f145c8ad4f6f944cd603bfe744415d44561
Merge "xFW: Ribbons Colorize action icons, unlockmethod" into jb-mr1
FW: Updated czech translation

Change-Id: Ic98f996d996d9e9bc3cd141dc1ebb2bf9077c27d
Signed-off-by: kecinzer <kecinzer@gmail.com>
FW Ribbons Swipe ribbons seperated && logic adjust for navbar

If you have an enabled navbar weither by default or user seleted
the bottom ribbon has not been available. If the user manually
hides the navbar I will allwo them to use the bottom ribbon.
They can also long press the hidden navbar handle to get the
bottom ribbon.

This also makes the left right and bottom their own ribbons.

Change-Id: Icba9c4ec510149bef74382a3bf59fd79b3ef87c4
FW: Navring ShouldUnlock method

Don't unlock for the ring options, and power

Change-Id: I7fa5bdfcc3c099477f87cd3cdd82a28e57a094a2
Signed-off-by: Stevespear426 <stephen.k.spear@gmail.com>
Add method to PowerManager that allows querying the lowest possible
brightness.

Used by the auto-brightness adjustment to adjust the sliders.

Change-Id: Idb58fd86dee1a053fe858291be6c9b3169ac4247
Merge "FW Ribbons Swipe ribbons seperated && logic adjust for navbar" into jb-mr1