Frameworks: Keyguard - Add user configurable shortcuts

Change-Id: If9bbf63067ce2294a09b1f8f70006adff035604d

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/util/slim/ActionHelper.java
	packages/Keyguard/res/values/dimens.xml
Frameworks: rest of shortcut icons by Sven R.

Change-Id: Ibbf7899e89906530c169c5e24d803aedfcbeb038

Conflicts:
	core/res/res/drawable-hdpi/ic_shortcut_calendar.png
	core/res/res/drawable-hdpi/ic_shortcut_fitness.png
	core/res/res/drawable-hdpi/ic_shortcut_gplus.png
	core/res/res/drawable-hdpi/ic_shortcut_joystick.png
	core/res/res/drawable-hdpi/ic_shortcut_key.png
	core/res/res/drawable-hdpi/ic_shortcut_market.png
	core/res/res/drawable-hdpi/ic_shortcut_notes.png
	core/res/res/drawable-hdpi/ic_shortcut_package.png
	core/res/res/drawable-hdpi/ic_shortcut_tasks.png
	core/res/res/drawable-hdpi/ic_shortcut_terminal.png
	core/res/res/drawable-mdpi/ic_shortcut_calendar.png
	core/res/res/drawable-mdpi/ic_shortcut_fitness.png
	core/res/res/drawable-mdpi/ic_shortcut_gplus.png
	core/res/res/drawable-mdpi/ic_shortcut_joystick.png
	core/res/res/drawable-mdpi/ic_shortcut_key.png
	core/res/res/drawable-mdpi/ic_shortcut_market.png
	core/res/res/drawable-mdpi/ic_shortcut_notes.png
	core/res/res/drawable-mdpi/ic_shortcut_package.png
	core/res/res/drawable-mdpi/ic_shortcut_tasks.png
	core/res/res/drawable-mdpi/ic_shortcut_terminal.png
	core/res/res/drawable-xhdpi/ic_shortcut_calendar.png
	core/res/res/drawable-xhdpi/ic_shortcut_fitness.png
	core/res/res/drawable-xhdpi/ic_shortcut_gplus.png
	core/res/res/drawable-xhdpi/ic_shortcut_joystick.png
	core/res/res/drawable-xhdpi/ic_shortcut_key.png
	core/res/res/drawable-xhdpi/ic_shortcut_market.png
	core/res/res/drawable-xhdpi/ic_shortcut_notes.png
	core/res/res/drawable-xhdpi/ic_shortcut_package.png
	core/res/res/drawable-xhdpi/ic_shortcut_tasks.png
	core/res/res/drawable-xhdpi/ic_shortcut_terminal.png
	core/res/res/drawable-xxhdpi/ic_shortcut_calendar.png
	core/res/res/drawable-xxhdpi/ic_shortcut_fitness.png
	core/res/res/drawable-xxhdpi/ic_shortcut_gplus.png
	core/res/res/drawable-xxhdpi/ic_shortcut_joystick.png
	core/res/res/drawable-xxhdpi/ic_shortcut_key.png
	core/res/res/drawable-xxhdpi/ic_shortcut_market.png
	core/res/res/drawable-xxhdpi/ic_shortcut_package.png
	core/res/res/drawable-xxhdpi/ic_shortcut_tasks.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully.png
Frameworks: moar shortcut icons by Sven R.

Change-Id: I7d29a044ce2b928cac33bb6482604a984a2e1740

