Make locale safe paths

generateMultiplePath was using SimpleDateFormat with
the default locale to create paths. In some locales
this resulted in characters that are not safe to use
on all file systems. Explicitly use Locale.US to
be locale safe.

Change-Id: Ic1cc0b83d04a81ab4791b90e34365896c9ca27fc
Snapshot 80117eda51c64366f7a11652956325999b98e433

Change-Id: Ibfbba2f092dd005167d10b07890bf8203602f2cc
Snapshot 81cfc41a448a57d0b3e16b817dc074e91ae94188

Change-Id: Ia1661589783f7d51557ff902c3260c341958c310
Fix NFC JNI local reference and pin table leaks.

Also turn compiler warnings up and fix the easy ones.

Bug: http://code.google.com/p/android/issues/detail?id=20441
Change-Id: I1043300f344b8296cfbb6bfad17388d5c3b314d1
Use LOCAL_REQUIRED_MODULES instead of LOCAL_JNI_SHARED_LIBRARIES

LOCAL_REQUIRED_MODULES creates a dependency of the apk to the jni libs,
while LOCAL_JNI_SHARED_LIBRARIES doesn't. Besides, the latter makes the
jni libs be included in the apk, but the former doesn't.

For a system app link Nfc.apk, there is no reason to use
LOCAL_JNI_SHARED_LIBRARIES. Using LOCAL_REQUIRED_MODULES
deduces the apk size and the device configuration makefile
doesn't need to specify the jni libs in PRODUCT_PACKAGES.

Change-Id: I0d67987424e010157c289a93b1ef075b897ed940
Merge "Fix NFC JNI local reference and pin table leaks."
am f843d899: Merge "Fix NFC JNI local reference and pin table leaks."

* commit 'f843d8995fb94bdb1059061bad650c21ffd3588e':
  Fix NFC JNI local reference and pin table leaks.
am 803eb6ae: am f843d899: Merge "Fix NFC JNI local reference and pin table leaks."

* commit '803eb6ae8cd5b2ac3ffe010a3ced9018bf0b3d1d':
  Fix NFC JNI local reference and pin table leaks.
Enforce foreground NDEF push.

Store the calling UID along with the NDEF callback,
to make sure the registered callback is running in
the foreground.

Bug: 5199662
Change-Id: Ia6eb4457309445909629878f3371805a503fc82f
Fix emergency_recovery logic.

Change-Id: I1ea17f15a0e627296fb46b20765c59d0998eaf2a
Merge "Fix emergency_recovery logic."
Use bindServiceAsUser() to follow API change.

Change-Id: If99f32a43c0e4c13e0d2390142dc1dc7679a02f3
Add a bit more logging for Bluetooth Beam.

This allows easily ruling out wrong Mac addresses
etc.

Bug: 7903517
Change-Id: I6864527fe547347890d5ad319d1535a3f8ddf4d0
Merge "Use LOCAL_REQUIRED_MODULES instead of LOCAL_JNI_SHARED_LIBRARIES"
am be1aec0a: Merge "Use LOCAL_REQUIRED_MODULES instead of LOCAL_JNI_SHARED_LIBRARIES"

# By Chih-Wei Huang
# Via Chih-Wei Huang (1) and Gerrit Code Review (1)
* commit 'be1aec0a4cdd9eca43656b2de289fc711b282caa':
  Use LOCAL_REQUIRED_MODULES instead of LOCAL_JNI_SHARED_LIBRARIES
am edd2eaf9: am be1aec0a: Merge "Use LOCAL_REQUIRED_MODULES instead of LOCAL_JNI_SHARED_LIBRARIES"

# By Chih-Wei Huang
# Via Android Git Automerger (1) and others
* commit 'edd2eaf9c4af5622b84d119e0d6cf9cd207be0bb':
  Use LOCAL_REQUIRED_MODULES instead of LOCAL_JNI_SHARED_LIBRARIES
Return more accurate errors for NfcEe.open.

There are a number of different conditions under
which access to the SE is not possible. Since some
of these require user intervention to resolve (ie
external field present), return a more accurate
reason for NfcEe.open failure.

Bug: 4304698
Change-Id: Ie947c29be12d554a02d9246264a9f0e026a37af8
Merge "Return more accurate errors for NfcEe.open."
Split Surface/SurfaceControl fallout

Change-Id: I7293782504fe594f364403fa4c3f99d0aa4cd572
Catch all exceptions when doing remote Binder calls.

When doing application callbacks for retrieving NDEF
data or notifying the application that an NDEF push
was completed, we should catch all exceptions, not
just RemoteExceptions.

Bug: 8179249
Change-Id: I35d30d52322f05b7998ef2e10f8da9d856a4b0d6