Fix NPE if themeContext is null

When installing a new theme it sometimes happens that the
ThemesProvider crashes due to a NullPointerException in
hasThemeComponent(...) when executing
AssetManager assetManager = themeContext.getAssets();

Don't silently catch the NameNotFoundException and return an
empty map.

Change-Id: I9d7bf8f79b9c38cd5da668a7fcf205406ffdd79c
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
(cherry picked from commit dda7d285c2b77770d09ad2abaf4fa09f909d4636)
Fix NPE if themeContext is null - round 2

If a theme is uninstalled and timing is perfect, it can happen
that the CopyImageService is trying to get the PackageContext
of a not existing package.

Return from the function if a NameNotFoundException is catched.

Change-Id: I8f4e33d527f78228f9681ac518292364e9269a0c
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Themes: Add read/write permissions [2/2]

Change-Id: Ie41b1605b5773d651b8ef8f3162791fef5c78cfc
Merge "Fix NPE if themeContext is null - round 2" into cm-11.0
Merge "Themes: Add read/write permissions [2/2]" into cm-11.0
Merge pull request #5 from CyanogenMod/cm-11.0

Merge