[1/3] Subtle Vibration when outgoing call is connected

Other parts of these patches are on packages/services/Telephony & packages/apps/InCallUI repos

Change-Id: I5b4ba3db4e5d0507058a6be53e5ee722a6bd72c6
Check for null in LocalSocketImpl.SocketInputStream.available()

Calling available() on a local socket after close() will cause a native
crash. Other methods that pass LocalSocketImpl.fd to native code copy
the fd and check for null.

https://android-review.googlesource.com/#/c/90900/

Change-Id: I2d0b573f34ae47a23009760bbb1c02933ab0a20e
Signed-off-by: houst0nn <houstonn@gmail.com>
AudioService: fix cross deadlock in VolumeStreamState

Synchronize modifications of volume index by VolumeStreamState
class mutex instead of using synchronized methods.
This avoids possible cross deadlock when modifying volume on
two stream types simultaneously and one is slave to the other.

Bug: 13730145.

https://android-review.googlesource.com/#/c/94255/

Change-Id: I13406c71010ce0c2e2f08f660b6101f310396c98
Signed-off-by: houst0nn <houstonn@gmail.com>
Activity chooser "Always" button is not working

When ResolverActivity is created with a custom list of matching
applications (rList) as in NFC case, and the alwaysUseOption is
set to true, the prferredActivity is not saved even if the user
presses the "always" button.

When a list is provided the variable mBaseResolveList will be
!= null. This will set mOrigResolveList = null.

When an activity is choosen and one of the buttons are pressed
onIntentSelected is called. The first thing this method does
is to check mAdapter.mOrigResolveList != null, however in this
case mOrigResolveList is always null, and the value is not
saved as PreferredActivity.

This problem was introduced in
6d8dfbd8149942f25f2b9643a12f1fb38f3be834.

https://android-review.googlesource.com/#/c/95336/

Change-Id: I9eac41b7861b5e68ad3978af0dc0285f2a34eb88
Signed-off-by: houst0nn <houstonn@gmail.com>
Automatic Translation Import

Change-Id: I19aacae3c150690f64d414f002aa3b529bb5621d

Conflicts:
	packages/SystemUI/res/values-fr/pa_strings.xml
Minor cleanup of UsageStatsService

code cleanup, whitespaces

https://android-review.googlesource.com/#/c/92738/

Change-Id: Idea0e29f347d14e48e87aad38a261d0493bd5fd3
Signed-off-by: houst0nn <houstonn@gmail.com>