Add HeadPhone icon and detection
Merge remote-tracking branch 'github/kk4.4' into slimkk

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Fix Merge Derp
Ensure running mTouchModeReset when AbsListView is detached

mTouchModeReset should be executed when AbsListView is detached from window.
If not, when the AbsListView is re-attaced to window,
the child can retain a pressed state.

You can see this problem easily when you double-touch an item of
option menu very quickly.

Change-Id: I5aaa1fd5b95847efb2f5f1b5ec7cabe8eb85b237
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Make implementation of isEmpty consistent with implementation of getCount in HeaderListViewAdapter

Fix for Issue ID 18316. Make isEmpty() return false when getCount() returns a non-zero value. So that the list cannot be considered empty when a header or footer is present.

https://code.google.com/p/android/issues/detail?id=18316

Change-Id: Ib69201e9d5ef3efcbb68ea298b8cc8ca6e027246
Signed-off-by: Emma Sajic <esajic@effectivelateralsolutions.co.uk>
Fix ListView is not scrolled properly with arrows

According to ListView's layoutChildren logic, it detaches all children
and rebuilds its children based on visible area which might omit
invisible elements in the adapter.

In this case, arrowScroll methods only tries to find next scroll
candidates from its children so user is unable to scroll more with
D-pad.

This fixes the issue by look forward next child among the adapter as
well as children.

Bug: 7346868
Change-Id: I01ab19ad899b5bcb5ab420ddf08c9ffd136933d1

Conflicts:
	core/java/android/widget/ListView.java
Scroll: modified velocitytracker

Velocitytracker and overscroll are called on every touch event to
calculate if there is a scrolling/fling. Move this and the recycling
to static voids so they are pre-optimized at compile time rather than
after evoking the method call during runtime (JIT) to increase responsiveness.

-Vanir

Change-Id: Ic7351da58f29281ca2b6a788386b95b68b552390
frameworks/base: Fix to avoid crash when the tab is not set from app

As the current tab is not set from application, getChildTabViewAt
returns Null value. Added a condition which checks whether mSelectTab
is set to first Tab.

(cherry picked from commit 9be6755efb149b22c36aa3eb7cc4ffe7e765e08a)

Change-Id: I11c77ca96333e2663d28db1b5fdb46602bd9e745
CRs-Fixed: 321176
Selectively restore non-stupid parts of stuff we had
before a patented nuclear decrapificating

Change-Id: I679f5748365bb50451abc71398dcf35002282330

Conflicts:
	core/java/android/webkit/CallbackProxy.java
	core/java/android/widget/ProgressBar.java
	core/java/android/widget/Toast.java

Conflicts:
	core/java/android/webkit/BrowserFrame.java
	core/java/android/webkit/CallbackProxy.java
	core/java/android/widget/Toast.java
Fix for ambiguous and broken disk formatting dialog

This patch ensures that the path-string from StorageNotification is converted
to the appropriate StorageVolume so that it can be correctly passed to the
formatting class. It also displays this path to the user so that it is clear
what will be deleted.

While trying to use a USB flash drive over OTG, the drive's FS somehow got
corrupted, so Android gave me a notification to re-format it. Okay, so then
a dialog pops up that doesn't specify what volume/device it will format, and
I incorrectly assumed it would be the USb drive. However this activity defaults
to the main internal memory for some reason, and wiped my data. Thank God for
them internets... (Dropbox)

Change-Id: I5621dff3cfd12a173b0d793398cf729333f97263
DefaultContainerService: implement additional methods

For usage in Settings->Storage

Change-Id: I2d45198cc6ea3b84af1547873380eae2c04c0b93
Fix DataInputStream leaks

Fix fixes
-In viewstateserializer, try to close before throwing or returning, and throw early if inputstream is null
-other stuff

Change-Id: I7f3b16057582566b82a85841829ff6ed11cd570e

Conflicts:
	core/java/android/webkit/ViewStateSerializer.java
ActionBar: Compute required items prior to optional items

When computing if a item should be shown in the action bar, required items need to be compute prior
to optional ones. Otherwise, in some cases (when the optional menu goes to the left of required
items then the algorithm could determine that optional has space to be shown and force the show of
required items, causing the required items to not be shown).
A concrete case is in the Email app. In the message_view_fragment_option.xml are defined 5 menus,
that when are all shown (xe: in Exchange mailbox account type) the bar is complete filled. But if
the overflow button is forced to be shown (the device has no permanent menu key) the overflow button
overlaps the older button, because space of 'ifRoom' items are wrong computed.

Change-Id: I6fc8e3e202d76f9704d7ec2383c7ee6f7b05ba76
fix cursor leaks in F_B

my previous commit was submitted before i was finished.  Here is an updated version.

PS2: missing bracket

Change-Id: I9d8048e49695cdac7ded086cd49ee6eb99e518cc
ActivityManagerService: stay away from zombie content providers

When the lowmemorykiller kills a content provider in an unfortunate
moment, an innocent client app can become attached to a zombie provider
and be unconditionally killed moments after, when the dead provider is
being removed.
Prevent this race by addition of isAlive function to Process.java that
determines whether a process is still running and is not only a zombie,
add a check of the state of the provider process to getContentProviderImpl.

Change-Id: Id753b8dab103e4b447c4138468938ca9f5cb857d
extend PreferenceActivity for title text on a single pane mode

startPreferencePanel() ignores titleText on a single pane mode
this commits extends PreferenceActivity by adding EXTRA_SHOW_FRAGMENT_TITLE_TEXT to intent

ported from CM9, http://review.cyanogenmod.org/#/c/14919
AOSP part verified, but not merged

Change-Id: Ie0702dc20b17504148f4da9cc83a6d7865d95423
power: Add CPU boosting interface

 * Boosts CPU using Power HAL for the given duration.
 * Duration is given in microseconds.
 * Power HAL must implement POWER_HINT_CPU_BOOST.

Change-Id: Ic79baf7e3d0f75483c2fe8a242b4c3d93368b68b

Conflicts:
	services/jni/com_android_server_power_PowerManagerService.cpp