Base: more fix Active Display (again)

maybe fix
http://jira.omnirom.org/browse/OMNI-313
http://jira.omnirom.org/browse/OMNI-421
http://jira.omnirom.org/browse/OMNI-401

Change-Id: Id947e18a9299200f1ccd41aa70e56534fdbb4b57

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
frameworks/base: added national roaming for Saunalahti in Finland

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

Change-Id: I24ec8993dd83fb18efd3f19ae39e845b4701f9dd
frameworks/base: added national roaming for Noverca in Italia

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

Change-Id: I1b792244e97114a648efb40c6d01ea0c595cafdd
frameworks/base: added national roaming for BSNL in India

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

Change-Id: I81e54f301a70300ff7d2e873480b197c58bbdb8a
Base: The Netherlands national Roaming

:: 06-01-2014
- Added for networks
	KPN
	Hi
	Telfort
	Vodafone

:: 07-01-2014
- Changed the config.xml
	Thanks to Andrew Dodd

- Added mcc204-mnc02.
	Network Tele2
	Thanks Silas Arentsen

:: 10-01-2014
- Added mcc204-mnc03, mcc204-mnc10, mcc204-mnc20
	Networks Voiceworks (PrivateGSM), KPN (2?), T-Mobile
	These networks have a GHM band others in this list don't..
	(http://en.wikipedia.org/wiki/Mobile_country_code)
	Thanks Max Weninger!

Change-Id: I4f6d3c7b1feb04cc7f342bdca1f29afc8cbe8e53
Rename realistic camera_click sounds to camera_click_realistic, and bring back stock camera_click.

Pumping up the "camera sound disable option" to allow BLOOP, CLICK, or (shhhhh)

CLEAN UP THE BLOOP!
you should probably get tested.

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

Conflicts:
	data/sounds/AudioPackage_tab.mk
Hot reboot

Change-Id: Iebd56c590ac5ac8189dbffc64580f3a2aabb9016
Signed-off-by: Chester Kener <Cl3Kener@gmail.com>

Conflicts:
	services/java/com/android/server/power/ShutdownThread.java

Fix

Signed-off-by: Chester Kener <Cl3Kener@gmail.com>
Facebook Sync Dirty Hack (Credit RomanB)
fix cursor leaks in F_B

my previous commit was submitted before i was finished.  Here is an updated version.

PS2: missing bracket

Change-Id: I9d8048e49695cdac7ded086cd49ee6eb99e518cc
frameworks: squash of leak & race fixes

commit 5c837244a550308a6b8fadf95275d50f6bf3b202
Author: Daniel 2 Olofsson <daniel2.olofsson@sonymobile.com>
Date:   Mon Jun 10 14:49:14 2013 +0200

    Fixed race condition in Spinner.DialogPopup on null reference.

    NullPointerException is triggered when DialogPopup is
    dismissed due to object mPopup being null when not showing.
    Race condition is triggered when dialog is dismissed before
    touch event to dismiss dialog has been processed properly.

    Fixed by adding a null check prior to accessing mPopup object.

    Change-Id: I3c4fe9c279d92a7103fb4f68189d1d42beedc606

commit 4950d85c29bed35c0874858d094d5a0f628f1e54
Author: Pawel Augustyn <pawel.augustyn@sonymobile.com>
Date:   Mon Jul 16 11:23:54 2012 +0200

    Fix for native leaks in YuvToJpegEncoder.cpp

    Objects allocated by Get<object>ArrayElements function,
    should be released. Add a fix to release this objects
    in error cases.

    Change-Id: Idf834523d93bb2dfd6b872e3b2179b7f1bba38f3

commit 463ac945502552ab0c06ae00c987d3c400161fe3
Author: Michal Szynkaruk <michal.szynkaruk@sonymobile.com>
Date:   Wed Jun 26 11:28:36 2013 +0200

    Fix for MemoryLeak in InputMethodService

    Problem: when onConfigrationChanged is called many times,
    mInsetsComputer is added many times to the list.
    Solution: check before if specific listener is already
    in the arraylist.

    Change-Id: Ic730395120d6dc8585628c142b2e161c42317f30

commit 5167ab57b2a1dbee38a5303e4b490a04b9dff950
Author: Pavan Kumar S <pavan.kumar.s@intel.com>
Date:   Fri Aug 3 12:03:01 2012 +0530

    [BatteryStatsImpl] Avoid memory corruption due to Parcel Recycling

    While processing batterystatsfile, in present code there is a race where a parcel
    might be recycled while it is being written to disk in another thread.

    The write process is done in 2 steps:
    - write into a Parcel (memory block)
    - then write this Parcel to disk using Journaled API.
    The Journaled API ensures robustness against file-system issues due to power cut.
    The writing is done in batch using a thread running commitPendingDataToDisk().
    This function writes the parcel to disk but this parcel is a global variable
    initialized by writeLocked(). If the writing takes too long time and two write
    threads are launched, the parcel is freed by the second writeLocked() call;
    which could cause the memory corruption.

    Hence, change global Parcel variable by a Parcel parameter to commitPendingDataToDisk()
    and only this function will be allowed to recycle the parcel.

    Change-Id: Ie86ee0a66434b7107264c79f68411196c7505a34
    Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com>
    Author: Pavan Kumar S <pavan.kumar.s@intel.com>
    Signed-off-by: Shuo Gao <shuo.gao@intel.com>
    Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
    Signed-off-by: Jack Ren <jack.ren@intel.com>
    Author-tracking-BZ: 47466 19426

commit ab625310c19573caf5cdcf4c6ef573bbfbc8a26b
Author: Vairavan Srinivasan <vairav@codeaurora.org>
Date:   Mon Jun 6 13:42:54 2011 -0700

    frameworks/base: Fix for the race in Wallpaperservice

    Wallpaperservice has a race among message handler of
    DO_DETACH and service's onDestroy. In certain cases,
    the engine kept track in mActiveEngines is removed by
    message handler of DO_DETACH and service's onDestroy
    doesn't get a entry in mActivieEngines and isn't able
    to invoke detach. This keeps the broadcast receiver,
    mReceiver active and is unregistered by the framework
    and a corresponding leak is reported.

      Later, the message handler of DO_DETACH continues
    and invokes detach on mEngine, which attempts to
    unregister mReceiver and framework throws an exception
    "Receiver not registered: android.service.wallpaper.
    WallpaperService$Engine$1@40874580" and causes the
    framework to reboot.

      In case of system_server, WindownManagerPolicy and
    android.server.ServerThread contest for access of
    shared members, mActiveEngines and mEgine. Fix is to
    protect the critical section via synchronized block.

    Change-Id: Ice79cb8344fb54bcc6e9f76f4b143daac2608d7b

    Conflicts:
    	core/java/android/service/wallpaper/WallpaperService.java

Change-Id: Ib24d04673c5fff21533f7f00456df658cdbc6288

Conflicts:
	core/java/android/service/wallpaper/WallpaperService.java
Fix SystemUI FC at bootup

Attempt to fix:
    java.lang.IllegalArgumentException: Layout: -30 < 0

Change-Id: Ic76745810cc3f42b0048bf395c0aaa9ecb547206
Cursor leakage due to cancellation signal

If a query call was cancelled, the cursor adaptor might leak. The
adaptor is now closed if any exception is thrown during query.

Change-Id: Ic4c2edeaf2fcef56b4ef59484a36d3233aa12dbc
fb: fix reconstruct statusbar illegal argument exception thanks a ton kufikugel!

Change-Id: Ia1044657934654861ae02222f255be3d8fb0d960
Keyguard: fix not shown overlay widgets from system

google derp....due that if widgets are disabled current AOSP
code just add the default widget. Then checkAppWidgetConsistency()
detects a widget which was added and the complete method is non op.
Whatever lets handle the whole process over checkAppWidgetConsistency()
on widget disabled it tries to bind the default widget over overlay if
this is without sucess it falls back to the system one.
Safemode falls always to the system one

This fixes as well an issue that the saved default id in LockPatternUtils
is not reseted back to default if all widgets were deleted from the user.
Based on an old patch from danesh. Thanks for the
suggestion

Change-Id: Ic8543e0b5e83114e57942225935870f45deda97e
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
Add NULL check in updateProxyConfig

If the exclusionList was null in updateProxyConfig the VM would
crash when converting it to a UTF8 string. Avoid this by adding a
null check.

Change-Id: I0d8106fd54385bd9ae9c652a6c67d459a119cf2b
MountService listeners can not be unregistered

When unregistering MountService listeners, their Binder proxy
objects were compared to registered listeners instead of their
backing objects.

Change-Id: Ie98a686b1d17544f1eda59fb3eb0dc02d836c1b2
Fixed stylus eraser being rejected by palm rejection

The stylus eraser appeared not to work, i.e. Android did not respond to
input from the eraser. It turned out that all input except stylus input
is rejected when palm rejection is activated. The problem was that the
eraser itself activates palm rejection when it hovers. The solution is
to allow the eraser during palm rejection. This solution makes sense
because the eraser input works in the exact same way as normal stylus
input.

Change-Id: I90824500be7613af4f00427c59ce828528b632f7

Patchset: 2
http://review.cyanogenmod.org/#/c/56424/
Camera Key description

Change-Id: Ic9a22448c16428fc2f311ea813aa2ec5f27493db
alarms: clean up duplicated sounds

another mess...

Alarm_Classic == Oxygen == Cesium
Promethium == Platinum
Argon == Fermium
Nobelium == Neon
Helium == Hassium
Plutonium == Krypton
Neptunium == Carbon

Change-Id: I29330a50a2538a5e3cf3af99d4f7bf1b17de7aca