Return: Smart Pulldown [1/2]

Adds the ability to directly open the QS panel when there are
no notifications present in the notification panel.
This commit combines the enhancement by HardCorePawn for detectin
notification types for the same.

Credits: kufikugel, HardCorePawn

Change-Id: I3c9b048f2616d2b8950930cc5bfac27c2364e826

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
(Updated) Frameworks: HALO

Change-Id: Id7a91ccc9d6af282e4512fc33d69800ab8206c97
Fix issue while scrolling on edit mode

Thanks to @rob43 on XDA-developers for this fix

Change-Id: I0e5cd1c2472415dcb8f003b5dc88a7e4d7b55bbf

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsTouchListener.java
Fixed incorrect calculation of dirty invalidation area

Padding was already taken into consideration before calling
invalidateDrawable in ProgressBar.

Change-Id: I75f25b0b7ee87d394422c58888ed3a1cca5d06a8
[Navigation bar] Allow "right to left" gesture to launch search panel

Symptom: "Bottom to up" gesture can launch search panel in portrait, but "right to left" gesture CANNOT in landscape.
Root Cause: Not handled.
Solution: Set swapXY to handle this in landscape case.

Change-Id: I1793280b3656af6912e6b4583b08e80a0a38e44a
[1/2] Base: Network traffic indicator

Before: http://i.imgur.com/bCR0oLZ.jpg
After: http://i.imgur.com/ssTi6pB.png

OmniGears: https://gerrit.omnirom.org/#/c/4851/

Change-Id: Ibd824b85f6c9f6fd96eb7787747bff2c71056263

Conflicts:
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Traffic.java
SystemUI: Update the icon on no sim

Upon SIM removal, MobileActivityIconId is not set to
no sim icon id resulting in no sim icon not shown.

Change-Id: I69d3af0535ff82379b2d04d74f0fd0323458cd45
Author: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 18682
Remove dead code.

This hasn't been used since at least 2011, and we're no longer
shipping the data supporting it either.

Change-Id: Ibe42057650b49794c65d6f0d54ed7a492f3b594b
UMS [1/6]: LegacyUSB Squashed commit with updates for 4.2

LegacyUSB: add overlay for UMS lun and use existence of lun to enable legacy USB
LegacyUSB: Add support for legacy USB implementations
Option to hide Adb notification icon (framework) - authorship belongs to Rick C

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Id14f70f7e21b689c08cadef69f69da711c7dc566

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml

UMS [2/6]: Add option for switching between UMS and MTP/PTP mode.

Change-Id: I8e692d468cb36ccc97ca69b8a2eb11afeb711eae

This adds support for switching between UMS and MTP/PTP.
Framework part (this part) will only enable UMS if the config setting is set.
Standard is to enable UMS if the primary volume supports UMS.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I8e692d468cb36ccc97ca69b8a2eb11afeb711eae

UMS [3/6]: Add UsbDebuggingManager and UsbDebuggingActivity to LegacyUsbManager

The UsbDebuggingManager listens to adbd requests and displays a dialog
when the public key authentification fails, for the user to confirm if it
wants to allow USB debugging from the attached host. If the user chooses
to always allow USB debugging, the UsbDebuggingManager writes the public
key to adbd's config file so that the public key authenfication succeeds
next time.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I819b8a0428ba34b68dadeb9fa67c53abb9a85fbc

UMS [4/6]: Allow USB notification to show when primary SD allows UMS and MTP

Previously if primary SD is set to allowMassStorage="true" the USB
dialog would never show.  This checks if persist.sys.usb.config is
set to mtp,adb and then allows the USB notification to show. With
this you can then have the option to select from MTP, PTP and Mass
storage when clicking the pull down notification. When Mass Storage
is selected it activates the USB connected dialog to turn on USB
storage. When set back to MTP the USB connected notification disappears.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I2287075ec93cae75f19e8fb59965d9dddb234aca

UMS [5/6]: Allow mounting of multiple volumes via mass storage (framework part)

The volumes to mount is taken from storage_list.xml (allowMassStorage)
rather than ro.additionalmounts.

Hand ported from the following patches:

commit 0233209827d95221399b1fe0185f79863fc6bf26
Author: Tony Layher <layhertony@gmail.com>
Date:   Sun Jan 2 12:46:38 2011 -0500

    forward port of 93bb95929a0c017498625a87654b4d114fe17b96 to allow mounting and sharing of mulitple volumes to MountService.

    Change-Id: I9fa3994e6e7b85360b451f57c1cdd4df921bc035

(the second part of the above patch was not ported)

commit 678fadf517126c8468ef2d8dcaea9c9fce96035b
Author: Josh Stone <cuviper@gmail.com>
Date:   Sun Nov 7 13:38:58 2010 -0800

    MountService: Remount all volumes after USB disconnect

    If USB was removed while UMS was enabled, the MountService was only
    remounting the primary share.  Any other shares, like the HTC Inc's
    emmc, were left in limbo.  This patch now iterates over *all* shared
    volumes to remount after disconnect.

    Change-Id: Ie6fd49ad80ba6fa0e4e194a386549cac786b4bbe
    Signed-off-by: Josh Stone <cuviper@gmail.com>

commit b1da9ed003edcd10ccda56fdf087e8f1b0f77b2a
Author: Josh Stone <cuviper@gmail.com>
Date:   Sat Jan 22 12:03:53 2011 -0800

    MountService: Only notify PackageManager for true ASEC changes

    MountService can be dealing with multiple mounts (emmc, sdcard), but
    only the EXTERNAL_STORAGE has any ASEC mounts on it.  Since the PMS
    updateExternalMediaStatus doesn't specify the path, we need to make sure
    it's only called for the real ASEC mount.  Otherwise we get into nasty
    race conditions when multiple mounts are coming and going, like during
    UMS transitions, and sdcard-installed apps tend to break.

    Change-Id: I85c6a601e84afd30b44270b0892686c2d864ce8d

