generateProjectThumbnail can fail to close output stream

In case of an excpetion the generateProjectThumbnail method
does not close the output stream used.

Move the closing of the stream to the finally block.

Change-Id: I417236ab1acf65bb97e40beb8a750035c25e436e
Fixed typo errors in documentation

Fixed some type errors in developer documentation.

Change-Id: I92629a4350508fb96fda1842741c5ced64171464
Signed-off-by: Taeho Kim <jyte82@gmail.com>
take account of RotationVector's new extra parameter

Rotation vector has a new 5th parameter introduced in API 18. But the code classified the 5 parameter the same as it would be 3 and overriden the 4th parameter which is unnecessary and also caused an unexpected behavior.

Issue #63268:
https://code.google.com/p/android/issues/detail?id=63268
Signed-off-by: Balint Ureczky <ubalint@gmail.com>

Change-Id: I6f9a5fc401da655695ab03694b4a74dc5be936ed
Fix documentation for Parcel.readException().

The old documentation was kind of useless and not clear, so this is an
improvement.

In addition to this change, I think this method should probably be private
instead of public, especially since the values for code are private. But it's
too late to change that now. Also the method name is pretty poor, since it's
not actually reading anything. Something like "throwException" would be more
appropriate.

I'm open to suggestions on how to improve this situation. Maybe mark the
method as deprecated with a comment that it will be made private in the
future?

Change-Id: I830f2bcf606714bd130d8c953aa33974b33c9a83
Hang off call by power button while screen is on

Enable power button end call and screen is off.  User use power button
to turn on screen will end call.  Should turn on screen and not end call

Change-Id: Idf34f7724dbf1796205332c5c7ef663102f8a30c
Signed-off-by: shower <shower929@gmail.com>
Miscellaneous small documentation fixes.

Most of these I noticed on my own. The change to docs/html/tools/testing/testing_ui.jd is mentioned in a bug report:
https://code.google.com/p/android/issues/detail?id=56324

Signed-off-by: Mark Doliner <markdoliner@google.com>
Add explicit close of Scanner input

The UsbDeviceManager is using a Scanner to identify
the ALSA card/device numbers to use for USB Gadget
audio, with a FileInputStream as its input.

Since FileInputStream implements the Closeable interface
it provides a close() method that should be explictly
called in order to close the stream source and release
any system resources that it might hold.

Change-Id: Ia0ff86d1f3cdf8916becec9c8603915dcbf4d2c8
Add additional languages to be accepted by the NumberPicker input filter

Adds Devanagari, Bengali and Kannada numerals to be accepted by the
input text filter of the NumberPicker class. Before this patch only
Latin and Arabic-Indic numerals was accepted as input.

Change-Id: I82a7e88e09c894ee55ef301d109e3d6b867c6ff6
Telephony API extension v2

Added new AndroidManifest permission:

android.permission.READ_PRECISE_PHONE_STATE

Added the following PhoneStateListeners and corresponding broadcast intents:

onPreciseCallStateChanged(PreciseCallState callState);
onPreciseDataConnectionStateChanged(PreciseDataConnectionState dataConnectionState);

broadcastPreciseCallStateChanged(int ringingCallState, int foregroundCallState, int backgroundCallState,
	int disconnectCause, int preciseDisconnectCause)
broadcastPreciseDataConnectionStateChanged(int state, int networkType, String apnType, String apn,
	String reason, LinkProperties linkProperties, String failCause)

Added TelephonyManager intent actions with their extras and constants:

public static final String ACTION_PRECISE_CALL_STATE_CHANGED = "android.intent.action.PRECISE_CALL_STATE";
public static final String ACTION_PRECISE_DATA_CONNECTION_STATE_CHANGED = "android.intent.action.PRECISE_DATA_CONNECTION_STATE_CHANGED";

public static final int PRECISE_CALL_STATE_*

Moved public static final int DISCONNECT_CAUSE_* from PreciseCallState.java to a new class DisconnectCause.java

Moved public static final int PRECISE_DISCONNECT_CAUSE_* from PreciseCallState.java to a new class PreciseDisconnectCause.java

Change-Id: If3b88c679507c529b746046c4a17cf6d9974bd09
Structure device not freed in error case

In case of an error in the call usb_device_get_fd()
the memory created by usb_open_device() is never
freed.

Added a call to usb_device_close in case of error to
release the allocated memory.

Change-Id: Iaa83674f000242d80604dd30c782236f7afd90c2
Telephony: Handle DATA_CALL_LIST in DCC.

- Added async handling of NetStatPoll.

Bug: 11596853
Change-Id: Iffb7bf369062264dd773338c732bc69318d90b73
Round off when calculate next step in Seekbar

When the positions for the new step is calculated in
a Seekbar, a rounding error can appear.
This is fixed by round off before casting.

Change-Id: Ie2cf201ef670ccc2297e9bc4c7f415a826e44a41
Tethering: Skip link local addresses when enabling NAT

Only one entry is allowed to be added to route table 60 for all
interface ipv6 link local addresses, so skip ipv6 link local
addresses on all interfaces when enabling NAT

Change-Id: Ibbe6c2bdae83586cdd38287089715f3433bbb91f
Signed-off-by: jiaguo <jiaguo@marvell.com>
NFC: getNdefMessage() should throw exception if no tag in field.

According to documentation, an TagLostException should be thrown, if
the tag has been moved out of field when reading NDEF message.

Change-Id: Ib7e485ed442027fdebd5bc7a46101fbca0c88bdb
AArch64: Use long for pointers in SurfaceSession class

For storing pointers, long is used in SurfaceSession class,
as native pointers can be 64-bit.

Change-Id: I1535a488dfffaddd20e3beac57e558035d715cbf
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Finish fixing Zygote descriptor leakage problem

In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: indent change

Bug: 12114500
Change-Id: I090402136a8a8b7d6aad6eb153026e85d7cf6ad3
Add hidden minor version ID for support lib workarounds.

Change-Id: I7940e32c78caaab351fb28d92e5fadbea6292b27
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Fix, MountService now only sends one onShutDownComplete

The event onShutDownComplete are sent only when all
volumes are shutdown. (Not one for every volume.)

Change-Id: I6af521ee8285ca581efac7d3c5f013dfbff3ee30
frameworks/base: move idmap from frameworks/native

idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: I3c1db3baa355f53d6b523d60f4377e63eff00c30