gps: fixed singleshot session that doesn't stop

When a single shot location is requested and a
location is returned, the location request is
not stopped and so it continues even when the
requestor has stopped listening. This can cause
gps tracking to continue in the backgroud and eat
up battery.

This is fixed by stoping the provider if there
are no more update record associated with it
when a location is returned.

Change-Id: Ie437732ff06231a46724843af30e21ca3a1694ab
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
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>
TRDS 2.0: Update Dark toggle state

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/toggles/TRDSToggle.java
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

Conflicts:
	services/java/com/android/server/power/DisplayPowerRequest.java
	services/java/com/android/server/power/PowerManagerService.java
Make character picker for QWERTY keyboards use HOLO theme

Also, removed the cancel button. Instead, touching outside will close
the dialog.

Change-Id: I20c1d22b131a92e2e2022d054b4141a2b61c7dd8
Relocate setcurrentfunctions string in legacyusbmanager
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Change-Id: Ibeea4f19b78a2935dbe61407dbdac14345b2d69c
Revert "Remove dock home support."

This reverts commit 7c135205f2f4c192299ad0215276e9e481bccaa5.

Conflicts:

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

Change-Id: I9b2c4eebaab87a669b42681e70ec5324dadf7f6d
Merge remote-tracking branch 'carbon/jb2' into carbon-jb2