commit c8c58f3d14fbb8c77ab1e90541e59fb74bef54cf
Author: Josh Stone <cuviper@gmail.com>
Date:   Sun Mar 6 12:34:50 2011 -0800

    MountService: Unmount secondary volumes more carefully

    Use the same message handler for unmounting both the ASEC external-
    storage path and any secondary paths like emmc.  This seems to help with
    additional race conditions encountered on Inc.

    Change-Id: Icca71756fa6721bd85da1f35b8b8c7fc7caa1eb1

commit 47495ab860ed97499e0c4268bf40b1f9c429bf99
Author: atinm <atinm.dev@gmail.com>
Date:   Sun Apr 10 14:50:41 2011 -0400

    Allow multiple shareable SD Cards by using getShareableVolumes()
    to get all the volumes that are shareable and allowing
    sharing/unsharing for all of them rather than just the hardcoded
    getExternalStorage calls.

    Unmount immediately if PM is not updating and not an ASEC
    mount. Change from Josh Stone.
    Change-Id: Iaf1a7a4484deac373e1c1d7bf16d5f22ca49fd64

    Only allow package manager for sdcard (packages aren't on
    external card).

    Change-Id: I0d148ea52dc1285905a9dd061d1ceedcfb761b52

    Take out extra logging.

    Change-Id: I6beb007700ef4be04c3eb273bbf2069c87b30011

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I5ea83afeda6cdaf63dd15857b3827bb00afbd6d2

UMS [6]: Make "SD Card removed" notification dismissible if the removed SD Card is not the primary storage

The Galaxy S uses the "external SD Card" as the extended storage
and it the notification should be dismissible as it's okay not
to have it.

Additionally, this patch also not hide the USB storage mount dialog
if the removed storage is not the primary storage

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ic752a3da917e0d7736a619fb68f07905106987fb

Conflicts:
	packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
MediaScanner: delete abnormal elements in prescan procedure.

There is a race in MediaProvider's mUnmountReciver.
when it doing external storage's database clean up at power down procedure,
if the datebase is big, system may shutdown after db.update, but db.delete
not done, there will be many elements with no filename in the database.
That may cause duplicated files and folders shown in MTP.

This patch clean up these abnormal elements in MediaScanner's prescan procedure.

Change-Id: I0a3dacffd12892b1a2a892b2749a02ab3dea109b
Author: Liang Wang <liangx.wang@intel.com>
Signed-off-by: Liang Wang <liangx.wang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 58969
FLAG_PRIVILEGED disappears if privileged app is updated and rebooted

Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.

Bug: 12640283

Change-Id: Ic24b5882f65dabdfae9cc39da3d68661bed4fc31
Make SurfaceView layers captured by screenshotApplications()

Since SurfaceView layers are located below application layers,
SurfaceView is not captured by screenshotApplications()
when the application is running in fullscreen.

Moreover, ws.isFullscreen(dw, dh) returns mostly true
on the devices which do not use the navigation bar.

Change-Id: Ia1036c79054950384a97504714929fd85c8147de
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Phone statusbar shows operator name as uppercase letters

The phone statusbar drop down shows the network operator
name, and since this is a trademark we should not force this
to uppercase, rather we should keep the case as the string
as defined by network provider.

Change-Id: I204ef34b138a1155804d24b2b5362f25d3c3fa04
Keydispatching timeout while finish Activity

If there is input to be handled during finish activity we can get a
keydispatching timeout ANR. The reason is that finish activity is some
times not possible, and the activity is instead put on a finish queue.
The activity will then be finished sometime in the future. When we add
the activity to the finish queue, key dispatching is paused, and there
is an ANR timer waiting for it to be resumed again. Since it can take a
long time before the activity is actually finished, we need to resume
the key dispatching to avoid the ANR.

Change-Id: Icea4ab3b5ad05c8bfbadf8f5cece1a59ec621469
Mms: Fix FC issue that when tapping contact icon many times

Add protection to check the extra string info from bundle before making
the URI, to avoid null pointer exception.

CRs-Fixed: 534089

Change-Id: Ie8c78ca42c290e16afa1fefeb01ea67c8e963b06
Webkit: add to support file uploading

This change adds one function in WebChromeClient for supporting
uploading file in browser. In Android 4.4, browser is based on
chromium not webkit engine, chromium engine support uploading file
and will callback to client to show file chooser, but android_webview
client has empty implementation within this callback for file chooser.

So we solve this issue by adding implementation in framework chromium
client which extends android_webview client, function in framework
webkit client and corresponding functions in browser app.

Change-Id: I6baef44eef28eb2b380ab6181200bf0b9cc0316c
Media: Make sure mVolumeController is not null

* mVolumeController is throwing NPEs all over the place in this class, which
  causes apps like Chromecast to shit the bed when using Google Play Music
  and/or Google Play Movies
* Catch additional exception on try/catch already in place and throw in a null
  check to prevent apps from crashing until null mVolumeController is rectified

Change-Id: I7a883aa85256d5dc6af6f37978676b136cb40d0d
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
Correct capitalization of RIL_UNSOl_CDMA_PRL_CHANGE

Change-Id: I25d02ef5c8364a0aff4344b434ce0031d4a4ebc2