Fast charge (1/2)

Credit to SlimRoms

Change-Id: Ib1117e40882dab576233534333ff4aa4ea5dc4fe
Cleanup
Properly handle changes in phone audio focus.

Change-Id: I921651684f4369a47aa83e93010266c40be71a41
Allow purging of asset bitmaps

It seems that neither CM9 nor CM10.x includes the actual framework-side
code to facilitate user-controllable bitmap purging. Odd, since the
CyanogenMod Settings app in both CM9/CM10.x includes the option.

Backported from original Gingerbread commit:
http://review.cyanogenmod.org/#/c/3908

Original description:

Allow the system to reclaim more free RAM when needed on 'low' memory devices
(e.g. Droid/Milestone) that are struggling with 2.3. This option enabled
efectively restores the froyo way of forcePurgeable BitmapFactory asset
handling.

Change-Id: I6a3b8a05b7be9c214a8548d6c6d1621e6533a1e0
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
Framework: Fix button label toasts when layout is RTL

Google have decided to set their gravity "relatively", while they measure only from the left.
The result? Toasts appearing in the wrong side of the screen.

Change-Id: If5e9d5fc2751fbef3eb058b241168fb9d8bf4b98
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
Fix resource leak: When call MediaMetadataRetriever.setDataSource or getFrameAtTime should ensure call release in finally to avoid resource leak
                   Patch set 2: Remove unnecessary white spaces

Change-Id: I49a7f2fb99dc8b9560e7c17421125356e45a87ac
Revert "The VM handles blocking SIGPIPE."

This reverts commit 5dd83efa091c9be624862d75b0bed4b4d1a8e3ee.
Fix aliasing violations
Camera Tile : Close on flip/switch

Currently the camera tile only checks whether the
container panel is fully expanded. This doesnt take into account
when the user swipes to another panel via handle bar swipe, or by
pressing the switch button in the top right of the drawer.

Reproduction steps :
    Go to quick settings panel
    Enable camera tile
    Switch to notifications via swipe or switch button
    Camera preview stays persistent behind drawer

This patchset also makes the view hierarchy lookups one time, rather than
on each runnable run which is quite frequent (100ms).

Change-Id: Ic803744b63613d1e58b3efd4a92d052a16e5a2bd
Expanded desktop tile (1/2)
Fix for expanded desktop tile