StorageManager: fix android.process.media process stop while plug a discontinuous partitioned SD Card

While get volume state, throw an IllegalArgumentException, catch
this exception in StorageManager and return null to MtpService to
avoid process stoping.

Change-Id: I7d32e3007296eca5903e6753f6a3395be4bf48c9
Author: Gang Li <gang.g.li@intel.com>
Signed-off-by: Gang Li <gang.g.li@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 47459
Fix Issue 59989

Case typo in documentation for <application> tag

Signed-off-by: Paul Quei <paulquei@gmail.com>

On the page http://developer.android.com/guide/topics/manifest/application-element.html,
in the "ATTRIBUTES" section,
the heading "android:allowbackup" should be
"android:allowBackup" (ie. upper case "B").

Change-Id: I7cab16729ea2ffc653bc449009ff983a05f6e867
ShutdownThread: Turn screen on during shutdown

Screen should wake up from low power mode during shutdown,
to notify the user that the phone is shutting down.
This will result in better user experience.

Orig-Change-Id: I06b2c5c7a56795a65c6f49470d9b68b03b65c669

Change-Id: I265cfbb939e1109fbba609b133bcc3f418ef0bcd
Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 103672
Fix NullException in QwertyKeyListener.KeyDown

Extending null protection for view to "c == i" case in addition to
"c == Character.toUpperCase(i)" case that helped to fix some force closures.
Seems as typo in original implementation.

Change-Id: Ibaa5aea95c5c8cdc8ac981fe0d1dad313e3e692f
Signed-off-by: Dmitry Tsyganyuk <fdt017@motorola.com>
Wrong notification tone played for secondary user sometimes

Media should have support for multiple user when get the
default ring tone uri from settings provider database.

Change-Id: I2d120c155dba1094cab49b0bab58525f17321797
UsbHostManager : Hide blacklisted interface

There are composite devices those have both blacklisted and
allowed interfaces. Dropping whole device by partially blacklisted
interfaces makes allowed interfaces not working.

This commit drops only balcklisted interfaces, so that valid interfaces
remain accessible.

Change-Id: I01a021f06f8403265c6f280d746414c723bb4559
revert ADDR_COMPAT_LAYOUT workaround.

Stop working around bad applications by setting ADDR_COMPAT_LAYOUT.
ADDR_COMPAT_LAYOUT is undesirable because it reduces the amount of
address space available to an application.

The Android emulator, in both 4.3 and 4.4, does not set
ADDR_COMPAT_LAYOUT. Anyone needing to test their application on a
version of Android without ADDR_COMPAT_LAYOUT can use the emulator
and reproduce the failures.

Change-Id: I8f753acc205798bd7f031026c7ece12d26de562c
Fixed the position of tooltip toast for action menu items

When bidirectional languages are set as a display language,
tooltip toast that appears by long tap of action menu items
is shown at unexpected position.
This patch fixes the miscalcution of toast position.

Change-Id: I5f3ecf454d463101a9484ef6a423866c859c42d1
Wifi: Do not enable configured networks on WPS events.

The Android framework enables the configured networks after WPS
SUCCESS, the supplicant shall consider the networks based on the
priority for the WPA2 handshake after the successful WPS handshake.
This might end up in the station connecting to the AP other than
the current one with which the WPS handshake is done. Moreover,
since framework does not disable the networks and the wpa_supplicant
was the entity that disabled the networks before wps handshake, it
could actually be cleaner to re-enable the networks that were
disabled during the WPS operation within wpa_supplicant. This patch
addresses this by not enabling the configured networks on WPS events.

Bug: 10537481
Change-Id: I2fefc85d0e1f0f1fa96a76940f26aea05219c1ed
Check if intent can be resolved before starts

Change-Id: Ib9ef20f9480b1ad2093955fffb34298d493015d6
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Fix typo in DevicePolicyManager documentation

Typo in DevicePolicyManager documentation
See: http://code.google.com/p/android/issues/detail?id=60235

Change-Id: Ic120297cfdc46ec49f870e0750ec831ba6362399
Fix the bug in replacing a fragment with itself.

Summary:

We are facing a bug that some fragments in our app got removed
randomly. We debugged the app and it seems there is a bug in
the fragment API.

When we we are trying to replace a fragment with itself. We will
try to make the operation a null op, then both `op.fragment` and
`f` will be reset to null.

  op.fragment = f = null;

But since it's inside a loop, if the list `mAdded` still have
items to be visited, the code will continue to the next
iteration. Then it will compare the fragment with null, and
reach the line:

  mManager.removeFragment(old, mTransition, mTransitionStyle);

Eventually it will delete all left fragments in the list `mAdded`.

This diff adds a break to abort the searching after we null
the operation.

Test Plan:

1) Tested with our app. No fragment is randomly removed.

Revert Plan:

Change-Id: I5dc2c07a1bb1d1da1b0fd4e5610d970d55a81e86
Tags:
Signed-off-by: Kang Zhang <kangzhang.cn@gmail.com>
Telephony: Avoid Infinite loop problem in Tethering

No need to have delayed message functionality for retrying
since we are listening to CONNECTIVITY_ACTION and would
retry if the upStream interface is available.

Change-Id: Ib56331dd699cfbab6060c1e8e8b82e272bd961ef
Separate source comment URLs from real data with <eat-comment>

We're adding in XML comments into the output files from the resource
merger which point back to the real origin of the merged items.

However, aapt will interpret these comments as user comments for the
resources, and these are converted into Javadocs in the R class,
meaning that the paths show up as documentation.

Aapt has a special <eat-comment> tag for this specific purpose, which
causes the accumulated comments to be discarded. This changeset makes
the resource merger emit these elements after the source URL comments.

It also tweaks a user message to make it clear to the user how to
continue (when the incremental merger fails), and exposes some APIs
used by the lint integration in Gradle (from package protected to
public.)

Change-Id: If44e65c54efab1fc32762a89dc1badecdff582ee

Conflicts:

	common/src/main/java/com/android/SdkConstants.java
	lint/cli/src/main/java/com/android/tools/lint/LintCliClient.java
	lint/cli/src/main/java/com/android/tools/lint/Reporter.java
	sdk-common/src/main/java/com/android/ide/common/res2/MergedResourceWriter.java
	sdk-common/src/main/java/com/android/ide/common/res2/ResourceSet.java
	sdk-common/src/test/java/com/android/ide/common/res2/ResourceMergerTest.java