Keyguard: don't refresh ui when screen off KeyguardStatusView is doing refresh all the time, which cause high power when screen off.

Original commit: https://android-review.googlesource.com/#/c/78853/

Change-Id: Iaca0c01947bb372f1c5a18c78a50ff788f89a53d
base: show notification count overlay only on notifications > 1

Change-Id: Ib52f7c365193f26f6ff983bd87fc7aaa9b63c46e
UI not updated correctly in expanded statusbar

Sometimes when getting status changes in expanded statusbar the
text disappear. Both NetworkController and PhoneStatusBar handles
UI updates and they are not in sync. This fix allows PhoneStatusBar
to update UI when NetworkController is updating the UI.

Change-Id: I46b8a24ecc732e441f836692c6584a78d8108dff

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
ProcessList: use different polling interval when screen off

We are using the same time interval for both screen off and screen on.
For process on top: ActivityManager.PROCESS_STATE_TOP, we will poll PSS
information every 120 sec.
During polling PSS, we are grep /proc/%d/smaps which is a 10k lines file.
This cost quite a lot of CPU resource. But when screen off, we don't need to update
TOP process PSS so frequently since we are not operating it. Lower polling
circle to every 15min to reduce power.

Change-Id: Ia4cd26290d44d066f034d5270ce5523650a3c493
Before requerying a cursor, check if it is closed.

Before updating a cursor,
it needs to be checked if it is valid.
Currently a defence code only checks
if it is not null.
But in case of "Cursor", it is not valid,
if it is closed.
So just like in CursorAdapter.onContentChanged(),
add the additional defence code to check validation.

Change-Id: I1302f1b6d009897815d4bdb2f20f625688cf9901
Revert "Don't try to set service.bootanim.exit"

This reverts commit b8b30900e59b74c082b073294aba443cccc7f887.

Change-Id: I988734a140cc7966168c1371a0419034f9917f95
framework: fix screenshot and rotation animation

for devices with abnormal hw rotation (e.g. hwrotation=270 or 90)

port forward from:
https://github.com/CyanogenMod/android_frameworks_base/commit/ac555b9ca9a76d13a26fc9ea40980fe57258761b#diff-d6f7bba268a742c91252cc9e64e2381a

Change-Id: I8dd0568c9261466178c737975a418321c3c634d1
Keyguard: do not allow to delete the system widget if widgets are disabled

We overwrite the default widget with our own one. In this case it is detected
as a normal widget even though it widgets are disabled and starts listening to
longpress events

Whatever check if widgets are disabled. If this is the case do not allow any
longpress events

Change-Id: I471664bac6ca1f8e57efe4904a385904c40486db
Framework: Glowpad Torch (1/3)

PS2: Torch active? Keep screen on.

Change-Id: I39c319b28e31470925f3b3764043c63ce9d3557b

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java
allow forcing HighEndGfx mode

people have already started fipping the lomRam prop to enable
transparent status bar, this will enable it with fewer
repercussions

Change-Id: Ied6de65276425fa1e7db0bf9da35f1932a355172

Conflicts:
	core/java/android/app/ActivityManager.java
SQUASHED: Remove ActiveDisplay to try again later

Revert "Base: more fix Active Display"

This reverts commit cd84c4d100efbf355d9d69ca6251e96f25e3db7b.

Revert "Active Display: Sort notifications by newest to oldest."

This reverts commit 74fefcf82d544498d1bfd7c1c6773c5e90f4f581.

Revert "Active Display: add some synchronization."

This reverts commit 661eee933552719c60064803260c529e5914116e.
fix RIL constants

Change-Id: I2913287157b59be21d766dc880bf85e80f1f203b
add MWI notifications as Settings constant

Change-Id: I850e561f0144684af4cc5f8d9f176108828eda3e
[1/3] Base: Remove Active display

Change-Id: Ia305a67eed1a57c61598af803c688389f9f30e45

Conflicts:
	core/java/android/app/INotificationManager.aidl
	core/java/android/provider/Settings.java
	core/res/AndroidManifest.xml
	core/res/res/values/custom_strings.xml
	core/res/res/values/rf_dimens.xml
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/rf_arrays.xml
	packages/SystemUI/res/values/rf_dimens.xml
	packages/SystemUI/res/values/rf_donottranslate.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Base: fix QuickSettings Scrollview

maybe fix http://jira.omnirom.org/browse/OMNI-414

Change-Id: I698cffda5016f51b9aa45df74fb56795553f208a
[1/4] Base: TRDS 3.0 and new theme engine preparation

