NEW_API: Add real-time Effects.

Add simple effects API, based on the mobile filter framework.

Bug-Id: 4966161

Change-Id: I1fa8aa6effd0f13029e6dd09d6e0a6c3f29f6cda
diff --git a/Android.mk b/Android.mk
index 752a5f8..a1c82fe 100644
--- a/Android.mk
+++ b/Android.mk
@@ -319,6 +319,9 @@
 # include definition of libcore_to_document
 include $(LOCAL_PATH)/../../libcore/Docs.mk
 
+# include definition of libfilterfw_to_document
+include $(LOCAL_PATH)/../../system/media/mca/Docs.mk
+
 non_base_dirs := \
 	../../external/apache-http/src/org/apache/http
 
@@ -335,7 +338,8 @@
 framework_docs_LOCAL_SRC_FILES := \
 	$(call find-other-java-files, $(dirs_to_document)) \
 	$(call find-other-html-files, $(html_dirs)) \
-	$(addprefix ../../libcore/, $(call libcore_to_document, $(LOCAL_PATH)/../../libcore))
+	$(addprefix ../../libcore/, $(call libcore_to_document, $(LOCAL_PATH)/../../libcore)) \
+	$(addprefix ../../system/media/mca/, $(call libfilterfw_to_document, $(LOCAL_PATH)/../../system/media/mca))
 
 # This is used by ide.mk as the list of source files that are
 # always included.
diff --git a/api/current.txt b/api/current.txt
index 1180440..244bd35 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -11159,6 +11159,37 @@
 
 }
 
+package android.media.effect {
+
+  public abstract class Effect {
+    ctor public Effect();
+    method public abstract void apply(int, int, int, int);
+    method public abstract java.lang.String getName();
+    method public abstract void release();
+    method public abstract void setParameter(java.lang.String, java.lang.Object);
+    method public void setUpdateListener(android.media.effect.EffectUpdateListener);
+  }
+
+  public class EffectContext {
+    method public static android.media.effect.EffectContext createWithCurrentGlContext();
+    method public android.media.effect.EffectFactory getFactory();
+    method public void release();
+  }
+
+  public class EffectFactory {
+    method public android.media.effect.Effect createEffect(java.lang.String);
+    method public static boolean isEffectSupported(java.lang.String);
+    field public static final java.lang.String EFFECT_BRIGHTNESS = "BrightnessEffect";
+    field public static final java.lang.String EFFECT_CONTRAST = "ContrastEffect";
+    field public static final java.lang.String EFFECT_FISHEYE = "FisheyeEffect";
+  }
+
+  public abstract interface EffectUpdateListener {
+    method public abstract void onEffectUpdated(android.media.effect.Effect, java.lang.Object);
+  }
+
+}
+
 package android.mtp {
 
   public final class MtpConstants {