LED: Simplify logic

Removed settings observer for enabling custom led settings.

Change-Id: Ic5dfec96696ad5d2f7247b4a04a2df584dd35454
ZygoteInit: increase GC threshold amount when preloading to postpone GC

Patch Set 2: Hardcode it better to 1MB.

Change-Id: I7a6e195b82ebe2f4bd5bbb506e19200d452fa3e5
Quicksettings 3.1

Minor post update.

* Update Recents animation with new immersive modes. Continue this https://github.com/AOSPA/android_frameworks_base/commit/48be6b18bbf2d676da75eb031ee76b282635713a
* Sleep Tile
  Cleanup code.
  Add new holoish drawable.
  Long press now opens power menu (pure emulation of power button). Thanks to @cristianomatos
* Immersive
  Back on our first concept of having the tile dualized and change it:
  - Front: Toggles Global On/Off.
  - Back: Toggles modes (Full/Nav only/Status only).
  The tile now stores last immersive state, thanks @David96 for the idea.
  Fixed a critical bug with status bar hidden only, thanks to @David96.
* Rssi Tile
  Restore long press action to data usage on front rssi tile
  Fix icon overlay, restore blank overlay on disable and while wifi is on.
* Code indenting and cleanup.
* Update dual switch icons, less bright.
* Restore a previous fix that relays on immersive.
* Get rid of some useless imports and code in quick settings, make a class for battery tile.

PS2: Update dual switch icon brightness.
PS3: Spanish translations.
PS4: Translation fix.
PS5: Translation derp.
PS6: Cleanup.
     Add battery tile class.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I076d4c2be5f22df7cf1f04d5487c699d90d663f7
DocumentsUI translations

Some translation from OmniROM DocumentsUI application
Merge "DocumentsUI translations" into kitkat
Set id for battery tile (wrongly removed on previous rework).

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Merge "LED: Simplify logic" into kitkat
Merge "ZygoteInit: increase GC threshold amount when preloading to postpone GC" into kitkat
Modify network disabled toast message

Also add spanish translation

Change-Id: If689aceccb0c14e3f5f42011cd4ac2c9c5306cfd
Update immersive confirmation.

1. Disable panic mechanism for expanded desktop.
2. Separate confirmation for each expanded desktop style.
3. Add new layout for the case when navigation
   bar is hidden but statusbar is visible.

PS1: Adapt to our immersive and fix conflicts.
PS2: ???
PS3: Hopefully restore previous state.
PS4: Spanish translations

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I5914d655bd5f9315ac4cc6fc7d70cc4ee45bb7b2
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into kitkat

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: Ib9c9261da93fc29aa4022aa2114dec9e821f4995
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
Alarm: Add one more RTC alarm type for poweroff alarm.

Now we use type of RTC_WAKEUP for the poweroff alarm.
Actually lots of other applications also use this type.
But these applications never expect the device will
power on after it has been shut down. So we need to
add dedicated alarm type for the Deskclock or similar
applications.

Change-Id: I5df2465c46de8fe875d1581bdefe26021c8ffb33
alarm: add JNI interface for clearing alarm

Add the JNI for clearing cancelled alarm, otherwise kernel driver
would know nothing about the alarm status. E.g. power-off alarm
would not be really cleared in alarm driver even it is cancelled
in the apps/framework.

Change-Id: I1250b3778de8961ba2a89d8ea8fa29d729bbc4e8
Bringup NSRM(network socket request manager).

NSRM is a feature to synchronize app socket requests
to reduce network signalling and there by save some power.

Change-Id: I6f23cc17e29e7ce12a138c747765e6bab8c126d9
Fix alarm wakelock not being released.

Alarm wakelock was not released when the pending intent was served
by the package with a uid not the same as the one which created the
alarm.
Remove advanced for loop from PowerManagerService since the list is
modified during iteration and thus resulting to
ConcurrentModificationException error

Change-Id: I4e2ff1f4be1ad044aa350886a3ea69ee5a576f74
CRs-Fixed: 591170
CRs-Fixed: 591511
Wifi: wifi not connecting, once the APN gets disabled state

APNs are disabled on select network and they are enabled on
receiving connected event. But forgetting an APN before the
connected event is received,will result all the remaining APN
to be in disabled state and they never connect.
So, Enabling all the disabled APN on forget network will help
to connect automatically to a saved APN.

Change-Id: I0aec08f118c3f33fceea60f5a6b44622717d93ed
CRs-fixed: 567655
 Audio: SetForceUse config check in AudioService

 - Audio is routed to headset when BT is turned off while audio is
   played on speaker
 - Mediarouter does not have setForce device information when app forces
   audio to speaker. So while disconnecting BT, MediaRouter is routing
   audio to headset instead of speaker.
 - Added check for setforce config in AudioService.

 CRs-Fixed: 578316

Change-Id: Ie929f407bfa12eacd29cf36031024a4a6a979b63