summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMathias Agopian <>2009-03-25 23:18:56 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-25 23:18:56 -0700
commitc75c4364eae030a9ea6db658c4d1e38cdb05ab4c (patch)
tree74b5aa87e54d08c144b2cddd1163d68537c895ee /core
parent02771bcb5d2156a58b825a5f8132fdf575ea862d (diff)
downloadframeworks_base-c75c4364eae030a9ea6db658c4d1e38cdb05ab4c.zip
frameworks_base-c75c4364eae030a9ea6db658c4d1e38cdb05ab4c.tar.gz
frameworks_base-c75c4364eae030a9ea6db658c4d1e38cdb05ab4c.tar.bz2
Automated import from //branches/cupcake/...@142873,142873
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/Surface.java19
-rw-r--r--core/jni/android_view_Surface.cpp6
2 files changed, 21 insertions, 4 deletions
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index 54ccf33..0178d63 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -118,6 +118,12 @@ public class Surface implements Parcelable {
public static final int ROTATION_180 = 2;
public static final int ROTATION_270 = 3;
+ /**
+ * Disable the orientation animation
+ * {@hide}
+ */
+ public static final int FLAGS_ORIENTATION_ANIMATION_DISABLE = 0x000000001;
+
@SuppressWarnings("unused")
private int mSurface;
@SuppressWarnings("unused")
@@ -226,10 +232,21 @@ public class Surface implements Parcelable {
* set the orientation of the given display.
* @param display
* @param orientation
+ * @param flags
+ * {@hide}
*/
- public static native void setOrientation(int display, int orientation);
+ public static native void setOrientation(int display, int orientation, int flags);
/**
+ * set the orientation of the given display.
+ * @param display
+ * @param orientation
+ */
+ public static void setOrientation(int display, int orientation) {
+ setOrientation(display, orientation, 0);
+ }
+
+ /**
* set surface parameters.
* needs to be inside open/closeTransaction block
*/
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 8baaa84..076775f 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -324,9 +324,9 @@ static void Surface_closeTransaction(
}
static void Surface_setOrientation(
- JNIEnv* env, jobject clazz, jint display, jint orientation)
+ JNIEnv* env, jobject clazz, jint display, jint orientation, jint flags)
{
- int err = SurfaceComposerClient::setOrientation(display, orientation);
+ int err = SurfaceComposerClient::setOrientation(display, orientation, flags);
if (err < 0) {
doThrow(env, "java/lang/IllegalArgumentException", NULL);
}
@@ -565,7 +565,7 @@ static JNINativeMethod gSurfaceMethods[] = {
{"unlockCanvas", "(Landroid/graphics/Canvas;)V", (void*)Surface_unlockCanvas },
{"openTransaction", "()V", (void*)Surface_openTransaction },
{"closeTransaction", "()V", (void*)Surface_closeTransaction },
- {"setOrientation", "(II)V", (void*)Surface_setOrientation },
+ {"setOrientation", "(III)V", (void*)Surface_setOrientation },
{"freezeDisplay", "(I)V", (void*)Surface_freezeDisplay },
{"unfreezeDisplay", "(I)V", (void*)Surface_unfreezeDisplay },
{"setLayer", "(I)V", (void*)Surface_setLayer },