Add TYPE_MAGNIFICATION_OVERLAY to InputWindowInfo::isTrustedOverlay()

This fixes a bug where a View with filterTouchesWhenObscured will have
all touches filtered when in magnification accessibility mode. This is
due to magnification being a separate Window over top of the running
Activity. The method onFilterTouchEventForSecurity in View will then
always return false when filterTouchesWhenObscured is enabled on the
View. By adding the magnification Window to the list of Trusted Overlays
we can ensure that touches will work properly with this property enabled.

Change-Id: I07706588a625682d05da5cb19f401139eb08a54c
Fix spelling error in Pm.java

"w ith" -> "with"

Change-Id: I8e45b971cd767326d35696276d2ab73634ffce34
Add a stub to fix master-gpl

Change-Id: I4cadd3a6e33843ccac4ef2eacbe508e40628367c
Add a stub for forgotten callback to fix master-gpl.

Change-Id: I375dba89403d09dc39f696de04e0811633ecc803
Add timeout for formatting operations

When formatting a bigger storage device (example: 64 GB), it may
take longer than the default timeout (1 min). In this case we get
a timeout from NativeDaemonConnector even if the storage can be
successfuly formatted.

Add a timeout variable for format operations and use that instead
of the default value.

Change-Id: Id2eec0c598dd660e9ef038c5c67ace9c6af551dc
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Fix soft reboot while formatting

While formatting it's possible to cause a framework crash if
the format opperation is not successful.

The 'getCode' function in NativeDaemonConnectorException can
cause a NullPointerException, since 'mEvent' can be null.

If an exception is thrown while formatting the thread will
try to create a Toast to notify the user of failure. This causes a
RuntimeException because a Toast cannot be shown from a background
thread.

Make sure 'getCode' will not throw a NullPointerException and also
create a handler so that the thread can send a message in order to
create a Toast.

Change-Id: I33716148ed931c4051118c0fa9a3542525921eaf
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Let isProviderEnabled default to the Settings.Secure value

isProviderEnabled must default to the values stored in Settings.Secure.
Those values are independent of the available location providers.
The user can set a provider as enabled in Settings even if that provider
is not present. This creates an inconsistency in the APIs; Thus, I
have eliminated the extra check that LocationManagerService performs
and let it read directly from Settings.Secure

Change-Id: I76a4562696f16108b513af29dd5d8bc52ade3cd2
Signed-off-by: Bogdan George Stefan <bogdan.g.stefan@intel.com>
Assure StorageNotification passes correct volume for formatting

If a format request comes to the ExternalStorageFormatter, it
will check the intent for the extra 'volume' data. If not present,
it will use the default external storage path (/storage/emulated/legacy).
This causes an IllegalArgumentException and a soft reboot. The change
assures that StorageNotification also sends in the intent the volume to
be formatted (eg./storage/usbcard) for which the notification was
received in the first place.

Change-Id: I25e0a367726cc20fd5d0aed8e129d587298f3e0f
Signed-off-by: Adriana Reus <adriana.reus@intel.com>

Conflicts:
	core/java/com/android/internal/app/ExternalMediaFormatActivity.java
	packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
Release DrmManagerClient resources

Call release for DrmManagerClient to avoid resource leaks

Introduced by following commit (5d143ad4a8f...),
"Media scanner support for FL(Forward Lock) DRM file types"

Change-Id: Ic3c458579f4e99b3b072a2e13362d1996b982589
Fix problem with BootAnimation exit

After the completion of each animation part, the boot animation must
sleep for the number of frames specified in part.pause. If this is
done in a single sleep statement, it is possible that the boot animation
will continue to display long after surface flinger has finished booting.

To address that, the pause between parts is done in a loop and on each
iteration, the property that surface flinger sets to indicate that animation
should exit is checked.  This minimizes, but doesn't remove, the likelihood
that the bootanimation is visible when the UI comes up.

Change-Id: Ib71df0a72c0a47a1f7231b02379dc951c1f93e52
Signed-off-by: Russell Webb <russell.webb@intel.com>