Frameworks: Clean up some possible memory leaks

Change-Id: Iea6acef53483404540ed90d51c047e9fb15076c6
AudioService: Remove STREAM_NOTIFICATION from ringer mode streams

Change-Id: Ie8d25743b27839fa2bd4e9ae5d3d0a49410ac5b4
JIRA: CYAN-344
Issue: https://jira.cyanogenmod.org/browse/CYAN-344
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Framework: clean up QS to reduce memory leaks in special conditions

PS2: adapted to slim
PS3: clean up

Change-Id: I4cf516da95abff6d493c36158e916a6fc35741d5
profiles: Broadcast profile updates

Add broadcast to indicate profile changes that does not
cause a profile to be selected.

Use the new broadcast to update the Profile Tile more
reliably.

Currently the tile update is triggered by a profile
selection. However, the active profile may change without
triggering a selection. This happens, for instance, on
locale changes.

The Profile Tile does handle locale changes, but is subject
to a race condition. If it handles the locale change before
the profile manager does, the name change will not be seen.

Change-Id: I193454f5100f1ae04dd24d50f25e75ec961f4d68
Improve auto-brightness handling

- Add a setting to control the auto-brightness algorithm responsitivity
- Make the algorithm react much faster when the ambient brightness
  increases quickly, e.g. when receiving a call in bright sunlight.

Change-Id: Ic608901c476609dde69cae982228c09567140a83
Bye, bye Talk. Welcome Hangouts (1/2)

Patchset  #2: Vector icons.

Change-Id: Ief201d9f0c80bca3c8d37fdf3283cbbb15004b5b
profiles: Don't broadcast before boot completed

 * Fix exception during boot.

Change-Id: I53850f55d3252ff2d16e1c98878ba24a074131e7
Fix MAP SDP record generation [2/3].

Give the bluetooth app API to register a server socket for a specific
UUID/port pair. It needs that for registering two OBEX server instances.

Change-Id: I6ede7f2777040af4e653eceb14ea47a2c03abfae
Telephony: Add DCHSPAP to getTcpBufferSizesPropName

Change-Id: I868f0eae2db6032b43e9c1a1bd23860ab7bbebca
Merge "Bye, bye Talk. Welcome Hangouts (1/2)" into jb4.2
Merge "profiles: Don't broadcast before boot completed" into jb4.2
Fix wrong log information in DevicePolicyManagerService

When user reset password their password,
if password doesn't match target quality of device,
DPM print a log why can't reset password.
however log message isn't correct information.
in log context, it have to exist current quality
and target quality. this patch can help print correct log.

Change-Id: I5c8fb1c77ddbe1bdbc76e35038c897e2e8efb077
Add additional Method that check whether a table is empty or not

Application Devleopers are using queryNumEntries API
implemented by "COUNT(*)" to check whether a table is empty or not.
COUNT(*)  has to process the entire table to compute the result.
But, "EXISTS" can stop after a single matching row has been found.
So, Using "EXISTS" is more faster than "COUNT(*)"
I added new API using "EXISTS" to check whether a table is empty or not

Change-Id: Idcc2633d0a5349c59f41e125cf34c9dc6622cdbe
Properly rotate full [-pi, +pi] orientation range if available

The code currently in place assumes that orientation has a range
of [-pi/2, +pi/2] as may be found with a touch digitizer. However,
when used with a digitzer that can report the full [-pi, +pi] range
of orientations (e.g. a stylus) the calculations here are incorrect.

This patch checks if the post-rotation value is out of range for
the axis, and wraps it back around.

Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee
Bug fix for building the hover target list

lastHoverTarget should be updated even though lastHoverTarget is not null.
If not, the hover target list cannot have more than one hover target.

Change-Id: I21b49e8cbf3657321b2f1f2c20a3bdeb7f07bd48
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Add missing ACTION_MEDIA_UNMOUNTED intent

When an SD card is removed without the user unmounting, the intent
ACTION_MEDIA_BAD_REMOVAL is fired but is missing the preceeding
ACTION_MEDIA_UNMOUNTED which is needed to keep UI consistency.

Now when bad media removal is detected an ACTION_MEDIA_UNMOUNTED
intent is sent before the ACTION_MEDIA_BAD_REMOVAL.

Change-Id: I133300f42bafab141351e796d7cfc13c15d133e0
framework:base: iterator error in singletone provider

In case of singletone provider, we don't count it in the guset user.
After we remove it from the array, and resize the array, need to move
iterator back.

Change-Id: I99920a6beccc9de0e67ffeb632b1940efaee10b9
Fixing crash in PhoneNumberUtils getNumberFromIntent

Handling intent with no data when trying to retrieve number from
intent.

Change-Id: If7c5930e7048aec732fb7a3fbeb3391e1408b071
Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event

See b.android.com/55873

Change-Id: Idff7b71480991e16f57e55748fafa57d5827b10b
Fix Expanded Mode

This fixes the erratic behavior that causes fullscreen apps/games
to rotate into portrait, in expanded mode. Weird as usual!

PatchSet:
- small clean up

Change-Id: I72febac50a282f7b5bf570e46ef0dd38215a6bab