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
privacyguard: Share privacy package name between activity stacks

AOSP 4.4 now has a stack supervisor with differents activity stacks for home and focus activities.
Every ActivityStack instance has a ref to this supervisor. Just share the privacy guard package name
throught the supervisor.

Thanks Jorgue....way better solution then the dumb fast one I did on 4.4 bringup

Change-Id: I66c283fb9e3cec6ac9ec6a293e068d115e80a3fa
base: Check for homeAsUp status when collapse actionbar widget

mHomeLayout should be visible if one of DISPLAY_SHOW_HOME or DISPLAY_HOME_AS_UP are set.
collapseItemActionView only checks for DISPLAY_SHOW_HOME, so applications that only uses
DISPLAY_HOME_AS_UP and uses an expandable/collapsible widget (like SearchView) doesn't
properly restore the home layout.
One sample of this behaviour is the DeskClock app. The CitiesActivity doesn't show the homeasup
indicator after collapse the searchview.

aosp change-id: https://android-review.googlesource.com/#/c/71093/

Change-Id: I2f225138771da6bd6b2a468ad616b90c2c0a9d35
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
QS: let's welcome LocationTile to 4.4

we already modified to use the basic 4.4 location mechanism. Still
it was very basic. Now using the same attempt like in Settings to
controll location mode (high accuracy, battery saving, device only) and on/off state

longpress switches between the states. Normal click turns it on/off
Compared to settings turning on will recover last state where it was turned off. As
well it respects the sharing location warning dialog either when you switch on into
a mode which use it or you switch into a mode which uses it and it was not confimed.

Slight corrections to original AOSP code to reflect the changes in LocationController
even though this code is non operational

PatchSet:
- moved the complete handling into the LocationController. Way better
  to have in centralized. Who knows for what we will use it later.
PatchSet:
- cleanup

PatchSet:
- added drawables from kroz :)

Change-Id: I3c7c51c8d7e3a8c003c37d1b55a6503a9bbeaf64