For the one who do not know this feature see as reference
the first two versions here:

https://github.com/SlimRoms/frameworks_base/commit/b330fde28306286572ba390e451a72539c0c3576

https://github.com/SlimRoms/frameworks_base/commit/3194015737b7944b4185fca007b8d167a0675cd8

we got now over a year now a lot experience how to handle the qualifier fallback
as well how to theme it and how to handle other apps. Based on this knowledge we
redid some parts of TRDS engine with following new features/additions and fixes
to have now a final perfect working TRDS

- compared to the old versions where it was needed on some apps to restart them
  in background this is not needed any more. All is handled about the internal
  AOSP resource handling and on qualifier change the caches are cleared
  and the apps get an onconfigurationchanged to restart the activity
  like it is doing on orientation change eg
- inverted folder is now depreciated and the new folders are holodark
  and hololight which allows on the one hand a dark theme (at least
  how TRDS started) and a light based theme hololight
- This name change is mainly because of the new theme engine which
  will come which uses this as base to add 2 external themes at the same
  time and give the user the ability to switch between them. But this is
  still in early stages and this commit is just the preparation for it
- Two new automodes are now integrated. User can enable the twilight modus
  which enables/disables holodark/hololight depending on the daytime...means
  on the evening it switches to holodark on normal day it is hololight.
  The other automode is based on light conditions....means that if it is
  dark outside it switches to holodark....if we have bright light conditions
  it switches immediatelly to hololight. Due of the resource cache handling now
  this happens immediatelly for the user and feels completly system integrated
  and happens without delay. A bit comparable to some navigation tool for cars
  which can switch automatically from dark to light and back
- currently the auto modes as well the manual mode switches between holodark
  and hololight. Due that we do not have currently anything hololight themed
  in the source hololight = stock theme. We will give the user the ability
  later when done to choose between which modes the user want to switch
  (stock/holodark/hololight). But this does not make sense at the moment.
  As soon as we have done the light theme or theme engine (lets see what
  comes first) we will open the ability to choose it. This is only a small code change
- a lot small tweaks and fixes went as well into the new version

Whatever this commit as usual adds the support for it. The themeing is done in the
other commits by kroz which is as well way more extended then on the older versions

cheers

PatchSets:
- minor code cleanup

PatchSet5:
- use one value for auto modes

PatchSet6:
- kill resource caches on configuration change

PatchSet7:
- register settings observer lol

PatchSet8:
- fix not assigment of config mode change (typo lol)

PatchsSet 9 -11:
- playing around aosp qualifier is not that flexible then I thought
whatever back in most parts to original implementation handling

PatchSet 12:
- now no restarts of any application needed any more like it was on 4.3...yeaaah
- fix wrong shifting in native adapter
- fix wrong call of twilightmode
- disable debug
- cleanup

PatchSet 13:
- fix lightsensor

Patchset 14:
- no need currently to recreate the navbar we can do if a theme needs it

Patchset 16:
- synchronize on sending config change
- only send if system is ready
- fire first update when system is ready

-rebase

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/slim_symbols.xml

Conflicts:
	core/res/res/values/symbols.xml

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

Change-Id: Ifcce5a11318460dcec166cb255e9462343215692

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/app/ResolverActivity.java
	core/res/res/values/symbols.xml
WiFi label is not a Quote!

Cleanup the damn quotes around the WiFi label in the
notification panel. This only removes the quotes from the first
and last positions of the string.

PS 2 : WiFi name can have quotes!

Change-Id: I90badb7b2d8160e41da2632dac79042c4be37f2a
Network speed indicator on status bar (1/2)
Thanks to htchoi1995 && mithun46
Mine rearranged, modified and adapted.

Change-Id: Ia4397d132f2ee6cbb72028f7d94d04d96ab6c394

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/colors.xml
Fix to fatal exception caused by LockSettingsService

SQLiteException is thrown when attempting to read stored value
from database causing fatal crash in PowerManagerService
during LockSettingsService.readFromDb function call.
Resolved by securing proper use of database reading and cursor
management by adding try-catch-finally clauses to function.

Change-Id: I5584a7b4c2f278fe845e1ffb434dc80e63a4d8ff
ContentProvider: Avoid duplicate initialization of AsyncTask

AsyncTask is being initialized by ActivityThread to ensure its static
handler initilization and ContentProvider need not duplicate the logic.

Change-Id: I48bc88bdba32b56114f09c04a75480e26508f704