Implement DocumentsProvider.createDocument and deleteDocument

Fixes AOSPA-431
This is needed to delete and create files/folders in DocumentsUI.
Some open questions are:
1. Are the methods implementented according to their description?
E.g I'm not sure whether deleteDocument should be able to delete folders, too.
2. I first didn't want to modify public API, but deleting files from within DocumentsUI somehow doesn't work - file.canWrite() always returns false
3. So is modfying the API this way OK?

Change-Id: Ie3a9d1888decaa0f08de1a5183ffd23760be15b9
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
Revert "Revert "Themes: Fix wallpaper chooser crash""

This reverts commit f9469fe18b5251b778c74c23d52a51428252cc38.
Fix hot reboot in powermenu

Fixes AOSPA-557
Accessing showGlobalActionsDialog() from different threads
(one for broadcasts and one for the actual longpress power button action)
caused a hot reboot when accessing the power menu from quick settings and then from power button.

Change-Id: I4b6efd192404f073c0d1b5655152ae736a398cbd
Pie: Fix navigation icon hints being cleared on reorientation

There is no reason to recreate the PieControlPanel instance if it already exists.

Change-Id: Id7bb4946a8fbd4595e840c605b90b97cab7b38ca