Added missing USB device descriptor fields needed for intent filters

The UsbDevice object is missing the ManufacturerName, ProductName, and
SerialNumber fields.  These are needed by intent filters to further
qualify a USB device that is plugged in while in host mode.  These
fields have been added in the jni UsbHostManager implementation and
propagated through UsbHostManager and UsbDevice implementations.
The UsbSettingsManager implementation has been modified to allow
manufacturer-name, product-name, and serial-number tags in intents.

File changes:
       modified:   api/current.txt
       modified:   core/java/android/hardware/usb/UsbDevice.java
       modified:   services/java/com/android/server/usb/UsbHostManager.java
       modified:   services/java/com/android/server/usb/UsbSettingsManager.java
       modified:   services/jni/com_android_server_UsbHostManager.cpp

Change-Id: I386884715d1b732b06a63feb77790be6b59b6fe6
Signed-off-by: Robin Cutshaw <robin.cutshaw@gmail.com>
Fixed race condition in Spinner.DialogPopup on null reference.

NullPointerException is triggered when DialogPopup is
dismissed due to object mPopup being null when not showing.
Race condition is triggered when dialog is dismissed before
touch event to dismiss dialog has been processed properly.

Fixed by adding a null check prior to accessing mPopup object.

Change-Id: I3c4fe9c279d92a7103fb4f68189d1d42beedc606
CompoundButton: Let text can be changed by config

Because CompoundButton freezes text inside onSaveInstanceState, the text
can't be changed automatically after locale of device changed.
Bug from such a case reported via url below:
https://code.google.com/p/android/issues/detail?id=24013

It would be better to don't freeze text for default case and let users
to freeze text if they need manually.

Change-Id: I2d6a192b6ff05a95b21487c2362cbc14691c68cf
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Before requerying a cursor, check if it is closed.

Before updating a cursor,
it needs to be checked if it is valid.
Currently a defence code only checks
if it is not null.
But in case of "Cursor", it is not valid,
if it is closed.
So just like in CursorAdapter.onContentChanged(),
add the additional defence code to check validation.

Change-Id: I1302f1b6d009897815d4bdb2f20f625688cf9901
Don't pseudolocalize untranslatable strings.

bug: https://code.google.com/p/android/issues/detail?id=63004
Change-Id: I8e47a53d887144dc867111e42313d0e113b83ea1
AArch64: Use long for pointers in MediaDrm and MediaMuxer

For storing pointers, long is used in MediaDrm and
MediaMuxer classes, as native pointers can be 64-bit.

Change-Id: I77f26cde627baf0dce70b6aa3a4dbd974051d9a6
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Clean up native AlarmManagerService tabs/spaces and unused parameter warnings

Change-Id: I64da1437dd0ed30957b43450c72b9d3797112a2e
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Use StrictJarFile instead of JarFile for cert collection.

This ensures that we use the same underlying zip
processing code as the runtimes.

bug: 10193060

(cherry picked from commit eb565dc527eda8c0a43df0d1f30132638ca4ba20)

Change-Id: Iaaa26b02678278394619d0a41613d9ceeae3203c
telephony: Add same named operator configuration for some operators

Add same named operator configuration for 404, 405, and 520.
That is, show roaming icon though same named operators.

Bug: 12121959
Change-Id: I9148bab727170f670fd2679db69b123b0526bb32
Revert "Do not show roaming icon for Videotron operator when access Canada network"

This reverts commit 119e24f98706cb0a1217b41e7e750b94c1a8941a.

Bug: 12163013
Change-Id: I574d1492253eb6e1f570411e441c5bea7376112c
Re-initialize error after attach

If flag for error after attach is not reinitialized, it may cause
NullPointerException on subsequent onAttachedWindow if error text
was reset to null.

Change-Id: I8976c28a6ca71017e5c4b3f29d4eeeb2eda48c38
Merge "Use StrictJarFile instead of JarFile for cert collection."
Fix ResTable_config::CONFIG_* typo (MCC vs MNC)

In commit 08d5b8f, the ResTable_config::CONFIG_* enum was incorrectly
changed to assign the same value to both CONFIG_MCC and CONFIG_MNC:
    - CONFIG_MCC = 0x0001,
    - CONFIG_MNC = 0x0002,
    + CONFIG_MCC = ACONFIGURATION_MCC,
    + CONFIG_MNC = ACONFIGURATION_MCC,

This commit assigns CONFIG_MNC the value ACONFIGURATION_MNC, as
intended.

Change-Id: I3b8799914a55debdb3ff30a82ada7ad990c49970
[bootanimation] Drop user loadable bootanimation.zip abiltiy.

A prior change removed the ability of
the shell to push to /data/local. Because
of this, the bootanimation code no longer
supports users loading custom bootanimation.zip
files. This patch drops the access attempt
from the code.

Change-Id: Ie30dd73699c8296be00dc6fbf14691e08baa6410
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Merge "[bootanimation] Drop user loadable bootanimation.zip abiltiy."
Merge "Fix ResTable_config::CONFIG_* typo (MCC vs MNC)"
Merge "AArch64: Use long for pointers in MediaDrm and MediaMuxer"
Add timerfd backend to AlarmManagerService

On devices without /dev/alarm, use a new backend based on timerfd.
timerfd has near-equivalent syscalls for the /dev/alarm ioctls we care
about, with two key differences:

1) /dev/alarm uses one fd for all clocks, while timerfd needs one fd per
clock type.

AlarmManagerService addresses this by replacing the fd (int) with an
opaque pointer (long) to the backend-specific state.

2) When the RTC changes, the /dev/alarm WAIT ioctl always returns, while
timerfd cancels (and signals events) only on specially-flagged RTC
timerfds.

The timerfd backend masks this by creating an extraneous RTC timerfd,
specifically so there's always something to signal on RTC changes.

Change-Id: I5aef867748298610347f6e1479dd8bf569495832
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Add /dev/rtc backend to SystemClock

On devices without /dev/alarm, use the settimeofday() syscall and the
standard RTC_SET_TIME ioctl (which are collectively equivalent to the
ANDROID_ALARM_SET_RTC ioctl).

Change-Id: I3c1d741099e253186e43c9369b62603b214b9c9a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Fix to NullPointerException on move back in ActivityStack.

In ActivityTask.moveTaskToBackLocked NullPointerException may occur
when moving back with only current Activity in stack. This due to a
condition that may trigger despite a TaskRecord being null and then
attempt accessing the TaskRecord.mOnTopOfHome variable.

TaskRecord task may be set to null when no resumed activity remain.

Resolved by assuring that flag mOnTopOfHome is instead set to false
for current TaskRecord in case where there are no remaining activities
above home.

The above bug has already been corrected in the following commit,
ada62fca51d314cefe2c5da4e007df5b9abf320d, but it does not set the
cottect value to mTopOfHome for the current taks, see below.

Variable mOnTopOfHome will not be set to false in situations where
stack is of size 1 or less and task is null, perhaps from already
having finished current activity.

To avoid current TaskRecord maintaining value mOnTopOfHome to true
after launching Home this variable is set to false.

Impact should not be major due to correction earlier that makes sure
that there is always a TaskRecord.mOnTopOfHome set to true above Home
activity but if not correctly set for current task still gives a
possibility of bad behavior.

Change-Id: Ie86ad99c188aaa05b0de9d58eaa16c42b6fc4341