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

Change-Id: I9e811cfd312abae24a9cad189d19e73848f6c4c1
Add support for allow-permission extension.
This will grant a sharedUserId arbitrary permissions as defined by XML files
in /system/etc/permissions.

Change-Id: I4c0be56173b89621c4cc7ae589715a030931e8d5
[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.

[2/2] part: https://gerrit.omnirom.org/#/c/3381/

Change-Id: I9e49ddb89002699714dcc3b3d2b1df87dc4bab4b
Signed-off-by: scott <scott@ubuntu>

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java
Changes in circle battery implementation to fit HALO

Change-Id: Ib8848537586511c509655776f74ea452f7b7e1ac

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
Halo: Add master switch to disable Halo (1/2)
-Port master switch from @Der-Schubi.
-Fixed Halo not showed at first notifiction pulldown.

Signed-off-by: scott <scott@ubuntu>

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

Change-Id: I93b59da79c63c3154bec1dba4490e4f4447a1564

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Remove dependency on jniGetNonMovableArrayElements.

jniGetNonMovableArrayElements is not safe and is going to be deleted.

Change-Id: I6daae1e4ac9e01ca593cda522fdbeb774eef1eff
(cherry picked from commit 75a5038849cecf38aba72721272ff07cca09501f)
base: added national roaming for BOB in Austria

http://jira.omnirom.org/browse/OMNI-121

Users of BOB in Austria (MCC 232 MNC 11) can roam on
A1 (MNC 01)

PS2:
wrong order

Change-Id: Ibf9f48cd0a142eb984ff2450337031f6c411f8c0
fb: slightly adjust navigationring background drawable size

for custom icons to fit the system icons

Change-Id: I068cd0a463484f0f1b3ed0f210701290be364b7a
fb: fix possible NPE on back button transition

Change-Id: Ia6e30a9d94f292e7616b846f159b61fed9f502cc
fb: refactor QuietHours code

thanks to ivisiblk for the idea