DocumentsUI: Handle NPE gracefully

Cherry-picked from OmniROM.

http://jira.omnirom.org/browse/OMNI-956

Change-Id: I8d50d71a9c91486dfc9e5da01538c6b5a626f054
DocumentsUI: Remove catch-all statements

This removes several "catch (Exception)" statements which violates the Android code
style guidelines and hides problems.

I left some catch-all statements in, as they seem to be intended like this (grep for
"catch (Exception").

I suggest we do not merge this before we are sure that we fixed any problems. One problem
is a crash when deleting items (I'm currently working to fix that).

PS 2: Add exception to log.
Change-Id: I483c320c7ee256acd993dd2a509c031fa5e3f09e
TextView: Check also for mLayoutParams before calling checkForRelayout

Cherry-picked from OmniROM.

http://jira.omnirom.org/browse/OMNI-976

This was introduced with
https://github.com/omnirom/android_frameworks_base/commit/b3670c54e60387fde633fb91c649c5b896f8b962

Change-Id: I06c1926c5b8102b336d128d9b411f74a9eff3ded
SystemUI: Fix crash on Recent Apps list

Issue: SystemUI crash is observed when Context MenuItem "App info"
       is selected on the recent apps activity
       1. Open the rencet apps list
       2. Long press on any one/more recent app(s)
       3. Lock the screen using power key
       4. Unlock the screen using power key
       5. select menu item "App info"
       6. SystemUI process will get crashed.

Fix: Changed the code to make sure that only one context
     menu is active at a time and also dismissed the
     context menu on pause of the RecentsActivity

Change-Id: Ia50bed7bfad6fde7beeaec37fa6402177eee1d40
NotificationHelper: Define Peek app broadcast intents

Continue this https://gerrit.paranoidandroid.co/#/c/4369/

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
SystemUI: modify AOSP RU translation

Updated a string to say "Cast screen" instead of older "Wireless display"

Change-Id: I10558e36c2ee9f0e53f0de382425a3aceb52cab1
Themes: Check CRC of APK MANIFEST.MF at install

Change-Id: I6ccfcd2b04107b85fe14cb678aad63443284353a
Theme special volumeup+down volume panel

When you press vol up + vol down button it brings up a
different volume panel which was not getting themed because
it lacked the ui context.

Change-Id: I416b8920160c0ab263fd426a6e6491d1f877a905
sync status bar transparency state on theme change

When the status bar view is reinflated its transparency mode is
reset back to opaque. This can be observed by changing a theme
and switching to home in the middle of a switch.

Change-Id: I3049c5f24cc6c46dcefb24188039a08503db09a9

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
synchronize updateStringCache on mAccessLock

Resources.java used to synchronize on mTmpValue but has since
switched to mAccessLock. mTmpValue can be null in some instances
causing a NPE during a theme change.

Change-Id: I7411dfdf6e8e411381ae993872a3c740dad19300
Themes: Avoid compiling icon packs every boot

Change-Id: I51c7effdd4592a302f457822a05cbebee6cde06b
inputdevices: update from aosp (master)

Change-Id: If5fb11c354ea0144cdae1434de4c536302dda5b3
GEL Integration (1/3)

Changed INJECT_EVENTS permission from signature to signatureOrSystem.

Change-Id: Ie3633aa2ee7a2f22b7f32232ce4d3d98f33fd39d
Themes: Don't set icons for iconpack that is applied.

Change-Id: I3cffade2c12ae1dbc1f75e43f1a74609ff0d7135
remove QuickRecordTile because I reverted it

Change-Id: I4276611c0c928f9ff78e190a956cdbafb43b7315
NavTargets : Show highlight for google search

- Show highlight for google now icon
- Update launching logic to upstream
- Don't hideTargets in doFinish

Change-Id: I6027bc30b4bc98bf1dbadd9cb02e46349745bfbb
framework: Add sound recorder tile (1/2)

Add a sound recorder tile to quicksettings.

Change-Id: I23907ebeb884729c0e92f8b57a6cda10022ac24d

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_qs_sound_recorder_off.png
	packages/SystemUI/res/drawable-hdpi/ic_qs_sound_recorder_on.png
	packages/SystemUI/res/drawable-mdpi/ic_qs_sound_recorder_off.png
	packages/SystemUI/res/drawable-xhdpi/ic_qs_sound_recorder_off.png
	packages/SystemUI/res/drawable-xxhdpi/ic_qs_sound_recorder_off.png
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/SoundRecorderTile.java
Revert "PackageManager:"

This reverts commit 7998d1c78eb5c1f0adc0a6aa80d39fca896ca880.

Conflicts:
	core/java/android/content/pm/IPackageManager.aidl
	services/java/com/android/server/pm/PackageManagerService.java

Change-Id: Ib2493749a5cab9645230ea07bcd15e9a652452a8

Conflicts:
	core/java/android/content/pm/IPackageManager.aidl
	services/java/com/android/server/pm/PackageManagerService.java
CM11 Themes: Add support for composed icons [1/2]

If an icon pack includes background, mask, and/or foreground
images and an icon is not included for a given app, an icon
will be generated using the background, mask and foreground.

Icon packs can include the following items into their
appfilter.xml
    <!-- Set deafult scale factor for the icons -->
    <scale factor="1.0" />

    <!-- Set back image for composed icons -->
    <iconback img="iconback" />

    <!-- Set the mask image for composed icons
         Original icon will be masked off using this mask -->
    <iconmask img="iconmask" />

    <!-- Set foreground image for composed icons -->
    <iconupon img="iconupon" />

Note: Mutliple iconback images can be used as follows
    <iconback img1="iconback1" img2="iconback2" img3="iconback3" />

Change-Id: I0f5fd7de4f0eae485139cbcd282c1d1e1663952f

Conflicts:
	core/java/android/content/pm/IPackageManager.aidl
	services/java/com/android/server/pm/PackageManagerService.java

Conflicts:
	core/java/android/content/pm/IPackageManager.aidl
remove unneeded file

Change-Id: Ie2138b904a1ae184befd1aff85bf498dc7ee7a83