systemui: Fix hidden battery icon style

Change-Id: I52a13f4945e2ea654221f73ca1357dc72b4f4cf9
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
systemui: fix circle battery percentage alignment for low dpi devices

This changes replaces the +1px for +1dp for a better center
text inside the circle battery

Change-Id: I71d5e20c20f3125b5affe4fa93986ae4d12a61a1
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
base: added national roaming info for Pepephone in Spain

Users of Pepephone in Spain (MCC 214 MNC 06) can roam on Vodafone ES (MCC 214 MNC 01).

Change-Id: I462e8b6bc7ffdc8bdfc92765178f960c71c8009d
systemui: Use the same color for circle battery than clock color

Patchset 3: Fix code derp

Change-Id: Iaa7b778b705468996079fe600821eeb94a6ecb28
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
SystemUI: Forward port Statusbar Clock and Date actions

Port of http://review.cyanogenmod.org/#/c/27795/4

PS2: Cleanup and address comments
PS3: Remove unused variables
PS4: Remove unused imports
PS5: Declare AP_PM_STYLE final
PS6: Add in @drawable/ic_notify_button_bg to header
PS7: Fix DateView layout. Clear activity stack

Begin old commit message-----------

Patch set 1-2: Initial port
Patch set 3  : Fixes date click action
Patch set 4  : Remove unused import

Includes:
- Add onClick action to notification clock and date
  In expanded StatusBar
  - clicking clock opens alarms
  - clicking date opens calendar - today selected
  Id: I850732dcca0e65af59ce009aaf9f7ba18bcaf915

- Add onLongClick action to notication clock and date
  - As discussed with ciwrl on google+, LongClick opens DateTimeSettings
  - Moved on-touch color change to superior xml solution, as suggested by
    Andrew Boren <preludedrew@gmail.com> here: http://review.evervolv.com/#/c/3676/"
  Id: I1fae71e347ffcb786227ba0b2651a66f2df35e27

- Add SET_ALARM permission for SystemUI
  If one or more third-party alarm clock app is installed, clicking clock should
  open an app chooser for the alarm clock. However, permission for
  com.android.alarm.permission.SET_ALARM is required to make this behaviour
  work properly.

Change-Id: I8006e57a953fe0c4be480e0aa27a4c28c672f982
BatteryService: Restore the original parcel order

Append the dock extensions to the end of the parcel to preserve
compatibility with the original parcel format.

Change-Id: I92112e244ab85d6c93e8e5ebf37de8257af6413a
Fix ResTable_config::CONFIG_* typo (MCC vs MNC)

In commit 08d5b8f, the ResTable_config::CONFIG_* enum was incorrectly
changed to assign the same value to both CONFIG_MCC and CONFIG_MNC:
    - CONFIG_MCC = 0x0001,
    - CONFIG_MNC = 0x0002,
    + CONFIG_MCC = ACONFIGURATION_MCC,
    + CONFIG_MNC = ACONFIGURATION_MCC,

This commit assigns CONFIG_MNC the value ACONFIGURATION_MNC, as
intended.

Change-Id: I3b8799914a55debdb3ff30a82ada7ad990c49970
QuietHours: disable volume change tone during quiet hours

* Its quiet time, you're trying to be quiet, why would the volume
  change make noise when you're being quiet?
* Turn this off when system sounds are disabled during quiet hours

Change-Id: I6c7eb9d52f5dab9349bf2b8f72ddcb0ab45834fa
Revert "Telephony: Add data rat constant"

See http://review.cyanogenmod.org/#/c/55832/ for reasons.

This reverts commit 60f79613897f74cacceafad7bcd7260fe25bb1e5.

Change-Id: I7eea322dec1cbb3df33e4ee10d4e73fde0c6e934
core: added national roaming info for Tesco Mobile in Ireland.

Users of Tesco Mobile in Ireland(MCC 272 MNC 11)
  can roam on O2 Ireland (MNC 02)

Change-Id: Ie0b32d51511c2bbc726c43cdec78332397d1ecb9
Frameworks: Lockscreen Colors and Lock Image [1/2]

PS2: Separate all color elements
	into separate prefs.
	Also colorize bouncer frame
	for secure lockscreens.
PS3: Whitespace

PS?: Add Lock Icon Picker =]
PS?: Add "Colorize Custom Icon" option.

---------------------------------------------
PS3: Fix build
PS4: Re-add some import stuff

Change-Id: I542dfa01bb1d3d0e401bbf8a5f58b32f08cbfc62
fw/base: MOAR misc fixes & enhancements

Make ImageView drawable update more efficient in some cases.

When updating the view's drawable via setImageResource or setImageURI,
make sure to skip the layout pass if the old and new drawable have equal
sizes. This follows what is already done for setDrawable().

Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty.
This often occurs after an incomplete reboot/shutdown or battery pull.

ActivityManagerService: stay away from zombie content providers

When the lowmemorykiller kills a content provider in an unfortunate
moment, an innocent client app can become attached to a zombie provider
and be unconditionally killed moments after, when the dead provider is
being removed.
Prevent this race by addition of isAlive function to Process.java that
determines whether a process is still running and is not only a zombie,
add a check of the state of the provider process to getContentProviderImpl.

bootanim: Don't cache textures if they're expected to use a lot of VRAM