Conflicts:
	core/res/res/drawable-hdpi/ic_shortcut_drive.png
	core/res/res/drawable-hdpi/ic_shortcut_dropbox.png
	core/res/res/drawable-hdpi/ic_shortcut_evernote.png
	core/res/res/drawable-hdpi/ic_shortcut_facebook.png
	core/res/res/drawable-hdpi/ic_shortcut_gallery.png
	core/res/res/drawable-hdpi/ic_shortcut_google_small.png
	core/res/res/drawable-hdpi/ic_shortcut_gtalk.png
	core/res/res/drawable-hdpi/ic_shortcut_music.png
	core/res/res/drawable-hdpi/ic_shortcut_pinterest.png
	core/res/res/drawable-hdpi/ic_shortcut_play.png
	core/res/res/drawable-hdpi/ic_shortcut_pocket.png
	core/res/res/drawable-hdpi/ic_shortcut_rss.png
	core/res/res/drawable-hdpi/ic_shortcut_twitter.png
	core/res/res/drawable-mdpi/ic_shortcut_drive.png
	core/res/res/drawable-mdpi/ic_shortcut_dropbox.png
	core/res/res/drawable-mdpi/ic_shortcut_evernote.png
	core/res/res/drawable-mdpi/ic_shortcut_facebook.png
	core/res/res/drawable-mdpi/ic_shortcut_gallery.png
	core/res/res/drawable-mdpi/ic_shortcut_google_small.png
	core/res/res/drawable-mdpi/ic_shortcut_gtalk.png
	core/res/res/drawable-mdpi/ic_shortcut_music.png
	core/res/res/drawable-mdpi/ic_shortcut_pinterest.png
	core/res/res/drawable-mdpi/ic_shortcut_play.png
	core/res/res/drawable-mdpi/ic_shortcut_pocket.png
	core/res/res/drawable-mdpi/ic_shortcut_rss.png
	core/res/res/drawable-mdpi/ic_shortcut_twitter.png
	core/res/res/drawable-xhdpi/ic_shortcut_drive.png
	core/res/res/drawable-xhdpi/ic_shortcut_dropbox.png
	core/res/res/drawable-xhdpi/ic_shortcut_evernote.png
	core/res/res/drawable-xhdpi/ic_shortcut_facebook.png
	core/res/res/drawable-xhdpi/ic_shortcut_gallery.png
	core/res/res/drawable-xhdpi/ic_shortcut_google_small.png
	core/res/res/drawable-xhdpi/ic_shortcut_gtalk.png
	core/res/res/drawable-xhdpi/ic_shortcut_music.png
	core/res/res/drawable-xhdpi/ic_shortcut_pinterest.png
	core/res/res/drawable-xhdpi/ic_shortcut_play.png
	core/res/res/drawable-xhdpi/ic_shortcut_pocket.png
	core/res/res/drawable-xhdpi/ic_shortcut_rss.png
	core/res/res/drawable-xhdpi/ic_shortcut_twitter.png
	core/res/res/drawable-xxhdpi/ic_shortcut_drive.png
	core/res/res/drawable-xxhdpi/ic_shortcut_dropbox.png
	core/res/res/drawable-xxhdpi/ic_shortcut_evernote.png
	core/res/res/drawable-xxhdpi/ic_shortcut_google_small.png
	core/res/res/drawable-xxhdpi/ic_shortcut_gtalk.png
	core/res/res/drawable-xxhdpi/ic_shortcut_pinterest.png
	core/res/res/drawable-xxhdpi/ic_shortcut_play.png
	core/res/res/drawable-xxhdpi/ic_shortcut_pocket.png
	core/res/res/drawable-xxhdpi/ic_shortcut_rss.png
	core/res/res/drawable-xxhdpi/ic_shortcut_twitter.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully.png
Update the ADB status bar icon

Change-Id: I35a52f9a438013d37e1f6739dc8fcc2527203ecf

(cherry picked from commit 4daf28faee922853c91385356bfbc2c53ac5c6cf)
Missing break in switch statement

Change-Id: I462c0c5fec96a850032266b04419ec409ad02174

(cherry picked from commit 4dba87d529632cb99e6014c640f3bb3b26d37393)

(cherry picked from commit bc90a5a14bd0319698d36121c7d0730de6734c3f)
Change SQL to improve performance.

To know the number of images, use "COUNT(*)" instead of "_id" in SQL.
Using "_id" gets all result set. and when getCount() is called, CursorWindow is filled.
But using "COUNT(*)" gets just 1by1 data.
So using "COUNT(*)" is more faster than now.
And this SQL is called everytime per a file during a file transfer in MTP
The better way is by using "EXIST".
But if using "EXIST", modify MediaProvider.call() method.
So i applied just a "COUNT(*)"

Change-Id: Ic5882af0fad2304f836b7b7043a4746359391609
Signed-off-by: muzbit.kim <muzbit.kim@lge.com>

(cherry picked from commit 5e2edb4ce62b261aabf9ed11cc7120f812d56df6)

(cherry picked from commit 26fe45a5c03371b2527e417e10a67bf68e0f1772)

(cherry picked from commit ff7d148ed2ea8fa2a76d7370d5b4fd4603a1520a)

(cherry picked from commit 3cf6a5a0a702553e066cceb9ba7dbac2c2b343c4)

(cherry picked from commit ef49f3e0242d58b80e155313915eb4c5ebb9d451)
Revert "Frameworks: Keyguard - Add user configurable shortcuts"

This reverts commit 3c0f8de5dbbcace2ec5107eaee034c7f1f4864d1.
Revert "Frameworks: rest of shortcut icons by Sven R."

This reverts commit 44d2270ae004d766f6b3b19f0fb0c444aaada0ef.
Revert "Frameworks: moar shortcut icons by Sven R."

This reverts commit 6a57ef023b6abdd8cf42c233f0e2a0ac242fed65.
i dont have a keyboard

Change-Id: I205d20518a0956cedb0f4b698a1ec6f7d504e4bc
SystemUI : Add ability to disable notifications via long press

Change-Id: Iebbf93fe71a3e11eedd50d2d8f0aa931d9032176

(cherry picked from commit 97f952ab0a0ddfbba3493d78eb77358e400279e8)

(cherry picked from commit 8c438e09e09a45cb64a90f6adc8c3bc82f9087c9)

(cherry picked from commit 3fd2d2fc8fa5cba00d84642d2baed082ce8a8ecb)

Conflicts:
SystemUI: add Weather display to status bar header (1/2)

Signed-off-by: Roman Birg <roman@cyngn.com>

requires: android_packages_apps_LockClock

Change-Id: Ic2fea861c36f405d8a0e64cc9224f47088ac6351

Conflicts:
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
DocumentsUI: Fix download status was displayed incompletely

The layout arrangement of date, size and summary are unreasonable.
Text was ellipsized when summary has too much characters.

Reconfigure "layout_weight" of date, size and summary can fix this
issue.

CRs-Fixed: 619201

Change-Id: Ic2db20a303dd1db7e2d3375e4b733d704daf393b

(cherry picked from commit 96fea8bb94d2d26c2447a5e3415a7988186232af)
bug fix possible NPE while startProcessLocked()

In case, process doesn't create well while startingProcessLocked().
There is possibility to make NPE.
Setting app's crash handler needs to be assigned after null check routine.

Change-Id: I67fb6427f72d93f79fed36eb44c47d37eafdac31

(cherry picked from commit 09014bed2dd9cfa62ee37dd8f0ce28ee2cc6b72f)
[ActivityManager] Invalidate last screenshot when activity relaunched

Symptom:
The task thumbnail is not updated when activity relaunched.

Reproduce Steps:
1. Put device in portrait
2. Launch Calculator
3. Launch Recent App (the Calculator's screenshot is correct)
4. Rotate device to landscape
5. Click Calculator in Recent App to return to Calculator (Calculator has relaunched to landsacpe ui)
6. Launch Recent App again (the Calculator's screenshot is not updated)

Change-Id: I92e951ea2ee215c52ca6e50cf6f9e02deb787bce

(cherry picked from commit 31f9a46bc590cb5caf493f1ab38a92f1d647909e)
Avoid capture all black screenshot bitmap

Captured screenshot bitmap is all black one if none of windows is
surface shown.

Change-Id: I651b2ade1865926d61f945167d60219535fa8bf8
Signed-off-by: tingna_sung <tingna_sung@htc.com>

(cherry picked from commit 1b003152065f689cebb4d0a31a3fc64b2c82015a)
[ActivityManager] Ensure provider external access count will be released.

Sympton: Oom-adj of provider process will be always 0.

Root Cause: Exception happend in openContentUri
may not call removeContentProviderExternalUnchecked.

Flow:
application [MediaPlayer.setDataSource(Context context, Uri uri)]
    uri is invalid, IOException will be caught and below log will appear:
    "Couldn't open file on client side, trying server side"
    Continue to call setDataSource(String path, Map<String, String> headers)
 ->mediaserver [MediaPlayerService::Client::setDataSource]
    setDataSource(httpService, url, headers) calls openContentProviderFile
 ->system_server (ActivityManagerService) [openContentUri]
    Increase externalProcessNoHandleCount for media provider.
    Call [openFile] to media provider.
 ->android.process.media [check permission for openFile]
    enforceReadPermissionInner
 ->system_server [checkComponentPermission]
    Use mediaserver's uid to check READ_EXTERNAL_STORAGE
      -> not granted due to it is pure native process, not a known package.
    Throw security exception then the flow of openContentUri is broke.
    And externalProcessNoHandleCount is unable to decrease.

Application sample code:
 String invalidId = "54321";
 Uri externalUri = MediaStore.Files.getContentUri("external");
 Uri uri = Uri.withAppendedPath(externalUri, invalidId);
 mediaPlayer.setDataSource(mContext, uri);

Solution: Move removeContentProviderExternalUnchecked to finally block.

Change-Id: I75eec1f9631e9c6bb18449946d707d51ac21e8a7

(cherry picked from commit 21632b4d96a1630451cfcf69468521a9144fcfdd)
[ActivityManager] Prevent provider from been created twice.

Root Cause:
If a process which contains provider is starting but not
from accessing provider, e.g. service/activity/receiver,
its providers' will be created during handleBindApplication.
And before the process complete publish provider to
ActivityManagerService, if there is an access call to
process provider before the process completes publishing
providers to ActivityManagerService, then the providers
will be created again.

Solution:
Don't schedule install provider if the provider record
already exist and will be published later.

Change-Id: Ic200ceae042c014c86e7edee0acd013b513af334

(cherry picked from commit 71b9bc9d23a2c997068888fc77ef4efdcf98b961)
[ActivityManager] Avoid system server crash due to package removed

Symptom:
When application is not responding, an ANR dialog will shown.
In certain timing, user uninstall the application when the ANR
occurs, but before ANR dialog shown. The system server will crash
when looking up the errorReportReceiver because the package is removed.

Here shows how the exception occurs.
java.lang.IllegalArgumentException: Unknown package: app.package.name
 at com.android.server.pm.Settings.getInstallerPackageNameLPr
 at com.android.server.pm.PackageManagerService.getInstallerPackageName
 at android.app.ApplicationPackageManager.getInstallerPackageName
 at android.app.ApplicationErrorReport.getErrorReportReceiver
 at com.android.server.am.ActivityManagerService.startAppProblemLocked
 at com.android.server.am.ActivityManagerService.makeAppNotRespondingLocked
 at com.android.server.am.ActivityManagerService.appNotResponding

Change-Id: Iced4287bd44dc25b1db2c1e3a583892eb6c041a2

(cherry picked from commit bfcdc902faf8bf443565ab4edd20f22e4d100494)