summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/hardware/SensorEvent.java56
-rw-r--r--core/java/android/widget/VideoView.java7
-rw-r--r--core/java/com/android/internal/os/PowerProfile.java9
-rw-r--r--core/jni/android_app_NativeActivity.cpp2
-rw-r--r--docs/html/resources/resources_toc.cs12
-rw-r--r--docs/html/sdk/eclipse-adt.jd149
-rw-r--r--docs/html/sdk/requirements.jd23
-rw-r--r--opengl/include/EGL/eglplatform.h23
-rw-r--r--opengl/libs/EGL/egl.cpp4
9 files changed, 157 insertions, 128 deletions
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index 98bf6328b440..32ff3b3d9791 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -111,6 +111,27 @@ public class SensorEvent {
* This can be achieved by applying a <i>high-pass</i> filter. Conversely, a
* <i>low-pass</i> filter can be used to isolate the force of gravity.
* </p>
+ *
+ * <pre class="prettyprint">
+ *
+ * public void onSensorChanged(SensorEvent event)
+ * {
+ * // alpha is calculated as t / (t + dT)
+ * // with t, the low-pass filter's time-constant
+ * // and dT, the event delivery rate
+ *
+ * final float alpha = 0.8;
+ *
+ * gravity[0] = alpha * gravity[0] + (1 - alpha) * event.data[0];
+ * gravity[1] = alpha * gravity[1] + (1 - alpha) * event.data[1];
+ * gravity[2] = alpha * gravity[2] + (1 - alpha) * event.data[2];
+ *
+ * linear_acceleration[0] = event.data[0] - gravity[0];
+ * linear_acceleration[1] = event.data[1] - gravity[1];
+ * linear_acceleration[2] = event.data[2] - gravity[2];
+ * }
+ * </pre>
+ *
* <p>
* <u>Examples</u>:
* <ul>
@@ -143,8 +164,41 @@ public class SensorEvent {
* standard mathematical definition of positive rotation and does not agree with the
* definition of roll given earlier.
*
+ * <ul>
+ * <p>
+ * values[0]: Angular speed around the x-axis
+ * </p>
+ * <p>
+ * values[1]: Angular speed around the y-axis
+ * </p>
+ * <p>
+ * values[2]: Angular speed around the z-axis
+ * </p>
+ * </ul>
+ * <p>
+ * Typically the output of the gyroscope is integrated over time to calculate
+ * an angle, for example:
+ * </p>
+ * <pre class="prettyprint">
+ * private static final float NS2S = 1.0f / 1000000000.0f;
+ * private float timestamp;
+ * public void onSensorChanged(SensorEvent event)
+ * {
+ * if (timestamp != 0) {
+ * final float dT = (event.timestamp - timestamp) * NS2S;
+ * angle[0] += event.data[0] * dT;
+ * angle[1] += event.data[1] * dT;
+ * angle[2] += event.data[2] * dT;
+ * }
+ * timestamp = event.timestamp;
+ * }
+ * </pre>
+ *
+ * <p>In practice, the gyroscope noise and offset will introduce some errors which need
+ * to be compensated for. This is usually done using the information from other
+ * sensors, but is beyond the scope of this document.</p>
+ *
* <h4>{@link android.hardware.Sensor#TYPE_LIGHT Sensor.TYPE_LIGHT}:</h4>
- *
* <ul>
* <p>
* values[0]: Ambient light level in SI lux units
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 531d9fe75c44..b169c931e786 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -27,7 +27,6 @@ import android.media.Metadata;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.net.Uri;
-import android.os.PowerManager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
@@ -35,7 +34,7 @@ import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
-import android.widget.MediaController.*;
+import android.widget.MediaController.MediaPlayerControl;
import java.io.IOException;
import java.util.Map;
@@ -462,6 +461,10 @@ public class VideoView extends SurfaceView implements MediaPlayerControl {
}
start();
if (mMediaController != null) {
+ if (mMediaController.isShowing()) {
+ // ensure the controller will get repositioned later
+ mMediaController.hide();
+ }
mMediaController.show();
}
}
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 127ed68dff98..99a68436ceff 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -47,6 +47,15 @@ public class PowerProfile {
public static final String POWER_CPU_IDLE = "cpu.idle";
/**
+ * Power consumption when CPU is awake (when a wake lock is held). This
+ * should be 0 on devices that can go into full CPU power collapse even
+ * when a wake lock is held. Otherwise, this is the power consumption in
+ * addition to POWERR_CPU_IDLE due to a wake lock being held but with no
+ * CPU activity.
+ */
+ public static final String POWER_CPU_AWAKE = "cpu.awake";
+
+ /**
* Power consumption when CPU is in power collapse mode.
*/
public static final String POWER_CPU_ACTIVE = "cpu.active";
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp
index 45fd5a094142..ec172bba528f 100644
--- a/core/jni/android_app_NativeActivity.cpp
+++ b/core/jni/android_app_NativeActivity.cpp
@@ -580,6 +580,7 @@ static int mainWorkCallback(int fd, int events, void* data) {
code->env->CallVoidMethod(code->clazz,
gNativeActivityClassInfo.dispatchUnhandledKeyEvent, inputEventObj);
checkAndClearExceptionFromCallback(code->env, "dispatchUnhandledKeyEvent");
+ code->env->DeleteLocalRef(inputEventObj);
code->nativeInputQueue->finishEvent(keyEvent, true);
}
int seq;
@@ -589,6 +590,7 @@ static int mainWorkCallback(int fd, int events, void* data) {
code->env->CallVoidMethod(code->clazz,
gNativeActivityClassInfo.preDispatchKeyEvent, inputEventObj, seq);
checkAndClearExceptionFromCallback(code->env, "preDispatchKeyEvent");
+ code->env->DeleteLocalRef(inputEventObj);
}
} break;
case CMD_FINISH: {
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 735a00eba20f..117ecfb2659b 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -202,7 +202,7 @@
</a></li>
<li><a href="<?cs var:toroot ?>resources/samples/BackupRestore/index.html">
<span class="en">Backup and Restore</span>
- </a> <span class="new">new!</span></li>
+ </a></li>
<li><a href="<?cs var:toroot ?>resources/samples/BluetoothChat/index.html">
<span class="en">Bluetooth Chat</span>
</a></li>
@@ -235,7 +235,7 @@
</a></li>
<li><a href="<?cs var:toroot ?>resources/samples/SearchableDictionary/index.html">
<span class="en">Searchable Dictionary v2</span>
- </a> <span class="new">new!</span></li>
+ </a></li>
<li><a href="<?cs var:toroot ?>resources/samples/SipDemo/index.html">
<span class="en">SIP Demo</span>
</a> <span class="new">new!</span></li>
@@ -247,16 +247,16 @@
</a></li>
<li><a href="<?cs var:toroot ?>resources/samples/Spinner/index.html">
<span class="en">Spinner</span>
- </a> <span class="new">new!</span></li>
+ </a></li>
<li><a href="<?cs var:toroot ?>resources/samples/SpinnerTest/index.html">
<span class="en">SpinnerTest</span>
- </a> <span class="new">new!</span></li>
+ </a></li>
<li><a href="<?cs var:toroot ?>resources/samples/TicTacToeLib/index.html">
<span class="en">TicTacToeLib</span>
- </a> <span class="new">new!</span></li>
+ </a></li>
<li><a href="<?cs var:toroot ?>resources/samples/TicTacToeMain/index.html">
<span class="en">TicTacToeMain</span>
- </a> <span class="new">new!</span></li>
+ </a></li>
<li><a href="<?cs var:toroot ?>resources/samples/Wiktionary/index.html">
<span class="en">Wiktionary</span>
</a></li>
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index 350f2b012f3d..c3afebd7ff38 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -22,7 +22,6 @@ adt.zip.checksum=7deff0c9b25940a74cea7a0815a3bc36
</ol>
</li>
<li><a href="#updating">Updating the ADT Plugin</a></li>
- <li><a href="#uninstalling">Uninstalling the ADT Plugin</a></li>
</ol>
</div>
@@ -52,9 +51,6 @@ href="#installing">Installing the ADT Plugin</a>, below. </p>
how to update ADT to the latest version or how to uninstall it, if necessary.
</p>
-<p class="caution"><strong>Caution:</strong> There are known issues with the ADT plugin running with
-Eclipse 3.6. Please stay on 3.5 until further notice.</p>
-
<h2 id="notes">Revisions</h2>
<p>The sections below provide notes about successive releases of
@@ -397,12 +393,15 @@ revision 3.</li>
</div>
</div>
+
+
<h2 id="installing">Installing the ADT Plugin</h2>
<p>The sections below provide instructions on how to download and install
ADT into your Eclipse environment. If you encounter problems, see the <a
href="#troubleshooting">Troubleshooting</a> section.</p>
+
<h3 id="preparing">Preparing Your Development Computer</h3>
<p>ADT is a plugin for the Eclipse IDE. Before you can install or use ADT,
@@ -421,7 +420,8 @@ location:
"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>
</p>
-<p>A Java or RCP version of Eclipse is recommended.</p></li>
+<p>For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended. Otherwise, a Java or RCP
+version of Eclipse is recommended.</p></li>
</ul>
<p>Additionally, before you can configure or use ADT, you must install the
@@ -445,54 +445,51 @@ these steps to download the ADT plugin and install it in your Eclipse
environment. </p>
<table style="font-size:100%">
-<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
+<tr><th>Eclipse 3.5 (Galileo) and 3.6 (Helios)</th><th>Eclipse 3.4 (Ganymede)</th></tr>
<tr>
<td width="45%">
-<!-- 3.4 steps -->
+<!-- 3.5+ steps -->
<ol>
- <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates...</strong>.
- In the dialog that appears, click the <strong>Available Software</strong> tab. </li>
- <li>Click <strong>Add Site...</strong> </li>
- <li>In the Add Site dialog that appears, enter this URL in the "Location" field:
- <pre style="margin-left:0">https://dl-ssl.google.com/android/eclipse/</pre>
+ <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
+Software...</strong>.</li>
+ <li>Click <strong>Add</strong>, in the top-right corner.</li>
+ <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
+following URL for the <em>Location</em>:
+ <pre>https://dl-ssl.google.com/android/eclipse/</pre>
<p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
instead of "https" (https is preferred for security reasons).</p>
<p>Click <strong>OK</strong>.</p></li>
- <li>Back in the Available Software view, you should see the plugin listed by the URL,
- with "Developer Tools" nested within it. Select the checkbox next to
- Developer Tools and click <strong>Install...</strong></li>
- <li>On the subsequent Install window, "Android DDMS" and "Android Development Tools"
- should both be checked. Click <strong>Next</strong>. </li>
- <li>Read and accept the license agreement, then click <strong>Finish</strong>.</li>
- <li>Restart Eclipse. </li>
+ <li>In the Available Software dialog, select
+the checkbox next to Developer Tools and click <strong>Next</strong>.</li>
+ <li>In the next window, you'll see a list of the tools to be downloaded. Click
+<strong>Next</strong>. </li>
+ <li>Read and accept the license agreements, then click <strong>Finish</strong>.</li>
+ <li>When the installation completes, restart Eclipse. </li>
</ol>
</td>
-<td>
-<!-- 3.5 steps -->
+<td width="50%">
+
+<!-- 3.4 steps -->
<ol>
- <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install
- New Software</strong>. </li>
- <li>In the Available Software dialog, click <strong>Add...</strong>.</li>
- <li>In the Add Site dialog that appears, enter a name for the remote site
- (for example, "Android Plugin") in the "Name" field.
- <p>In the "Location" field, enter this URL:</p>
+ <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates...</strong>.
+In the dialog that appears, click the <strong>Available Software</strong> tab.</li>
+ <li>Click <strong>Add Site</strong>.</li>
+ <li>In the Add Site dialog that appears, enter this URL in the "Location" field:
<pre>https://dl-ssl.google.com/android/eclipse/</pre>
<p>Note: If you have trouble acquiring the plugin, you can try
using "http" in the URL, instead of "https" (https is preferred for
security reasons).</p>
<p>Click <strong>OK</strong>.</p>
</li>
- <li>Back in the Available Software view, you should now see "Developer
- Tools" added to the list. Select the checkbox next to Developer Tools,
- which will automatically select the nested tools Android DDMS and Android
- Development Tools.
- Click <strong>Next</strong>. </li>
- <li>In the resulting Install Details dialog, the Android DDMS and Android
- Development Tools features are listed. Click <strong>Next</strong> to
- read and accept the license agreement and install any dependencies,
- then click <strong>Finish</strong>. </li>
- <li>Restart Eclipse. </li>
+ <li>Back in the Available Software view, you should see the plugin listed by the URL,
+ with "Developer Tools" nested within it. Select the checkbox next to Developer Tools,
+ which will automatically select the nested tools. Then click
+ <strong>Install</strong></li>
+ <li>On the subsequent Install window, all of the included tools
+ should be checked. Click <strong>Next</strong>. </li>
+ <li>Read and accept the license agreements, then click <strong>Finish</strong>.</li>
+ <li>When the installation completes, restart Eclipse. </li>
</ol>
</td>
@@ -530,7 +527,7 @@ try changing the remote site URL to use http, rather than https. That is, set
the Location for the remote site to:
<pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
<li>If you are behind a firewall (such as a corporate firewall), make sure that
-you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4,
+you have properly configured your proxy settings in Eclipse. In Eclipse,
you can configure proxy information from the main Eclipse menu in
<strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
<strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
@@ -567,7 +564,7 @@ manually install it:</p>
instructions</a> (above).</li>
<li>In the Add Site dialog, click <strong>Archive</strong>.</li>
<li>Browse and select the downloaded zip file.</li>
- <li>In Eclipse 3.5 only, enter a name for the local update site (e.g.,
+ <li>Enter a name for the local update site (e.g.,
"Android Plugin") in the "Name" field.</li>
<li>Click <strong>OK</strong>.
<li>Follow the remaining procedures as listed for
@@ -623,37 +620,32 @@ Eclipse Installed Software window using <strong>Help</strong>
to install it. </p>
<table style="font-size:100%">
-<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
+<tr><th>Eclipse 3.5 (Galileo) and 3.6 (Helios)</th><th>Eclipse 3.4 (Ganymede)</th></tr>
<tr>
-<td width="50%">
-<!-- 3.4 steps -->
+<td>
+<!-- 3.5+ steps -->
<ol>
- <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong>.</li>
- <li>Select the <strong>Available Software</strong> tab.</li>
- <li>Select the checkboxes next to Android DDMS and Android Developer Tools,
- then click <strong>Update</strong>.</li>
- <li>In the resulting Available Updates dialog, ensure that both Android DDMS
- and Android Development Tools are selected, then click
- <strong>Next</strong>.</li>
+ <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
+ <p>If there are no updates available, a dialog will say so and you're done.</p></li>
+ <li>If there are updates available, select Android DDMS, Android Development Tools,
+ and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
+ <li>In the Update Details dialog, click <strong>Next</strong>.</li>
<li>Read and accept the license agreement and then click <strong>Finish</strong>.
This will download and install the latest version of Android DDMS and
Android Development Tools.</li>
<li>Restart Eclipse.</li>
</ol>
</td>
-<td>
-<!-- 3.5 steps -->
+
+<td width="50%">
+<!-- 3.4 steps -->
<ol>
- <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>. </li>
- <li>In the resulting Available Updates dialog, locate the Android DDMS and
- Android Development Tools features in the list and ensure that the checkboxes
- next to them are selected. Click <strong>Next</strong>.
- <p>If the Available Updates dialog does not list Android DDMS and Android
- Development tools, make sure that you have set up a remote update site
- for them, as described in
- <a href="#installing">Installing the ADT Plugin</a>.
- </p></li>
- <li>In the Update Details dialog, click <strong>Next</strong>.</li>
+ <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong>.</li>
+ <li>Select the <strong>Available Software</strong> tab.</li>
+ <li>If there are updates available, select Android DDMS, Android Development Tools,
+ and Android Hierarchy Viewer, then click <strong>Update</strong>.</li>
+ <li>In the resulting Available Updates dialog, ensure that each of the listed tools
+ are selected, then click <strong>Next</strong>.</li>
<li>Read and accept the license agreement and then click <strong>Finish</strong>.
This will download and install the latest version of Android DDMS and
Android Development Tools.</li>
@@ -671,38 +663,3 @@ href="#uninstalling">Uninstalling the ADT Plugin</a>, below. To reinstall
the plugin, follow the instructions in <a
href="#installing">Installing the ADT Plugin</a>, above.</p>
-
-<h2 id="uninstalling">Uninstalling the ADT plugin</h2>
-
-<p>If you encounter problems when installing or updating ADT, you
-can try removing the existing ADT plugin and then performing a fresh
-installation. To remove ADT, follow these steps: </p>
-
-<table style="font-size:100%">
-<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
-<tr>
-<td width="50%">
-<!-- 3.4 steps -->
-<ol>
- <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong> &gt;
- <strong>Manage Configuration</strong>. </li>
- <li>Expand the list in the left panel to reveal the installed tools.</li>
- <li>Right-click "Android Editors" and click <strong>Uninstall</strong>. Click <strong>OK</strong>
- to confirm.</li>
- <li>Restart Eclipse.
- <p>(Do not uninstall "Android Development Tools".)</p></li>
-</ol>
-</td>
-<td>
-<!-- 3.5 steps -->
-<ol>
- <li>Select <strong>Help</strong> &gt; <strong>Install New Software</strong>.</li>
- <li>In the "Details" panel, click the "What is already installed?" link.</li>
- <li>In the <strong>Eclipse Installation Details</strong> dialog, select "Android DDMS" and "Android Development Tools" and then click <strong>Uninstall</strong>.</li>
- <li>In the next window, confirm that the ADT features are selected for uninstall and then click <strong>Finish</strong> to uninstall.</li>
- <li>Restart Eclipse.</li>
-</ol>
-</td>
-</tr>
-</table>
-
diff --git a/docs/html/sdk/requirements.jd b/docs/html/sdk/requirements.jd
index 7b11654cff87..3679d44234bf 100644
--- a/docs/html/sdk/requirements.jd
+++ b/docs/html/sdk/requirements.jd
@@ -8,7 +8,7 @@ Android applications using the Android SDK. </p>
<ul>
<li>Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)</li>
<li>Mac OS X 10.5.8 or later (x86 only)</li>
- <li>Linux (tested on Linux Ubuntu Hardy Heron)
+ <li>Linux (tested on Linux Ubuntu Hardy Heron and Lucid Lynx)
<ul>
<li>64-bit distributions must be capable of running 32-bit applications.
For information about how to add support for 32-bit applications, see
@@ -22,10 +22,7 @@ installation notes</a>.</li>
<h4 style="margin-top:.25em"><em>Eclipse IDE</em></h4>
<ul>
- <li>Eclipse 3.4 (Ganymede) or 3.5 (Galileo)
- <p class="caution"><strong>Caution:</strong> There are known issues with the ADT plugin
-running with Eclipse 3.6. Please stay on 3.5 until further notice.</p>
- </li>
+ <li>Eclipse 3.4 (Ganymede) or greater</li>
<li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
in most Eclipse IDE packages) </li>
<li>If you need to install or update Eclipse, you can download it from <a
@@ -35,23 +32,22 @@ href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.
developing Android applications, we recommend that you install one of these
packages: </p>
<ul>
- <li>Eclipse IDE for Java EE Developers</li>
<li>Eclipse IDE for Java Developers</li>
- <li>Eclipse for RCP/Plug-in Developers</li>
<li>Eclipse Classic (versions 3.5.1 and higher)</li>
+ <li>Eclipse IDE for Java EE Developers</li>
</ul>
</li>
- <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK
+ <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 5 or JDK
6</a> (JRE alone is not sufficient)</li>
<li><a href="eclipse-adt.html">Android Development Tools plugin</a>
-(optional)</li>
+(recommended)</li>
<li><strong>Not</strong> compatible with Gnu Compiler for Java (gcj)</li>
</ul>
<h4><em>Other development environments or IDEs</em></h4>
<ul>
- <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK 5 or JDK
+ <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 5 or JDK
6</a> (JRE alone is not sufficient)</li>
<li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.5 or later for
Linux and Mac, 1.7 or later for Windows</li>
@@ -75,7 +71,12 @@ particular, note that some Linux distributions may include JDK 1.4 or Gnu Compil
</tr>
<tr>
<td>SDK Tools</td>
-<td>50 MB</td>
+<td>35 MB</td>
+<td>Required.</td>
+</tr>
+<tr>
+<td>SDK Platform-tools</td>
+<td>6 MB</td>
<td>Required.</td>
</tr>
<tr>
diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h
index 25d7697ee3be..bfac71bec674 100644
--- a/opengl/include/EGL/eglplatform.h
+++ b/opengl/include/EGL/eglplatform.h
@@ -78,18 +78,7 @@ typedef int EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
-#elif defined(__unix__) && !defined(ANDROID)
-
-/* X11 (tentative) */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef Display *EGLNativeDisplayType;
-typedef Pixmap EGLNativePixmapType;
-typedef Window EGLNativeWindowType;
-
-
-#elif defined(ANDROID)
+#elif defined(__ANDROID__) || defined(ANDROID)
#include <android/native_window.h>
@@ -99,6 +88,16 @@ typedef struct ANativeWindow* EGLNativeWindowType;
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
+#elif defined(__unix__)
+
+/* X11 (tentative) */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap EGLNativePixmapType;
+typedef Window EGLNativeWindowType;
+
#else
#error "Platform not recognized"
#endif
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 2d1a2786a41a..ab260d582a70 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -407,6 +407,10 @@ static const extention_map_t gExtentionMap[] = {
(__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR },
{ "eglSetSwapRectangleANDROID",
(__eglMustCastToProperFunctionPointerType)&eglSetSwapRectangleANDROID },
+ { "glEGLImageTargetTexture2DOES",
+ (__eglMustCastToProperFunctionPointerType)NULL },
+ { "glEGLImageTargetRenderbufferStorageOES",
+ (__eglMustCastToProperFunctionPointerType)NULL },
};
extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS];