EthernetDataTracker: Set network available on connected

This change fixes state mismatch found in the bugs below,
and makes the code look consistent with disconnect().

In startMonitoring(), reconnect() is called before mNMService.registerObserver().
Then dhcpThread.run() could finish without getting interfaceLinkStateChanged() callback.
In such a case, mNetworkInfo has connected but not-available state - which is contradictory.

Bug: 8113933, 8291000, 8291039
Change-Id: I29d74f8d09dcffb97d6c9f8198811bca046fef0c
Avoid IllegalArgumentException in Preference.java compareTo()

In some situations the collection.sort() algoritm fails in compareTo()
with a: java.lang.IllegalArgumentException: Comparison method violates
its general contract!, due to a more strict validation of the compare
contract.
This strict validation was introduced in java 1.7.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6804124
This fix should prevent the sorting from crashing.

Change-Id: I64230e7f62f83c99d7a6274964bb2988ae843826
Fix CalendarView to show the month title properly.

Step to reproduce:
Do this test on a Tablet (i.e. do in multi-pane layout)
1. Settings > Date & time > Uncheck the Automatic date & time checkbox.
2. Select 'Set date' and set the month to January and Done.
3. Re-select 'Set date' then you will find no month title just above the calendar.

Change-Id: I2489b454a4526be13f1fbdc61a72edcd6b6942a0
Telephony: Add DCHSPAP to getTcpBufferSizesPropName

Change-Id: I868f0eae2db6032b43e9c1a1bd23860ab7bbebca
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 BatteryBar showing on all 3 locations

Change-Id: Idbdd16ea5442b032119ce48d586b2207e8cf0281
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>