OSDN Git Service

Gallery2: Check privative effects
authorJorge Ruesga <j.ruesga.criado@gmail.com>
Tue, 12 Jun 2012 21:28:58 +0000 (23:28 +0200)
committerJorge Ruesga <j.ruesga.criado@gmail.com>
Wed, 13 Jun 2012 22:46:05 +0000 (00:46 +0200)
commita901f8861f9b62386ad9729d533db744964a8690
treeb227379b4cb936aa2acfe58d8857722c308b5c7e
parent582c3bb99cf58b55defa5f788d488c62f771b60e
Gallery2: Check privative effects

Gallery2 has 2 effects (FaceTan and Facelift) from the privative gapps.
If gapps is not present, Gallery2 gets into a FC when click on this effects.
This patch checks if the permission "com.google.android.media.effects" exists
and hide this 2 effects if permission not exists

Patch 2: Use EffectFactory.isEffectSupported to detect if filters exists
Patch 3: Make isPresent method from effect classes a static method
Patch 4: Change actions classes for static calling to effects classes

Change-Id: I8f6b59e57e504114835ab3283f65a72b4f6774a8
src/com/android/gallery3d/photoeditor/EffectsBar.java
src/com/android/gallery3d/photoeditor/actions/EffectAction.java
src/com/android/gallery3d/photoeditor/actions/FaceTanAction.java
src/com/android/gallery3d/photoeditor/actions/FaceliftAction.java
src/com/android/gallery3d/photoeditor/filters/FaceTanFilter.java
src/com/android/gallery3d/photoeditor/filters/FaceliftFilter.java