Revert "Themes: Fix wallpaper chooser crash"

This reverts commit 7cca08daf6eb4f362a7b43763bc4675bf44a9874.

Reverted commit removed Theme Engine's dependencies. The NPE isn't reproducible for me (N4),
also i added back the missing permission that here was restored:

https://gerrit.paranoidandroid.co/#/c/4472/

Change-Id: Ie061ad72350dc10d3302791d2b7e037fa048d3c9
Automatic Translation Import

Change-Id: I3f0ccd2695a5dfb0c35692e0ee1fe921f4c4c706
PIE: Fix assistant issues

We should check if we have a search assistant any time pie is drawed, not
just on init. Also restore previous intent null check way instead of calling
SearchPanelView (may not be initialized yet at boot when pie and immersive are on).
Fix also an old bug, once activated for first time, on first google now swipe up
nothing happened (the check done at first init returned false).

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
WallpaperCropper: Add missing Theme Engine permission

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: If8d9ebe3fe18d033963f432ee7b4246e36b91b3b
Themes: Get resources with an explicit theme attached.

Change-Id: If04e82a13250f520d70b58991586c8ce38f0ecb1
Don't log an error if we cannot open icon hash

The icons will end up being processed if we cannot access the hash
so let's just fail gracefully and silently.

Change-Id: I6368ee9bb47a9d52351fff22283ffac2de625b71
Themes: Set bounds on iconUpon

Change-Id: I90720b87ed6d5c30f342bd0e1c149e8a6e238d6e
Themes: Tests: Hide new private APIs

Add missing @hide
This should have been done in If04e82a13250f520d70b58991586c8ce38f0ecb1 to avoid

/opt/jenkins/android/workspace/android/cm-11.0/out/target/common/obj/PACKAGING/public_api.txt:24102:
error 4: Added public method android.test.mock.MockPackageManager.getThemedResourcesForApplication
/opt/jenkins/android/workspace/android/cm-11.0/out/target/common/obj/PACKAGING/public_api.txt:24103:
error 4: Added public method android.test.mock.MockPackageManager.getThemedResourcesForApplication

Change-Id: Ib40279065c937b130322350c1dbdf5b0b43506e3
Merge "PIE: Fix assistant issues" into kitkat
Merge "Automatic Translation Import" into kitkat
PackageManagerService: Prevent sending a SIGKILL while the device shutting down

This avoid potential NPE when cleanup theme related data

Change-Id: Ifc7b5f7a21af32464feb32012336cfbe4b7de2ff
Merge "Themes: Get resources with an explicit theme attached." into kitkat
Merge "Don't log an error if we cannot open icon hash" into kitkat
Merge "Themes: Set bounds on iconUpon" into kitkat
Merge "Themes: Tests: Hide new private APIs" into kitkat
Merge "PackageManagerService: Prevent sending a SIGKILL while the device shutting down" into kitkat
Merge remote-tracking branch 'pa_upstream/kitkat' into legacy