bootanimation cached all the textures generated until the animation
was completed.
For Hi-res animations with lots of frames (like the new CM9 anim on
xhdpi devices), this implied using large amounts of video RAM, more
than most devices actually have available, causing the animation to
stall (and in some cases, gralloc to lock up); so if an animation is
expected to use a lot of RAM (rough estimation based on frame size
and number of frames), disable cache entirely and generate the textures
on demand

bootanimation: performance enhancements

This patch implements two simple performance enhancements, which
might benefit devices. They are completely opt-in by setting
the following variables.

  * TARGET_BOOTANIMATION_PRELOAD: will preload the bootanimation
    zip to memory; this is handy on devices where the storage
    might be slow. By preloading it, we get quick access to the
    zip file, and the animation doesn't stutter.

  * TARGET_BOOTANIMATION_TEXTURE_CACHE: allows maintainers to
    force texture cache on/off.

Also fixes the sign warnings related to int / size_t comparison

bootanimation: fix usage of LOGW

bootanimation: allow using RGB565 instead of ARGB8888

RGB565 uses considerably less memory, and together with texture
cache, it allows us to offer a really smooth bootanimation on
not so powerful devices.

audio: libaudioeffect_jni GREF leak fix

- Excessive JNI global reference in AudioEffects.
- Global references created during native setup
  are not deleted.
- Global references are deleted in setup failure
  and during native release.

CRs-fixed: 413633
(cherry picked from commit f60e70097b84c4ef26eeb31024d52e5b1fc8aa64)
(cherry picked from commit 9c9279277ad10582ff3dcf5cad576d2d7f036569)

Call to equals() comparing different types (FindBugs)

Call to HashSet<PrintServiceInfo>.equals(ArrayList<PrintServiceInfo>).
The result of this comparison will always be false.

MiniThumbFile: Fix image/bitmap retrieval

Change I66005dd69b0a5c8f4353bd7a8225d163a654fd2d changed the insertion
and creation indexing mechanism, but the retrieval method was still
using the old sparse one. Fixit

Fixes android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithBitmap,
android.provider.cts.MediaStore_Images_MediaTest#testInsertImageWithImagePath,
android.provider.cts.MediaStore_Images_ThumbnailsTest#testQueryExternalMiniThumbnails,
and android.provider.cts.MediaStore_Video_ThumbnailsTest#testGetThumbnail

Memory leak in IInputMethodSessionWrapper executeMessage

In some cases the executeMessage is called with
mInputMethodSession == null. For the messages

DO_UPDATE_SELECTION, DO_APP_PRIVATE_COMMAND

memory is leaked. This commit recycles the args freeing
the allocated memory.

Fix resource leak: When call MediaMetadataRetriever.setDataSource or getFrameAtTime should ensure call release in finally to avoid resource leak
                   Patch set 2: Remove unnecessary white spaces

Fix certain setting writes being incorrectly skipped.

If a value that previously had a very long value (over the 500 char
threshold) is now set to null, isRedundantSetValue would incorrectly
return true even though the value was changed.

Change-Id: I3ccfc311546abe2b2b18262f76faba75e494075e
Port: Don't show phone unlock targets for devices without voice (1/2)

Add a separate list of default lockscreen unlock targets for devices
without voice capability.

http://review.cyanogenmod.org/#/c/52965/1

Change-Id: I2e9aa953bf9aeee4c492ae7514bedd9db408863b

Conflicts:

	packages/SettingsProvider/res/values/defaults.xml
	packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
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.

Change-Id: I5914d655bd5f9315ac4cc6fc7d70cc4ee45bb7b2

Conflicts:

	core/res/res/values/cm_strings.xml
frameworks/base: IT translations

Change-Id: I0ddeb31a240c53adf81c361102b033abe5759fd6
Screen recorder: add ability to record audio from mic [1/3]

Change-Id: I2422a3c651e469bc9ffeb6b101f43e145dc5de85

Conflicts:

	core/java/android/provider/Settings.java
Close sockets on wpa_supplicant termination.

Framework does not close the sockets on supplicant
termination, leading to leakage of file descriptors.

Thus close the socket on supplicant termination.

Change-Id: I50aefc6d60b3794288564f403a42258442e224df
CRs-Fixed: 576276
wlan: Error handling on PNO failure due to active P2P session.

If set PNO fails due to concurrent active p2p sessions,
handle the error condition in framework and issue a
regular scan for every framework background scan interval
until set PNO is either success or disabled.

Change-Id: Ia4e8d9aef9ed24e534cb57cea7c8ba7a7ffc509e
CRs-Fixed: 568458
Clear the scan list when an empty list is received

When the framework receives an empty scan list from supplicant, it does
not clear the local list. So the UI will continue to show the previous
scan list even when there are no APs around. So clear the local list,
when an empty list is received.

CRs-Fixed: 552212
Change-Id: I8715bc31ce0df7bd54c96fcf7d7b73592429f12a
framework/base: get proper obb mountpoint based on user handle

Due to invalid obb mount point, CTS test case was failing to mount
obb file at /mnt/shell/emulated/0. Added new API to support user
based mount point for obb.

Change-Id: I9f113bd98ab3a4af00dd7f788b2dc3bc45627d6c
CRs-Fixed: 587497