Merge "Update layers' opaque property when needed"
diff --git a/core/java/android/app/MediaRouteButton.java b/core/java/android/app/MediaRouteButton.java
index c34c163..b0bfe74 100644
--- a/core/java/android/app/MediaRouteButton.java
+++ b/core/java/android/app/MediaRouteButton.java
@@ -60,7 +60,7 @@
}
public MediaRouteButton(Context context, AttributeSet attrs) {
- this(context, null, com.android.internal.R.attr.mediaRouteButtonStyle);
+ this(context, attrs, com.android.internal.R.attr.mediaRouteButtonStyle);
}
public MediaRouteButton(Context context, AttributeSet attrs, int defStyleAttr) {
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 3e0942c..3b26af7 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -98,6 +98,7 @@
private static final int MSG_WALLPAPER_OFFSETS = 10020;
private static final int MSG_WALLPAPER_COMMAND = 10025;
private static final int MSG_WINDOW_RESIZED = 10030;
+ private static final int MSG_WINDOW_MOVED = 10035;
private static final int MSG_TOUCH_EVENT = 10040;
private Looper mCallbackLooper;
@@ -259,7 +260,13 @@
reportDraw ? 1 : 0);
mCaller.sendMessage(msg);
}
-
+
+ @Override
+ public void moved(int newX, int newY) {
+ Message msg = mCaller.obtainMessageII(MSG_WINDOW_MOVED, newX, newY);
+ mCaller.sendMessage(msg);
+ }
+
@Override
public void dispatchAppVisibility(boolean visible) {
// We don't do this in preview mode; we'll let the preview
@@ -290,7 +297,8 @@
}
}
}
-
+
+ @Override
public void dispatchWallpaperCommand(String action, int x, int y,
int z, Bundle extras, boolean sync) {
synchronized (mLock) {
@@ -1044,6 +1052,9 @@
mEngine.updateSurface(true, false, reportDraw);
mEngine.doOffsetsChanged(true);
} break;
+ case MSG_WINDOW_MOVED: {
+ // Do nothing. What does it mean for a Wallpaper to move?
+ } break;
case MSG_TOUCH_EVENT: {
boolean skip = false;
MotionEvent ev = (MotionEvent)message.obj;
diff --git a/core/java/android/text/MeasuredText.java b/core/java/android/text/MeasuredText.java
index 445aac63..bd9310c1 100644
--- a/core/java/android/text/MeasuredText.java
+++ b/core/java/android/text/MeasuredText.java
@@ -83,7 +83,7 @@
}
void setPos(int pos) {
- mPos = pos;
+ mPos = pos - mTextStart;
}
/**
diff --git a/core/java/android/view/AccessibilityInteractionController.java b/core/java/android/view/AccessibilityInteractionController.java
index 4de0b01..d0c393c 100644
--- a/core/java/android/view/AccessibilityInteractionController.java
+++ b/core/java/android/view/AccessibilityInteractionController.java
@@ -18,6 +18,7 @@
import static android.view.accessibility.AccessibilityNodeInfo.INCLUDE_NOT_IMPORTANT_VIEWS;
+import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -64,6 +65,8 @@
private final ArrayList<View> mTempArrayList = new ArrayList<View>();
+ private final Rect mTempRect = new Rect();
+
public AccessibilityInteractionController(ViewRootImpl viewRootImpl) {
Looper looper = viewRootImpl.mHandler.getLooper();
mMyLooperThreadId = looper.getThread().getId();
@@ -207,6 +210,7 @@
} finally {
try {
mViewRootImpl.mAttachInfo.mIncludeNotImportantViews = false;
+ applyApplicationScaleIfNeeded(infos);
callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
infos.clear();
} catch (RemoteException re) {
@@ -287,6 +291,7 @@
} finally {
try {
mViewRootImpl.mAttachInfo.mIncludeNotImportantViews = false;
+ applyApplicationScaleIfNeeded(info);
callback.setFindAccessibilityNodeInfoResult(info, interactionId);
} catch (RemoteException re) {
/* ignore - the other side will time out */
@@ -396,6 +401,7 @@
} finally {
try {
mViewRootImpl.mAttachInfo.mIncludeNotImportantViews = false;
+ applyApplicationScaleIfNeeded(infos);
callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
} catch (RemoteException re) {
/* ignore - the other side will time out */
@@ -502,6 +508,7 @@
} finally {
try {
mViewRootImpl.mAttachInfo.mIncludeNotImportantViews = false;
+ applyApplicationScaleIfNeeded(focused);
callback.setFindAccessibilityNodeInfoResult(focused, interactionId);
} catch (RemoteException re) {
/* ignore - the other side will time out */
@@ -582,6 +589,7 @@
} finally {
try {
mViewRootImpl.mAttachInfo.mIncludeNotImportantViews = false;
+ applyApplicationScaleIfNeeded(next);
callback.setFindAccessibilityNodeInfoResult(next, interactionId);
} catch (RemoteException re) {
/* ignore - the other side will time out */
@@ -677,6 +685,39 @@
return foundView;
}
+ private void applyApplicationScaleIfNeeded(List<AccessibilityNodeInfo> infos) {
+ if (infos == null) {
+ return;
+ }
+ final float applicationScale = mViewRootImpl.mAttachInfo.mApplicationScale;
+ if (applicationScale != 1.0f) {
+ final int infoCount = infos.size();
+ for (int i = 0; i < infoCount; i++) {
+ AccessibilityNodeInfo info = infos.get(i);
+ applyApplicationScaleIfNeeded(info);
+ }
+ }
+ }
+
+ private void applyApplicationScaleIfNeeded(AccessibilityNodeInfo info) {
+ if (info == null) {
+ return;
+ }
+ final float applicationScale = mViewRootImpl.mAttachInfo.mApplicationScale;
+ if (applicationScale != 1.0f) {
+ Rect bounds = mTempRect;
+
+ info.getBoundsInParent(bounds);
+ bounds.scale(applicationScale);
+ info.setBoundsInParent(bounds);
+
+ info.getBoundsInScreen(bounds);
+ bounds.scale(applicationScale);
+ info.setBoundsInScreen(bounds);
+ }
+ }
+
+
/**
* This class encapsulates a prefetching strategy for the accessibility APIs for
* querying window content. It is responsible to prefetch a batch of
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index b4caad3..9f22870 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -47,6 +47,7 @@
void resized(int w, int h, in Rect contentInsets,
in Rect visibleInsets, boolean reportDraw, in Configuration newConfig);
+ void moved(int newX, int newY);
void dispatchAppVisibility(boolean visible);
void dispatchGetNewSurface();
void dispatchScreenState(boolean on);
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 22b307c..d81b7c1 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4697,14 +4697,11 @@
*/
void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
Rect bounds = mAttachInfo.mTmpInvalRect;
- final float applicationScale = mAttachInfo.mApplicationScale;
getDrawingRect(bounds);
- bounds.scale(applicationScale);
info.setBoundsInParent(bounds);
getBoundsOnScreen(bounds);
- bounds.scale(applicationScale);
info.setBoundsInScreen(bounds);
ViewParent parent = getParentForAccessibility();
@@ -4769,9 +4766,9 @@
* @hide
*/
public int getActualAndReportedWindowLeftDelta() {
- if (mAttachInfo != null) {
- return mAttachInfo.mActualWindowLeft - mAttachInfo.mWindowLeft;
- }
+// if (mAttachInfo != null) {
+// return mAttachInfo.mActualWindowLeft - mAttachInfo.mWindowLeft;
+// }
return 0;
}
@@ -4781,9 +4778,9 @@
* @hide
*/
public int getActualAndReportedWindowTopDelta() {
- if (mAttachInfo != null) {
- return mAttachInfo.mActualWindowTop - mAttachInfo.mWindowTop;
- }
+// if (mAttachInfo != null) {
+// return mAttachInfo.mActualWindowTop - mAttachInfo.mWindowTop;
+// }
return 0;
}
@@ -5571,7 +5568,7 @@
@ViewDebug.IntToString(from = LAYOUT_DIRECTION_RTL, to = "RESOLVED_DIRECTION_RTL")
})
public int getResolvedLayoutDirection() {
- // The layout diretion will be resolved only if needed
+ // The layout direction will be resolved only if needed
if ((mPrivateFlags2 & LAYOUT_DIRECTION_RESOLVED) != LAYOUT_DIRECTION_RESOLVED) {
resolveLayoutDirection();
}
@@ -11099,9 +11096,13 @@
scrollBar.setParameters(computeVerticalScrollRange(),
computeVerticalScrollOffset(),
computeVerticalScrollExtent(), true);
- switch (mVerticalScrollbarPosition) {
+ int verticalScrollbarPosition = mVerticalScrollbarPosition;
+ if (verticalScrollbarPosition == SCROLLBAR_POSITION_DEFAULT) {
+ verticalScrollbarPosition = isLayoutRtl() ?
+ SCROLLBAR_POSITION_LEFT : SCROLLBAR_POSITION_RIGHT;
+ }
+ switch (verticalScrollbarPosition) {
default:
- case SCROLLBAR_POSITION_DEFAULT:
case SCROLLBAR_POSITION_RIGHT:
left = scrollX + width - size - (mUserPaddingRight & inside);
break;
@@ -11272,15 +11273,18 @@
// Set resolved depending on layout direction
switch (getLayoutDirection()) {
case LAYOUT_DIRECTION_INHERIT:
- // If this is root view, no need to look at parent's layout dir.
- if (canResolveLayoutDirection()) {
- ViewGroup viewGroup = ((ViewGroup) mParent);
+ // We cannot resolve yet. LTR is by default and let the resolution happen again
+ // later to get the correct resolved value
+ if (!canResolveLayoutDirection()) return;
- if (viewGroup.getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) {
- mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL;
- }
- } else {
- // Nothing to do, LTR by default
+ ViewGroup viewGroup = ((ViewGroup) mParent);
+
+ // We cannot resolve yet on the parent too. LTR is by default and let the
+ // resolution happen again later
+ if (!viewGroup.canResolveLayoutDirection()) return;
+
+ if (viewGroup.getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) {
+ mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL;
}
break;
case LAYOUT_DIRECTION_RTL:
@@ -14149,7 +14153,7 @@
? 0 : getVerticalScrollbarWidth();
switch (mVerticalScrollbarPosition) {
case SCROLLBAR_POSITION_DEFAULT:
- if (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) {
+ if (isLayoutRtl()) {
left += offset;
} else {
right += offset;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index af5f474..4e6e2ce 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -5507,6 +5507,11 @@
*/
static private final int DEFAULT_RELATIVE = Integer.MIN_VALUE;
+ private int initialLeftMargin;
+ private int initialRightMargin;
+
+ private int layoutDirection;
+
/**
* Creates a new set of layout parameters. The values are extracted from
* the supplied attributes set and context.
@@ -5545,6 +5550,12 @@
R.styleable.ViewGroup_MarginLayout_layout_marginEnd, DEFAULT_RELATIVE);
}
+ initialLeftMargin = leftMargin;
+ initialRightMargin = rightMargin;
+
+ // LTR by default
+ layoutDirection = View.LAYOUT_DIRECTION_LTR;
+
a.recycle();
}
@@ -5570,6 +5581,11 @@
this.bottomMargin = source.bottomMargin;
this.startMargin = source.startMargin;
this.endMargin = source.endMargin;
+
+ this.initialLeftMargin = source.leftMargin;
+ this.initialRightMargin = source.rightMargin;
+
+ this.layoutDirection = source.layoutDirection;
}
/**
@@ -5599,6 +5615,8 @@
topMargin = top;
rightMargin = right;
bottomMargin = bottom;
+ initialLeftMargin = left;
+ initialRightMargin = right;
}
/**
@@ -5624,6 +5642,8 @@
topMargin = top;
endMargin = end;
bottomMargin = bottom;
+ initialLeftMargin = 0;
+ initialRightMargin = 0;
}
/**
@@ -5634,7 +5654,14 @@
* @return the start margin in pixels.
*/
public int getMarginStart() {
- return startMargin;
+ if (startMargin != DEFAULT_RELATIVE) return startMargin;
+ switch(layoutDirection) {
+ case View.LAYOUT_DIRECTION_RTL:
+ return rightMargin;
+ case View.LAYOUT_DIRECTION_LTR:
+ default:
+ return leftMargin;
+ }
}
/**
@@ -5645,7 +5672,14 @@
* @return the end margin in pixels.
*/
public int getMarginEnd() {
- return endMargin;
+ if (endMargin != DEFAULT_RELATIVE) return endMargin;
+ switch(layoutDirection) {
+ case View.LAYOUT_DIRECTION_RTL:
+ return leftMargin;
+ case View.LAYOUT_DIRECTION_LTR:
+ default:
+ return rightMargin;
+ }
}
/**
@@ -5666,15 +5700,19 @@
*/
@Override
public void onResolveLayoutDirection(int layoutDirection) {
+ this.layoutDirection = layoutDirection;
+
+ if (!isMarginRelative()) return;
+
switch(layoutDirection) {
case View.LAYOUT_DIRECTION_RTL:
- leftMargin = (endMargin > DEFAULT_RELATIVE) ? endMargin : leftMargin;
- rightMargin = (startMargin > DEFAULT_RELATIVE) ? startMargin : rightMargin;
+ leftMargin = (endMargin > DEFAULT_RELATIVE) ? endMargin : initialLeftMargin;
+ rightMargin = (startMargin > DEFAULT_RELATIVE) ? startMargin : initialRightMargin;
break;
case View.LAYOUT_DIRECTION_LTR:
default:
- leftMargin = (startMargin > DEFAULT_RELATIVE) ? startMargin : leftMargin;
- rightMargin = (endMargin > DEFAULT_RELATIVE) ? endMargin : rightMargin;
+ leftMargin = (startMargin > DEFAULT_RELATIVE) ? startMargin : initialLeftMargin;
+ rightMargin = (endMargin > DEFAULT_RELATIVE) ? endMargin : initialRightMargin;
break;
}
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 9798877..85b6d3d 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -2717,6 +2717,7 @@
private final static int MSG_CLEAR_ACCESSIBILITY_FOCUS_HOST = 22;
private final static int MSG_DISPATCH_DONE_ANIMATING = 23;
private final static int MSG_INVALIDATE_WORLD = 24;
+ private final static int MSG_WINDOW_MOVED = 25;
final class ViewRootHandler extends Handler {
@Override
@@ -2768,6 +2769,8 @@
return "MSG_CLEAR_ACCESSIBILITY_FOCUS_HOST";
case MSG_DISPATCH_DONE_ANIMATING:
return "MSG_DISPATCH_DONE_ANIMATING";
+ case MSG_WINDOW_MOVED:
+ return "MSG_WINDOW_MOVED";
}
return super.getMessageName(message);
}
@@ -2812,6 +2815,7 @@
if (config != null) {
updateConfiguration(config, false);
}
+ // TODO: Should left/top stay unchanged and only change the right/bottom?
mWinFrame.left = 0;
mWinFrame.right = msg.arg1;
mWinFrame.top = 0;
@@ -2828,6 +2832,23 @@
requestLayout();
}
break;
+ case MSG_WINDOW_MOVED:
+ if (mAdded) {
+ final int w = mWinFrame.width();
+ final int h = mWinFrame.height();
+ final int l = msg.arg1;
+ final int t = msg.arg2;
+ mWinFrame.left = l;
+ mWinFrame.right = l + w;
+ mWinFrame.top = t;
+ mWinFrame.bottom = t + h;
+
+ if (mView != null) {
+ forceLayout(mView);
+ }
+ requestLayout();
+ }
+ break;
case MSG_WINDOW_FOCUS_CHANGED: {
if (mAdded) {
boolean hasWindowFocus = msg.arg1 != 0;
@@ -4047,6 +4068,18 @@
mHandler.sendMessage(msg);
}
+ public void dispatchMoved(int newX, int newY) {
+ if (DEBUG_LAYOUT) Log.v(TAG, "Window moved " + this + ": newX=" + newX + " newY=" + newY);
+ if (mTranslator != null) {
+ PointF point = new PointF(newX, newY);
+ mTranslator.translatePointInScreenToAppWindow(point);
+ newX = (int) (point.x + 0.5);
+ newY = (int) (point.y + 0.5);
+ }
+ Message msg = mHandler.obtainMessage(MSG_WINDOW_MOVED, newX, newY);
+ mHandler.sendMessage(msg);
+ }
+
/**
* Represents a pending input event that is waiting in a queue.
*
@@ -4686,6 +4719,14 @@
}
}
+ @Override
+ public void moved(int newX, int newY) {
+ final ViewRootImpl viewAncestor = mViewAncestor.get();
+ if (viewAncestor != null) {
+ viewAncestor.dispatchMoved(newX, newY);
+ }
+ }
+
public void dispatchAppVisibility(boolean visible) {
final ViewRootImpl viewAncestor = mViewAncestor.get();
if (viewAncestor != null) {
diff --git a/core/java/android/webkit/HTML5VideoView.java b/core/java/android/webkit/HTML5VideoView.java
index 610808b..96d8248 100644
--- a/core/java/android/webkit/HTML5VideoView.java
+++ b/core/java/android/webkit/HTML5VideoView.java
@@ -35,6 +35,7 @@
static final int STATE_PREPARED = 2;
static final int STATE_PLAYING = 3;
static final int STATE_RESETTED = 4;
+ static final int STATE_RELEASED = 5;
protected HTML5VideoViewProxy mProxy;
@@ -126,7 +127,7 @@
}
public void reset() {
- if (mCurrentState != STATE_RESETTED) {
+ if (mCurrentState < STATE_RESETTED) {
mPlayer.reset();
}
mCurrentState = STATE_RESETTED;
@@ -138,6 +139,18 @@
}
}
+ public static void release() {
+ if (mPlayer != null && mCurrentState != STATE_RELEASED) {
+ mPlayer.release();
+ mPlayer = null;
+ }
+ mCurrentState = STATE_RELEASED;
+ }
+
+ public boolean isReleased() {
+ return mCurrentState == STATE_RELEASED;
+ }
+
public boolean getPauseDuringPreparing() {
return mPauseDuringPreparing;
}
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index 2dba89d..701ef35 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -109,7 +109,8 @@
mBaseLayer = layer;
// Don't do this for full screen mode.
if (mHTML5VideoView != null
- && !mHTML5VideoView.isFullScreenMode()) {
+ && !mHTML5VideoView.isFullScreenMode()
+ && !mHTML5VideoView.isReleased()) {
int currentVideoLayerId = mHTML5VideoView.getVideoLayerId();
SurfaceTexture surfTexture =
HTML5VideoInline.getSurfaceTexture(currentVideoLayerId);
@@ -214,7 +215,9 @@
boolean skipPrepare = false;
boolean createInlineView = false;
- if (backFromFullScreenMode && currentVideoLayerId == videoLayerId) {
+ if (backFromFullScreenMode
+ && currentVideoLayerId == videoLayerId
+ && !mHTML5VideoView.isReleased()) {
skipPrepare = true;
createInlineView = true;
} else if(backFromFullScreenMode
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 01c047b..e93db09 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -245,8 +245,8 @@
}
/**
- * Tell the client that the quota has been reached for the Application Cache
- * API and request a new quota. The client must respond by invoking the
+ * Notify the host application that the Application Cache has reached the
+ * maximum size. The client must respond by invoking the
* {@link WebStorage.QuotaUpdater#updateQuota(long) updateQuota(long)}
* method of the supplied {@link WebStorage.QuotaUpdater} instance. The
* minimum value that can be set for the new quota is the current quota. The
@@ -255,7 +255,7 @@
* @param requiredStorage The amount of storage required by the Application
* Cache operation that triggered this notification,
* in bytes.
- * @param quota The quota, in bytes
+ * @param quota the current maximum Application Cache size, in bytes
* @param quotaUpdater An instance of {@link WebStorage.QuotaUpdater} which
* must be used to inform the WebView of the new quota.
*/
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index f2a041a..1a868d5 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1005,8 +1005,11 @@
}
/**
- * Sets the maximum size for the Application Caches content. The default is
- * {@link Long#MAX_VALUE}.
+ * Sets the maximum size for the Application Cache content. The passed size
+ * will be rounded to the nearest value that the database can support, so
+ * this should be viewed as a guide, not a hard limit. Setting the
+ * size to a value less than current database size does not cause the
+ * database to be trimmed. The default size is {@link Long#MAX_VALUE}.
*
* @param appCacheMaxSize the maximum size in bytes
*/
diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java
index 76674f4..1e955bd 100644
--- a/core/java/android/webkit/WebStorage.java
+++ b/core/java/android/webkit/WebStorage.java
@@ -23,17 +23,22 @@
* {@link WebView}. It manages the Application Cache API, the Web SQL Database
* API and the HTML5 Web Storage API.
*
- * The Web SQL Database API provides storage which is private to a given
- * origin, where an origin comprises the host, scheme and port of a URI.
- * Similarly, use of the Application Cache API can be attributed to an origin.
- * This class provides access to the storage use and quotas for these APIs for
- * a given origin. Origins are represented using {@link WebStorage.Origin}.
+ * The Application Cache API provides a mechanism to create and maintain an
+ * application cache to power offline Web applications. Use of the Application
+ * Cache API can be attributed to an origin {@link WebStorage.Origin}, however
+ * it is not possible to set per-origin quotas. Note that there can be only
+ * one application cache per application.
+ *
+ * The Web SQL Database API provides storage which is private to a given origin.
+ * Similar to the Application Cache, use of the Web SQL Database can be attributed
+ * to an origin. It is also possible to set per-origin quotas.
*/
public class WebStorage {
/**
* Encapsulates a callback function which is used to provide a new quota
- * for a JavaScript storage API. See
+ * for a JavaScript storage API.
+ * See
* {@link WebChromeClient#onExceededDatabaseQuota} and
* {@link WebChromeClient#onReachedMaxAppCacheSize}.
*/
@@ -54,6 +59,7 @@
/**
* This class encapsulates information about the amount of storage
* currently used by an origin for the JavaScript storage APIs.
+ * An origin comprises the host, scheme and port of a URI.
* See {@link WebStorage} for details.
*/
public static class Origin {
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 251ddf7..038dde5 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -745,6 +745,7 @@
// Here we just need to clean up the Surface Texture which is static.
if (level > TRIM_MEMORY_UI_HIDDEN) {
HTML5VideoInline.cleanupSurfaceTexture();
+ HTML5VideoView.release();
}
WebViewClassic.nativeOnTrimMemory(level);
}
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 1875ced..40229af 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -443,7 +443,7 @@
}
/**
- * Notify the browser that the origin has exceeded it's database quota.
+ * Notify the embedding application that the origin has exceeded it's database quota.
* @param url The URL that caused the overflow.
* @param databaseIdentifier The identifier of the database.
* @param quota The current quota for the origin.
@@ -468,12 +468,15 @@
}
/**
- * Notify the browser that the appcache has exceeded its max size.
+ * Notify the embedding application that the appcache has reached or exceeded its maximum
+ * allowed storage size.
+ *
* @param requiredStorage is the amount of storage, in bytes, that would be
* needed in order for the last appcache operation to succeed.
+ * @param maxSize maximum allowed Application Cache database size, in bytes.
*/
- protected void reachedMaxAppCacheSize(long requiredStorage) {
- mCallbackProxy.onReachedMaxAppCacheSize(requiredStorage, getUsedQuota(),
+ protected void reachedMaxAppCacheSize(long requiredStorage, long maxSize) {
+ mCallbackProxy.onReachedMaxAppCacheSize(requiredStorage, maxSize,
new WebStorage.QuotaUpdater() {
@Override
public void updateQuota(long newQuota) {
@@ -2117,8 +2120,8 @@
return width;
}
- // Utility method for exceededDatabaseQuota and reachedMaxAppCacheSize
- // callbacks. Computes the sum of database quota for all origins.
+ // Utility method for exceededDatabaseQuota callback. Computes the sum
+ // of WebSQL database quota for all origins.
private long getUsedQuota() {
WebStorageClassic webStorage = WebStorageClassic.getInstance();
Collection<WebStorage.Origin> origins = webStorage.getOriginsSync();
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index 083a952..d2139af 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -181,10 +181,13 @@
}
public void setScrollbarPosition(int position) {
+ if (position == View.SCROLLBAR_POSITION_DEFAULT) {
+ position = mList.isLayoutRtl() ?
+ View.SCROLLBAR_POSITION_LEFT : View.SCROLLBAR_POSITION_RIGHT;
+ }
mPosition = position;
switch (position) {
default:
- case View.SCROLLBAR_POSITION_DEFAULT:
case View.SCROLLBAR_POSITION_RIGHT:
mOverlayDrawable = mOverlayDrawableRight;
break;
@@ -229,7 +232,6 @@
final int viewWidth = mList.getWidth();
// Bounds are always top right. Y coordinate get's translated during draw
switch (mPosition) {
- case View.SCROLLBAR_POSITION_DEFAULT:
case View.SCROLLBAR_POSITION_RIGHT:
mThumbDrawable.setBounds(viewWidth - mThumbW, 0, viewWidth, mThumbH);
break;
@@ -327,7 +329,6 @@
}
int left = 0;
switch (mPosition) {
- case View.SCROLLBAR_POSITION_DEFAULT:
case View.SCROLLBAR_POSITION_RIGHT:
left = viewWidth - (mThumbW * alpha) / ScrollFade.ALPHA_MAX;
break;
@@ -360,7 +361,6 @@
int left = 0;
switch (mPosition) {
default:
- case View.SCROLLBAR_POSITION_DEFAULT:
case View.SCROLLBAR_POSITION_RIGHT:
left = Math.max(0,
mThumbDrawable.getBounds().left - mThumbW - mOverlaySize);
@@ -410,7 +410,6 @@
if (mThumbDrawable != null) {
switch (mPosition) {
default:
- case View.SCROLLBAR_POSITION_DEFAULT:
case View.SCROLLBAR_POSITION_RIGHT:
mThumbDrawable.setBounds(w - mThumbW, 0, w, mThumbH);
break;
@@ -820,7 +819,6 @@
boolean inTrack = false;
switch (mPosition) {
default:
- case View.SCROLLBAR_POSITION_DEFAULT:
case View.SCROLLBAR_POSITION_RIGHT:
inTrack = x > mList.getWidth() - mThumbW;
break;
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index 2391898d..4e114d8 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -345,28 +345,42 @@
void drawDividersHorizontal(Canvas canvas) {
final int count = getVirtualChildCount();
+ final boolean isLayoutRtl = isLayoutRtl();
for (int i = 0; i < count; i++) {
final View child = getVirtualChildAt(i);
if (child != null && child.getVisibility() != GONE) {
if (hasDividerBeforeChildAt(i)) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
- final int left = child.getLeft() - lp.leftMargin - mDividerWidth;
- drawVerticalDivider(canvas, left);
+ final int position;
+ if (isLayoutRtl) {
+ position = child.getRight() + lp.rightMargin;
+ } else {
+ position = child.getLeft() - lp.leftMargin - mDividerWidth;
+ }
+ drawVerticalDivider(canvas, position);
}
}
}
if (hasDividerBeforeChildAt(count)) {
final View child = getVirtualChildAt(count - 1);
- int right = 0;
+ int position;
if (child == null) {
- right = getWidth() - getPaddingRight() - mDividerWidth;
+ if (isLayoutRtl) {
+ position = getPaddingLeft();
+ } else {
+ position = getWidth() - getPaddingRight() - mDividerWidth;
+ }
} else {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
- right = child.getRight() + lp.rightMargin;
+ if (isLayoutRtl) {
+ position = child.getLeft() - lp.leftMargin - mDividerWidth;
+ } else {
+ position = child.getRight() + lp.rightMargin;
+ }
}
- drawVerticalDivider(canvas, right);
+ drawVerticalDivider(canvas, position);
}
}
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index a0e961f..c44ce8a 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -1595,8 +1595,8 @@
} catch (RuntimeException e2 ) {
rowNum = -1;
}
- Log.w(LOG_TAG, "Search Suggestions cursor at row " + rowNum +
- " returned exception" + e.toString());
+ Log.w(LOG_TAG, "Search suggestions cursor at row " + rowNum +
+ " returned exception.", e);
return null;
}
}
diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java
index 4c34d73..ac1d594 100644
--- a/core/java/com/android/internal/view/BaseIWindow.java
+++ b/core/java/com/android/internal/view/BaseIWindow.java
@@ -28,11 +28,12 @@
public class BaseIWindow extends IWindow.Stub {
private IWindowSession mSession;
public int mSeq;
-
+
public void setSession(IWindowSession session) {
mSession = session;
}
-
+
+ @Override
public void resized(int w, int h, Rect contentInsets,
Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
if (reportDraw) {
@@ -43,24 +44,35 @@
}
}
+ @Override
+ public void moved(int newX, int newY) {
+ }
+
+ @Override
public void dispatchAppVisibility(boolean visible) {
}
+ @Override
public void dispatchGetNewSurface() {
}
+ @Override
public void dispatchScreenState(boolean on) {
}
+ @Override
public void windowFocusChanged(boolean hasFocus, boolean touchEnabled) {
}
+ @Override
public void executeCommand(String command, String parameters, ParcelFileDescriptor out) {
}
-
+
+ @Override
public void closeSystemDialogs(String reason) {
}
-
+
+ @Override
public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, boolean sync) {
if (sync) {
try {
@@ -70,14 +82,17 @@
}
}
+ @Override
public void dispatchDragEvent(DragEvent event) {
}
+ @Override
public void dispatchSystemUiVisibilityChanged(int seq, int globalUi,
int localValue, int localChanges) {
mSeq = seq;
}
+ @Override
public void dispatchWallpaperCommand(String action, int x, int y,
int z, Bundle extras, boolean sync) {
if (sync) {
@@ -88,6 +103,7 @@
}
}
+ @Override
public void doneAnimating() {
}
}
diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
index 4e60b75..421e247 100644
--- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
@@ -214,8 +214,8 @@
mVibrationDuration);
mFeedbackCount = a.getInt(R.styleable.GlowPadView_feedbackCount,
mFeedbackCount);
- mHandleDrawable = new TargetDrawable(res,
- a.peekValue(R.styleable.GlowPadView_handleDrawable).resourceId);
+ TypedValue handle = a.peekValue(R.styleable.GlowPadView_handleDrawable);
+ mHandleDrawable = new TargetDrawable(res, handle != null ? handle.resourceId : 0);
mHandleDrawable.setState(TargetDrawable.STATE_INACTIVE);
mOuterRing = new TargetDrawable(res,
getResourceId(a, R.styleable.GlowPadView_outerRingDrawable));
@@ -717,7 +717,7 @@
startBackgroundAnimation(0, 0.0f);
stopAndHideWaveAnimation();
hideTargets(animate, false);
- hideGlow(0, 0, 1.0f, null);
+ hideGlow(0, 0, 0.0f, null);
Tweener.reset();
}
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 1f2b4ba..eb39b12 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -32,6 +32,7 @@
com_google_android_gles_jni_EGLImpl.cpp \
com_google_android_gles_jni_GLImpl.cpp.arm \
android_app_NativeActivity.cpp \
+ android_opengl_EGL14.cpp \
android_opengl_GLES10.cpp \
android_opengl_GLES10Ext.cpp \
android_opengl_GLES11.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 7a23747..532a6e5 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -68,6 +68,7 @@
extern int register_com_google_android_gles_jni_EGLImpl(JNIEnv* env);
extern int register_com_google_android_gles_jni_GLImpl(JNIEnv* env);
+extern int register_android_opengl_jni_EGL14(JNIEnv* env);
extern int register_android_opengl_jni_GLES10(JNIEnv* env);
extern int register_android_opengl_jni_GLES10Ext(JNIEnv* env);
extern int register_android_opengl_jni_GLES11(JNIEnv* env);
@@ -1105,6 +1106,7 @@
REG_JNI(register_android_view_TextureView),
REG_JNI(register_com_google_android_gles_jni_EGLImpl),
REG_JNI(register_com_google_android_gles_jni_GLImpl),
+ REG_JNI(register_android_opengl_jni_EGL14),
REG_JNI(register_android_opengl_jni_GLES10),
REG_JNI(register_android_opengl_jni_GLES10Ext),
REG_JNI(register_android_opengl_jni_GLES11),
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp
index 5466be4..2bdba87 100644
--- a/core/jni/android/graphics/TextLayoutCache.cpp
+++ b/core/jni/android/graphics/TextLayoutCache.cpp
@@ -345,26 +345,10 @@
void TextLayoutShaper::init() {
mDefaultTypeface = SkFontHost::CreateTypeface(NULL, NULL, NULL, 0, SkTypeface::kNormal);
- mArabicTypeface = NULL;
- mHebrewRegularTypeface = NULL;
- mHebrewBoldTypeface = NULL;
- mBengaliTypeface = NULL;
- mThaiTypeface = NULL;
- mDevanagariRegularTypeface = NULL;
- mTamilRegularTypeface = NULL;
- mTamilBoldTypeface = NULL;
}
void TextLayoutShaper::unrefTypefaces() {
SkSafeUnref(mDefaultTypeface);
- SkSafeUnref(mArabicTypeface);
- SkSafeUnref(mHebrewRegularTypeface);
- SkSafeUnref(mHebrewBoldTypeface);
- SkSafeUnref(mBengaliTypeface);
- SkSafeUnref(mThaiTypeface);
- SkSafeUnref(mDevanagariRegularTypeface);
- SkSafeUnref(mTamilRegularTypeface);
- SkSafeUnref(mTamilBoldTypeface);
}
TextLayoutShaper::~TextLayoutShaper() {
@@ -750,115 +734,32 @@
* assumption is that its lifetime is managed elsewhere - in particular, the fallback typefaces
* for the default font live in a global cache.
*/
-SkTypeface* TextLayoutShaper::typefaceForUnichar(const SkPaint* paint, SkTypeface* typeface,
- SkUnichar unichar, HB_Script script) {
- // Set the correct Typeface depending on the script
- switch (script) {
- case HB_Script_Arabic:
- typeface = getCachedTypeface(&mArabicTypeface, HB_Script_Arabic,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Arabic Typeface");
-#endif
- break;
-
- case HB_Script_Hebrew:
- if (typeface) {
- switch (typeface->style()) {
- case SkTypeface::kBold:
- case SkTypeface::kBoldItalic:
- typeface = getCachedTypeface(&mHebrewBoldTypeface, HB_Script_Hebrew,
- SkTypeface::kBold);
-#if DEBUG_GLYPHS
- ALOGD("Using Hebrew Bold/BoldItalic Typeface");
-#endif
- break;
-
- case SkTypeface::kNormal:
- case SkTypeface::kItalic:
- default:
- typeface = getCachedTypeface(&mHebrewRegularTypeface, HB_Script_Hebrew,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Hebrew Regular/Italic Typeface");
-#endif
- break;
- }
- } else {
- typeface = getCachedTypeface(&mHebrewRegularTypeface, HB_Script_Hebrew,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Hebrew Regular Typeface");
-#endif
- }
- break;
-
- case HB_Script_Bengali:
- typeface = getCachedTypeface(&mBengaliTypeface, HB_Script_Bengali,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Bengali Typeface");
-#endif
- break;
-
- case HB_Script_Thai:
- typeface = getCachedTypeface(&mThaiTypeface, HB_Script_Thai,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Thai Typeface");
-#endif
- break;
-
- case HB_Script_Devanagari:
- typeface = getCachedTypeface(&mDevanagariRegularTypeface, HB_Script_Devanagari,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Devanagari Regular Typeface");
-#endif
- break;
-
- case HB_Script_Tamil:
- if (typeface) {
- switch (typeface->style()) {
- case SkTypeface::kBold:
- case SkTypeface::kBoldItalic:
- typeface = getCachedTypeface(&mTamilBoldTypeface, HB_Script_Tamil,
- SkTypeface::kBold);
-#if DEBUG_GLYPHS
- ALOGD("Using Tamil Bold Typeface");
-#endif
- break;
-
- case SkTypeface::kNormal:
- case SkTypeface::kItalic:
- default:
- typeface = getCachedTypeface(&mTamilRegularTypeface, HB_Script_Tamil,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Tamil Regular Typeface");
-#endif
- break;
- }
- } else {
- typeface = getCachedTypeface(&mTamilRegularTypeface, HB_Script_Tamil,
- SkTypeface::kNormal);
-#if DEBUG_GLYPHS
- ALOGD("Using Tamil Regular Typeface");
-#endif
- }
- break;
-
- default:
-#if DEBUG_GLYPHS
- if (typeface) {
- ALOGD("Using Paint Typeface");
- }
-#endif
- break;
+SkTypeface* TextLayoutShaper::typefaceForScript(const SkPaint* paint, SkTypeface* typeface,
+ HB_Script script) {
+ SkTypeface::Style currentStyle = SkTypeface::kNormal;
+ if (typeface) {
+ currentStyle = typeface->style();
}
+ typeface = SkCreateTypefaceForScript(script, currentStyle);
+#if DEBUG_GLYPHS
+ ALOGD("Using Harfbuzz Script %d, Style %d", script, currentStyle);
+#endif
return typeface;
}
+bool TextLayoutShaper::isComplexScript(HB_Script script) {
+ switch (script) {
+ case HB_Script_Common:
+ case HB_Script_Greek:
+ case HB_Script_Cyrillic:
+ case HB_Script_Hangul:
+ case HB_Script_Inherited:
+ return false;
+ default:
+ return true;
+ }
+}
+
size_t TextLayoutShaper::shapeFontRun(const SkPaint* paint, bool isRTL) {
// Reset kerning
mShaperItem.kerning_applied = false;
@@ -874,37 +775,35 @@
// If we are a "common" script we dont need to shift
size_t baseGlyphCount = 0;
SkUnichar firstUnichar = 0;
- switch (mShaperItem.item.script) {
- case HB_Script_Arabic:
- case HB_Script_Hebrew:
- case HB_Script_Bengali:
- case HB_Script_Devanagari:
- case HB_Script_Tamil:
- case HB_Script_Thai:{
- const uint16_t* text16 = (const uint16_t*)(mShaperItem.string + mShaperItem.item.pos);
+ if (isComplexScript(mShaperItem.item.script)) {
+ const uint16_t* text16 = (const uint16_t*) (mShaperItem.string + mShaperItem.item.pos);
const uint16_t* text16End = text16 + mShaperItem.item.length;
firstUnichar = SkUTF16_NextUnichar(&text16);
while (firstUnichar == ' ' && text16 < text16End) {
firstUnichar = SkUTF16_NextUnichar(&text16);
}
baseGlyphCount = paint->getBaseGlyphCount(firstUnichar);
- break;
- }
- default:
- break;
}
- // We test the baseGlyphCount to see if the typeface supports the requested script
if (baseGlyphCount != 0) {
- typeface = typefaceForUnichar(paint, typeface, firstUnichar, mShaperItem.item.script);
+ typeface = typefaceForScript(paint, typeface, mShaperItem.item.script);
+ if (!typeface) {
+ typeface = mDefaultTypeface;
+ SkSafeRef(typeface);
+#if DEBUG_GLYPHS
+ ALOGD("Using Default Typeface");
+#endif
+ }
+ } else {
+ if (!typeface) {
+ typeface = mDefaultTypeface;
+#if DEBUG_GLYPHS
+ ALOGD("Using Default Typeface");
+#endif
+ }
+ SkSafeRef(typeface);
}
- if (!typeface) {
- typeface = mDefaultTypeface;
-#if DEBUG_GLYPHS
- ALOGD("Using Default Typeface");
-#endif
- }
mShapingPaint.setTypeface(typeface);
mShaperItem.face = getCachedHBFace(typeface);
@@ -912,6 +811,7 @@
ALOGD("Run typeface = %p, uniqueID = %d, hb_face = %p",
typeface, typeface->uniqueID(), mShaperItem.face);
#endif
+ SkSafeUnref(typeface);
// Shape
assert(mShaperItem.item.length > 0); // Harfbuzz will overwrite other memory if length is 0.
@@ -960,25 +860,6 @@
delete[] mShaperItem.log_clusters;
}
-SkTypeface* TextLayoutShaper::getCachedTypeface(SkTypeface** typeface, HB_Script script,
- SkTypeface::Style style) {
- if (!*typeface) {
- *typeface = SkCreateTypefaceForScript(script, style);
- // CreateFromFile(path) can return NULL if the path is non existing
- if (!*typeface) {
-#if DEBUG_GLYPHS
- ALOGD("No font for Harfbuzz script %d, will use default font", script);
-#endif
- return mDefaultTypeface;
- }
- (*typeface)->ref();
-#if DEBUG_GLYPHS
- ALOGD("Created SkTypeface for Harfbuzz script %d with uniqueID = %d", script, (*typeface)->uniqueID());
-#endif
- }
- return *typeface;
-}
-
HB_Face TextLayoutShaper::getCachedHBFace(SkTypeface* typeface) {
SkFontID fontId = typeface->uniqueID();
ssize_t index = mCachedHBFaces.indexOfKey(fontId);
diff --git a/core/jni/android/graphics/TextLayoutCache.h b/core/jni/android/graphics/TextLayoutCache.h
index 62d1796..0b25e93 100644
--- a/core/jni/android/graphics/TextLayoutCache.h
+++ b/core/jni/android/graphics/TextLayoutCache.h
@@ -189,17 +189,9 @@
SkPaint mShapingPaint;
/**
- * Skia typefaces cached for shaping
+ * Skia default typeface to be returned if we cannot resolve script
*/
SkTypeface* mDefaultTypeface;
- SkTypeface* mArabicTypeface;
- SkTypeface* mHebrewRegularTypeface;
- SkTypeface* mHebrewBoldTypeface;
- SkTypeface* mBengaliTypeface;
- SkTypeface* mThaiTypeface;
- SkTypeface* mDevanagariRegularTypeface;
- SkTypeface* mTamilRegularTypeface;
- SkTypeface* mTamilBoldTypeface;
/**
* Cache of Harfbuzz faces
@@ -224,8 +216,8 @@
void init();
void unrefTypefaces();
- SkTypeface* typefaceForUnichar(const SkPaint* paint, SkTypeface* typeface,
- SkUnichar unichar, HB_Script script);
+ SkTypeface* typefaceForScript(const SkPaint* paint, SkTypeface* typeface,
+ HB_Script script);
size_t shapeFontRun(const SkPaint* paint, bool isRTL);
@@ -245,6 +237,7 @@
bool doShaping(size_t size);
void createShaperItemGlyphArrays(size_t size);
void deleteShaperItemGlyphArrays();
+ bool isComplexScript(HB_Script script);
}; // TextLayoutShaper
diff --git a/core/jni/android_opengl_EGL14.cpp b/core/jni/android_opengl_EGL14.cpp
new file mode 100644
index 0000000..c271aeb
--- /dev/null
+++ b/core/jni/android_opengl_EGL14.cpp
@@ -0,0 +1,1247 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+// This source file is automatically generated
+
+#include "jni.h"
+#include "JNIHelp.h"
+#include <android_runtime/AndroidRuntime.h>
+#include <android_runtime/android_view_Surface.h>
+#include <android_runtime/android_graphics_SurfaceTexture.h>
+#include <utils/misc.h>
+
+#include <assert.h>
+#include <EGL/egl.h>
+
+#include <gui/Surface.h>
+#include <gui/SurfaceTexture.h>
+#include <gui/SurfaceTextureClient.h>
+
+#include <ui/ANativeObjectBase.h>
+
+static int initialized = 0;
+
+static jclass egldisplayClass;
+static jclass eglcontextClass;
+static jclass eglsurfaceClass;
+static jclass eglconfigClass;
+
+static jmethodID egldisplayGetHandleID;
+static jmethodID eglcontextGetHandleID;
+static jmethodID eglsurfaceGetHandleID;
+static jmethodID eglconfigGetHandleID;
+
+static jmethodID egldisplayConstructor;
+static jmethodID eglcontextConstructor;
+static jmethodID eglsurfaceConstructor;
+static jmethodID eglconfigConstructor;
+
+static jobject eglNoContextObject;
+static jobject eglNoDisplayObject;
+static jobject eglNoSurfaceObject;
+
+
+
+/* Cache method IDs each time the class is loaded. */
+
+static void
+nativeClassInit(JNIEnv *_env, jclass glImplClass)
+{
+ jclass egldisplayClassLocal = _env->FindClass("android/opengl/EGLDisplay");
+ egldisplayClass = (jclass) _env->NewGlobalRef(egldisplayClassLocal);
+ jclass eglcontextClassLocal = _env->FindClass("android/opengl/EGLContext");
+ eglcontextClass = (jclass) _env->NewGlobalRef(eglcontextClassLocal);
+ jclass eglsurfaceClassLocal = _env->FindClass("android/opengl/EGLSurface");
+ eglsurfaceClass = (jclass) _env->NewGlobalRef(eglsurfaceClassLocal);
+ jclass eglconfigClassLocal = _env->FindClass("android/opengl/EGLConfig");
+ eglconfigClass = (jclass) _env->NewGlobalRef(eglconfigClassLocal);
+
+ egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getHandle", "()I");
+ eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getHandle", "()I");
+ eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getHandle", "()I");
+ eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getHandle", "()I");
+
+
+ egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(I)V");
+ eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(I)V");
+ eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(I)V");
+ eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(I)V");
+
+ jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, (jint)EGL_NO_CONTEXT);
+ eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject);
+ jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, (jint)EGL_NO_DISPLAY);
+ eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject);
+ jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, (jint)EGL_NO_SURFACE);
+ eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject);
+
+
+ jclass eglClass = _env->FindClass("android/opengl/EGL14");
+ jfieldID noContextFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_CONTEXT", "Landroid/opengl/EGLContext;");
+ _env->SetStaticObjectField(eglClass, noContextFieldID, eglNoContextObject);
+
+ jfieldID noDisplayFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_DISPLAY", "Landroid/opengl/EGLDisplay;");
+ _env->SetStaticObjectField(eglClass, noDisplayFieldID, eglNoDisplayObject);
+
+ jfieldID noSurfaceFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_SURFACE", "Landroid/opengl/EGLSurface;");
+ _env->SetStaticObjectField(eglClass, noSurfaceFieldID, eglNoSurfaceObject);
+}
+
+static void *
+fromEGLHandle(JNIEnv *_env, jmethodID mid, jobject obj) {
+ if (obj == NULL){
+ jniThrowException(_env, "java/lang/IllegalArgumentException",
+ "Object is set to null.");
+ }
+
+ return (void*) (_env->CallIntMethod(obj, mid));
+}
+
+static jobject
+toEGLHandle(JNIEnv *_env, jclass cls, jmethodID con, void * handle) {
+ if (cls == eglcontextClass &&
+ (EGLContext)handle == EGL_NO_CONTEXT) {
+ return eglNoContextObject;
+ }
+
+ if (cls == egldisplayClass &&
+ (EGLDisplay)handle == EGL_NO_DISPLAY) {
+ return eglNoDisplayObject;
+ }
+
+ if (cls == eglsurfaceClass &&
+ (EGLSurface)handle == EGL_NO_SURFACE) {
+ return eglNoSurfaceObject;
+ }
+
+ return _env->NewObject(cls, con, (jint)handle);
+}
+
+// --------------------------------------------------------------------------
+/* EGLint eglGetError ( void ) */
+static jint
+android_eglGetError
+ (JNIEnv *_env, jobject _this) {
+ EGLint _returnValue = (EGLint) 0;
+ _returnValue = eglGetError();
+ return _returnValue;
+}
+
+/* EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
+static jobject
+android_eglGetDisplay
+ (JNIEnv *_env, jobject _this, jint display_id) {
+ EGLDisplay _returnValue = (EGLDisplay) 0;
+ _returnValue = eglGetDisplay(
+ (EGLNativeDisplayType)display_id
+ );
+ return toEGLHandle(_env, egldisplayClass, egldisplayConstructor, _returnValue);
+}
+
+/* EGLBoolean eglInitialize ( EGLDisplay dpy, EGLint *major, EGLint *minor ) */
+static jboolean
+android_eglInitialize
+ (JNIEnv *_env, jobject _this, jobject dpy, jintArray major_ref, jint majorOffset, jintArray minor_ref, jint minorOffset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLint *major_base = (EGLint *) 0;
+ jint _majorRemaining;
+ EGLint *major = (EGLint *) 0;
+ EGLint *minor_base = (EGLint *) 0;
+ jint _minorRemaining;
+ EGLint *minor = (EGLint *) 0;
+
+ if (!major_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "major == null";
+ goto exit;
+ }
+ if (majorOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "majorOffset < 0";
+ goto exit;
+ }
+ _majorRemaining = _env->GetArrayLength(major_ref) - majorOffset;
+ if (_majorRemaining < 1) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - majorOffset < 1 < needed";
+ goto exit;
+ }
+ major_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(major_ref, (jboolean *)0);
+ major = major_base + majorOffset;
+
+ if (!minor_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "minor == null";
+ goto exit;
+ }
+ if (minorOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "minorOffset < 0";
+ goto exit;
+ }
+ _minorRemaining = _env->GetArrayLength(minor_ref) - minorOffset;
+ if (_minorRemaining < 1) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - minorOffset < 1 < needed";
+ goto exit;
+ }
+ minor_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(minor_ref, (jboolean *)0);
+ minor = minor_base + minorOffset;
+
+ _returnValue = eglInitialize(
+ (EGLDisplay)dpy_native,
+ (EGLint *)major,
+ (EGLint *)minor
+ );
+
+exit:
+ if (minor_base) {
+ _env->ReleasePrimitiveArrayCritical(minor_ref, minor_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (major_base) {
+ _env->ReleasePrimitiveArrayCritical(major_ref, major_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return _returnValue;
+}
+
+/* EGLBoolean eglTerminate ( EGLDisplay dpy ) */
+static jboolean
+android_eglTerminate
+ (JNIEnv *_env, jobject _this, jobject dpy) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+
+ _returnValue = eglTerminate(
+ (EGLDisplay)dpy_native
+ );
+ return _returnValue;
+}
+
+/* const char * eglQueryString ( EGLDisplay dpy, EGLint name ) */
+static jstring
+android_eglQueryString__Landroind_opengl_EGLDisplay_2I
+ (JNIEnv *_env, jobject _this, jobject dpy, jint name) {
+ const char* chars = (const char*) eglQueryString(
+ (EGLDisplay)fromEGLHandle(_env, egldisplayGetHandleID, dpy),
+ (EGLint)name
+ );
+ return _env->NewStringUTF(chars);
+}
+/* EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+static jboolean
+android_eglGetConfigs
+ (JNIEnv *_env, jobject _this, jobject dpy, jobjectArray configs_ref, jint configsOffset, jint config_size, jintArray num_config_ref, jint num_configOffset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ jint _configsRemaining;
+ EGLConfig *configs = (EGLConfig *) 0;
+ EGLint *num_config_base = (EGLint *) 0;
+ jint _num_configRemaining;
+ EGLint *num_config = (EGLint *) 0;
+
+ if (!configs_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "configs == null";
+ goto exit;
+ }
+ if (configsOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "configsOffset < 0";
+ goto exit;
+ }
+ _configsRemaining = _env->GetArrayLength(configs_ref) - configsOffset;
+ if (_configsRemaining < config_size) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - configsOffset < config_size < needed";
+ goto exit;
+ }
+ configs = new EGLConfig[_configsRemaining];
+
+ if (!num_config_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "num_config == null";
+ goto exit;
+ }
+ if (num_configOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "num_configOffset < 0";
+ goto exit;
+ }
+ _num_configRemaining = _env->GetArrayLength(num_config_ref) - num_configOffset;
+ num_config_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(num_config_ref, (jboolean *)0);
+ num_config = num_config_base + num_configOffset;
+
+ _returnValue = eglGetConfigs(
+ (EGLDisplay)dpy_native,
+ (EGLConfig *)configs,
+ (EGLint)config_size,
+ (EGLint *)num_config
+ );
+
+exit:
+ if (num_config_base) {
+ _env->ReleasePrimitiveArrayCritical(num_config_ref, num_config_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (configs) {
+ for (int i = 0; i < _configsRemaining; i++) {
+ jobject configs_new = toEGLHandle(_env, eglconfigClass, eglconfigConstructor, configs[i]);
+ _env->SetObjectArrayElement(configs_ref, i + configsOffset, configs_new);
+ }
+ delete[] configs;
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return _returnValue;
+}
+
+/* EGLBoolean eglChooseConfig ( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+static jboolean
+android_eglChooseConfig
+ (JNIEnv *_env, jobject _this, jobject dpy, jintArray attrib_list_ref, jint attrib_listOffset, jobjectArray configs_ref, jint configsOffset, jint config_size, jintArray num_config_ref, jint num_configOffset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ bool attrib_list_sentinel = false;
+ EGLint *attrib_list_base = (EGLint *) 0;
+ jint _attrib_listRemaining;
+ EGLint *attrib_list = (EGLint *) 0;
+ jint _configsRemaining;
+ EGLConfig *configs = (EGLConfig *) 0;
+ EGLint *num_config_base = (EGLint *) 0;
+ jint _num_configRemaining;
+ EGLint *num_config = (EGLint *) 0;
+
+ if (!attrib_list_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list == null";
+ goto exit;
+ }
+ if (attrib_listOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_listOffset < 0";
+ goto exit;
+ }
+ _attrib_listRemaining = _env->GetArrayLength(attrib_list_ref) - attrib_listOffset;
+ attrib_list_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+ attrib_list = attrib_list_base + attrib_listOffset;
+ attrib_list_sentinel = false;
+ for (int i = _attrib_listRemaining - 1; i >= 0; i--) {
+ if (attrib_list[i] == EGL_NONE){
+ attrib_list_sentinel = true;
+ break;
+ }
+ }
+ if (attrib_list_sentinel == false) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list must contain EGL_NONE!";
+ goto exit;
+ }
+
+ if (!configs_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "configs == null";
+ goto exit;
+ }
+ if (configsOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "configsOffset < 0";
+ goto exit;
+ }
+ _configsRemaining = _env->GetArrayLength(configs_ref) - configsOffset;
+ if (_configsRemaining < config_size) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - configsOffset < config_size < needed";
+ goto exit;
+ }
+ configs = new EGLConfig[_configsRemaining];
+
+ if (!num_config_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "num_config == null";
+ goto exit;
+ }
+ if (num_configOffset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "num_configOffset < 0";
+ goto exit;
+ }
+ _num_configRemaining = _env->GetArrayLength(num_config_ref) - num_configOffset;
+ if (_num_configRemaining < 1) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - num_configOffset < 1 < needed";
+ goto exit;
+ }
+ num_config_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(num_config_ref, (jboolean *)0);
+ num_config = num_config_base + num_configOffset;
+
+ _returnValue = eglChooseConfig(
+ (EGLDisplay)dpy_native,
+ (EGLint *)attrib_list,
+ (EGLConfig *)configs,
+ (EGLint)config_size,
+ (EGLint *)num_config
+ );
+
+exit:
+ if (num_config_base) {
+ _env->ReleasePrimitiveArrayCritical(num_config_ref, num_config_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (attrib_list_base) {
+ _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+ JNI_ABORT);
+ }
+ if (configs) {
+ for (int i = 0; i < _configsRemaining; i++) {
+ jobject configs_new = toEGLHandle(_env, eglconfigClass, eglconfigConstructor, configs[i]);
+ _env->SetObjectArrayElement(configs_ref, i + configsOffset, configs_new);
+ }
+ delete[] configs;
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return _returnValue;
+}
+
+/* EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value ) */
+static jboolean
+android_eglGetConfigAttrib
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jint attribute, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+ EGLint *value_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *value = (EGLint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ if (_remaining < 1) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
+ goto exit;
+ }
+ value_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ _returnValue = eglGetConfigAttrib(
+ (EGLDisplay)dpy_native,
+ (EGLConfig)config_native,
+ (EGLint)attribute,
+ (EGLint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return _returnValue;
+}
+
+/* EGLSurface eglCreateWindowSurface ( EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list ) */
+static jobject
+android_eglCreateWindowSurface
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jobject win, jintArray attrib_list_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = "";
+ const char * _exceptionMessage = "";
+ EGLSurface _returnValue = (EGLSurface) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+ int attrib_list_sentinel = 0;
+ EGLint *attrib_list_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *attrib_list = (EGLint *) 0;
+ android::sp<ANativeWindow> window;
+
+ if (!attrib_list_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ if (win == NULL) {
+not_valid_surface:
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "Make sure the SurfaceView or associated SurfaceHolder has a valid Surface";
+ goto exit;
+ }
+
+ window = android::android_Surface_getNativeWindow(_env, win);
+
+ if (window == NULL)
+ goto not_valid_surface;
+
+ _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
+ attrib_list_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+ attrib_list = attrib_list_base + offset;
+ attrib_list_sentinel = 0;
+ for (int i = _remaining - 1; i >= 0; i--) {
+ if (*((EGLint*)(attrib_list + i)) == EGL_NONE){
+ attrib_list_sentinel = 1;
+ break;
+ }
+ }
+ if (attrib_list_sentinel == 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list must contain EGL_NONE!";
+ goto exit;
+ }
+
+ _returnValue = eglCreateWindowSurface(
+ (EGLDisplay)dpy_native,
+ (EGLConfig)config_native,
+ (EGLNativeWindowType)window.get(),
+ (EGLint *)attrib_list
+ );
+
+exit:
+ if (attrib_list_base) {
+ _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
+}
+
+/* EGLSurface eglCreateWindowSurface ( EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list ) */
+static jobject
+android_eglCreateWindowSurfaceTexture
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jobject win, jintArray attrib_list_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType = "";
+ const char * _exceptionMessage = "";
+ EGLSurface _returnValue = (EGLSurface) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+ int attrib_list_sentinel = 0;
+ EGLint *attrib_list_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *attrib_list = (EGLint *) 0;
+ android::sp<ANativeWindow> window;
+ android::sp<android::SurfaceTexture> surfaceTexture;
+
+ if (!attrib_list_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ if (win == NULL) {
+not_valid_surface:
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "Make sure the SurfaceView or associated SurfaceHolder has a valid Surface";
+ goto exit;
+ }
+ surfaceTexture = android::SurfaceTexture_getSurfaceTexture(_env, win);
+ window = new android::SurfaceTextureClient(surfaceTexture);
+
+ if (window == NULL)
+ goto not_valid_surface;
+
+ _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
+ attrib_list_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+ attrib_list = attrib_list_base + offset;
+ attrib_list_sentinel = 0;
+ for (int i = _remaining - 1; i >= 0; i--) {
+ if (*((EGLint*)(attrib_list + i)) == EGL_NONE){
+ attrib_list_sentinel = 1;
+ break;
+ }
+ }
+ if (attrib_list_sentinel == 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list must contain EGL_NONE!";
+ goto exit;
+ }
+
+ _returnValue = eglCreateWindowSurface(
+ (EGLDisplay)dpy_native,
+ (EGLConfig)config_native,
+ (EGLNativeWindowType)window.get(),
+ (EGLint *)attrib_list
+ );
+
+exit:
+ if (attrib_list_base) {
+ _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
+}
+/* EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list ) */
+static jobject
+android_eglCreatePbufferSurface
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jintArray attrib_list_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLSurface _returnValue = (EGLSurface) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+ bool attrib_list_sentinel = false;
+ EGLint *attrib_list_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *attrib_list = (EGLint *) 0;
+
+ if (!attrib_list_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
+ attrib_list_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+ attrib_list = attrib_list_base + offset;
+ attrib_list_sentinel = false;
+ for (int i = _remaining - 1; i >= 0; i--) {
+ if (attrib_list[i] == EGL_NONE){
+ attrib_list_sentinel = true;
+ break;
+ }
+ }
+ if (attrib_list_sentinel == false) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list must contain EGL_NONE!";
+ goto exit;
+ }
+
+ _returnValue = eglCreatePbufferSurface(
+ (EGLDisplay)dpy_native,
+ (EGLConfig)config_native,
+ (EGLint *)attrib_list
+ );
+
+exit:
+ if (attrib_list_base) {
+ _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
+}
+
+/* EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) */
+static jobject
+android_eglCreatePixmapSurface
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jint pixmap, jintArray attrib_list_ref, jint offset) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException",
+ "eglCreatePixmapSurface");
+ return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, (EGLSurface) 0);
+}
+
+/* EGLBoolean eglDestroySurface ( EGLDisplay dpy, EGLSurface surface ) */
+static jboolean
+android_eglDestroySurface
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface surface_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, surface);
+
+ _returnValue = eglDestroySurface(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)surface_native
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglQuerySurface ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value ) */
+static jboolean
+android_eglQuerySurface
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface, jint attribute, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface surface_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, surface);
+ EGLint *value_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *value = (EGLint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ if (_remaining < 1) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
+ goto exit;
+ }
+ value_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ _returnValue = eglQuerySurface(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)surface_native,
+ (EGLint)attribute,
+ (EGLint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return _returnValue;
+}
+
+/* EGLBoolean eglBindAPI ( EGLenum api ) */
+static jboolean
+android_eglBindAPI
+ (JNIEnv *_env, jobject _this, jint api) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ _returnValue = eglBindAPI(
+ (EGLenum)api
+ );
+ return _returnValue;
+}
+
+/* EGLenum eglQueryAPI ( void ) */
+static jint
+android_eglQueryAPI
+ (JNIEnv *_env, jobject _this) {
+ EGLenum _returnValue = (EGLenum) 0;
+ _returnValue = eglQueryAPI();
+ return _returnValue;
+}
+
+/* EGLBoolean eglWaitClient ( void ) */
+static jboolean
+android_eglWaitClient
+ (JNIEnv *_env, jobject _this) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ _returnValue = eglWaitClient();
+ return _returnValue;
+}
+
+/* EGLBoolean eglReleaseThread ( void ) */
+static jboolean
+android_eglReleaseThread
+ (JNIEnv *_env, jobject _this) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ _returnValue = eglReleaseThread();
+ return _returnValue;
+}
+
+/* EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ) */
+static jobject
+android_eglCreatePbufferFromClientBuffer
+ (JNIEnv *_env, jobject _this, jobject dpy, jint buftype, jint buffer, jobject config, jintArray attrib_list_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLSurface _returnValue = (EGLSurface) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+ bool attrib_list_sentinel = false;
+ EGLint *attrib_list_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *attrib_list = (EGLint *) 0;
+
+ if (!attrib_list_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
+ attrib_list_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+ attrib_list = attrib_list_base + offset;
+ attrib_list_sentinel = false;
+ for (int i = _remaining - 1; i >= 0; i--) {
+ if (attrib_list[i] == EGL_NONE){
+ attrib_list_sentinel = true;
+ break;
+ }
+ }
+ if (attrib_list_sentinel == false) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list must contain EGL_NONE!";
+ goto exit;
+ }
+
+ _returnValue = eglCreatePbufferFromClientBuffer(
+ (EGLDisplay)dpy_native,
+ (EGLenum)buftype,
+ (EGLClientBuffer)buffer,
+ (EGLConfig)config_native,
+ (EGLint *)attrib_list
+ );
+
+exit:
+ if (attrib_list_base) {
+ _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
+}
+
+/* EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value ) */
+static jboolean
+android_eglSurfaceAttrib
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface, jint attribute, jint value) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface surface_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, surface);
+
+ _returnValue = eglSurfaceAttrib(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)surface_native,
+ (EGLint)attribute,
+ (EGLint)value
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+static jboolean
+android_eglBindTexImage
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface, jint buffer) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface surface_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, surface);
+
+ _returnValue = eglBindTexImage(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)surface_native,
+ (EGLint)buffer
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+static jboolean
+android_eglReleaseTexImage
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface, jint buffer) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface surface_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, surface);
+
+ _returnValue = eglReleaseTexImage(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)surface_native,
+ (EGLint)buffer
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglSwapInterval ( EGLDisplay dpy, EGLint interval ) */
+static jboolean
+android_eglSwapInterval
+ (JNIEnv *_env, jobject _this, jobject dpy, jint interval) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+
+ _returnValue = eglSwapInterval(
+ (EGLDisplay)dpy_native,
+ (EGLint)interval
+ );
+ return _returnValue;
+}
+
+/* EGLContext eglCreateContext ( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list ) */
+static jobject
+android_eglCreateContext
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jobject share_context, jintArray attrib_list_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLContext _returnValue = (EGLContext) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
+ EGLContext share_context_native = (EGLContext) fromEGLHandle(_env, eglcontextGetHandleID, share_context);
+ bool attrib_list_sentinel = false;
+ EGLint *attrib_list_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *attrib_list = (EGLint *) 0;
+
+ if (!attrib_list_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
+ attrib_list_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(attrib_list_ref, (jboolean *)0);
+ attrib_list = attrib_list_base + offset;
+ attrib_list_sentinel = false;
+ for (int i = _remaining - 1; i >= 0; i--) {
+ if (attrib_list[i] == EGL_NONE){
+ attrib_list_sentinel = true;
+ break;
+ }
+ }
+ if (attrib_list_sentinel == false) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "attrib_list must contain EGL_NONE!";
+ goto exit;
+ }
+
+ _returnValue = eglCreateContext(
+ (EGLDisplay)dpy_native,
+ (EGLConfig)config_native,
+ (EGLContext)share_context_native,
+ (EGLint *)attrib_list
+ );
+
+exit:
+ if (attrib_list_base) {
+ _env->ReleasePrimitiveArrayCritical(attrib_list_ref, attrib_list_base,
+ JNI_ABORT);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return toEGLHandle(_env, eglcontextClass, eglcontextConstructor, _returnValue);
+}
+
+/* EGLBoolean eglDestroyContext ( EGLDisplay dpy, EGLContext ctx ) */
+static jboolean
+android_eglDestroyContext
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject ctx) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLContext ctx_native = (EGLContext) fromEGLHandle(_env, eglcontextGetHandleID, ctx);
+
+ _returnValue = eglDestroyContext(
+ (EGLDisplay)dpy_native,
+ (EGLContext)ctx_native
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglMakeCurrent ( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx ) */
+static jboolean
+android_eglMakeCurrent
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject draw, jobject read, jobject ctx) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface draw_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, draw);
+ EGLSurface read_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, read);
+ EGLContext ctx_native = (EGLContext) fromEGLHandle(_env, eglcontextGetHandleID, ctx);
+
+ _returnValue = eglMakeCurrent(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)draw_native,
+ (EGLSurface)read_native,
+ (EGLContext)ctx_native
+ );
+ return _returnValue;
+}
+
+/* EGLContext eglGetCurrentContext ( void ) */
+static jobject
+android_eglGetCurrentContext
+ (JNIEnv *_env, jobject _this) {
+ EGLContext _returnValue = (EGLContext) 0;
+ _returnValue = eglGetCurrentContext();
+ return toEGLHandle(_env, eglcontextClass, eglcontextConstructor, _returnValue);
+}
+
+/* EGLSurface eglGetCurrentSurface ( EGLint readdraw ) */
+static jobject
+android_eglGetCurrentSurface
+ (JNIEnv *_env, jobject _this, jint readdraw) {
+ EGLSurface _returnValue = (EGLSurface) 0;
+ _returnValue = eglGetCurrentSurface(
+ (EGLint)readdraw
+ );
+ return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
+}
+
+/* EGLDisplay eglGetCurrentDisplay ( void ) */
+static jobject
+android_eglGetCurrentDisplay
+ (JNIEnv *_env, jobject _this) {
+ EGLDisplay _returnValue = (EGLDisplay) 0;
+ _returnValue = eglGetCurrentDisplay();
+ return toEGLHandle(_env, egldisplayClass, egldisplayConstructor, _returnValue);
+}
+
+/* EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value ) */
+static jboolean
+android_eglQueryContext
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject ctx, jint attribute, jintArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLContext ctx_native = (EGLContext) fromEGLHandle(_env, eglcontextGetHandleID, ctx);
+ EGLint *value_base = (EGLint *) 0;
+ jint _remaining;
+ EGLint *value = (EGLint *) 0;
+
+ if (!value_ref) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
+ goto exit;
+ }
+ if (offset < 0) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
+ goto exit;
+ }
+ _remaining = _env->GetArrayLength(value_ref) - offset;
+ if (_remaining < 1) {
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
+ goto exit;
+ }
+ value_base = (EGLint *)
+ _env->GetPrimitiveArrayCritical(value_ref, (jboolean *)0);
+ value = value_base + offset;
+
+ _returnValue = eglQueryContext(
+ (EGLDisplay)dpy_native,
+ (EGLContext)ctx_native,
+ (EGLint)attribute,
+ (EGLint *)value
+ );
+
+exit:
+ if (value_base) {
+ _env->ReleasePrimitiveArrayCritical(value_ref, value_base,
+ _exception ? JNI_ABORT: 0);
+ }
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
+ return _returnValue;
+}
+
+/* EGLBoolean eglWaitGL ( void ) */
+static jboolean
+android_eglWaitGL
+ (JNIEnv *_env, jobject _this) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ _returnValue = eglWaitGL();
+ return _returnValue;
+}
+
+/* EGLBoolean eglWaitNative ( EGLint engine ) */
+static jboolean
+android_eglWaitNative
+ (JNIEnv *_env, jobject _this, jint engine) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ _returnValue = eglWaitNative(
+ (EGLint)engine
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface ) */
+static jboolean
+android_eglSwapBuffers
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface) {
+ EGLBoolean _returnValue = (EGLBoolean) 0;
+ EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
+ EGLSurface surface_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, surface);
+
+ _returnValue = eglSwapBuffers(
+ (EGLDisplay)dpy_native,
+ (EGLSurface)surface_native
+ );
+ return _returnValue;
+}
+
+/* EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target ) */
+static jboolean
+android_eglCopyBuffers
+ (JNIEnv *_env, jobject _this, jobject dpy, jobject surface, jint target) {
+ jniThrowException(_env, "java/lang/UnsupportedOperationException",
+ "eglCopyBuffers");
+ return (EGLBoolean) 0;
+}
+
+static const char *classPathName = "android/opengl/EGL14";
+
+static JNINativeMethod methods[] = {
+{"_nativeClassInit", "()V", (void*)nativeClassInit },
+{"eglGetError", "()I", (void *) android_eglGetError },
+{"eglGetDisplay", "(I)Landroid/opengl/EGLDisplay;", (void *) android_eglGetDisplay },
+{"eglInitialize", "(Landroid/opengl/EGLDisplay;[II[II)Z", (void *) android_eglInitialize },
+{"eglTerminate", "(Landroid/opengl/EGLDisplay;)Z", (void *) android_eglTerminate },
+{"eglQueryString", "(Landroid/opengl/EGLDisplay;I)Ljava/lang/String;", (void *) android_eglQueryString__Landroind_opengl_EGLDisplay_2I },
+{"eglGetConfigs", "(Landroid/opengl/EGLDisplay;[Landroid/opengl/EGLConfig;II[II)Z", (void *) android_eglGetConfigs },
+{"eglChooseConfig", "(Landroid/opengl/EGLDisplay;[II[Landroid/opengl/EGLConfig;II[II)Z", (void *) android_eglChooseConfig },
+{"eglGetConfigAttrib", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;I[II)Z", (void *) android_eglGetConfigAttrib },
+{"_eglCreateWindowSurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;Ljava/lang/Object;[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreateWindowSurface },
+{"_eglCreateWindowSurfaceTexture", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;Ljava/lang/Object;[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreateWindowSurfaceTexture },
+{"eglCreatePbufferSurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePbufferSurface },
+{"eglCreatePixmapSurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;I[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePixmapSurface },
+{"eglDestroySurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;)Z", (void *) android_eglDestroySurface },
+{"eglQuerySurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;I[II)Z", (void *) android_eglQuerySurface },
+{"eglBindAPI", "(I)Z", (void *) android_eglBindAPI },
+{"eglQueryAPI", "()I", (void *) android_eglQueryAPI },
+{"eglWaitClient", "()Z", (void *) android_eglWaitClient },
+{"eglReleaseThread", "()Z", (void *) android_eglReleaseThread },
+{"eglCreatePbufferFromClientBuffer", "(Landroid/opengl/EGLDisplay;IILandroid/opengl/EGLConfig;[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePbufferFromClientBuffer },
+{"eglSurfaceAttrib", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;II)Z", (void *) android_eglSurfaceAttrib },
+{"eglBindTexImage", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;I)Z", (void *) android_eglBindTexImage },
+{"eglReleaseTexImage", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;I)Z", (void *) android_eglReleaseTexImage },
+{"eglSwapInterval", "(Landroid/opengl/EGLDisplay;I)Z", (void *) android_eglSwapInterval },
+{"eglCreateContext", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;Landroid/opengl/EGLContext;[II)Landroid/opengl/EGLContext;", (void *) android_eglCreateContext },
+{"eglDestroyContext", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLContext;)Z", (void *) android_eglDestroyContext },
+{"eglMakeCurrent", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;Landroid/opengl/EGLSurface;Landroid/opengl/EGLContext;)Z", (void *) android_eglMakeCurrent },
+{"eglGetCurrentContext", "()Landroid/opengl/EGLContext;", (void *) android_eglGetCurrentContext },
+{"eglGetCurrentSurface", "(I)Landroid/opengl/EGLSurface;", (void *) android_eglGetCurrentSurface },
+{"eglGetCurrentDisplay", "()Landroid/opengl/EGLDisplay;", (void *) android_eglGetCurrentDisplay },
+{"eglQueryContext", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLContext;I[II)Z", (void *) android_eglQueryContext },
+{"eglWaitGL", "()Z", (void *) android_eglWaitGL },
+{"eglWaitNative", "(I)Z", (void *) android_eglWaitNative },
+{"eglSwapBuffers", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;)Z", (void *) android_eglSwapBuffers },
+{"eglCopyBuffers", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;I)Z", (void *) android_eglCopyBuffers },
+};
+
+int register_android_opengl_jni_EGL14(JNIEnv *_env)
+{
+ int err;
+ err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));
+ return err;
+}
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp
index 6c29d6c..73696ec 100644
--- a/core/jni/android_opengl_GLES10.cpp
+++ b/core/jni/android_opengl_GLES10.cpp
@@ -404,21 +404,30 @@
static void
android_glDeleteTextures__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *textures_base = (GLuint *) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "textures == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(textures_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
textures_base = (GLuint *)
@@ -435,19 +444,27 @@
_env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
static void
android_glDeleteTextures__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteTextures(
@@ -459,6 +476,9 @@
if (_array) {
releasePointer(_env, _array, textures, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDepthFunc ( GLenum func ) */
@@ -532,13 +552,18 @@
static void
android_glDrawElements__IIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
if (_remaining < count) {
- jniThrowException(_env, "java/lang/ArrayIndexOutOfBoundsException", "remaining() < count");
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "remaining() < count < needed";
goto exit;
}
glDrawElements(
@@ -552,6 +577,9 @@
if (_array) {
releasePointer(_env, _array, indices, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glEnable ( GLenum cap ) */
@@ -600,16 +628,23 @@
static void
android_glFogfv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -639,7 +674,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -656,12 +693,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogfv ( GLenum pname, const GLfloat *params ) */
static void
android_glFogfv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -693,7 +736,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glFogfv(
@@ -705,6 +750,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogx ( GLenum pname, GLfixed param ) */
@@ -721,16 +769,23 @@
static void
android_glFogxv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -760,7 +815,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -777,12 +834,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogxv ( GLenum pname, const GLfixed *params ) */
static void
android_glFogxv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -814,7 +877,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glFogxv(
@@ -826,6 +891,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFrontFace ( GLenum mode ) */
@@ -870,24 +938,29 @@
android_glGenTextures__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *textures_base = (GLuint *) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "textures == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(textures_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
textures_base = (GLuint *)
@@ -904,6 +977,9 @@
_env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenTextures ( GLsizei n, GLuint *textures ) */
@@ -911,6 +987,8 @@
android_glGenTextures__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
@@ -918,7 +996,8 @@
textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenTextures(
@@ -930,6 +1009,9 @@
if (_array) {
releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLenum glGetError ( void ) */
@@ -946,18 +1028,22 @@
android_glGetIntegerv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1294,7 +1380,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -1311,6 +1398,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetIntegerv ( GLenum pname, GLint *params ) */
@@ -1318,6 +1408,8 @@
android_glGetIntegerv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1656,7 +1748,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetIntegerv(
@@ -1668,6 +1761,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* const GLubyte * glGetString ( GLenum name ) */
@@ -1699,16 +1795,23 @@
static void
android_glLightModelfv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1729,7 +1832,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1746,12 +1851,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
static void
android_glLightModelfv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -1774,7 +1885,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightModelfv(
@@ -1786,6 +1899,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelx ( GLenum pname, GLfixed param ) */
@@ -1802,16 +1918,23 @@
static void
android_glLightModelxv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1832,7 +1955,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -1849,12 +1974,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
static void
android_glLightModelxv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1877,7 +2008,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightModelxv(
@@ -1889,6 +2022,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */
@@ -1906,16 +2042,23 @@
static void
android_glLightfv__II_3FI
(JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1962,7 +2105,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1980,12 +2125,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
static void
android_glLightfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2034,7 +2185,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightfv(
@@ -2047,6 +2200,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */
@@ -2064,16 +2220,23 @@
static void
android_glLightxv__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2120,7 +2283,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -2138,12 +2303,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
static void
android_glLightxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -2192,7 +2363,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightxv(
@@ -2205,6 +2378,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLineWidth ( GLfloat width ) */
@@ -2236,16 +2412,23 @@
static void
android_glLoadMatrixf___3FI
(JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *m_base = (GLfloat *) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2262,6 +2445,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLoadMatrixf ( const GLfloat *m ) */
@@ -2285,16 +2471,23 @@
static void
android_glLoadMatrixx___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2311,6 +2504,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLoadMatrixx ( const GLfixed *m ) */
@@ -2354,16 +2550,23 @@
static void
android_glMaterialfv__II_3FI
(JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2396,7 +2599,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -2414,12 +2619,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
static void
android_glMaterialfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2454,7 +2665,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glMaterialfv(
@@ -2467,6 +2680,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */
@@ -2484,16 +2700,23 @@
static void
android_glMaterialxv__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2526,7 +2749,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -2544,12 +2769,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
static void
android_glMaterialxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -2584,7 +2815,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glMaterialxv(
@@ -2597,6 +2830,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMatrixMode ( GLenum mode ) */
@@ -2612,16 +2848,23 @@
static void
android_glMultMatrixf___3FI
(JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *m_base = (GLfloat *) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2638,6 +2881,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMultMatrixf ( const GLfloat *m ) */
@@ -2661,16 +2907,23 @@
static void
android_glMultMatrixx___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2687,6 +2940,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMultMatrixx ( const GLfixed *m ) */
@@ -2870,7 +3126,6 @@
static void
android_glReadPixels__IIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
@@ -2886,7 +3141,7 @@
(GLvoid *)pixels
);
if (_array) {
- releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, pixels, JNI_TRUE);
}
}
@@ -3046,16 +3301,23 @@
static void
android_glTexEnvfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3082,7 +3344,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -3100,12 +3364,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexEnvfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -3134,7 +3404,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glTexEnvfv(
@@ -3147,6 +3419,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */
@@ -3164,16 +3439,23 @@
static void
android_glTexEnvxv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3200,7 +3482,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -3218,12 +3502,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
static void
android_glTexEnvxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -3252,7 +3542,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glTexEnvxv(
@@ -3265,6 +3557,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
diff --git a/core/jni/android_opengl_GLES10Ext.cpp b/core/jni/android_opengl_GLES10Ext.cpp
index 1154cef..16a884a 100644
--- a/core/jni/android_opengl_GLES10Ext.cpp
+++ b/core/jni/android_opengl_GLES10Ext.cpp
@@ -106,6 +106,8 @@
android_glQueryMatrixxOES___3II_3II
(JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLbitfield _returnValue = -1;
GLfixed *mantissa_base = (GLfixed *) 0;
jint _mantissaRemaining;
@@ -116,18 +118,21 @@
if (!mantissa_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissa == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "mantissa == null";
goto exit;
}
if (mantissaOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissaOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "mantissaOffset < 0";
goto exit;
}
_mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset;
if (_mantissaRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - mantissaOffset < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - mantissaOffset < 16 < needed";
goto exit;
}
mantissa_base = (GLfixed *)
@@ -136,18 +141,21 @@
if (!exponent_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "exponent == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "exponent == null";
goto exit;
}
if (exponentOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "exponentOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "exponentOffset < 0";
goto exit;
}
_exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset;
if (_exponentRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - exponentOffset < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - exponentOffset < 16 < needed";
goto exit;
}
exponent_base = (GLint *)
@@ -168,6 +176,9 @@
_env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
return _returnValue;
}
@@ -176,6 +187,8 @@
android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _mantissaArray = (jarray) 0;
jarray _exponentArray = (jarray) 0;
GLbitfield _returnValue = -1;
@@ -187,13 +200,15 @@
mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining);
if (_mantissaRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining);
if (_exponentRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
_returnValue = glQueryMatrixxOES(
@@ -208,6 +223,9 @@
if (_exponentArray) {
releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
return _returnValue;
}
diff --git a/core/jni/android_opengl_GLES11.cpp b/core/jni/android_opengl_GLES11.cpp
index d038f20..ee7cb12 100644
--- a/core/jni/android_opengl_GLES11.cpp
+++ b/core/jni/android_opengl_GLES11.cpp
@@ -136,6 +136,9 @@
static void
android_glBufferData__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
@@ -143,7 +146,9 @@
if (data_buf) {
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
if (_remaining < size) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < size < needed";
goto exit;
}
}
@@ -158,19 +163,27 @@
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
static void
android_glBufferSubData__IIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
if (_remaining < size) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < size < needed";
goto exit;
}
glBufferSubData(
@@ -184,22 +197,32 @@
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
static void
android_glClipPlanef__I_3FI
(JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *equation_base = (GLfloat *) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
if (!equation_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "equation == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(equation_ref) - offset;
@@ -217,12 +240,18 @@
_env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
static void
android_glClipPlanef__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
@@ -235,22 +264,32 @@
if (_array) {
releasePointer(_env, _array, equation, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
static void
android_glClipPlanex__I_3II
(JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *equation_base = (GLfixed *) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
if (!equation_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "equation == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(equation_ref) - offset;
@@ -268,12 +307,18 @@
_env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
static void
android_glClipPlanex__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
@@ -286,6 +331,9 @@
if (_array) {
releasePointer(_env, _array, equation, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
@@ -316,21 +364,30 @@
static void
android_glDeleteBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *buffers_base = (GLuint *) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(buffers_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
buffers_base = (GLuint *)
@@ -347,19 +404,27 @@
_env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
static void
android_glDeleteBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteBuffers(
@@ -371,18 +436,27 @@
if (_array) {
releasePointer(_env, _array, buffers, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
static void
android_glDrawElements__IIII
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
glDrawElements(
(GLenum)mode,
(GLsizei)count,
(GLenum)type,
(const GLvoid *)offset
);
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
@@ -390,24 +464,29 @@
android_glGenBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *buffers_base = (GLuint *) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(buffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
buffers_base = (GLuint *)
@@ -424,6 +503,9 @@
_env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
@@ -431,6 +513,8 @@
android_glGenBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
@@ -438,7 +522,8 @@
buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenBuffers(
@@ -450,6 +535,9 @@
if (_array) {
releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
@@ -457,18 +545,22 @@
android_glGetBooleanv__I_3ZI
(JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLboolean *params_base = (GLboolean *) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -486,13 +578,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
static void
android_glGetBooleanv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
@@ -503,7 +597,7 @@
(GLboolean *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -512,24 +606,29 @@
android_glGetBufferParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -547,6 +646,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -554,6 +656,8 @@
android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -561,7 +665,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetBufferParameteriv(
@@ -574,6 +679,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
@@ -581,18 +689,22 @@
android_glGetClipPlanef__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *eqn_base = (GLfloat *) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
if (!eqn_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "eqn == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(eqn_ref) - offset;
@@ -610,13 +722,15 @@
_env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
static void
android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
@@ -627,7 +741,7 @@
(GLfloat *)eqn
);
if (_array) {
- releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, eqn, JNI_TRUE);
}
}
@@ -636,18 +750,22 @@
android_glGetClipPlanex__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *eqn_base = (GLfixed *) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
if (!eqn_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "eqn == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(eqn_ref) - offset;
@@ -665,13 +783,15 @@
_env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
static void
android_glGetClipPlanex__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
@@ -682,7 +802,7 @@
(GLfixed *)eqn
);
if (_array) {
- releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, eqn, JNI_TRUE);
}
}
@@ -691,18 +811,22 @@
android_glGetFixedv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -720,13 +844,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
static void
android_glGetFixedv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -737,7 +863,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -746,18 +872,22 @@
android_glGetFloatv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -775,13 +905,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
static void
android_glGetFloatv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -792,7 +924,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -801,18 +933,22 @@
android_glGetLightfv__II_3FI
(JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -860,7 +996,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -878,6 +1015,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
@@ -885,6 +1025,8 @@
android_glGetLightfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -934,7 +1076,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetLightfv(
@@ -947,6 +1090,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
@@ -954,18 +1100,22 @@
android_glGetLightxv__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1013,7 +1163,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -1031,6 +1182,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
@@ -1038,6 +1192,8 @@
android_glGetLightxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1087,7 +1243,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetLightxv(
@@ -1100,6 +1257,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
@@ -1107,18 +1267,22 @@
android_glGetMaterialfv__II_3FI
(JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1152,7 +1316,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1170,6 +1335,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
@@ -1177,6 +1345,8 @@
android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -1212,7 +1382,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetMaterialfv(
@@ -1225,6 +1396,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
@@ -1232,18 +1406,22 @@
android_glGetMaterialxv__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1277,7 +1455,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -1295,6 +1474,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
@@ -1302,6 +1484,8 @@
android_glGetMaterialxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1337,7 +1521,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetMaterialxv(
@@ -1350,6 +1535,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvfv ( GLenum env, GLenum pname, GLfloat *params ) */
@@ -1357,18 +1545,22 @@
android_glGetTexEnvfv__II_3FI
(JNIEnv *_env, jobject _this, jint env, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1396,7 +1588,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1414,6 +1607,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvfv ( GLenum env, GLenum pname, GLfloat *params ) */
@@ -1421,6 +1617,8 @@
android_glGetTexEnvfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -1450,7 +1648,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetTexEnvfv(
@@ -1463,6 +1662,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
@@ -1470,18 +1672,22 @@
android_glGetTexEnviv__II_3II
(JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1509,7 +1715,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -1527,6 +1734,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
@@ -1534,6 +1744,8 @@
android_glGetTexEnviv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1563,7 +1775,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetTexEnviv(
@@ -1576,6 +1789,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
@@ -1583,18 +1799,22 @@
android_glGetTexEnvxv__II_3II
(JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1622,7 +1842,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -1640,6 +1861,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
@@ -1647,6 +1871,8 @@
android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1676,7 +1902,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetTexEnvxv(
@@ -1689,6 +1916,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
@@ -1696,24 +1926,29 @@
android_glGetTexParameterfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1731,6 +1966,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
@@ -1738,6 +1976,8 @@
android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -1745,7 +1985,8 @@
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameterfv(
@@ -1758,6 +1999,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -1765,24 +2009,29 @@
android_glGetTexParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -1800,6 +2049,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -1807,6 +2059,8 @@
android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1814,7 +2068,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameteriv(
@@ -1827,6 +2082,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
@@ -1834,24 +2092,29 @@
android_glGetTexParameterxv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -1869,6 +2132,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
@@ -1876,6 +2142,8 @@
android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1883,7 +2151,8 @@
params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameterxv(
@@ -1896,6 +2165,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLboolean glIsBuffer ( GLuint buffer ) */
@@ -1956,21 +2228,30 @@
static void
android_glPointParameterfv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1987,19 +2268,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
static void
android_glPointParameterfv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glPointParameterfv(
@@ -2011,6 +2300,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterx ( GLenum pname, GLfixed param ) */
@@ -2027,21 +2319,30 @@
static void
android_glPointParameterxv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -2058,19 +2359,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
static void
android_glPointParameterxv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glPointParameterxv(
@@ -2082,6 +2391,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
@@ -2133,16 +2445,23 @@
static void
android_glTexEnviv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2169,7 +2488,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -2187,12 +2508,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
static void
android_glTexEnviv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2221,7 +2548,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glTexEnviv(
@@ -2234,27 +2563,39 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexParameterfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -2272,19 +2613,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexParameterfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameterfv(
@@ -2297,6 +2646,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
@@ -2314,21 +2666,30 @@
static void
android_glTexParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -2346,19 +2707,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
static void
android_glTexParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameteriv(
@@ -2371,27 +2740,39 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
static void
android_glTexParameterxv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -2409,19 +2790,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
static void
android_glTexParameterxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameterxv(
@@ -2434,6 +2823,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
diff --git a/core/jni/android_opengl_GLES11Ext.cpp b/core/jni/android_opengl_GLES11Ext.cpp
index d6dc0fe..a05f809 100644
--- a/core/jni/android_opengl_GLES11Ext.cpp
+++ b/core/jni/android_opengl_GLES11Ext.cpp
@@ -197,21 +197,30 @@
static void
android_glDrawTexsvOES___3SI
(JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLshort *coords_base = (GLshort *) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLshort *)
@@ -227,19 +236,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexsvOES ( const GLshort *coords ) */
static void
android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexsvOES(
@@ -250,27 +267,39 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexivOES ( const GLint *coords ) */
static void
android_glDrawTexivOES___3II
(JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *coords_base = (GLint *) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLint *)
@@ -286,19 +315,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexivOES ( const GLint *coords ) */
static void
android_glDrawTexivOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexivOES(
@@ -309,27 +346,39 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexxvOES ( const GLfixed *coords ) */
static void
android_glDrawTexxvOES___3II
(JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *coords_base = (GLfixed *) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLfixed *)
@@ -345,19 +394,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexxvOES ( const GLfixed *coords ) */
static void
android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexxvOES(
@@ -368,6 +425,9 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height ) */
@@ -387,21 +447,30 @@
static void
android_glDrawTexfvOES___3FI
(JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *coords_base = (GLfloat *) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLfloat *)
@@ -417,19 +486,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexfvOES ( const GLfloat *coords ) */
static void
android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexfvOES(
@@ -440,13 +517,15 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image ) */
static void
android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLeglImageOES image = (GLeglImageOES) 0;
@@ -457,7 +536,7 @@
(GLeglImageOES)image
);
if (_array) {
- releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, image, JNI_TRUE);
}
}
@@ -465,7 +544,6 @@
static void
android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLeglImageOES image = (GLeglImageOES) 0;
@@ -476,7 +554,7 @@
(GLeglImageOES)image
);
if (_array) {
- releasePointer(_env, _array, image, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, image, JNI_TRUE);
}
}
@@ -515,16 +593,23 @@
static void
android_glClipPlanexOES__I_3II
(JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *equation_base = (GLfixed *) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
if (!equation_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "equation == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(equation_ref) - offset;
@@ -542,6 +627,9 @@
_env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanexOES ( GLenum plane, const GLfixed *equation ) */
@@ -598,16 +686,23 @@
static void
android_glFogxvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -625,6 +720,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogxvOES ( GLenum pname, const GLfixed *params ) */
@@ -664,24 +762,29 @@
android_glGetClipPlanexOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *eqn_base = (GLfixed *) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
if (!eqn_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "eqn == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(eqn_ref) - offset;
if (_remaining < 4) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 4 < needed";
goto exit;
}
eqn_base = (GLfixed *)
@@ -698,6 +801,9 @@
_env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn ) */
@@ -705,6 +811,8 @@
android_glGetClipPlanexOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
@@ -712,7 +820,8 @@
eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
if (_remaining < 4) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
glGetClipPlanexOES(
@@ -724,6 +833,9 @@
if (_array) {
releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
@@ -731,18 +843,22 @@
android_glGetFixedvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -760,13 +876,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFixedvOES ( GLenum pname, GLfixed *params ) */
static void
android_glGetFixedvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -777,7 +895,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -786,18 +904,22 @@
android_glGetLightxvOES__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -816,13 +938,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params ) */
static void
android_glGetLightxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -834,7 +958,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -843,18 +967,22 @@
android_glGetMaterialxvOES__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -873,13 +1001,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params ) */
static void
android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -891,7 +1021,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -900,18 +1030,22 @@
android_glGetTexEnvxvOES__II_3II
(JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -930,13 +1064,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params ) */
static void
android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -948,7 +1084,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -957,18 +1093,22 @@
android_glGetTexParameterxvOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -987,13 +1127,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params ) */
static void
android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -1005,7 +1147,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -1023,16 +1165,23 @@
static void
android_glLightModelxvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1050,6 +1199,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelxvOES ( GLenum pname, const GLfixed *params ) */
@@ -1085,16 +1237,23 @@
static void
android_glLightxvOES__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1113,6 +1272,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params ) */
@@ -1147,16 +1309,23 @@
static void
android_glLoadMatrixxOES___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -1173,6 +1342,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLoadMatrixxOES ( const GLfixed *m ) */
@@ -1207,16 +1379,23 @@
static void
android_glMaterialxvOES__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1235,6 +1414,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params ) */
@@ -1260,16 +1442,23 @@
static void
android_glMultMatrixxOES___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -1286,6 +1475,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMultMatrixxOES ( const GLfixed *m ) */
@@ -1357,16 +1549,23 @@
static void
android_glPointParameterxvOES__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1384,6 +1583,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterxvOES ( GLenum pname, const GLfixed *params ) */
@@ -1471,16 +1673,23 @@
static void
android_glTexEnvxvOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1499,6 +1708,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
@@ -1535,16 +1747,23 @@
static void
android_glTexParameterxvOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1563,6 +1782,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params ) */
@@ -1620,21 +1842,30 @@
static void
android_glDeleteRenderbuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "renderbuffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
renderbuffers_base = (GLuint *)
@@ -1651,19 +1882,27 @@
_env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers ) */
static void
android_glDeleteRenderbuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteRenderbuffersOES(
@@ -1675,6 +1914,9 @@
if (_array) {
releasePointer(_env, _array, renderbuffers, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
@@ -1682,24 +1924,29 @@
android_glGenRenderbuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "renderbuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
renderbuffers_base = (GLuint *)
@@ -1716,6 +1963,9 @@
_env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers ) */
@@ -1723,6 +1973,8 @@
android_glGenRenderbuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
@@ -1730,7 +1982,8 @@
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenRenderbuffersOES(
@@ -1742,6 +1995,9 @@
if (_array) {
releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) */
@@ -1761,24 +2017,29 @@
android_glGetRenderbufferParameterivOES__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -1796,6 +2057,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params ) */
@@ -1803,6 +2067,8 @@
android_glGetRenderbufferParameterivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1810,7 +2076,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetRenderbufferParameterivOES(
@@ -1823,6 +2090,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLboolean glIsFramebufferOES ( GLuint framebuffer ) */
@@ -1850,21 +2120,30 @@
static void
android_glDeleteFramebuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "framebuffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(framebuffers_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
framebuffers_base = (GLuint *)
@@ -1881,19 +2160,27 @@
_env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers ) */
static void
android_glDeleteFramebuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteFramebuffersOES(
@@ -1905,6 +2192,9 @@
if (_array) {
releasePointer(_env, _array, framebuffers, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
@@ -1912,24 +2202,29 @@
android_glGenFramebuffersOES__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "framebuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(framebuffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
framebuffers_base = (GLuint *)
@@ -1946,6 +2241,9 @@
_env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers ) */
@@ -1953,6 +2251,8 @@
android_glGenFramebuffersOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
@@ -1960,7 +2260,8 @@
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenFramebuffersOES(
@@ -1972,6 +2273,9 @@
if (_array) {
releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLenum glCheckFramebufferStatusOES ( GLenum target ) */
@@ -2015,24 +2319,29 @@
android_glGetFramebufferAttachmentParameterivOES__III_3II
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -2051,6 +2360,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
@@ -2058,6 +2370,8 @@
android_glGetFramebufferAttachmentParameterivOES__IIILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2065,7 +2379,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetFramebufferAttachmentParameterivOES(
@@ -2079,6 +2394,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenerateMipmapOES ( GLenum target ) */
@@ -2194,16 +2512,23 @@
static void
android_glClipPlanefOES__I_3FI
(JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *equation_base = (GLfloat *) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
if (!equation_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "equation == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(equation_ref) - offset;
@@ -2221,6 +2546,9 @@
_env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanefOES ( GLenum plane, const GLfloat *equation ) */
@@ -2246,24 +2574,29 @@
android_glGetClipPlanefOES__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *eqn_base = (GLfloat *) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
if (!eqn_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "eqn == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(eqn_ref) - offset;
if (_remaining < 4) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 4 < needed";
goto exit;
}
eqn_base = (GLfloat *)
@@ -2280,6 +2613,9 @@
_env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn ) */
@@ -2287,6 +2623,8 @@
android_glGetClipPlanefOES__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
@@ -2294,7 +2632,8 @@
eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
if (_remaining < 4) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
glGetClipPlanefOES(
@@ -2306,6 +2645,9 @@
if (_array) {
releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClearDepthfOES ( GLclampf depth ) */
@@ -2332,16 +2674,23 @@
static void
android_glTexGenfvOES__II_3FI
(JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2360,6 +2709,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params ) */
@@ -2396,16 +2748,23 @@
static void
android_glTexGenivOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2424,6 +2783,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params ) */
@@ -2460,16 +2822,23 @@
static void
android_glTexGenxvOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2488,6 +2857,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params ) */
@@ -2514,18 +2886,22 @@
android_glGetTexGenfvOES__II_3FI
(JNIEnv *_env, jobject _this, jint coord, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2544,13 +2920,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params ) */
static void
android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2562,7 +2940,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -2571,18 +2949,22 @@
android_glGetTexGenivOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2601,13 +2983,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params ) */
static void
android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2619,7 +3003,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -2628,18 +3012,22 @@
android_glGetTexGenxvOES__II_3II
(JNIEnv *_env, jobject _this, jint coord, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2658,13 +3046,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params ) */
static void
android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -2676,7 +3066,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp
index a53e4d7..87ff270 100644
--- a/core/jni/android_opengl_GLES20.cpp
+++ b/core/jni/android_opengl_GLES20.cpp
@@ -150,10 +150,14 @@
static void
android_glBindAttribLocation__IILjava_lang_String_2
(JNIEnv *_env, jobject _this, jint program, jint index, jstring name) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
const char* _nativename = 0;
if (!name) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
goto exit;
}
_nativename = _env->GetStringUTFChars(name, 0);
@@ -169,6 +173,9 @@
_env->ReleaseStringUTFChars(name, _nativename);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glBindBuffer ( GLenum target, GLuint buffer ) */
@@ -268,6 +275,9 @@
static void
android_glBufferData__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
@@ -275,7 +285,9 @@
if (data_buf) {
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
if (_remaining < size) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < size < needed";
goto exit;
}
}
@@ -290,19 +302,27 @@
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
static void
android_glBufferSubData__IIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
if (_remaining < size) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < size < needed";
goto exit;
}
glBufferSubData(
@@ -316,6 +336,9 @@
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLenum glCheckFramebufferStatus ( GLenum target ) */
@@ -503,21 +526,30 @@
static void
android_glDeleteBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *buffers_base = (GLuint *) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(buffers_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
buffers_base = (GLuint *)
@@ -534,19 +566,27 @@
_env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
static void
android_glDeleteBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteBuffers(
@@ -558,22 +598,32 @@
if (_array) {
releasePointer(_env, _array, buffers, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */
static void
android_glDeleteFramebuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "framebuffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(framebuffers_ref) - offset;
@@ -591,6 +641,9 @@
_env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) */
@@ -624,16 +677,23 @@
static void
android_glDeleteRenderbuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "renderbuffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
@@ -651,6 +711,9 @@
_env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) */
@@ -684,21 +747,30 @@
static void
android_glDeleteTextures__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *textures_base = (GLuint *) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "textures == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(textures_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
textures_base = (GLuint *)
@@ -715,19 +787,27 @@
_env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
static void
android_glDeleteTextures__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteTextures(
@@ -739,6 +819,9 @@
if (_array) {
releasePointer(_env, _array, textures, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDepthFunc ( GLenum func ) */
@@ -812,25 +895,36 @@
static void
android_glDrawElements__IIII
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
glDrawElements(
(GLenum)mode,
(GLsizei)count,
(GLenum)type,
(const GLvoid *)offset
);
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) */
static void
android_glDrawElements__IIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
if (_remaining < count) {
- jniThrowException(_env, "java/lang/ArrayIndexOutOfBoundsException", "remaining() < count");
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "remaining() < count < needed";
goto exit;
}
glDrawElements(
@@ -844,6 +938,9 @@
if (_array) {
releasePointer(_env, _array, indices, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glEnable ( GLenum cap ) */
@@ -917,24 +1014,29 @@
android_glGenBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *buffers_base = (GLuint *) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(buffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
buffers_base = (GLuint *)
@@ -951,6 +1053,9 @@
_env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
@@ -958,6 +1063,8 @@
android_glGenBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
@@ -965,7 +1072,8 @@
buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenBuffers(
@@ -977,6 +1085,9 @@
if (_array) {
releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenerateMipmap ( GLenum target ) */
@@ -993,18 +1104,22 @@
android_glGenFramebuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray framebuffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "framebuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(framebuffers_ref) - offset;
@@ -1022,13 +1137,15 @@
_env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) */
static void
android_glGenFramebuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
@@ -1039,7 +1156,7 @@
(GLuint *)framebuffers
);
if (_array) {
- releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, framebuffers, JNI_TRUE);
}
}
@@ -1048,18 +1165,22 @@
android_glGenRenderbuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray renderbuffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "renderbuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
@@ -1077,13 +1198,15 @@
_env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) */
static void
android_glGenRenderbuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
@@ -1094,7 +1217,7 @@
(GLuint *)renderbuffers
);
if (_array) {
- releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, renderbuffers, JNI_TRUE);
}
}
@@ -1103,24 +1226,29 @@
android_glGenTextures__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *textures_base = (GLuint *) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "textures == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(textures_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
textures_base = (GLuint *)
@@ -1137,6 +1265,9 @@
_env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenTextures ( GLsizei n, GLuint *textures ) */
@@ -1144,6 +1275,8 @@
android_glGenTextures__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
@@ -1151,7 +1284,8 @@
textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenTextures(
@@ -1163,6 +1297,9 @@
if (_array) {
releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
@@ -1170,6 +1307,8 @@
android_glGetActiveAttrib__III_3II_3II_3II_3BI
(JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLsizei *length_base = (GLsizei *) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
@@ -1185,12 +1324,14 @@
if (!length_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
goto exit;
}
if (lengthOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "lengthOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
goto exit;
}
_lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
@@ -1200,12 +1341,14 @@
if (!size_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "size == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "size == null";
goto exit;
}
if (sizeOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "sizeOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "sizeOffset < 0";
goto exit;
}
_sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
@@ -1215,12 +1358,14 @@
if (!type_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "type == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "type == null";
goto exit;
}
if (typeOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "typeOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "typeOffset < 0";
goto exit;
}
_typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
@@ -1230,12 +1375,14 @@
if (!name_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
goto exit;
}
if (nameOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "nameOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "nameOffset < 0";
goto exit;
}
_nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
@@ -1270,13 +1417,15 @@
_env->ReleasePrimitiveArrayCritical(length_ref, length_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
static void
android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
(JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
- jint _exception = 0;
jarray _lengthArray = (jarray) 0;
jarray _sizeArray = (jarray) 0;
jarray _typeArray = (jarray) 0;
@@ -1300,13 +1449,13 @@
(char *)name
);
if (_lengthArray) {
- releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _lengthArray, type, JNI_TRUE);
}
if (_sizeArray) {
- releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _sizeArray, size, JNI_TRUE);
}
if (_typeArray) {
- releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _typeArray, length, JNI_TRUE);
}
}
@@ -1315,6 +1464,8 @@
android_glGetActiveUniform__III_3II_3II_3II_3BI
(JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLsizei *length_base = (GLsizei *) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
@@ -1330,12 +1481,14 @@
if (!length_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
goto exit;
}
if (lengthOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "lengthOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
goto exit;
}
_lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
@@ -1345,12 +1498,14 @@
if (!size_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "size == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "size == null";
goto exit;
}
if (sizeOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "sizeOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "sizeOffset < 0";
goto exit;
}
_sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset;
@@ -1360,12 +1515,14 @@
if (!type_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "type == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "type == null";
goto exit;
}
if (typeOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "typeOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "typeOffset < 0";
goto exit;
}
_typeRemaining = _env->GetArrayLength(type_ref) - typeOffset;
@@ -1375,12 +1532,14 @@
if (!name_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
goto exit;
}
if (nameOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "nameOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "nameOffset < 0";
goto exit;
}
_nameRemaining = _env->GetArrayLength(name_ref) - nameOffset;
@@ -1415,13 +1574,15 @@
_env->ReleasePrimitiveArrayCritical(length_ref, length_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) */
static void
android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B
(JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) {
- jint _exception = 0;
jarray _lengthArray = (jarray) 0;
jarray _sizeArray = (jarray) 0;
jarray _typeArray = (jarray) 0;
@@ -1445,13 +1606,13 @@
(char *)name
);
if (_lengthArray) {
- releasePointer(_env, _lengthArray, type, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _lengthArray, type, JNI_TRUE);
}
if (_sizeArray) {
- releasePointer(_env, _sizeArray, size, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _sizeArray, size, JNI_TRUE);
}
if (_typeArray) {
- releasePointer(_env, _typeArray, length, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _typeArray, length, JNI_TRUE);
}
}
@@ -1460,6 +1621,8 @@
android_glGetAttachedShaders__II_3II_3II
(JNIEnv *_env, jobject _this, jint program, jint maxcount, jintArray count_ref, jint countOffset, jintArray shaders_ref, jint shadersOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLsizei *count_base = (GLsizei *) 0;
jint _countRemaining;
GLsizei *count = (GLsizei *) 0;
@@ -1469,12 +1632,14 @@
if (!count_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "count == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "count == null";
goto exit;
}
if (countOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "countOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "countOffset < 0";
goto exit;
}
_countRemaining = _env->GetArrayLength(count_ref) - countOffset;
@@ -1484,12 +1649,14 @@
if (!shaders_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "shaders == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "shaders == null";
goto exit;
}
if (shadersOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "shadersOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "shadersOffset < 0";
goto exit;
}
_shadersRemaining = _env->GetArrayLength(shaders_ref) - shadersOffset;
@@ -1513,13 +1680,15 @@
_env->ReleasePrimitiveArrayCritical(count_ref, count_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) */
static void
android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint maxcount, jobject count_buf, jobject shaders_buf) {
- jint _exception = 0;
jarray _countArray = (jarray) 0;
jarray _shadersArray = (jarray) 0;
jint _countRemaining;
@@ -1536,10 +1705,10 @@
(GLuint *)shaders
);
if (_countArray) {
- releasePointer(_env, _countArray, shaders, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _countArray, shaders, JNI_TRUE);
}
if (_shadersArray) {
- releasePointer(_env, _shadersArray, count, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _shadersArray, count, JNI_TRUE);
}
}
@@ -1547,11 +1716,15 @@
static jint
android_glGetAttribLocation__ILjava_lang_String_2
(JNIEnv *_env, jobject _this, jint program, jstring name) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
int _returnValue = 0;
const char* _nativename = 0;
if (!name) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
goto exit;
}
_nativename = _env->GetStringUTFChars(name, 0);
@@ -1566,6 +1739,9 @@
_env->ReleaseStringUTFChars(name, _nativename);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
return _returnValue;
}
@@ -1574,18 +1750,22 @@
android_glGetBooleanv__I_3ZI
(JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLboolean *params_base = (GLboolean *) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1603,13 +1783,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
static void
android_glGetBooleanv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
@@ -1620,7 +1802,7 @@
(GLboolean *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -1629,24 +1811,29 @@
android_glGetBufferParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -1664,6 +1851,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -1671,6 +1861,8 @@
android_glGetBufferParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1678,7 +1870,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetBufferParameteriv(
@@ -1691,6 +1884,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLenum glGetError ( void ) */
@@ -1707,18 +1903,22 @@
android_glGetFloatv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1736,13 +1936,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
static void
android_glGetFloatv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -1753,7 +1955,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -1762,18 +1964,22 @@
android_glGetFramebufferAttachmentParameteriv__III_3II
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1793,13 +1999,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) */
static void
android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1812,7 +2020,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -1821,18 +2029,22 @@
android_glGetIntegerv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2169,7 +2381,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -2186,6 +2399,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetIntegerv ( GLenum pname, GLint *params ) */
@@ -2193,6 +2409,8 @@
android_glGetIntegerv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2531,7 +2749,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetIntegerv(
@@ -2543,6 +2762,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */
@@ -2550,18 +2772,22 @@
android_glGetProgramiv__II_3II
(JNIEnv *_env, jobject _this, jint program, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2580,13 +2806,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) */
static void
android_glGetProgramiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2598,7 +2826,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -2626,18 +2854,22 @@
android_glGetRenderbufferParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2656,13 +2888,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
static void
android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2674,7 +2908,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -2683,18 +2917,22 @@
android_glGetShaderiv__II_3II
(JNIEnv *_env, jobject _this, jint shader, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2713,13 +2951,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) */
static void
android_glGetShaderiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint shader, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -2731,7 +2971,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -2759,6 +2999,8 @@
android_glGetShaderPrecisionFormat__II_3II_3II
(JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jintArray range_ref, jint rangeOffset, jintArray precision_ref, jint precisionOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *range_base = (GLint *) 0;
jint _rangeRemaining;
GLint *range = (GLint *) 0;
@@ -2768,12 +3010,14 @@
if (!range_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "range == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "range == null";
goto exit;
}
if (rangeOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "rangeOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "rangeOffset < 0";
goto exit;
}
_rangeRemaining = _env->GetArrayLength(range_ref) - rangeOffset;
@@ -2783,12 +3027,14 @@
if (!precision_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "precision == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "precision == null";
goto exit;
}
if (precisionOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "precisionOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "precisionOffset < 0";
goto exit;
}
_precisionRemaining = _env->GetArrayLength(precision_ref) - precisionOffset;
@@ -2812,13 +3058,15 @@
_env->ReleasePrimitiveArrayCritical(range_ref, range_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) */
static void
android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jobject range_buf, jobject precision_buf) {
- jint _exception = 0;
jarray _rangeArray = (jarray) 0;
jarray _precisionArray = (jarray) 0;
jint _rangeRemaining;
@@ -2835,10 +3083,10 @@
(GLint *)precision
);
if (_rangeArray) {
- releasePointer(_env, _rangeArray, precision, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _rangeArray, precision, JNI_TRUE);
}
if (_precisionArray) {
- releasePointer(_env, _precisionArray, range, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _precisionArray, range, JNI_TRUE);
}
}
@@ -2847,6 +3095,8 @@
android_glGetShaderSource__II_3II_3BI
(JNIEnv *_env, jobject _this, jint shader, jint bufsize, jintArray length_ref, jint lengthOffset, jbyteArray source_ref, jint sourceOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLsizei *length_base = (GLsizei *) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
@@ -2856,12 +3106,14 @@
if (!length_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length == null";
goto exit;
}
if (lengthOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "lengthOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "lengthOffset < 0";
goto exit;
}
_lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset;
@@ -2871,12 +3123,14 @@
if (!source_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "source == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "source == null";
goto exit;
}
if (sourceOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "sourceOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "sourceOffset < 0";
goto exit;
}
_sourceRemaining = _env->GetArrayLength(source_ref) - sourceOffset;
@@ -2900,13 +3154,15 @@
_env->ReleasePrimitiveArrayCritical(length_ref, length_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) */
static void
android_glGetShaderSource__IILjava_nio_IntBuffer_2B
(JNIEnv *_env, jobject _this, jint shader, jint bufsize, jobject length_buf, jbyte source) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLsizei *length = (GLsizei *) 0;
@@ -2919,7 +3175,7 @@
(char *)source
);
if (_array) {
- releasePointer(_env, _array, length, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, length, JNI_TRUE);
}
}
@@ -2933,24 +3189,29 @@
android_glGetTexParameterfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -2968,6 +3229,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
@@ -2975,6 +3239,8 @@
android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2982,7 +3248,8 @@
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameterfv(
@@ -2995,6 +3262,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -3002,24 +3272,29 @@
android_glGetTexParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -3037,6 +3312,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -3044,6 +3322,8 @@
android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -3051,7 +3331,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameteriv(
@@ -3064,6 +3345,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */
@@ -3071,18 +3355,22 @@
android_glGetUniformfv__II_3FI
(JNIEnv *_env, jobject _this, jint program, jint location, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3101,13 +3389,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) */
static void
android_glGetUniformfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -3119,7 +3409,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -3128,18 +3418,22 @@
android_glGetUniformiv__II_3II
(JNIEnv *_env, jobject _this, jint program, jint location, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3158,13 +3452,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetUniformiv ( GLuint program, GLint location, GLint *params ) */
static void
android_glGetUniformiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -3176,7 +3472,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -3184,11 +3480,15 @@
static jint
android_glGetUniformLocation__ILjava_lang_String_2
(JNIEnv *_env, jobject _this, jint program, jstring name) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
int _returnValue = 0;
const char* _nativename = 0;
if (!name) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "name == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "name == null";
goto exit;
}
_nativename = _env->GetStringUTFChars(name, 0);
@@ -3203,6 +3503,9 @@
_env->ReleaseStringUTFChars(name, _nativename);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
return _returnValue;
}
@@ -3211,18 +3514,22 @@
android_glGetVertexAttribfv__II_3FI
(JNIEnv *_env, jobject _this, jint index, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3241,13 +3548,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) */
static void
android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -3259,7 +3568,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -3268,18 +3577,22 @@
android_glGetVertexAttribiv__II_3II
(JNIEnv *_env, jobject _this, jint index, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3298,13 +3611,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) */
static void
android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -3316,7 +3631,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -3449,7 +3764,6 @@
static void
android_glReadPixels__IIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
@@ -3465,7 +3779,7 @@
(GLvoid *)pixels
);
if (_array) {
- releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, pixels, JNI_TRUE);
}
}
@@ -3514,6 +3828,9 @@
static void
android_glShaderBinary__I_3IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint n, jintArray shaders_ref, jint offset, jint binaryformat, jobject binary_buf, jint length) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
GLuint *shaders_base = (GLuint *) 0;
jint _shadersRemaining;
@@ -3522,11 +3839,15 @@
GLvoid *binary = (GLvoid *) 0;
if (!shaders_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "shaders == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "shaders == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_shadersRemaining = _env->GetArrayLength(shaders_ref) - offset;
@@ -3551,6 +3872,9 @@
_env->ReleasePrimitiveArrayCritical(shaders_ref, shaders_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) */
@@ -3705,21 +4029,30 @@
static void
android_glTexParameterfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -3737,19 +4070,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexParameterfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameterfv(
@@ -3762,6 +4103,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
@@ -3779,21 +4123,30 @@
static void
android_glTexParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -3811,19 +4164,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
static void
android_glTexParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameteriv(
@@ -3836,6 +4197,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) */
@@ -3879,16 +4243,23 @@
static void
android_glUniform1fv__II_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *v_base = (GLfloat *) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -3907,6 +4278,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) */
@@ -3942,16 +4316,23 @@
static void
android_glUniform1iv__II_3II
(JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *v_base = (GLint *) 0;
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -3970,6 +4351,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) */
@@ -4006,16 +4390,23 @@
static void
android_glUniform2fv__II_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *v_base = (GLfloat *) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -4034,6 +4425,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) */
@@ -4070,16 +4464,23 @@
static void
android_glUniform2iv__II_3II
(JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *v_base = (GLint *) 0;
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -4098,6 +4499,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) */
@@ -4135,16 +4539,23 @@
static void
android_glUniform3fv__II_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *v_base = (GLfloat *) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -4163,6 +4574,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) */
@@ -4200,16 +4614,23 @@
static void
android_glUniform3iv__II_3II
(JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *v_base = (GLint *) 0;
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -4228,6 +4649,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) */
@@ -4266,16 +4690,23 @@
static void
android_glUniform4fv__II_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jfloatArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *v_base = (GLfloat *) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -4294,6 +4725,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) */
@@ -4332,16 +4766,23 @@
static void
android_glUniform4iv__II_3II
(JNIEnv *_env, jobject _this, jint location, jint count, jintArray v_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *v_base = (GLint *) 0;
jint _remaining;
GLint *v = (GLint *) 0;
if (!v_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "v == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "v == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(v_ref) - offset;
@@ -4360,6 +4801,9 @@
_env->ReleasePrimitiveArrayCritical(v_ref, v_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) */
@@ -4385,16 +4829,23 @@
static void
android_glUniformMatrix2fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "value == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
@@ -4414,6 +4865,9 @@
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
@@ -4440,16 +4894,23 @@
static void
android_glUniformMatrix3fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "value == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
@@ -4469,6 +4930,9 @@
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
@@ -4495,16 +4959,23 @@
static void
android_glUniformMatrix4fv__IIZ_3FI
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jfloatArray value_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *value_base = (GLfloat *) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
if (!value_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "value == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "value == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(value_ref) - offset;
@@ -4524,6 +4995,9 @@
_env->ReleasePrimitiveArrayCritical(value_ref, value_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) */
@@ -4578,16 +5052,23 @@
static void
android_glVertexAttrib1fv__I_3FI
(JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *values_base = (GLfloat *) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "values == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(values_ref) - offset;
@@ -4605,6 +5086,9 @@
_env->ReleasePrimitiveArrayCritical(values_ref, values_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) */
@@ -4640,16 +5124,23 @@
static void
android_glVertexAttrib2fv__I_3FI
(JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *values_base = (GLfloat *) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "values == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(values_ref) - offset;
@@ -4667,6 +5158,9 @@
_env->ReleasePrimitiveArrayCritical(values_ref, values_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) */
@@ -4703,16 +5197,23 @@
static void
android_glVertexAttrib3fv__I_3FI
(JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *values_base = (GLfloat *) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "values == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(values_ref) - offset;
@@ -4730,6 +5231,9 @@
_env->ReleasePrimitiveArrayCritical(values_ref, values_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) */
@@ -4767,16 +5271,23 @@
static void
android_glVertexAttrib4fv__I_3FI
(JNIEnv *_env, jobject _this, jint indx, jfloatArray values_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *values_base = (GLfloat *) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
if (!values_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "values == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "values == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(values_ref) - offset;
@@ -4794,6 +5305,9 @@
_env->ReleasePrimitiveArrayCritical(values_ref, values_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) */
diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp
index 8777131..0310dc7 100644
--- a/core/jni/com_google_android_gles_jni_GLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp
@@ -530,21 +530,30 @@
static void
android_glDeleteTextures__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *textures_base = (GLuint *) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "textures == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(textures_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
textures_base = (GLuint *)
@@ -561,19 +570,27 @@
_env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteTextures ( GLsizei n, const GLuint *textures ) */
static void
android_glDeleteTextures__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteTextures(
@@ -585,6 +602,9 @@
if (_array) {
releasePointer(_env, _array, textures, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDepthFunc ( GLenum func ) */
@@ -658,13 +678,18 @@
static void
android_glDrawElements__IIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
if (_remaining < count) {
- jniThrowException(_env, "java/lang/ArrayIndexOutOfBoundsException", "remaining() < count");
+ _exception = 1;
+ _exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
+ _exceptionMessage = "remaining() < count < needed";
goto exit;
}
glDrawElements(
@@ -678,6 +703,9 @@
if (_array) {
releasePointer(_env, _array, indices, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glEnable ( GLenum cap ) */
@@ -726,16 +754,23 @@
static void
android_glFogfv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -765,7 +800,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -782,12 +819,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogfv ( GLenum pname, const GLfloat *params ) */
static void
android_glFogfv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -819,7 +862,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glFogfv(
@@ -831,6 +876,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogx ( GLenum pname, GLfixed param ) */
@@ -847,16 +895,23 @@
static void
android_glFogxv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -886,7 +941,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -903,12 +960,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFogxv ( GLenum pname, const GLfixed *params ) */
static void
android_glFogxv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -940,7 +1003,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glFogxv(
@@ -952,6 +1017,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFrontFace ( GLenum mode ) */
@@ -996,24 +1064,29 @@
android_glGenTextures__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray textures_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *textures_base = (GLuint *) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
if (!textures_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "textures == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "textures == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(textures_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
textures_base = (GLuint *)
@@ -1030,6 +1103,9 @@
_env->ReleasePrimitiveArrayCritical(textures_ref, textures_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenTextures ( GLsizei n, GLuint *textures ) */
@@ -1037,6 +1113,8 @@
android_glGenTextures__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject textures_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
@@ -1044,7 +1122,8 @@
textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenTextures(
@@ -1056,6 +1135,9 @@
if (_array) {
releasePointer(_env, _array, textures, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLenum glGetError ( void ) */
@@ -1072,18 +1154,22 @@
android_glGetIntegerv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1420,7 +1506,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -1437,6 +1524,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetIntegerv ( GLenum pname, GLint *params ) */
@@ -1444,6 +1534,8 @@
android_glGetIntegerv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -1782,7 +1874,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetIntegerv(
@@ -1794,6 +1887,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* const GLubyte * glGetString ( GLenum name ) */
@@ -1825,16 +1921,23 @@
static void
android_glLightModelfv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1855,7 +1958,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -1872,12 +1977,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelfv ( GLenum pname, const GLfloat *params ) */
static void
android_glLightModelfv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -1900,7 +2011,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightModelfv(
@@ -1912,6 +2025,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelx ( GLenum pname, GLfixed param ) */
@@ -1928,16 +2044,23 @@
static void
android_glLightModelxv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -1958,7 +2081,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -1975,12 +2100,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightModelxv ( GLenum pname, const GLfixed *params ) */
static void
android_glLightModelxv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -2003,7 +2134,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightModelxv(
@@ -2015,6 +2148,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightf ( GLenum light, GLenum pname, GLfloat param ) */
@@ -2032,16 +2168,23 @@
static void
android_glLightfv__II_3FI
(JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2088,7 +2231,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -2106,12 +2251,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) */
static void
android_glLightfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2160,7 +2311,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightfv(
@@ -2173,6 +2326,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightx ( GLenum light, GLenum pname, GLfixed param ) */
@@ -2190,16 +2346,23 @@
static void
android_glLightxv__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2246,7 +2409,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -2264,12 +2429,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) */
static void
android_glLightxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -2318,7 +2489,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glLightxv(
@@ -2331,6 +2504,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLineWidth ( GLfloat width ) */
@@ -2362,16 +2538,23 @@
static void
android_glLoadMatrixf___3FI
(JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *m_base = (GLfloat *) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2388,6 +2571,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLoadMatrixf ( const GLfloat *m ) */
@@ -2411,16 +2597,23 @@
static void
android_glLoadMatrixx___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2437,6 +2630,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLoadMatrixx ( const GLfixed *m ) */
@@ -2480,16 +2676,23 @@
static void
android_glMaterialfv__II_3FI
(JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2522,7 +2725,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -2540,12 +2745,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) */
static void
android_glMaterialfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -2580,7 +2791,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glMaterialfv(
@@ -2593,6 +2806,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) */
@@ -2610,16 +2826,23 @@
static void
android_glMaterialxv__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -2652,7 +2875,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -2670,12 +2895,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) */
static void
android_glMaterialxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -2710,7 +2941,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glMaterialxv(
@@ -2723,6 +2956,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMatrixMode ( GLenum mode ) */
@@ -2738,16 +2974,23 @@
static void
android_glMultMatrixf___3FI
(JNIEnv *_env, jobject _this, jfloatArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *m_base = (GLfloat *) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2764,6 +3007,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMultMatrixf ( const GLfloat *m ) */
@@ -2787,16 +3033,23 @@
static void
android_glMultMatrixx___3II
(JNIEnv *_env, jobject _this, jintArray m_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *m_base = (GLfixed *) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
if (!m_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "m == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "m == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(m_ref) - offset;
@@ -2813,6 +3066,9 @@
_env->ReleasePrimitiveArrayCritical(m_ref, m_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glMultMatrixx ( const GLfixed *m ) */
@@ -2996,7 +3252,6 @@
static void
android_glReadPixels__IIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jobject pixels_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
@@ -3012,7 +3267,7 @@
(GLvoid *)pixels
);
if (_array) {
- releasePointer(_env, _array, pixels, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, pixels, JNI_TRUE);
}
}
@@ -3172,16 +3427,23 @@
static void
android_glTexEnvfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3208,7 +3470,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -3226,12 +3490,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexEnvfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -3260,7 +3530,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glTexEnvfv(
@@ -3273,6 +3545,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) */
@@ -3290,16 +3565,23 @@
static void
android_glTexEnvxv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -3326,7 +3608,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -3344,12 +3628,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) */
static void
android_glTexEnvxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -3378,7 +3668,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glTexEnvxv(
@@ -3391,6 +3683,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) */
@@ -3531,6 +3826,8 @@
android_glQueryMatrixxOES___3II_3II
(JNIEnv *_env, jobject _this, jintArray mantissa_ref, jint mantissaOffset, jintArray exponent_ref, jint exponentOffset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLbitfield _returnValue = -1;
GLfixed *mantissa_base = (GLfixed *) 0;
jint _mantissaRemaining;
@@ -3541,18 +3838,21 @@
if (!mantissa_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissa == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "mantissa == null";
goto exit;
}
if (mantissaOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "mantissaOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "mantissaOffset < 0";
goto exit;
}
_mantissaRemaining = _env->GetArrayLength(mantissa_ref) - mantissaOffset;
if (_mantissaRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - mantissaOffset < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - mantissaOffset < 16 < needed";
goto exit;
}
mantissa_base = (GLfixed *)
@@ -3561,18 +3861,21 @@
if (!exponent_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "exponent == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "exponent == null";
goto exit;
}
if (exponentOffset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "exponentOffset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "exponentOffset < 0";
goto exit;
}
_exponentRemaining = _env->GetArrayLength(exponent_ref) - exponentOffset;
if (_exponentRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - exponentOffset < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - exponentOffset < 16 < needed";
goto exit;
}
exponent_base = (GLint *)
@@ -3593,6 +3896,9 @@
_env->ReleasePrimitiveArrayCritical(mantissa_ref, mantissa_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
return _returnValue;
}
@@ -3601,6 +3907,8 @@
android_glQueryMatrixxOES__Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject mantissa_buf, jobject exponent_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _mantissaArray = (jarray) 0;
jarray _exponentArray = (jarray) 0;
GLbitfield _returnValue = -1;
@@ -3612,13 +3920,15 @@
mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining);
if (_mantissaRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining);
if (_exponentRemaining < 16) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 16");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
_returnValue = glQueryMatrixxOES(
@@ -3633,6 +3943,9 @@
if (_exponentArray) {
releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
return _returnValue;
}
@@ -3650,6 +3963,9 @@
static void
android_glBufferData__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint target, jint size, jobject data_buf, jint usage) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
@@ -3657,7 +3973,9 @@
if (data_buf) {
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
if (_remaining < size) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < size < needed";
goto exit;
}
}
@@ -3672,19 +3990,27 @@
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) */
static void
android_glBufferSubData__IIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint offset, jint size, jobject data_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
if (_remaining < size) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < size");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < size < needed";
goto exit;
}
glBufferSubData(
@@ -3698,27 +4024,39 @@
if (_array) {
releasePointer(_env, _array, data, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
static void
android_glClipPlanef__I_3FI
(JNIEnv *_env, jobject _this, jint plane, jfloatArray equation_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *equation_base = (GLfloat *) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
if (!equation_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "equation == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(equation_ref) - offset;
if (_remaining < 4) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 4 < needed";
goto exit;
}
equation_base = (GLfloat *)
@@ -3735,19 +4073,27 @@
_env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
static void
android_glClipPlanef__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
if (_remaining < 4) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
glClipPlanef(
@@ -3759,27 +4105,39 @@
if (_array) {
releasePointer(_env, _array, equation, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
static void
android_glClipPlanex__I_3II
(JNIEnv *_env, jobject _this, jint plane, jintArray equation_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *equation_base = (GLfixed *) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
if (!equation_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "equation == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "equation == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(equation_ref) - offset;
if (_remaining < 4) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 4");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 4 < needed";
goto exit;
}
equation_base = (GLfixed *)
@@ -3796,19 +4154,27 @@
_env->ReleasePrimitiveArrayCritical(equation_ref, equation_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glClipPlanex ( GLenum plane, const GLfixed *equation ) */
static void
android_glClipPlanex__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
if (_remaining < 4) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 4");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
glClipPlanex(
@@ -3820,6 +4186,9 @@
if (_array) {
releasePointer(_env, _array, equation, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) */
@@ -3850,21 +4219,30 @@
static void
android_glDeleteBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *buffers_base = (GLuint *) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buffers == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(buffers_ref) - offset;
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
buffers_base = (GLuint *)
@@ -3881,19 +4259,27 @@
_env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) */
static void
android_glDeleteBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
if (_remaining < n) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteBuffers(
@@ -3905,18 +4291,27 @@
if (_array) {
releasePointer(_env, _array, buffers, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) */
static void
android_glDrawElements__IIII
(JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
glDrawElements(
(GLenum)mode,
(GLsizei)count,
(GLenum)type,
(const GLvoid *)offset
);
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
@@ -3924,24 +4319,29 @@
android_glGenBuffers__I_3II
(JNIEnv *_env, jobject _this, jint n, jintArray buffers_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *buffers_base = (GLuint *) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
if (!buffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "buffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "buffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(buffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
buffers_base = (GLuint *)
@@ -3958,6 +4358,9 @@
_env->ReleasePrimitiveArrayCritical(buffers_ref, buffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenBuffers ( GLsizei n, GLuint *buffers ) */
@@ -3965,6 +4368,8 @@
android_glGenBuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject buffers_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
@@ -3972,7 +4377,8 @@
buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenBuffers(
@@ -3984,6 +4390,9 @@
if (_array) {
releasePointer(_env, _array, buffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
@@ -3991,18 +4400,22 @@
android_glGetBooleanv__I_3ZI
(JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLboolean *params_base = (GLboolean *) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4020,13 +4433,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */
static void
android_glGetBooleanv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
@@ -4037,7 +4452,7 @@
(GLboolean *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -4062,18 +4477,22 @@
android_glGetClipPlanef__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray eqn_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *eqn_base = (GLfloat *) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
if (!eqn_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "eqn == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(eqn_ref) - offset;
@@ -4091,13 +4510,15 @@
_env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */
static void
android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
@@ -4108,7 +4529,7 @@
(GLfloat *)eqn
);
if (_array) {
- releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, eqn, JNI_TRUE);
}
}
@@ -4117,18 +4538,22 @@
android_glGetClipPlanex__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray eqn_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *eqn_base = (GLfixed *) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
if (!eqn_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "eqn == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "eqn == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(eqn_ref) - offset;
@@ -4146,13 +4571,15 @@
_env->ReleasePrimitiveArrayCritical(eqn_ref, eqn_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetClipPlanex ( GLenum pname, GLfixed *eqn ) */
static void
android_glGetClipPlanex__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
@@ -4163,7 +4590,7 @@
(GLfixed *)eqn
);
if (_array) {
- releasePointer(_env, _array, eqn, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, eqn, JNI_TRUE);
}
}
@@ -4172,18 +4599,22 @@
android_glGetFixedv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4201,13 +4632,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFixedv ( GLenum pname, GLfixed *params ) */
static void
android_glGetFixedv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -4218,7 +4651,7 @@
(GLfixed *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -4227,18 +4660,22 @@
android_glGetFloatv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4256,13 +4693,15 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFloatv ( GLenum pname, GLfloat *params ) */
static void
android_glGetFloatv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -4273,7 +4712,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -4282,18 +4721,22 @@
android_glGetLightfv__II_3FI
(JNIEnv *_env, jobject _this, jint light, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4341,7 +4784,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -4359,6 +4803,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params ) */
@@ -4366,6 +4813,8 @@
android_glGetLightfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -4415,7 +4864,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetLightfv(
@@ -4428,6 +4878,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
@@ -4435,18 +4888,22 @@
android_glGetLightxv__II_3II
(JNIEnv *_env, jobject _this, jint light, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4494,7 +4951,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -4512,6 +4970,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params ) */
@@ -4519,6 +4980,8 @@
android_glGetLightxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -4568,7 +5031,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetLightxv(
@@ -4581,6 +5045,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
@@ -4588,18 +5055,22 @@
android_glGetMaterialfv__II_3FI
(JNIEnv *_env, jobject _this, jint face, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4633,7 +5104,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -4651,6 +5123,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params ) */
@@ -4658,6 +5133,8 @@
android_glGetMaterialfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -4693,7 +5170,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetMaterialfv(
@@ -4706,6 +5184,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
@@ -4713,18 +5194,22 @@
android_glGetMaterialxv__II_3II
(JNIEnv *_env, jobject _this, jint face, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4758,7 +5243,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -4776,6 +5262,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params ) */
@@ -4783,6 +5272,8 @@
android_glGetMaterialxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -4818,7 +5309,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetMaterialxv(
@@ -4831,6 +5323,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
@@ -4838,18 +5333,22 @@
android_glGetTexEnviv__II_3II
(JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4877,7 +5376,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -4895,6 +5395,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params ) */
@@ -4902,6 +5405,8 @@
android_glGetTexEnviv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -4931,7 +5436,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetTexEnviv(
@@ -4944,6 +5450,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
@@ -4951,18 +5460,22 @@
android_glGetTexEnvxv__II_3II
(JNIEnv *_env, jobject _this, jint env, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -4990,7 +5503,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -5008,6 +5522,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params ) */
@@ -5015,6 +5532,8 @@
android_glGetTexEnvxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -5044,7 +5563,8 @@
}
if (_remaining < _needed) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glGetTexEnvxv(
@@ -5057,6 +5577,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
@@ -5064,24 +5587,29 @@
android_glGetTexParameterfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -5099,6 +5627,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) */
@@ -5106,6 +5637,8 @@
android_glGetTexParameterfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -5113,7 +5646,8 @@
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameterfv(
@@ -5126,6 +5660,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -5133,24 +5670,29 @@
android_glGetTexParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -5168,6 +5710,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -5175,6 +5720,8 @@
android_glGetTexParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -5182,7 +5729,8 @@
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameteriv(
@@ -5195,6 +5743,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
@@ -5202,24 +5753,29 @@
android_glGetTexParameterxv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -5237,6 +5793,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params ) */
@@ -5244,6 +5803,8 @@
android_glGetTexParameterxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
@@ -5251,7 +5812,8 @@
params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glGetTexParameterxv(
@@ -5264,6 +5826,9 @@
if (_array) {
releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* GLboolean glIsBuffer ( GLuint buffer ) */
@@ -5324,21 +5889,30 @@
static void
android_glPointParameterfv__I_3FI
(JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -5355,19 +5929,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterfv ( GLenum pname, const GLfloat *params ) */
static void
android_glPointParameterfv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glPointParameterfv(
@@ -5379,6 +5961,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterx ( GLenum pname, GLfixed param ) */
@@ -5395,21 +5980,30 @@
static void
android_glPointParameterxv__I_3II
(JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -5426,19 +6020,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointParameterxv ( GLenum pname, const GLfixed *params ) */
static void
android_glPointParameterxv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glPointParameterxv(
@@ -5450,6 +6052,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer ) */
@@ -5501,16 +6106,23 @@
static void
android_glTexEnviv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -5537,7 +6149,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < needed";
goto exit;
}
params_base = (GLint *)
@@ -5555,12 +6169,18 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexEnviv ( GLenum target, GLenum pname, const GLint *params ) */
static void
android_glTexEnviv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -5589,7 +6209,9 @@
break;
}
if (_remaining < _needed) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < needed");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < needed";
goto exit;
}
glTexEnviv(
@@ -5602,27 +6224,39 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexParameterfv__II_3FI
(JNIEnv *_env, jobject _this, jint target, jint pname, jfloatArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfloat *)
@@ -5640,19 +6274,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) */
static void
android_glTexParameterfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameterfv(
@@ -5665,6 +6307,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameteri ( GLenum target, GLenum pname, GLint param ) */
@@ -5682,21 +6327,30 @@
static void
android_glTexParameteriv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLint *)
@@ -5714,19 +6368,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) */
static void
android_glTexParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameteriv(
@@ -5739,27 +6401,39 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
static void
android_glTexParameterxv__II_3II
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *params_base = (GLfixed *) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
if (!params_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 1 < needed";
goto exit;
}
params_base = (GLfixed *)
@@ -5777,19 +6451,27 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params ) */
static void
android_glTexParameterxv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
if (_remaining < 1) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 1");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
glTexParameterxv(
@@ -5802,6 +6484,9 @@
if (_array) {
releasePointer(_env, _array, params, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset ) */
@@ -5842,21 +6527,30 @@
static void
android_glDrawTexfvOES___3FI
(JNIEnv *_env, jobject _this, jfloatArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *coords_base = (GLfloat *) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLfloat *)
@@ -5872,19 +6566,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexfvOES ( const GLfloat *coords ) */
static void
android_glDrawTexfvOES__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexfvOES(
@@ -5895,6 +6597,9 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height ) */
@@ -5914,21 +6619,30 @@
static void
android_glDrawTexivOES___3II
(JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *coords_base = (GLint *) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLint *)
@@ -5944,19 +6658,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexivOES ( const GLint *coords ) */
static void
android_glDrawTexivOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexivOES(
@@ -5967,6 +6689,9 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height ) */
@@ -5986,21 +6711,30 @@
static void
android_glDrawTexsvOES___3SI
(JNIEnv *_env, jobject _this, jshortArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLshort *coords_base = (GLshort *) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLshort *)
@@ -6016,19 +6750,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexsvOES ( const GLshort *coords ) */
static void
android_glDrawTexsvOES__Ljava_nio_ShortBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexsvOES(
@@ -6039,6 +6781,9 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height ) */
@@ -6058,21 +6803,30 @@
static void
android_glDrawTexxvOES___3II
(JNIEnv *_env, jobject _this, jintArray coords_ref, jint offset) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfixed *coords_base = (GLfixed *) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
if (!coords_ref) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "coords == null");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "coords == null";
goto exit;
}
if (offset < 0) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(coords_ref) - offset;
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < 5 < needed";
goto exit;
}
coords_base = (GLfixed *)
@@ -6088,19 +6842,27 @@
_env->ReleasePrimitiveArrayCritical(coords_ref, coords_base,
JNI_ABORT);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDrawTexxvOES ( const GLfixed *coords ) */
static void
android_glDrawTexxvOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject coords_buf) {
+ jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
if (_remaining < 5) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < 5");
+ _exception = 1;
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
glDrawTexxvOES(
@@ -6111,6 +6873,9 @@
if (_array) {
releasePointer(_env, _array, coords, JNI_FALSE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glLoadPaletteFromModelViewMatrixOES ( void ) */
@@ -6273,7 +7038,7 @@
if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
jniThrowException(_env, "java/lang/UnsupportedOperationException",
"glCheckFramebufferStatusOES");
- return 0;
+ return 0;
}
GLint _returnValue = 0;
_returnValue = glCheckFramebufferStatusOES(
@@ -6292,24 +7057,29 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "framebuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(framebuffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
framebuffers_base = (GLuint *)
@@ -6326,6 +7096,9 @@
_env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers ) */
@@ -6338,6 +7111,8 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
@@ -6345,7 +7120,8 @@
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteFramebuffersOES(
@@ -6357,6 +7133,9 @@
if (_array) {
releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
@@ -6369,24 +7148,29 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "renderbuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
renderbuffers_base = (GLuint *)
@@ -6403,6 +7187,9 @@
_env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
@@ -6415,6 +7202,8 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
@@ -6422,7 +7211,8 @@
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glDeleteRenderbuffersOES(
@@ -6434,6 +7224,9 @@
if (_array) {
releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer ) */
@@ -6495,24 +7288,29 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *framebuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
if (!framebuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "framebuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "framebuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(framebuffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
framebuffers_base = (GLuint *)
@@ -6529,6 +7327,9 @@
_env->ReleasePrimitiveArrayCritical(framebuffers_ref, framebuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenFramebuffersOES ( GLint n, GLuint *framebuffers ) */
@@ -6541,6 +7342,8 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
@@ -6548,7 +7351,8 @@
framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenFramebuffersOES(
@@ -6560,6 +7364,9 @@
if (_array) {
releasePointer(_env, _array, framebuffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
@@ -6572,24 +7379,29 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLuint *renderbuffers_base = (GLuint *) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
if (!renderbuffers_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "renderbuffers == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "renderbuffers == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(renderbuffers_ref) - offset;
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "length - offset < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "length - offset < n < needed";
goto exit;
}
renderbuffers_base = (GLuint *)
@@ -6606,6 +7418,9 @@
_env->ReleasePrimitiveArrayCritical(renderbuffers_ref, renderbuffers_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers ) */
@@ -6618,6 +7433,8 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
jarray _array = (jarray) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
@@ -6625,7 +7442,8 @@
renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
if (_remaining < n) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "remaining() < n");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "remaining() < n < needed";
goto exit;
}
glGenRenderbuffersOES(
@@ -6637,6 +7455,9 @@
if (_array) {
releasePointer(_env, _array, renderbuffers, _exception ? JNI_FALSE : JNI_TRUE);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
@@ -6649,18 +7470,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -6680,6 +7505,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params ) */
@@ -6691,7 +7519,6 @@
"glGetFramebufferAttachmentParameterivOES");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -6704,7 +7531,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -6718,18 +7545,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -6748,6 +7579,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params ) */
@@ -6759,7 +7593,6 @@
"glGetRenderbufferParameterivOES");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -6771,7 +7604,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -6785,18 +7618,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -6815,6 +7652,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
@@ -6826,7 +7666,6 @@
"glGetTexGenfv");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -6838,7 +7677,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -6852,18 +7691,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -6882,6 +7725,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexGeniv ( GLint coord, GLint pname, GLint *params ) */
@@ -6893,7 +7739,6 @@
"glGetTexGeniv");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -6905,7 +7750,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -6919,18 +7764,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -6949,6 +7798,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glGetTexGenxv ( GLint coord, GLint pname, GLint *params ) */
@@ -6960,7 +7812,6 @@
"glGetTexGenxv");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -6972,7 +7823,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -6983,7 +7834,7 @@
if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
jniThrowException(_env, "java/lang/UnsupportedOperationException",
"glIsFramebufferOES");
- return JNI_FALSE;
+ return JNI_FALSE;
}
GLboolean _returnValue = JNI_FALSE;
_returnValue = glIsFramebufferOES(
@@ -6999,7 +7850,7 @@
if (! supportsExtension(_env, _this, have_OES_framebuffer_objectID)) {
jniThrowException(_env, "java/lang/UnsupportedOperationException",
"glIsRenderbufferOES");
- return JNI_FALSE;
+ return JNI_FALSE;
}
GLboolean _returnValue = JNI_FALSE;
_returnValue = glIsRenderbufferOES(
@@ -7051,18 +7902,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLfloat *params_base = (GLfloat *) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -7081,6 +7936,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexGenfv ( GLint coord, GLint pname, GLfloat *params ) */
@@ -7092,7 +7950,6 @@
"glTexGenfv");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
@@ -7104,7 +7961,7 @@
(GLfloat *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -7134,18 +7991,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -7164,6 +8025,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexGeniv ( GLint coord, GLint pname, GLint *params ) */
@@ -7175,7 +8039,6 @@
"glTexGeniv");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -7187,7 +8050,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
@@ -7217,18 +8080,22 @@
return;
}
jint _exception = 0;
+ const char * _exceptionType;
+ const char * _exceptionMessage;
GLint *params_base = (GLint *) 0;
jint _remaining;
GLint *params = (GLint *) 0;
if (!params_ref) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "params == null");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "params == null";
goto exit;
}
if (offset < 0) {
_exception = 1;
- jniThrowException(_env, "java/lang/IllegalArgumentException", "offset < 0");
+ _exceptionType = "java/lang/IllegalArgumentException";
+ _exceptionMessage = "offset < 0";
goto exit;
}
_remaining = _env->GetArrayLength(params_ref) - offset;
@@ -7247,6 +8114,9 @@
_env->ReleasePrimitiveArrayCritical(params_ref, params_base,
_exception ? JNI_ABORT: 0);
}
+ if (_exception) {
+ jniThrowException(_env, _exceptionType, _exceptionMessage);
+ }
}
/* void glTexGenxv ( GLint coord, GLint pname, GLint *params ) */
@@ -7258,7 +8128,6 @@
"glTexGenxv");
return;
}
- jint _exception = 0;
jarray _array = (jarray) 0;
jint _remaining;
GLint *params = (GLint *) 0;
@@ -7270,7 +8139,7 @@
(GLint *)params
);
if (_array) {
- releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _array, params, JNI_TRUE);
}
}
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
deleted file mode 100644
index bc718b5..0000000
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
deleted file mode 100644
index 0892c31..0000000
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
deleted file mode 100644
index 04cc0a2..0000000
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
deleted file mode 100644
index bb553b1..0000000
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
deleted file mode 100644
index 308fe8a..0000000
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
deleted file mode 100644
index 9a25634..0000000
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
deleted file mode 100644
index 77240d0..0000000
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
deleted file mode 100644
index e0b0134..0000000
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
deleted file mode 100644
index b8e5733..0000000
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
deleted file mode 100644
index ce5da43..0000000
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
deleted file mode 100644
index c16f143..0000000
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
deleted file mode 100644
index 9bed39a..0000000
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 4969f8e..15733be 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopieer URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Kies teks"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Tekskeuse"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Voeg by woordeboek"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Vee uit"</string>
<string name="inputMethod" msgid="1653630062304567879">"Invoermetode"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Teksaksies"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Bergingspasie word min"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 58348c0..2212354 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"የURL ቅጂ"</string>
<string name="selectTextMode" msgid="1018691815143165326">"ፅሁፍ ምረጥ"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"የፅሁፍ ምርጫ"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"ወደ መዝገበ ቃላት አክል"</string>
+ <string name="deleteText" msgid="6979668428458199034">"ሰርዝ"</string>
<string name="inputMethod" msgid="1653630062304567879">"ግቤት ሜተድ"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"የፅሁፍ እርምጃዎች"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"የማከማቻ ቦታ እያለቀ ነው"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index e4b4188..02eb84b 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"نسخ عنوان URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"تحديد نص"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"تحديد النص"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"إضافة إلى القاموس"</string>
+ <string name="deleteText" msgid="6979668428458199034">"حذف"</string>
<string name="inputMethod" msgid="1653630062304567879">"طريقة الإرسال"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"إجراءات النص"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"مساحة التخزين منخفضة"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index d0396a7b..1a44113 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Копиране на URL адреса"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Избор на текст"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Избиране на текст"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Добавяне в речника"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Изтриване"</string>
<string name="inputMethod" msgid="1653630062304567879">"Метод на въвеждане"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Действия с текста"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Мястото в хранилището е на изчерпване"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 91c6ade..7b044b5 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopírovat adresu URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Vybrat text"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Výběr textu"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Přidat do slovníku"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Smazat"</string>
<string name="inputMethod" msgid="1653630062304567879">"Metoda zadávání dat"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Operace s textem"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"V úložišti je málo místa"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index c74c3bd5..5b8a03b 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Copiar URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Seleccionar texto"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Selección de texto"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Agregar al diccionario"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Eliminar"</string>
<string name="inputMethod" msgid="1653630062304567879">"Método de entrada"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Acciones de texto"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Queda poco espacio de almacenamiento"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 17982d1..c335fa3 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Copiar URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Seleccionar texto"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Selección de texto"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Añadir al diccionario"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Eliminar"</string>
<string name="inputMethod" msgid="1653630062304567879">"Método de entrada de texto"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Acciones de texto"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Queda poco espacio"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index ae1857e..d49594b 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopeeri URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Valige tekst"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Teksti valimine"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Lisa sõnastikku"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Kustuta"</string>
<string name="inputMethod" msgid="1653630062304567879">"Sisestusmeetod"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Tekstitoimingud"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Talletusruum saab täis"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 2d79eba..0c7d4ca 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"کپی URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"انتخاب متن"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"انتخاب متن"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"افزودن به فرهنگلغت"</string>
+ <string name="deleteText" msgid="6979668428458199034">"حذف"</string>
<string name="inputMethod" msgid="1653630062304567879">"روش ورودی"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"عملکردهای متنی"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"فضای ذخیرهسازی رو به اتمام است"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index a86547f..cabed61 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopioi URL-osoite"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Valitse tekstiä"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Tekstin valinta"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Lisää sanakirjaan"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Poista"</string>
<string name="inputMethod" msgid="1653630062304567879">"Syöttötapa"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Tekstitoiminnot"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Tallennustila loppumassa"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index d5b69c7..d145791 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"URL की प्रतिलिपि बनाएं"</string>
<string name="selectTextMode" msgid="1018691815143165326">"पाठ का चयन करें"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"पाठ चयन"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"शब्दकोश में जोड़ें"</string>
+ <string name="deleteText" msgid="6979668428458199034">"हटाएं"</string>
<string name="inputMethod" msgid="1653630062304567879">"इनपुट विधि"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"पाठ क्रियाएं"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"संग्रहण स्थान समाप्त हो रहा है"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 0186eee..be187ac 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopiraj URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Odabir teksta"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Odabir teksta"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Dodaj u rječnik"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Izbriši"</string>
<string name="inputMethod" msgid="1653630062304567879">"Način unosa"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Radnje s tekstom"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ponestaje prostora za pohranu"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 2261b8f..dc01b63 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -324,7 +324,7 @@
<string name="permlab_anyCodecForPlayback" msgid="715805555823881818">"menggunakan media pengawasandi apa pun untuk pemutaran"</string>
<string name="permdesc_anyCodecForPlayback" msgid="8283912488433189010">"Mengizinkan apl menggunakan pengawasandi media apa pun yang terpasang guna mengawasandikan media untuk diputar."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"baca/tulis ke sumber daya yang dimiliki oleh diag"</string>
- <string name="permdesc_diagnostic" msgid="6608295692002452283">"Mengizinkan apl membaca dan menulis ke sumber daya apa pun yang dimiliki oleh grup diag; misalnya, file dalam /dev. Izin ini berpotensi memengaruhi kestabilan dan keamanan sistem. Sebaiknya ini HANYA digunakan untuk diagnostik khusus perangkat keras oleh pabrikan atau operator."</string>
+ <string name="permdesc_diagnostic" msgid="6608295692002452283">"Mengizinkan apl membaca dan menulis ke sumber daya apa pun yang dimiliki oleh grup diag; misalnya, file dalam /dev. Izin ini berpotensi memengaruhi kestabilan dan keamanan sistem. Sebaiknya ini HANYA digunakan untuk diagnosis khusus perangkat keras oleh pabrikan atau operator."</string>
<string name="permlab_changeComponentState" msgid="6335576775711095931">"mengaktifkan atau menonaktifkan komponen apl"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Mengizinkan apl mengubah apakah komponen apl lain diaktifkan atau tidak. Apl berbahaya dapat menggunakan ini untuk menonaktifkan kemampuan tablet yang penting. Izin ini harus digunakan dengan hati-hati karena dapat menjadikan komponen apl tidak dapat digunakan, tidak konsisten, atau tidak stabil."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Mengizinkan apl mengubah apakah komponen apl lain diaktifkan atau tidak. Apl berbahaya dapat menggunakan izin ini untuk menonaktifkan kemampuan ponsel yang penting. Izin ini harus digunakan dengan hati-hati, karena mungkin saja menjadikan komponen apl tidak dapat digunakan, tidak konsisten, atau tidak stabil."</string>
@@ -434,8 +434,8 @@
<string name="permdesc_performCdmaProvisioning" msgid="1994193538802314186">"Mengizinkan apl memulai penyediaan CDMA. Apl berbahaya dapat memulai penyediaan CDMA yang tidak perlu."</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"mengontrol pemberitahuan pembaruan lokasi"</string>
<string name="permdesc_locationUpdates" msgid="1120741557891438876">"Mengizinkan apl mengaktifkan/menonaktifkan pemberitahuan pembaruan lokasi dari radio. Tidak untuk digunakan oleh apl normal."</string>
- <string name="permlab_checkinProperties" msgid="7855259461268734914">"akses properti lapor masuk"</string>
- <string name="permdesc_checkinProperties" msgid="4024526968630194128">"Mengizinkan apl membaca/menulis akses ke properti yang diunggah oleh layanan lapor masuk. Tidak untuk digunakan oleh apl normal."</string>
+ <string name="permlab_checkinProperties" msgid="7855259461268734914">"akses properti check in"</string>
+ <string name="permdesc_checkinProperties" msgid="4024526968630194128">"Mengizinkan apl membaca/menulis akses ke properti yang diunggah oleh layanan check in. Tidak untuk digunakan oleh apl normal."</string>
<string name="permlab_bindGadget" msgid="776905339015863471">"pilih widget"</string>
<string name="permdesc_bindGadget" msgid="8261326938599049290">"Mengizinkan apl memberi tahu sistem tentang widget mana yang dapat digunakan oleh suatu apl. Apl dengan izin ini dapat memberikan akses ke data pribadi untuk apl lain. Tidak untuk digunakan oleh apl normal."</string>
<string name="permlab_modifyPhoneState" msgid="8423923777659292228">"ubah kondisi ponsel"</string>
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Salin URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Pilih teks"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Pemilihan teks"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Tambahkan ke kamus"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Hapus"</string>
<string name="inputMethod" msgid="1653630062304567879">"Metode masukan"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Tindakan teks"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ruang penyimpanan hampir habis"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index a1ec4bf..4f7b5cc 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"URLをコピー"</string>
<string name="selectTextMode" msgid="1018691815143165326">"テキストを選択"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"テキスト選択"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"辞書に追加"</string>
+ <string name="deleteText" msgid="6979668428458199034">"削除"</string>
<string name="inputMethod" msgid="1653630062304567879">"入力方法"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"テキスト操作"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"空き容量わずか"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index aec99ba..bb6cf01 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"URL 복사"</string>
<string name="selectTextMode" msgid="1018691815143165326">"텍스트 선택"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"텍스트 선택"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"사전에 추가"</string>
+ <string name="deleteText" msgid="6979668428458199034">"삭제"</string>
<string name="inputMethod" msgid="1653630062304567879">"입력 방법"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"텍스트 작업"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"저장 공간이 부족함"</string>
diff --git a/core/res/res/values-land/arrays.xml b/core/res/res/values-land/arrays.xml
index 6db3a508..1cd9e74 100644
--- a/core/res/res/values-land/arrays.xml
+++ b/core/res/res/values-land/arrays.xml
@@ -69,11 +69,4 @@
<item>@string/description_target_camera</item>
</array>
- <array name="lockscreen_chevron_drawables">
- <item>@null</item>
- <item>@drawable/ic_lockscreen_chevron_up</item>
- <item>@null</item>
- <item>@null</item>
- </array>
-
</resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 12086d1..0922667 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopijuoti URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Pasirinkti tekstą"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Teksto pasirinkimas"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Pridėti prie žodyno"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Ištrinti"</string>
<string name="inputMethod" msgid="1653630062304567879">"Įvesties būdas"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Teksto veiksmai"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Mažėja laisvos saugyklos vietos"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index c35fe72..75ec5ba 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopēt URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Atlasīt tekstu"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Teksta atlase"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Pievienot vārdnīcai"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Dzēst"</string>
<string name="inputMethod" msgid="1653630062304567879">"Ievades metode"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Teksta darbības"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Paliek maz brīvas vietas"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 7ee2a9c..73d6b54 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Salin URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Pilih teks"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Pemilihan teks"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Tambah ke kamus"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Padam"</string>
<string name="inputMethod" msgid="1653630062304567879">"Kaedah input"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Tindakan teks"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Ruang storan semakin berkurangan"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 0e50eee..de803b0 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopier URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Marker tekst"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Merket tekst"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Legg til i ordlisten"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Slett"</string>
<string name="inputMethod" msgid="1653630062304567879">"Inndatametode"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Teksthandlinger"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Lite ledig lagringsplass"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index c6eb4dc..0135d9f 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Copiar URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Selecionar texto"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Selecção de texto"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Adicionar ao dicionário"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Eliminar"</string>
<string name="inputMethod" msgid="1653630062304567879">"Método de entrada"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Acções de texto"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Está quase sem espaço de armazenamento"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 4915e7c..93d4f85 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Copiar URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Selecionar texto"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Seleção de texto"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Adicionar ao dicionário"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Excluir"</string>
<string name="inputMethod" msgid="1653630062304567879">"Método de entrada"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Ações de texto"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Pouco espaço de armazenamento"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 031f8ee..d69cb2e 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Copiaţi adresa URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Selectaţi text"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Selectare text"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Adăugaţi în dicţionar"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Ştergeţi"</string>
<string name="inputMethod" msgid="1653630062304567879">"Metodă de intrare"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Acţiuni pentru text"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Spaţiul de stocare aproape ocupat"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index b3fff5a..72b11f3 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Копировать URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Выбрать текст"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Выбор текста"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Добавить в словарь"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Удалить"</string>
<string name="inputMethod" msgid="1653630062304567879">"Способ ввода"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Операции с текстом"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Заканчивается свободное место"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index abb0f31..dccefa2 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Skopírovať adresu URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Vybrať text"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Výber textu"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Pridať do slovníka"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Odstrániť"</string>
<string name="inputMethod" msgid="1653630062304567879">"Metóda vstupu"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Operácie s textom"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Nedostatok ukladacieho priestoru"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index b5f9f8b..dce4e52 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopiraj URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Izbira besedila"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Izbrano besedilo"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Dodaj v slovar"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Izbriši"</string>
<string name="inputMethod" msgid="1653630062304567879">"Način vnosa"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Besedilna dejanja"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Prostor za shranjevanje bo pošel"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index b770d2f..5ef0bcf 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Копирај URL адресу"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Изабери текст"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Избор текста"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Додај у речник"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Избриши"</string>
<string name="inputMethod" msgid="1653630062304567879">"Метод уноса"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Радње у вези са текстом"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Простор за складиштење је на измаку"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 1015415..f9ab2ed 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopiera webbadress"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Markera text"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Textmarkering"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Lägg till i ordlista"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Ta bort"</string>
<string name="inputMethod" msgid="1653630062304567879">"Indatametod"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Textåtgärder"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Lagringsutrymmet börjar ta slut"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index bbb0681..7b1ee78 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -187,7 +187,7 @@
<string name="permgrouplab_storage" msgid="1971118770546336966">"Hifadhi"</string>
<string name="permgroupdesc_storage" product="nosdcard" msgid="7442318502446874999">"Fikia hifadhi ya USB."</string>
<string name="permgroupdesc_storage" product="default" msgid="9203302214915355774">"Fikia kadi ya SD."</string>
- <string name="permlab_statusBar" msgid="7417192629601890791">"lemaza au rekebisha mwambaa hali"</string>
+ <string name="permlab_statusBar" msgid="7417192629601890791">"zima au rekebisha mwambaa hali"</string>
<string name="permdesc_statusBar" msgid="8434669549504290975">"Inaruhusu programu kulemaza upau wa hali au kuongeza na kutoa ikoni za mfumo."</string>
<string name="permlab_statusBarService" msgid="7247281911387931485">"mwamba hali"</string>
<string name="permdesc_statusBarService" msgid="716113660795976060">"Inaruhusu programu kuwa upau wa hali."</string>
@@ -391,7 +391,7 @@
<string name="permdesc_recordAudio" msgid="4906839301087980680">"Inaruhusu programu kurekodi sauti kwa kinasa sauti. Idhini hii inaruhusu programu kurekodi sauti wakati wowote bila ya uthibitisho wako."</string>
<string name="permlab_camera" msgid="3616391919559751192">"chukua picha na video"</string>
<string name="permdesc_camera" msgid="8497216524735535009">"Inaruhusu programu kupiga picha na video kwa kamera. Kibali hiki kinaruhusu programu kutumia kamera kwa wakati wowote bila uthibitisho wako."</string>
- <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"lemaza kompyuta ndogo kabisa"</string>
+ <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"zima kompyuta ndogo kabisa"</string>
<string name="permlab_brick" product="default" msgid="8337817093326370537">"simu iliyolemazwa kabisa"</string>
<string name="permdesc_brick" product="tablet" msgid="4334818808001699530">"Inaruhusu programu kulemaza kompyuta yote kibao kabisa. Hii ni hatari sana."</string>
<string name="permdesc_brick" product="default" msgid="5788903297627283099">"Inaruhusu programu kulemaza simu yote kabisa. Hii ni hatari sana."</string>
@@ -508,7 +508,7 @@
<string name="permdesc_bluetooth" product="default" msgid="3207106324452312739">"Inaruhusu programu kuona usanidi wa Bluetooth kwenye simu, na kuunda na kukubali miunganisho kwa vifaa vilivyooanishwa."</string>
<string name="permlab_nfc" msgid="4423351274757876953">"dhibiti Mawasiliano Karibu na Uga"</string>
<string name="permdesc_nfc" msgid="7120611819401789907">"Inaruhusu programu kuwasiliana na lebo, kadi na wasomaji wa Near Field Communication (NFC)."</string>
- <string name="permlab_disableKeyguard" msgid="3598496301486439258">"lemaza kufuli la skrini yako"</string>
+ <string name="permlab_disableKeyguard" msgid="3598496301486439258">"zima kufuli la skrini yako"</string>
<string name="permdesc_disableKeyguard" msgid="6034203065077122992">"Inaruhusu programu kulemaza ufunguo wa vitufe na usalama mwingine ambata wa nenosiri. Kwa mfano, simu inalemaza ufunguo wa viitufe inapopokea simu inayoingia, kisha inawezesha upya ufunguo wa vitufe wakati simu inapokamilika."</string>
<string name="permlab_readSyncSettings" msgid="6201810008230503052">"soma mipangilio ya usawazishaji"</string>
<string name="permdesc_readSyncSettings" msgid="2706745674569678644">"Inaruhusu programu kusoma mipangilio ya upatanishi wa akaunti. Kwa mfano, huku kunaweza kuamua kama programu ya Watu imepatanishwa na akaunti."</string>
diff --git a/core/res/res/values-sw720dp-port/arrays.xml b/core/res/res/values-sw720dp-port/arrays.xml
deleted file mode 100644
index d845875..0000000
--- a/core/res/res/values-sw720dp-port/arrays.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <array name="lockscreen_chevron_drawables">
- <item>@drawable/ic_lockscreen_chevron_right</item>
- <item>@null</item>
- <item>@null</item>
- <item>@null</item>
- </array>
-
-</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index e92dcb3..3f6c173 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"คัดลอก URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"เลือกข้อความ"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"การเลือกข้อความ"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"เพิ่มในพจนานุกรม"</string>
+ <string name="deleteText" msgid="6979668428458199034">"ลบ"</string>
<string name="inputMethod" msgid="1653630062304567879">"วิธีป้อนข้อมูล"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"การทำงานของข้อความ"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"พื้นที่จัดเก็บเหลือน้อย"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 4110a5b..ea21b68 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopyahin ang URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Pumili ng teksto"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Pagpili ng teksto"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Idagdag sa diksyunaryo"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Tanggalin"</string>
<string name="inputMethod" msgid="1653630062304567879">"Pamamaraan ng pag-input"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Pagkilos ng teksto"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Nauubusan na ang puwang ng storage"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index e30df3e..777dd2a 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"URL\'yi kopyala"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Metin seç"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Metin seçimi"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Sözlüğe ekle"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Sil"</string>
<string name="inputMethod" msgid="1653630062304567879">"Giriş yöntemi"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Metin eylemleri"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Depolama alanı bitiyor"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index bf28dd3..8b1caf2 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Sao chép URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Chọn văn bản"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Lựa chọn văn bản"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Thêm vào từ điển"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Xóa"</string>
<string name="inputMethod" msgid="1653630062304567879">"Phương thức nhập"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Tác vụ văn bản"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Sắp hết dung lượng lưu trữ"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 4de19a1..ed1d8f9 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"复制网址"</string>
<string name="selectTextMode" msgid="1018691815143165326">"选择文字"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"文字选择"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"添加到词典"</string>
+ <string name="deleteText" msgid="6979668428458199034">"删除"</string>
<string name="inputMethod" msgid="1653630062304567879">"输入法"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"文字操作"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"存储空间不足"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 08dc94f..eced3ce 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"複製網址"</string>
<string name="selectTextMode" msgid="1018691815143165326">"選取文字"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"選取文字"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"加入字典"</string>
+ <string name="deleteText" msgid="6979668428458199034">"刪除"</string>
<string name="inputMethod" msgid="1653630062304567879">"輸入法"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"文字動作"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"儲存空間即將用盡"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 885849e..5116100 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -930,10 +930,8 @@
<string name="copyUrl" msgid="2538211579596067402">"Kopisha i-URL"</string>
<string name="selectTextMode" msgid="1018691815143165326">"Khetha umbhalo"</string>
<string name="textSelectionCABTitle" msgid="5236850394370820357">"Inketho yombhalo"</string>
- <!-- no translation found for addToDictionary (4352161534510057874) -->
- <skip />
- <!-- no translation found for deleteText (6979668428458199034) -->
- <skip />
+ <string name="addToDictionary" msgid="4352161534510057874">"Engeza kwisichazamazwi"</string>
+ <string name="deleteText" msgid="6979668428458199034">"Susa"</string>
<string name="inputMethod" msgid="1653630062304567879">"Indlela yokufakwayo"</string>
<string name="editTextMenuTitle" msgid="4909135564941815494">"Izenzo zombhalo"</string>
<string name="low_internal_storage_view_title" msgid="5576272496365684834">"Isikhala sokulondoloza siyaphela"</string>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index b425ad7..8615476 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -242,8 +242,6 @@
<item>@drawable/list_divider_holo_dark</item>
<item>@drawable/list_divider_holo_light</item>
<item>@drawable/list_divider_holo_light</item>
- <item>@drawable/ic_lockscreen_chevron_left</item>
- <item>@drawable/ic_lockscreen_chevron_right</item>
<item>@drawable/ab_transparent_dark_holo</item>
<item>@drawable/ab_stacked_transparent_dark_holo</item>
<item>@drawable/ab_bottom_transparent_dark_holo</item>
@@ -400,11 +398,4 @@
<item>@null</item>
</array>
- <array name="lockscreen_chevron_drawables">
- <item>@drawable/ic_lockscreen_chevron_right</item>
- <item>@null</item>
- <item>@null</item>
- <item>@null</item>
- </array>
-
</resources>
diff --git a/data/fonts/AndroidEmoji.ttf b/data/fonts/AndroidEmoji.ttf
index 4c017d5..92bf047 100644
--- a/data/fonts/AndroidEmoji.ttf
+++ b/data/fonts/AndroidEmoji.ttf
Binary files differ
diff --git a/docs/html/guide/google/gcm/c2dm.jd b/docs/html/guide/google/gcm/c2dm.jd
index 91c6ac5..ecc08c1 100644
--- a/docs/html/guide/google/gcm/c2dm.jd
+++ b/docs/html/guide/google/gcm/c2dm.jd
@@ -17,7 +17,11 @@
<ol>
<li><a href="#history">Historical Overview</a></li>
-<li><a href="#diffs">How is GCM Different from C2DM?</a></li>
+<li><a href="#diffs">How is GCM Different from C2DM?</a>
+ <ol>
+ <li><a href="#interop">Relationship between C2DM and GCM</a></li>
+ </ol>
+</li>
<li><a href="#migrating">Migrating Your Apps</a>
<ol>
<li><a href="#client">Client changes</a></li>
@@ -72,6 +76,14 @@
<dd>There may be situations where the server ends up with 2 registration IDs for the same device. If the GCM response contains a registration ID, simply replace the registration ID you have with the one provided. With this feature your application doesn't need to send the device ID to your server anymore. For more information, see <a href="adv.html#canonical">Advanced Topics</a>.</dd>
</dl>
<p>GCM also provides helper libraries (<a href="{@docRoot}guide/google/gcm/client-javadoc/index.html">client</a> and <a href="{@docRoot}guide/google/gcm/server-javadoc/index.html">server</a>) to make writing your code easier.</p>
+
+<h3 id="interop">Relationship between C2DM and GCM</h3>
+
+<p>C2DM and GCM are not interoperable. For example, you cannot post notifications from GCM to C2DM registration IDs, nor can you use C2DM registration IDs as GCM registration IDs. From your server-side application, you must keep keep track of whether a registration ID is from C2DM or GCM and use the proper endpoint. </p>
+
+<p>As you transition from C2DM to GCM, your server needs to be aware of whether a given registration ID
+contains an old C2DM sender or a new GCM project ID. This is the approach we recommend: have the new app version (the one that uses GCM) send a bit along with the registration ID. This bit tells your server that this registration ID is for GCM. If you don't get the extra bit, you mark the registration ID as C2DM. Once no more valid registration IDs are marked as C2DM, you can complete the migration.</p>
+
<h2 id="migrating">Migrating Your Apps</h2>
<p>This section describes how to move existing C2DM apps to GCM.</p>
<h3 id="client">Client changes</h3>
diff --git a/docs/html/guide/google/gcm/demo.jd b/docs/html/guide/google/gcm/demo.jd
index 2e1e975..4c56373 100644
--- a/docs/html/guide/google/gcm/demo.jd
+++ b/docs/html/guide/google/gcm/demo.jd
@@ -74,11 +74,11 @@
<li> From the SDK Manager, install <strong>Extras > Google Cloud Messaging for Android Library</strong>.
- <p>This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-demo-appengine</code>, <code>gcm-demo-client</code>, <code>gcm-demo-server</code>, and <code>gcm-server</code>.</p>
+ <p>This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-server</code>, <code>samples/gcm-demo-client</code>, <code>samples/gcm-demo-server</code>, and <code>samples/gcm-demo-appengine</code>.</p>
</li>
- <li>In a text editor, edit the <code>gcm-demo-server/WebContent/WEB-INF/classes/api.key</code> and replace the existing text with the API key obtained above.</li>
- <li>In a shell window, go to the <code>gcm-demo-server</code> directory.</li>
+ <li>In a text editor, edit the <code>samples/gcm-demo-server/WebContent/WEB-INF/classes/api.key</code> and replace the existing text with the API key obtained above.</li>
+ <li>In a shell window, go to the <code>samples/gcm-demo-server</code> directory.</li>
<li>Generate the server's WAR file by running <code>ant war</code>:</li>
<pre class="prettyprint">$ ant war
@@ -112,13 +112,13 @@
<p>To set up the server using a standard App Engine for Java:</p>
<ol>
<li> From the SDK Manager, install <strong>Extras > Google Cloud Messaging for Android Library</strong>.
- <p>This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-demo-appengine</code>, <code>gcm-demo-client</code>, <code>gcm-demo-server</code>, and <code>gcm-server</code>.</p>
+ <p>This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-server</code>, <code>samples/gcm-demo-client</code>, <code>samples/gcm-demo-server</code>, and <code>samples/gcm-demo-appengine</code>.</p>
</li>
- <li>In a text editor, edit the <code>gcm-demo-appengine/src/com/google/android/gcm/demo/server/ApiKeyInitializer.java</code> and replace the existing text with the API key obtained above.
+ <li>In a text editor, edit <code>samples/gcm-demo-appengine/src/com/google/android/gcm/demo/server/ApiKeyInitializer.java</code> and replace the existing text with the API key obtained above.
<p class="note"><strong>Note:</strong> The API key value set in that class will be used just once to create a persistent entity on App Engine. If you deploy the application, you can use App Engine's <code>Datastore Viewer</code> to change it later.</p>
</li>
- <li>In a shell window, go to the <code>gcm-api-server</code> directory.</li>
+ <li>In a shell window, go to the <code>samples/gcm-demo-appengine</code> directory.</li>
<li>Start the development App Engine server by <code>ant runserver</code>, using the <code>-Dsdk.dir</code> to indicate the location of the App Engine SDK and <code>-Dserver.host</code> to set your server's hostname or IP address:</li>
<pre class="prettyprint">
@@ -163,9 +163,9 @@
<p>To set up the device:</p>
<ol>
<li> From the SDK Manager, install <strong>Extras > Google Cloud Messaging for Android Library</strong>.
- <p>This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-demo-appengine</code>, <code>gcm-demo-client</code>, <code>gcm-demo-server</code>, <code>gcm-server</code>, and <code>source.properties</code>.</p>
+ <p>This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-server</code>, <code>samples/gcm-demo-client</code>, <code>samples/gcm-demo-server</code>, and <code>samples/gcm-demo-appengine</code>.</p>
</li>
- <li>Using a text editor, open <code>gcm-demo-client/src/com/google/android/gcm/demo/app/CommonUtilities.java</code> and set the proper values for the <code>SENDER_ID</code> and <code>SERVER_URL</code> constants. For example:</li>
+ <li>Using a text editor, open <code>samples/gcm-demo-client/src/com/google/android/gcm/demo/app/CommonUtilities.java</code> and set the proper values for the <code>SENDER_ID</code> and <code>SERVER_URL</code> constants. For example:</li>
<pre class="prettyprint pretty-java">
static final String SERVER_URL = "http://192.168.1.10:8080/gcm-demo";
diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd
index d871fb4..3884244 100644
--- a/docs/html/guide/google/gcm/gcm.jd
+++ b/docs/html/guide/google/gcm/gcm.jd
@@ -620,7 +620,7 @@
Authorization:key=AIzaSyB-1uEai2WiUapxCs2Q0GZYzPu7Udno5aA
{
- "registration_id" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...",
+ "registration_ids" : ["APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx..."],
"data" : {
...
},
@@ -874,7 +874,10 @@
<li>Implement exponential back-off in your retry mechanism. This means an exponentially increasing delay after each failed retry (e.g. if you waited one second before the first retry, wait at least two second before the next one, then 4 seconds and so on). If you're sending multiple messages, delay each one independently by an additional random amount to avoid issuing a new request for all messages at the same time.</li>
</ul>
Senders that cause problems risk being blacklisted.
-<br/>Happens when the HTTP status code is 500 or 503; or when the <code>error</code> field of a JSON object in the <code>results</code> array is <code>Unavailable</code>.
+<br/>Happens when the HTTP status code is 500 or 503, or when the <code>error</code> field of a JSON object in the <code>results</code> array is <code>InternalServerError</code> or <code>Unavailable</code>.</dd>
+
+<dt id="ttl_error"><strong>Invalid Time To Live</strong></dt>
+ <dd>The value for the Time to Live field must be an integer representing a duration in seconds between 0 and 2,419,200 (4 weeks). Happens when error code is <code>InvalidTtl</code>.
</dd>
</dl>
<h4>Example responses</h4>
diff --git a/docs/html/guide/google/gcm/gs.jd b/docs/html/guide/google/gcm/gs.jd
index 5e426c2..8f05d30 100644
--- a/docs/html/guide/google/gcm/gs.jd
+++ b/docs/html/guide/google/gcm/gs.jd
@@ -85,7 +85,7 @@
<p class="note"><strong>Note:</strong> If you need to rotate the key, click <strong>Generate new key</strong>. A new key will be created while the old one will still be active for up to 24 hours. If you want to get rid of the old key immediately (for example, if you feel it was compromised), click <strong>Delete key</strong>.</p>
<h2 id="libs">Install the Helper Libraries</h2>
-<p>To perform the steps described in the following sections, you must first install the helper libraries (reference: <a href="{@docRoot}guide/google/gcm/client-javadoc/index.html">client</a> and <a href="{@docRoot}guide/google/gcm/server-javadoc/index.html">server</a>). From the SDK Manager, install <strong>Extras > Google Cloud Messaging for Android Library</strong>. This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-demo-appengine</code>, <code>gcm-demo-client</code>, <code>gcm-demo-server</code>, and <code>gcm-server</code>.</p>
+<p>To perform the steps described in the following sections, you must first install the helper libraries (reference: <a href="{@docRoot}guide/google/gcm/client-javadoc/index.html">client</a> and <a href="{@docRoot}guide/google/gcm/server-javadoc/index.html">server</a>). From the SDK Manager, install <strong>Extras > Google Cloud Messaging for Android Library</strong>. This creates a <code>gcm</code> directory under <code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these subdirectories: <code>gcm-client</code>, <code>gcm-server</code>, <code>samples/gcm-demo-client</code>, <code>samples/gcm-demo-server</code>, and <code>samples/gcm-demo-appengine</code>.</p>
<h2 id="android-app">Writing the Android Application</h2>
<p>This section describes the steps involved in writing an Android application that uses GCM.</p>
<h4>Step 1: Copy the gcm.jar file into your application classpath</h4>
@@ -104,9 +104,16 @@
<p> This permission must be called <code>my_app_package.permission.C2D_MESSAGE</code> (where <code>my_app_package</code> is the package name of your app as defined by the manifest tag), otherwise it will not work.</p>
<p class="note"><strong>Note:</strong> This permission is not required if you are targeting your application to 4.1 or above (i.e., minSdkVersion 16)</p>
- <li>Add the permission to receive GCM messages:</li>
+ <li>Add the following permissions:</li>
-<pre class="prettyprint pretty-xml"><uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /></pre>
+<pre class="prettyprint pretty-xml"><!-- App receives GCM messages. -->
+<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
+<!-- GCM connects to Google Services. -->
+<uses-permission android:name="android.permission.INTERNET" />
+<!-- GCM requires a Google account. -->
+<uses-permission android:name="android.permission.GET_ACCOUNTS" />
+<!-- Keeps the processor from sleeping when a message is received. -->
+<uses-permission android:name="android.permission.WAKE_LOCK" /></pre>
<li>Add the following broadcast receiver:</li>
@@ -127,7 +134,7 @@
<pre class="prettyprint pretty-xml"><service android:name=".GCMIntentService" /></pre>
</ol>
-<p> This intent service will be called by the <code>GCMBroadcastReceiver</code> (which is is provided by GCM library), as shown in the next step. It must be named <code>my_app_package.GCMIntentService</code>, unless you use a subclass of <code>GCMBroadcastReceiver</code> that overrides the method used to name the service.</p>
+<p>This intent service will be called by the <code>GCMBroadcastReceiver</code> (which is is provided by GCM library), as shown in the next step. It must be a subclass of <code>com.google.android.gcm.GCMBaseIntentService</code>, must contain a public constructor, and should be named <code>my_app_package.GCMIntentService</code> (unless you use a subclass of <code>GCMBroadcastReceiver</code> that overrides the method used to name the service).</p>
<h4><br>
Step 3: Write the my_app_package.GCMIntentService class</h4>
<p>Next write the <code>my_app_package.GCMIntentService</code> class, overriding the following callback methods (which are called by <code>GCMBroadcastReceiver</code>):<br>
diff --git a/docs/html/guide/google/gcm/index.jd b/docs/html/guide/google/gcm/index.jd
index cba8d0b..140b076 100644
--- a/docs/html/guide/google/gcm/index.jd
+++ b/docs/html/guide/google/gcm/index.jd
@@ -5,7 +5,7 @@
<p><img src="{@docRoot}images/gcm/gcm-logo.png" /></p>
<p>Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.</p>
-<p>To learn more about GCM, read the following documents:</p>
+<p>To learn more about GCM, you can join the <a href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a> and read the following documents:</p>
<dl>
<dt><strong><a href="{@docRoot}guide/google/gcm/gs.html">Getting Started</a></strong></dt>
@@ -23,3 +23,4 @@
<p>GCM also provides helper libraries for <a href="{@docRoot}guide/google/gcm/client-javadoc/index.html"><strong>client</strong></a> and <a href="{@docRoot}guide/google/gcm/server-javadoc/index.html"><strong>server</strong></a> development.</p>
+
diff --git a/docs/html/tools/adk/adk2.jd b/docs/html/tools/adk/adk2.jd
index ee9c0d8..d5be8ab 100644
--- a/docs/html/tools/adk/adk2.jd
+++ b/docs/html/tools/adk/adk2.jd
@@ -26,10 +26,12 @@
<h2>See also</h2>
<ol>
+ <li><a href="https://developers.google.com/events/io/sessions/gooio2012/128/">
+ Google I/O Session Video</a></li>
<li><a href="aoa.html">Android Open Accessory Protocol</a></li>
<li><a href="aoa2.html">Android Open Accessory Protocol 2.0</a></li>
- <li><a href="{@docRoot}guide/topics/connectivity/usb/accessory.html">USB Accessory Dev
- Guide</a></li>
+ <li><a href="{@docRoot}guide/topics/connectivity/usb/accessory.html">
+ USB Accessory Dev Guide</a></li>
</ol>
</div>
</div>
@@ -231,7 +233,12 @@
system.</li>
<li>Download and setup the {@code repo} tool, as described on the <a
href="http://source.android.com/source/downloading.html#installing-repo">Android open source
-project</a> site.</li>
+project</a> site.
+ <p class="note"><strong>Note:</strong> Developers using Windows must use a Linux compatibility
+package, such as <a href="http://www.cygwin.com/">cygwin</a>, to install and run {@code repo}.
+Within your compatibility environment, you must install {@code curl}, {@code git} and {@code
+python} to be able to download and use the {@code repo} tool.</p>
+ </li>
<li>In a terminal window, create a new directory for the downloaded source files, initialize and
synchronize a local repository:
<pre>
@@ -268,7 +275,7 @@
href="http://java.oracle.com">java.oracle.com</a>.</li>
<li>Download the ADK 2012 IDE for your development platform:
<ul>
- <li><a href="https://dl-ssl.google.com/android/adk/adk2012_ide-win32-20120626.zip">
+ <li><a href="https://dl-ssl.google.com/android/adk/adk2012_ide-win32-20120629.zip">
Windows</a></li>
<li><a href="https://dl-ssl.google.com/android/adk/adk2012_ide-macosx-20120626.zip">
Mac</a></li>
diff --git a/graphics/java/android/renderscript/Matrix2f.java b/graphics/java/android/renderscript/Matrix2f.java
index acc5bd8..39abd4f 100644
--- a/graphics/java/android/renderscript/Matrix2f.java
+++ b/graphics/java/android/renderscript/Matrix2f.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 2009-2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,23 +59,23 @@
/**
* Returns the value for a given row and column
*
- * @param i row of the value to return
- * @param j column of the value to return
+ * @param x column of the value to return
+ * @param y row of the value to return
*
- * @return value in the ith row and jth column
+ * @return value in the yth row and xth column
*/
- public float get(int i, int j) {
- return mMat[i*2 + j];
+ public float get(int x, int y) {
+ return mMat[x*2 + y];
}
/**
* Sets the value for a given row and column
*
- * @param i row of the value to set
- * @param j column of the value to set
+ * @param x column of the value to set
+ * @param y row of the value to set
*/
- public void set(int i, int j, float v) {
- mMat[i*2 + j] = v;
+ public void set(int x, int y, float v) {
+ mMat[x*2 + y] = v;
}
/**
diff --git a/graphics/java/android/renderscript/Matrix3f.java b/graphics/java/android/renderscript/Matrix3f.java
index 253506d..66f2c81 100644
--- a/graphics/java/android/renderscript/Matrix3f.java
+++ b/graphics/java/android/renderscript/Matrix3f.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 2009-2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,23 +59,23 @@
/**
* Returns the value for a given row and column
*
- * @param i row of the value to return
- * @param j column of the value to return
+ * @param x column of the value to return
+ * @param y row of the value to return
*
- * @return value in the ith row and jth column
+ * @return value in the yth row and xth column
*/
- public float get(int i, int j) {
- return mMat[i*3 + j];
+ public float get(int x, int y) {
+ return mMat[x*3 + y];
}
/**
* Sets the value for a given row and column
*
- * @param i row of the value to set
- * @param j column of the value to set
+ * @param x column of the value to set
+ * @param y row of the value to set
*/
- public void set(int i, int j, float v) {
- mMat[i*3 + j] = v;
+ public void set(int x, int y, float v) {
+ mMat[x*3 + y] = v;
}
/**
diff --git a/graphics/java/android/renderscript/Matrix4f.java b/graphics/java/android/renderscript/Matrix4f.java
index adc1806..a85d464 100644
--- a/graphics/java/android/renderscript/Matrix4f.java
+++ b/graphics/java/android/renderscript/Matrix4f.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 2009-2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,23 +59,23 @@
/**
* Returns the value for a given row and column
*
- * @param i row of the value to return
- * @param j column of the value to return
+ * @param x column of the value to return
+ * @param y row of the value to return
*
- * @return value in the ith row and jth column
+ * @return value in the yth row and xth column
*/
- public float get(int i, int j) {
- return mMat[i*4 + j];
+ public float get(int x, int y) {
+ return mMat[x*4 + y];
}
/**
* Sets the value for a given row and column
*
- * @param i row of the value to set
- * @param j column of the value to set
+ * @param x column of the value to set
+ * @param y row of the value to set
*/
- public void set(int i, int j, float v) {
- mMat[i*4 + j] = v;
+ public void set(int x, int y, float v) {
+ mMat[x*4 + y] = v;
}
/**
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 2e153dd..d2a8298 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -143,11 +143,12 @@
private static final int MSG_REEVALUATE_REMOTE = 17;
private static final int MSG_RCC_NEW_PLAYBACK_INFO = 18;
private static final int MSG_RCC_NEW_VOLUME_OBS = 19;
+ private static final int MSG_SET_FORCE_BT_A2DP_USE = 20;
// start of messages handled under wakelock
// these messages can only be queued, i.e. sent with queueMsgUnderWakeLock(),
// and not with sendMsg(..., ..., SENDMSG_QUEUE, ...)
- private static final int MSG_SET_WIRED_DEVICE_CONNECTION_STATE = 20;
- private static final int MSG_SET_A2DP_CONNECTION_STATE = 21;
+ private static final int MSG_SET_WIRED_DEVICE_CONNECTION_STATE = 21;
+ private static final int MSG_SET_A2DP_CONNECTION_STATE = 22;
// end of messages handled under wakelock
// flags for MSG_PERSIST_VOLUME indicating if current and/or last audible volume should be
@@ -381,7 +382,7 @@
// message looper for SoundPool listener
private Looper mSoundPoolLooper = null;
// volume applied to sound played with playSoundEffect()
- private static int SOUND_EFFECT_VOLUME_DB;
+ private static int sSoundEffectVolumeDb;
// getActiveStreamType() will return STREAM_NOTIFICATION during this period after a notification
// stopped
private static final int NOTIFICATION_VOLUME_DELAY_MS = 5000;
@@ -438,7 +439,7 @@
"ro.config.vc_call_vol_steps",
MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
- SOUND_EFFECT_VOLUME_DB = context.getResources().getInteger(
+ sSoundEffectVolumeDb = context.getResources().getInteger(
com.android.internal.R.integer.config_soundEffectVolumeDb);
mVolumePanel = new VolumePanel(context, this);
@@ -1701,7 +1702,13 @@
/** @see AudioManager#setBluetoothA2dpOn() */
public void setBluetoothA2dpOn(boolean on) {
- setBluetoothA2dpOnInt(on);
+ synchronized (mBluetoothA2dpEnabledLock) {
+ mBluetoothA2dpEnabled = on;
+ sendMsg(mAudioHandler, MSG_SET_FORCE_BT_A2DP_USE, SENDMSG_QUEUE,
+ AudioSystem.FOR_MEDIA,
+ mBluetoothA2dpEnabled ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP,
+ null, 0);
+ }
}
/** @see AudioManager#isBluetoothA2dpOn() */
@@ -2875,7 +2882,7 @@
float volFloat;
// use default if volume is not specified by caller
if (volume < 0) {
- volFloat = (float)Math.pow(10, SOUND_EFFECT_VOLUME_DB/20);
+ volFloat = (float)Math.pow(10, (float)sSoundEffectVolumeDb/20);
} else {
volFloat = (float) volume / 1000.0f;
}
@@ -3049,6 +3056,7 @@
break;
case MSG_SET_FORCE_USE:
+ case MSG_SET_FORCE_BT_A2DP_USE:
setForceUse(msg.arg1, msg.arg2);
break;
@@ -5290,10 +5298,9 @@
public void setBluetoothA2dpOnInt(boolean on) {
synchronized (mBluetoothA2dpEnabledLock) {
mBluetoothA2dpEnabled = on;
- sendMsg(mAudioHandler, MSG_SET_FORCE_USE, SENDMSG_QUEUE,
- AudioSystem.FOR_MEDIA,
- mBluetoothA2dpEnabled ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP,
- null, 0);
+ mAudioHandler.removeMessages(MSG_SET_FORCE_BT_A2DP_USE);
+ AudioSystem.setForceUse(AudioSystem.FOR_MEDIA,
+ mBluetoothA2dpEnabled ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP);
}
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java
index 25b6e7f..67da6ac 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java
@@ -24,6 +24,7 @@
import android.hardware.Camera;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
+import android.os.Environment;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;
import android.util.Log;
@@ -66,6 +67,9 @@
private int mTotalNotSeekable = 0;
private int mTotalMetaDataUpdate = 0;
+ //Test result output file
+ private static final String PLAYBACK_RESULT = "PlaybackTestResult.txt";
+
private void writeTestOutput(String filename, Writer output) throws Exception{
output.write("File Name: " + filename);
output.write(" Complete: " + CodecTest.onCompleteSuccess);
@@ -109,27 +113,19 @@
@LargeTest
public void testVideoPlayback() throws Exception {
String fileWithError = "Filename:\n";
- File playbackOutput = new File("/sdcard/PlaybackTestResult.txt");
+ File playbackOutput = new File(Environment.getExternalStorageDirectory(), PLAYBACK_RESULT);
Writer output = new BufferedWriter(new FileWriter(playbackOutput, true));
boolean testResult = true;
// load directory files
boolean onCompleteSuccess = false;
File dir = new File(MediaNames.MEDIA_SAMPLE_POOL);
-
- Instrumentation inst = getInstrumentation();
- Intent intent = new Intent();
-
- intent.setClass(getInstrumentation().getTargetContext(), MediaFrameworkTest.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
String[] children = dir.list();
if (children == null) {
Log.v("MediaPlayerApiTest:testMediaSamples", "dir is empty");
return;
} else {
for (int i = 0; i < children.length; i++) {
- Activity act = inst.startActivitySync(intent);
//Get filename of directory
String filename = children[i];
onCompleteSuccess =
@@ -141,8 +137,6 @@
testResult = false;
}
Thread.sleep(3000);
- //Call onCreat to recreate the surface
- act.finish();
//Write test result to an output file
writeTestOutput(filename,output);
//Get the summary
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java
new file mode 100644
index 0000000..31fc04aa
--- /dev/null
+++ b/opengl/java/android/opengl/EGL14.java
@@ -0,0 +1,446 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+// This source file is automatically generated
+
+package android.opengl;
+
+import android.graphics.SurfaceTexture;
+import android.view.Surface;
+import android.view.SurfaceView;
+import android.view.SurfaceHolder;
+
+
+/**
+* @hide
+*/
+public class EGL14 {
+
+public static final int EGL_DEFAULT_DISPLAY = 0;
+public static EGLContext EGL_NO_CONTEXT = null;
+public static EGLDisplay EGL_NO_DISPLAY = null;
+public static EGLSurface EGL_NO_SURFACE = null;
+
+public static final int EGL_FALSE = 0;
+public static final int EGL_TRUE = 1;
+public static final int EGL_SUCCESS = 0x3000;
+public static final int EGL_NOT_INITIALIZED = 0x3001;
+public static final int EGL_BAD_ACCESS = 0x3002;
+public static final int EGL_BAD_ALLOC = 0x3003;
+public static final int EGL_BAD_ATTRIBUTE = 0x3004;
+public static final int EGL_BAD_CONFIG = 0x3005;
+public static final int EGL_BAD_CONTEXT = 0x3006;
+public static final int EGL_BAD_CURRENT_SURFACE = 0x3007;
+public static final int EGL_BAD_DISPLAY = 0x3008;
+public static final int EGL_BAD_MATCH = 0x3009;
+public static final int EGL_BAD_NATIVE_PIXMAP = 0x300A;
+public static final int EGL_BAD_NATIVE_WINDOW = 0x300B;
+public static final int EGL_BAD_PARAMETER = 0x300C;
+public static final int EGL_BAD_SURFACE = 0x300D;
+public static final int EGL_CONTEXT_LOST = 0x300E;
+public static final int EGL_BUFFER_SIZE = 0x3020;
+public static final int EGL_ALPHA_SIZE = 0x3021;
+public static final int EGL_BLUE_SIZE = 0x3022;
+public static final int EGL_GREEN_SIZE = 0x3023;
+public static final int EGL_RED_SIZE = 0x3024;
+public static final int EGL_DEPTH_SIZE = 0x3025;
+public static final int EGL_STENCIL_SIZE = 0x3026;
+public static final int EGL_CONFIG_CAVEAT = 0x3027;
+public static final int EGL_CONFIG_ID = 0x3028;
+public static final int EGL_LEVEL = 0x3029;
+public static final int EGL_MAX_PBUFFER_HEIGHT = 0x302A;
+public static final int EGL_MAX_PBUFFER_PIXELS = 0x302B;
+public static final int EGL_MAX_PBUFFER_WIDTH = 0x302C;
+public static final int EGL_NATIVE_RENDERABLE = 0x302D;
+public static final int EGL_NATIVE_VISUAL_ID = 0x302E;
+public static final int EGL_NATIVE_VISUAL_TYPE = 0x302F;
+public static final int EGL_SAMPLES = 0x3031;
+public static final int EGL_SAMPLE_BUFFERS = 0x3032;
+public static final int EGL_SURFACE_TYPE = 0x3033;
+public static final int EGL_TRANSPARENT_TYPE = 0x3034;
+public static final int EGL_TRANSPARENT_BLUE_VALUE = 0x3035;
+public static final int EGL_TRANSPARENT_GREEN_VALUE = 0x3036;
+public static final int EGL_TRANSPARENT_RED_VALUE = 0x3037;
+public static final int EGL_NONE = 0x3038;
+public static final int EGL_BIND_TO_TEXTURE_RGB = 0x3039;
+public static final int EGL_BIND_TO_TEXTURE_RGBA = 0x303A;
+public static final int EGL_MIN_SWAP_INTERVAL = 0x303B;
+public static final int EGL_MAX_SWAP_INTERVAL = 0x303C;
+public static final int EGL_LUMINANCE_SIZE = 0x303D;
+public static final int EGL_ALPHA_MASK_SIZE = 0x303E;
+public static final int EGL_COLOR_BUFFER_TYPE = 0x303F;
+public static final int EGL_RENDERABLE_TYPE = 0x3040;
+public static final int EGL_MATCH_NATIVE_PIXMAP = 0x3041;
+public static final int EGL_CONFORMANT = 0x3042;
+public static final int EGL_SLOW_CONFIG = 0x3050;
+public static final int EGL_NON_CONFORMANT_CONFIG = 0x3051;
+public static final int EGL_TRANSPARENT_RGB = 0x3052;
+public static final int EGL_RGB_BUFFER = 0x308E;
+public static final int EGL_LUMINANCE_BUFFER = 0x308F;
+public static final int EGL_NO_TEXTURE = 0x305C;
+public static final int EGL_TEXTURE_RGB = 0x305D;
+public static final int EGL_TEXTURE_RGBA = 0x305E;
+public static final int EGL_TEXTURE_2D = 0x305F;
+public static final int EGL_PBUFFER_BIT = 0x0001;
+public static final int EGL_PIXMAP_BIT = 0x0002;
+public static final int EGL_WINDOW_BIT = 0x0004;
+public static final int EGL_VG_COLORSPACE_LINEAR_BIT = 0x0020;
+public static final int EGL_VG_ALPHA_FORMAT_PRE_BIT = 0x0040;
+public static final int EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200;
+public static final int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400;
+public static final int EGL_OPENGL_ES_BIT = 0x0001;
+public static final int EGL_OPENVG_BIT = 0x0002;
+public static final int EGL_OPENGL_ES2_BIT = 0x0004;
+public static final int EGL_OPENGL_BIT = 0x0008;
+public static final int EGL_VENDOR = 0x3053;
+public static final int EGL_VERSION = 0x3054;
+public static final int EGL_EXTENSIONS = 0x3055;
+public static final int EGL_CLIENT_APIS = 0x308D;
+public static final int EGL_HEIGHT = 0x3056;
+public static final int EGL_WIDTH = 0x3057;
+public static final int EGL_LARGEST_PBUFFER = 0x3058;
+public static final int EGL_TEXTURE_FORMAT = 0x3080;
+public static final int EGL_TEXTURE_TARGET = 0x3081;
+public static final int EGL_MIPMAP_TEXTURE = 0x3082;
+public static final int EGL_MIPMAP_LEVEL = 0x3083;
+public static final int EGL_RENDER_BUFFER = 0x3086;
+public static final int EGL_VG_COLORSPACE = 0x3087;
+public static final int EGL_VG_ALPHA_FORMAT = 0x3088;
+public static final int EGL_HORIZONTAL_RESOLUTION = 0x3090;
+public static final int EGL_VERTICAL_RESOLUTION = 0x3091;
+public static final int EGL_PIXEL_ASPECT_RATIO = 0x3092;
+public static final int EGL_SWAP_BEHAVIOR = 0x3093;
+public static final int EGL_MULTISAMPLE_RESOLVE = 0x3099;
+public static final int EGL_BACK_BUFFER = 0x3084;
+public static final int EGL_SINGLE_BUFFER = 0x3085;
+public static final int EGL_VG_COLORSPACE_sRGB = 0x3089;
+public static final int EGL_VG_COLORSPACE_LINEAR = 0x308A;
+public static final int EGL_VG_ALPHA_FORMAT_NONPRE = 0x308B;
+public static final int EGL_VG_ALPHA_FORMAT_PRE = 0x308C;
+public static final int EGL_DISPLAY_SCALING = 10000;
+public static final int EGL_BUFFER_PRESERVED = 0x3094;
+public static final int EGL_BUFFER_DESTROYED = 0x3095;
+public static final int EGL_OPENVG_IMAGE = 0x3096;
+public static final int EGL_CONTEXT_CLIENT_TYPE = 0x3097;
+public static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
+public static final int EGL_MULTISAMPLE_RESOLVE_DEFAULT = 0x309A;
+public static final int EGL_MULTISAMPLE_RESOLVE_BOX = 0x309B;
+public static final int EGL_OPENGL_ES_API = 0x30A0;
+public static final int EGL_OPENVG_API = 0x30A1;
+public static final int EGL_OPENGL_API = 0x30A2;
+public static final int EGL_DRAW = 0x3059;
+public static final int EGL_READ = 0x305A;
+public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
+
+ native private static void _nativeClassInit();
+ static {
+ _nativeClassInit();
+ }
+ /* @hide C function EGLint eglGetError ( void ) */
+
+ public static native int eglGetError(
+ );
+
+ /* @hide C function EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
+
+ public static native EGLDisplay eglGetDisplay(
+ int display_id
+ );
+
+ /* @hide C function EGLBoolean eglInitialize ( EGLDisplay dpy, EGLint *major, EGLint *minor ) */
+
+ public static native boolean eglInitialize(
+ EGLDisplay dpy,
+ int[] major,
+ int majorOffset,
+ int[] minor,
+ int minorOffset
+ );
+
+ /* @hide C function EGLBoolean eglTerminate ( EGLDisplay dpy ) */
+
+ public static native boolean eglTerminate(
+ EGLDisplay dpy
+ );
+
+ // C function const char * eglQueryString ( EGLDisplay dpy, EGLint name )
+
+ public static native String eglQueryString(
+ EGLDisplay dpy,
+ int name
+ );
+ /* @hide C function EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+
+ public static native boolean eglGetConfigs(
+ EGLDisplay dpy,
+ EGLConfig[] configs,
+ int configsOffset,
+ int config_size,
+ int[] num_config,
+ int num_configOffset
+ );
+
+ /* @hide C function EGLBoolean eglChooseConfig ( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+
+ public static native boolean eglChooseConfig(
+ EGLDisplay dpy,
+ int[] attrib_list,
+ int attrib_listOffset,
+ EGLConfig[] configs,
+ int configsOffset,
+ int config_size,
+ int[] num_config,
+ int num_configOffset
+ );
+
+ /* @hide C function EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value ) */
+
+ public static native boolean eglGetConfigAttrib(
+ EGLDisplay dpy,
+ EGLConfig config,
+ int attribute,
+ int[] value,
+ int offset
+ );
+
+ // C function EGLSurface eglCreateWindowSurface ( EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list )
+
+ private static native EGLSurface _eglCreateWindowSurface(
+ EGLDisplay dpy,
+ EGLConfig config,
+ Object win,
+ int[] attrib_list,
+ int offset
+ );
+
+ private static native EGLSurface _eglCreateWindowSurfaceTexture(
+ EGLDisplay dpy,
+ EGLConfig config,
+ Object win,
+ int[] attrib_list,
+ int offset
+ );
+
+ public static EGLSurface eglCreateWindowSurface(EGLDisplay dpy,
+ EGLConfig config,
+ Object win,
+ int[] attrib_list,
+ int offset
+ ){
+ Surface sur = null;
+ if (win instanceof SurfaceView) {
+ SurfaceView surfaceView = (SurfaceView)win;
+ sur = surfaceView.getHolder().getSurface();
+ } else if (win instanceof SurfaceHolder) {
+ SurfaceHolder holder = (SurfaceHolder)win;
+ sur = holder.getSurface();
+ }
+
+ EGLSurface surface;
+ if (sur != null) {
+ surface = _eglCreateWindowSurface(dpy, config, sur, attrib_list, offset);
+ } else if (win instanceof SurfaceTexture) {
+ surface = _eglCreateWindowSurfaceTexture(dpy, config,
+ win, attrib_list, offset);
+ } else {
+ throw new java.lang.UnsupportedOperationException(
+ "eglCreateWindowSurface() can only be called with an instance of " +
+ "SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
+ "this will be fixed later.");
+ }
+
+ return surface;
+ }
+ /* @hide C function EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list ) */
+
+ public static native EGLSurface eglCreatePbufferSurface(
+ EGLDisplay dpy,
+ EGLConfig config,
+ int[] attrib_list,
+ int offset
+ );
+
+ /* @hide C function EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) */
+
+ public static native EGLSurface eglCreatePixmapSurface(
+ EGLDisplay dpy,
+ EGLConfig config,
+ int pixmap,
+ int[] attrib_list,
+ int offset
+ );
+
+ /* @hide C function EGLBoolean eglDestroySurface ( EGLDisplay dpy, EGLSurface surface ) */
+
+ public static native boolean eglDestroySurface(
+ EGLDisplay dpy,
+ EGLSurface surface
+ );
+
+ /* @hide C function EGLBoolean eglQuerySurface ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value ) */
+
+ public static native boolean eglQuerySurface(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ int attribute,
+ int[] value,
+ int offset
+ );
+
+ /* @hide C function EGLBoolean eglBindAPI ( EGLenum api ) */
+
+ public static native boolean eglBindAPI(
+ int api
+ );
+
+ /* @hide C function EGLenum eglQueryAPI ( void ) */
+
+ public static native int eglQueryAPI(
+ );
+
+ /* @hide C function EGLBoolean eglWaitClient ( void ) */
+
+ public static native boolean eglWaitClient(
+ );
+
+ /* @hide C function EGLBoolean eglReleaseThread ( void ) */
+
+ public static native boolean eglReleaseThread(
+ );
+
+ /* @hide C function EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ) */
+
+ public static native EGLSurface eglCreatePbufferFromClientBuffer(
+ EGLDisplay dpy,
+ int buftype,
+ int buffer,
+ EGLConfig config,
+ int[] attrib_list,
+ int offset
+ );
+
+ /* @hide C function EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value ) */
+
+ public static native boolean eglSurfaceAttrib(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ int attribute,
+ int value
+ );
+
+ /* @hide C function EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+
+ public static native boolean eglBindTexImage(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ int buffer
+ );
+
+ /* @hide C function EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+
+ public static native boolean eglReleaseTexImage(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ int buffer
+ );
+
+ /* @hide C function EGLBoolean eglSwapInterval ( EGLDisplay dpy, EGLint interval ) */
+
+ public static native boolean eglSwapInterval(
+ EGLDisplay dpy,
+ int interval
+ );
+
+ /* @hide C function EGLContext eglCreateContext ( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list ) */
+
+ public static native EGLContext eglCreateContext(
+ EGLDisplay dpy,
+ EGLConfig config,
+ EGLContext share_context,
+ int[] attrib_list,
+ int offset
+ );
+
+ /* @hide C function EGLBoolean eglDestroyContext ( EGLDisplay dpy, EGLContext ctx ) */
+
+ public static native boolean eglDestroyContext(
+ EGLDisplay dpy,
+ EGLContext ctx
+ );
+
+ /* @hide C function EGLBoolean eglMakeCurrent ( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx ) */
+
+ public static native boolean eglMakeCurrent(
+ EGLDisplay dpy,
+ EGLSurface draw,
+ EGLSurface read,
+ EGLContext ctx
+ );
+
+ /* @hide C function EGLContext eglGetCurrentContext ( void ) */
+
+ public static native EGLContext eglGetCurrentContext(
+ );
+
+ /* @hide C function EGLSurface eglGetCurrentSurface ( EGLint readdraw ) */
+
+ public static native EGLSurface eglGetCurrentSurface(
+ int readdraw
+ );
+
+ /* @hide C function EGLDisplay eglGetCurrentDisplay ( void ) */
+
+ public static native EGLDisplay eglGetCurrentDisplay(
+ );
+
+ /* @hide C function EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value ) */
+
+ public static native boolean eglQueryContext(
+ EGLDisplay dpy,
+ EGLContext ctx,
+ int attribute,
+ int[] value,
+ int offset
+ );
+
+ /* @hide C function EGLBoolean eglWaitGL ( void ) */
+
+ public static native boolean eglWaitGL(
+ );
+
+ /* @hide C function EGLBoolean eglWaitNative ( EGLint engine ) */
+
+ public static native boolean eglWaitNative(
+ int engine
+ );
+
+ /* @hide C function EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface ) */
+
+ public static native boolean eglSwapBuffers(
+ EGLDisplay dpy,
+ EGLSurface surface
+ );
+
+ /* @hide C function EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target ) */
+
+ public static native boolean eglCopyBuffers(
+ EGLDisplay dpy,
+ EGLSurface surface,
+ int target
+ );
+
+}
diff --git a/opengl/java/android/opengl/EGLConfig.java b/opengl/java/android/opengl/EGLConfig.java
new file mode 100644
index 0000000..d9aebfc
--- /dev/null
+++ b/opengl/java/android/opengl/EGLConfig.java
@@ -0,0 +1,41 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.opengl;
+
+/**
+ * @hide
+ */
+public class EGLConfig extends EGLObjectHandle {
+ public EGLConfig(int handle) {
+ super(handle);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EGLConfig that = (EGLConfig) o;
+ return getHandle() == that.getHandle();
+ }
+
+ @Override
+ public int hashCode() {
+ return getHandle();
+ }
+}
diff --git a/opengl/java/android/opengl/EGLContext.java b/opengl/java/android/opengl/EGLContext.java
new file mode 100644
index 0000000..7b194f3
--- /dev/null
+++ b/opengl/java/android/opengl/EGLContext.java
@@ -0,0 +1,41 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.opengl;
+
+/**
+ * @hide
+ */
+public class EGLContext extends EGLObjectHandle {
+ public EGLContext(int handle) {
+ super(handle);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EGLContext that = (EGLContext) o;
+ return getHandle() == that.getHandle();
+ }
+
+ @Override
+ public int hashCode() {
+ return getHandle();
+ }
+}
diff --git a/opengl/java/android/opengl/EGLDisplay.java b/opengl/java/android/opengl/EGLDisplay.java
new file mode 100644
index 0000000..a090cf0
--- /dev/null
+++ b/opengl/java/android/opengl/EGLDisplay.java
@@ -0,0 +1,41 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.opengl;
+
+/**
+ * @hide
+ */
+public class EGLDisplay extends EGLObjectHandle {
+ public EGLDisplay(int handle) {
+ super(handle);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EGLDisplay that = (EGLDisplay) o;
+ return getHandle() == that.getHandle();
+ }
+
+ @Override
+ public int hashCode() {
+ return getHandle();
+ }
+}
diff --git a/core/res/res/values-sw720dp-land/arrays.xml b/opengl/java/android/opengl/EGLObjectHandle.java
similarity index 61%
rename from core/res/res/values-sw720dp-land/arrays.xml
rename to opengl/java/android/opengl/EGLObjectHandle.java
index d845875..01f9bd4 100644
--- a/core/res/res/values-sw720dp-land/arrays.xml
+++ b/opengl/java/android/opengl/EGLObjectHandle.java
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/colors.xml
+/*
**
** Copyright 2012, The Android Open Source Project
**
@@ -16,14 +14,20 @@
** See the License for the specific language governing permissions and
** limitations under the License.
*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <array name="lockscreen_chevron_drawables">
- <item>@drawable/ic_lockscreen_chevron_right</item>
- <item>@null</item>
- <item>@null</item>
- <item>@null</item>
- </array>
+package android.opengl;
-</resources>
+/**
+ * @hide
+ */
+public abstract class EGLObjectHandle {
+ private final int mHandle;
+
+ public EGLObjectHandle(int handle) {
+ mHandle = handle;
+ }
+
+ public int getHandle() {
+ return mHandle;
+ }
+}
diff --git a/opengl/java/android/opengl/EGLSurface.java b/opengl/java/android/opengl/EGLSurface.java
new file mode 100644
index 0000000..4800a64
--- /dev/null
+++ b/opengl/java/android/opengl/EGLSurface.java
@@ -0,0 +1,41 @@
+/*
+**
+** Copyright 2012, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+package android.opengl;
+
+/**
+ * @hide
+ */
+public class EGLSurface extends EGLObjectHandle {
+ public EGLSurface(int handle) {
+ super(handle);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ EGLSurface that = (EGLSurface) o;
+ return getHandle() == that.getHandle();
+ }
+
+ @Override
+ public int hashCode() {
+ return getHandle();
+ }
+}
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight.png
index f949e59..8ddb375 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png
index bbda474..57a3b99 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight.png
index b97c664..71e1303 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png
index 222a826..1de0a3a 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight.png
index c9d96ec..202c8bc 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight_land.png
index 4c64b28..31bc09c 100644
--- a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight_land.png
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight.png
index 5f18ae3..bef6de3 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight_land.png
index d9df25c..406eeab 100644
--- a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight_land.png
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight.png
index 2412a4e..75b5fbb 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight_land.png
index 114c778..a7a4ce3 100644
--- a/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight_land.png
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight.png
index bf2553e..c44aafc 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png
index 8df299e..05da6da 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/navbar_search_handle.xml b/packages/SystemUI/res/drawable/navbar_search_handle.xml
deleted file mode 100644
index e40fa2c..0000000
--- a/packages/SystemUI/res/drawable/navbar_search_handle.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item
- android:state_enabled="true"
- android:state_active="false"
- android:state_focused="false"
- android:drawable="@*android:drawable/ic_lockscreen_handle_pressed" />
-
- <item
- android:state_enabled="true"
- android:state_active="true"
- android:state_focused="false"
- android:drawable="@*android:drawable/ic_lockscreen_handle_pressed" />
-
-</selector>
diff --git a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
index c8a120d4..f56b03b 100644
--- a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
@@ -49,7 +49,6 @@
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
- prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
diff --git a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
index 1e4bb57..b871bef 100644
--- a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
@@ -49,7 +49,6 @@
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
- prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
index 3b6c52e..1fa67bd 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
@@ -35,7 +35,6 @@
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
- prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
diff --git a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
index 8c2360e..b5f1f90 100644
--- a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
@@ -36,7 +36,6 @@
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
- prvandroid:handleDrawable="@drawable/navbar_search_handle"
prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 06901f6..0c15f6c 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -142,7 +142,7 @@
<string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazať všetky upozornenia."</string>
<string name="dreams_dock_launcher" msgid="3541196417659166245">"Aktivovať šetrič obrazovky"</string>
<string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informácie o aplikácii"</string>
- <string name="close_universe" msgid="3736513750241754348">"Zatvoriť"</string>
+ <string name="close_universe" msgid="3736513750241754348">"Zavrieť"</string>
<string name="notifications_off_title" msgid="8936620513608443224">"Upozornenia sú vypnuté"</string>
<string name="notifications_off_text" msgid="2529001315769385273">"Klepnutím sem upozornenia znova povolíte."</string>
<string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka sa automaticky otočí."</string>
diff --git a/packages/VpnDialogs/res/values-in/strings.xml b/packages/VpnDialogs/res/values-in/strings.xml
index c9710e5..2848f83 100644
--- a/packages/VpnDialogs/res/values-in/strings.xml
+++ b/packages/VpnDialogs/res/values-in/strings.xml
@@ -17,7 +17,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="prompt" msgid="8359175999006833462">"<xliff:g id="APP">%s</xliff:g> mencoba membuat sambungan VPN."</string>
- <string name="warning" msgid="5470743576660160079">"Dengan melanjutkan, Anda memberikan izin kepada aplikasi untuk mencegat semua lalu lintas jaringan. "<b>"JANGAN memberi izin kecuali Anda mempercayai aplikasi ini."</b>" Jika tidak, data Anda berisiko disusupi oleh perangkat lunak jahat."</string>
+ <string name="warning" msgid="5470743576660160079">"Dengan melanjutkan, Anda memberikan izin kepada aplikasi untuk mencegat semua lalu lintas jaringan. "<b>"JANGAN memberi izin kecuali Anda mempercayai aplikasi ini."</b>" Jika tidak, data Anda berisiko disusupi oleh perangkat lunak perusak."</string>
<string name="accept" msgid="2889226408765810173">"Saya mempercayai aplikasi ini."</string>
<string name="legacy_title" msgid="192936250066580964">"VPN tersambung"</string>
<string name="configure" msgid="4905518375574791375">"Konfigurasikan"</string>
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
index e84e912..4b2066f 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -335,7 +335,7 @@
}
int lockSoundDefaultAttenuation = context.getResources().getInteger(
com.android.internal.R.integer.config_lockSoundVolumeDb);
- mLockSoundVolume = (float)Math.pow(10, lockSoundDefaultAttenuation/20);
+ mLockSoundVolume = (float)Math.pow(10, (float)lockSoundDefaultAttenuation/20);
IntentFilter userFilter = new IntentFilter();
userFilter.addAction(Intent.ACTION_USER_SWITCHED);
userFilter.addAction(Intent.ACTION_USER_REMOVED);
diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java
index 4d6c058..7725f35 100644
--- a/services/java/com/android/server/AppWidgetServiceImpl.java
+++ b/services/java/com/android/server/AppWidgetServiceImpl.java
@@ -210,11 +210,19 @@
synchronized (mAppWidgetIds) {
ensureStateLoadedLocked();
- int N = mInstalledProviders.size();
+ // Note: updateProvidersForPackageLocked() may remove providers, so we must copy the
+ // list of installed providers and skip providers that we don't need to update.
+ // Also note that remove the provider does not clear the Provider component data.
+ ArrayList<Provider> installedProviders =
+ new ArrayList<Provider>(mInstalledProviders);
+ HashSet<ComponentName> removedProviders = new HashSet<ComponentName>();
+ int N = installedProviders.size();
for (int i = N - 1; i >= 0; i--) {
- Provider p = mInstalledProviders.get(i);
- String pkgName = p.info.provider.getPackageName();
- updateProvidersForPackageLocked(pkgName);
+ Provider p = installedProviders.get(i);
+ ComponentName cn = p.info.provider;
+ if (!removedProviders.contains(cn)) {
+ updateProvidersForPackageLocked(cn.getPackageName(), removedProviders);
+ }
}
saveStateLocked();
}
@@ -257,7 +265,7 @@
|| (extras != null && extras.getBoolean(Intent.EXTRA_REPLACING, false))) {
for (String pkgName : pkgList) {
// The package was just upgraded
- providersModified |= updateProvidersForPackageLocked(pkgName);
+ providersModified |= updateProvidersForPackageLocked(pkgName, null);
}
} else {
// The package was just added
@@ -1677,7 +1685,13 @@
return providersAdded;
}
- boolean updateProvidersForPackageLocked(String pkgName) {
+ /**
+ * Updates all providers with the specified package names, and records any providers that were
+ * pruned.
+ *
+ * @return whether any providers were updated
+ */
+ boolean updateProvidersForPackageLocked(String pkgName, Set<ComponentName> removedProviders) {
boolean providersUpdated = false;
HashSet<String> keep = new HashSet<String>();
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
@@ -1754,6 +1768,9 @@
Provider p = mInstalledProviders.get(i);
if (pkgName.equals(p.info.provider.getPackageName())
&& !keep.contains(p.info.provider.getClassName())) {
+ if (removedProviders != null) {
+ removedProviders.add(p.info.provider);
+ }
removeProviderLocked(i, p);
providersUpdated = true;
}
diff --git a/services/java/com/android/server/wm/AppWindowAnimator.java b/services/java/com/android/server/wm/AppWindowAnimator.java
index 16461ab..4860f1e 100644
--- a/services/java/com/android/server/wm/AppWindowAnimator.java
+++ b/services/java/com/android/server/wm/AppWindowAnimator.java
@@ -123,7 +123,7 @@
if (w == mService.mInputMethodTarget && !mService.mInputMethodTargetWaitingAnim) {
mService.setInputMethodAnimLayerAdjustment(adj);
}
- if (w == mService.mWallpaperTarget && mService.mLowerWallpaperTarget == null) {
+ if (w == mAnimator.mWallpaperTarget && mAnimator.mLowerWallpaperTarget == null) {
mService.setWallpaperAnimLayerAdjustmentLocked(adj);
}
}
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java
index af373e4..eb98e7d 100644
--- a/services/java/com/android/server/wm/WindowAnimator.java
+++ b/services/java/com/android/server/wm/WindowAnimator.java
@@ -21,7 +21,6 @@
import android.view.animation.Animation;
import com.android.internal.policy.impl.PhoneWindowManager;
-import com.android.server.wm.WindowManagerService.AnimatorToLayoutParams;
import com.android.server.wm.WindowManagerService.LayoutToAnimatorParams;
import java.io.PrintWriter;
@@ -84,14 +83,26 @@
int mPendingActions;
WindowState mWallpaperTarget = null;
+ AppWindowAnimator mWpAppAnimator = null;
+ WindowState mLowerWallpaperTarget = null;
+ WindowState mUpperWallpaperTarget = null;
+ ArrayList<WindowToken> mWallpaperTokens = new ArrayList<WindowToken>();
+
+ /** Parameters being passed from this into mService. */
+ static class AnimatorToLayoutParams {
+ boolean mUpdateQueued;
+ int mBulkUpdateParams;
+ int mPendingLayoutChanges;
+ WindowState mWindowDetachedWallpaper;
+ }
+ /** Do not modify unless holding mService.mWindowMap or this and mAnimToLayout in that order */
final AnimatorToLayoutParams mAnimToLayout = new AnimatorToLayoutParams();
- WindowAnimator(final WindowManagerService service, final Context context,
- final WindowManagerPolicy policy) {
+ WindowAnimator(final WindowManagerService service) {
mService = service;
- mContext = context;
- mPolicy = policy;
+ mContext = service.mContext;
+ mPolicy = service.mPolicy;
mAnimationRunnable = new Runnable() {
@Override
@@ -132,8 +143,18 @@
synchronized(layoutToAnim) {
layoutToAnim.mAnimationScheduled = false;
+ if ((layoutToAnim.mChanges & LayoutToAnimatorParams.WALLPAPER_TOKENS_CHANGED) != 0) {
+ layoutToAnim.mChanges &= ~LayoutToAnimatorParams.WALLPAPER_TOKENS_CHANGED;
+ mWallpaperTokens = new ArrayList<WindowToken>(layoutToAnim.mWallpaperTokens);
+ }
+
mWinAnimators = new ArrayList<WindowStateAnimator>(layoutToAnim.mWinAnimators);
mWallpaperTarget = layoutToAnim.mWallpaperTarget;
+ mWpAppAnimator = mWallpaperTarget == null
+ ? null : mWallpaperTarget.mAppToken == null
+ ? null : mWallpaperTarget.mAppToken.mAppAnimator;
+ mLowerWallpaperTarget = layoutToAnim.mLowerWallpaperTarget;
+ mUpperWallpaperTarget = layoutToAnim.mUpperWallpaperTarget;
// Set the new DimAnimator params.
DimAnimator.Parameters dimParams = layoutToAnim.mDimParams;
@@ -156,10 +177,13 @@
}
void hideWallpapersLocked(final WindowState w) {
- if ((mService.mWallpaperTarget == w && mService.mLowerWallpaperTarget == null)
- || mService.mWallpaperTarget == null) {
- for (final WindowToken token : mService.mWallpaperTokens) {
- for (final WindowState wallpaper : token.windows) {
+ if ((mWallpaperTarget == w && mLowerWallpaperTarget == null) || mWallpaperTarget == null) {
+ final int numTokens = mWallpaperTokens.size();
+ for (int i = numTokens - 1; i >= 0; i--) {
+ final WindowToken token = mWallpaperTokens.get(i);
+ final int numWindows = token.windows.size();
+ for (int j = numWindows - 1; j >= 0; j--) {
+ final WindowState wallpaper = token.windows.get(j);
final WindowStateAnimator winAnimator = wallpaper.mWinAnimator;
if (!winAnimator.mLastHidden) {
winAnimator.hide();
@@ -230,7 +254,13 @@
ArrayList<WindowStateAnimator> unForceHiding = null;
boolean wallpaperInUnForceHiding = false;
- boolean forceHiding = false;
+ // forceHiding states.
+ final int KEYGUARD_NOT_SHOWN = 0;
+ final int KEYGUARD_ANIMATING_IN = 1;
+ final int KEYGUARD_SHOWN = 2;
+ final int KEYGUARD_ANIMATING_OUT = 3;
+ int forceHiding = KEYGUARD_NOT_SHOWN;
+
for (int i = mWinAnimators.size() - 1; i >= 0; i--) {
WindowStateAnimator winAnimator = mWinAnimators.get(i);
WindowState win = winAnimator.mWin;
@@ -245,7 +275,7 @@
", nowAnimating=" + nowAnimating);
}
- if (wasAnimating && !winAnimator.mAnimating && mService.mWallpaperTarget == win) {
+ if (wasAnimating && !winAnimator.mAnimating && mWallpaperTarget == win) {
mBulkUpdateParams |= SET_WALLPAPER_MAY_CHANGE;
mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
if (WindowManagerService.DEBUG_LAYOUT_REPEATS) {
@@ -267,8 +297,16 @@
}
mService.mFocusMayChange = true;
}
- if (win.isReadyForDisplay() && winAnimator.mAnimationIsEntrance) {
- forceHiding = true;
+ if (win.isReadyForDisplay()) {
+ if (nowAnimating) {
+ if (winAnimator.mAnimationIsEntrance) {
+ forceHiding = KEYGUARD_ANIMATING_IN;
+ } else {
+ forceHiding = KEYGUARD_ANIMATING_OUT;
+ }
+ } else {
+ forceHiding = KEYGUARD_SHOWN;
+ }
}
if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(TAG,
"Force hide " + forceHiding
@@ -280,9 +318,12 @@
+ " hidden=" + win.mRootToken.hidden
+ " anim=" + win.mWinAnimator.mAnimation);
} else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
+ final boolean hideWhenLocked =
+ (winAnimator.mAttrFlags & FLAG_SHOW_WHEN_LOCKED) == 0;
final boolean changed;
- if (forceHiding && (!winAnimator.isAnimating()
- || (winAnimator.mAttrFlags & FLAG_SHOW_WHEN_LOCKED) == 0)) {
+ if (((forceHiding == KEYGUARD_ANIMATING_IN)
+ && (!winAnimator.isAnimating() || hideWhenLocked))
+ || ((forceHiding == KEYGUARD_SHOWN) && hideWhenLocked)) {
changed = win.hideLw(false, false);
if (WindowManagerService.DEBUG_VISIBILITY && changed) Slog.v(TAG,
"Now policy hidden: " + win);
@@ -431,13 +472,12 @@
// don't cause the wallpaper to suddenly disappear.
int animLayer = windowAnimationBackground.mAnimLayer;
WindowState win = windowAnimationBackground.mWin;
- if (windowAnimationBackground != null && mService.mWallpaperTarget == win
- || mService.mLowerWallpaperTarget == win
- || mService.mUpperWallpaperTarget == win) {
+ if (windowAnimationBackground != null && mWallpaperTarget == win
+ || mLowerWallpaperTarget == win || mUpperWallpaperTarget == win) {
final int N = mWinAnimators.size();
for (int i = 0; i < N; i++) {
WindowStateAnimator winAnimator = mWinAnimators.get(i);
- if (winAnimator.mWin.mIsWallpaper) {
+ if (winAnimator.mIsWallpaper) {
animLayer = winAnimator.mAnimLayer;
break;
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 48bad9f..4cffb32 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -588,10 +588,10 @@
WindowState mWallpaperTarget = null;
// If non-null, we are in the middle of animating from one wallpaper target
// to another, and this is the lower one in Z-order.
- WindowState mLowerWallpaperTarget = null;
+ private WindowState mLowerWallpaperTarget = null;
// If non-null, we are in the middle of animating from one wallpaper target
// to another, and this is the higher one in Z-order.
- WindowState mUpperWallpaperTarget = null;
+ private WindowState mUpperWallpaperTarget = null;
int mWallpaperAnimLayerAdjustment;
float mLastWallpaperX = -1;
float mLastWallpaperY = -1;
@@ -648,25 +648,20 @@
}
final LayoutFields mInnerFields = new LayoutFields();
- // TODO: Move this into WindowAnimator. For some reason it causes the H class to blow up.
- /* Parameters being passed from mAnimator into this.
- * Do not modify unless holding (mWindowMap or mAnimator) and mAnimToLayout in that order */
- static class AnimatorToLayoutParams {
- boolean mUpdateQueued;
- int mBulkUpdateParams;
- int mPendingLayoutChanges;
- WindowState mWindowDetachedWallpaper;
- }
-
static class LayoutToAnimatorParams {
+ static final long WALLPAPER_TOKENS_CHANGED = 1 << 0;
+ long mChanges;
+
boolean mAnimationScheduled;
ArrayList<WindowStateAnimator> mWinAnimators = new ArrayList<WindowStateAnimator>();
WindowState mWallpaperTarget;
+ WindowState mLowerWallpaperTarget;
+ WindowState mUpperWallpaperTarget;
DimAnimator.Parameters mDimParams;
+ ArrayList<WindowToken> mWallpaperTokens = new ArrayList<WindowToken>();
}
- /** Params from WindowManagerService . Do not modify or read without first locking on
- * either WindowManagerService.mWindowMap or WindowManagerService.mAnimator.and then on
- * mLayoutToAnim */
+ /** Params from WindowManagerService to WindowAnimator. Do not modify or read without first
+ * locking on either mWindowMap or mAnimator and then on mLayoutToAnim */
final LayoutToAnimatorParams mLayoutToAnim = new LayoutToAnimatorParams();
/** The lowest wallpaper target with a detached wallpaper animation on it. */
@@ -916,7 +911,7 @@
mInputManager = new InputManagerService(context, mInputMonitor);
mFxSession = new SurfaceSession();
- mAnimator = new WindowAnimator(this, context, mPolicy);
+ mAnimator = new WindowAnimator(this);
PolicyThread thr = new PolicyThread(mPolicy, this, context, pm);
thr.start();
@@ -2254,14 +2249,14 @@
if (res != WindowManagerImpl.ADD_OKAY) {
return res;
}
-
+
if (outInputChannel != null && (attrs.inputFeatures
& WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0) {
String name = win.makeInputChannelName();
InputChannel[] inputChannels = InputChannel.openInputChannelPair(name);
win.setInputChannel(inputChannels[0]);
inputChannels[1].transferTo(outInputChannel);
-
+
mInputManager.registerInputChannel(win.mInputChannel, win.mInputWindowHandle);
}
@@ -3481,6 +3476,7 @@
mTokenMap.put(token, wtoken);
if (type == TYPE_WALLPAPER) {
mWallpaperTokens.add(wtoken);
+ updateLayoutToAnimWallpaperTokens();
}
}
}
@@ -3527,6 +3523,7 @@
mExitingTokens.add(wtoken);
} else if (wtoken.windowType == TYPE_WALLPAPER) {
mWallpaperTokens.remove(wtoken);
+ updateLayoutToAnimWallpaperTokens();
}
}
@@ -3698,7 +3695,7 @@
haveGroup = true;
curGroup = wtoken.groupId;
lastOrientation = wtoken.requestedOrientation;
- }
+ }
int or = wtoken.requestedOrientation;
// If this application is fullscreen, and didn't explicitly say
@@ -3824,6 +3821,7 @@
return req;
}
+ @Override
public void setNewConfiguration(Configuration config) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setNewConfiguration()")) {
@@ -3836,7 +3834,8 @@
performLayoutAndPlaceSurfacesLocked();
}
}
-
+
+ @Override
public void setAppOrientation(IApplicationToken token, int requestedOrientation) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppOrientation()")) {
@@ -7325,7 +7324,8 @@
case UPDATE_ANIM_PARAMETERS: {
// Used to send multiple changes from the animation side to the layout side.
synchronized (mWindowMap) {
- final AnimatorToLayoutParams animToLayout = mAnimator.mAnimToLayout;
+ final WindowAnimator.AnimatorToLayoutParams animToLayout =
+ mAnimator.mAnimToLayout;
synchronized (animToLayout) {
animToLayout.mUpdateQueued = false;
boolean doRequest = false;
@@ -8684,6 +8684,10 @@
winAnimator.setAnimation(a);
winAnimator.mAnimDw = w.mLastFrame.left - w.mFrame.left;
winAnimator.mAnimDh = w.mLastFrame.top - w.mFrame.top;
+ try {
+ w.mClient.moved(w.mFrame.left, w.mFrame.top);
+ } catch (RemoteException e) {
+ }
}
//Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
@@ -8924,6 +8928,7 @@
mExitingTokens.remove(i);
if (token.windowType == TYPE_WALLPAPER) {
mWallpaperTokens.remove(token);
+ updateLayoutToAnimWallpaperTokens();
}
}
}
@@ -9112,10 +9117,19 @@
}
}
layoutToAnim.mWallpaperTarget = mWallpaperTarget;
+ layoutToAnim.mLowerWallpaperTarget = mLowerWallpaperTarget;
+ layoutToAnim.mUpperWallpaperTarget = mUpperWallpaperTarget;
scheduleAnimationLocked();
}
}
+ void updateLayoutToAnimWallpaperTokens() {
+ synchronized(mLayoutToAnim) {
+ mLayoutToAnim.mWallpaperTokens = new ArrayList<WindowToken>(mWallpaperTokens);
+ mLayoutToAnim.mChanges |= LayoutToAnimatorParams.WALLPAPER_TOKENS_CHANGED;
+ }
+ }
+
void setAnimDimParams(DimAnimator.Parameters params) {
synchronized (mLayoutToAnim) {
mLayoutToAnim.mDimParams = params;
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 248da74..e5ec5af 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -317,7 +317,7 @@
mIsFloatingLayer = mIsImWindow || mIsWallpaper;
}
- mWinAnimator = new WindowStateAnimator(service, this, mAttachedWindow);
+ mWinAnimator = new WindowStateAnimator(this);
mWinAnimator.mAlpha = a.alpha;
WindowState appWin = this;
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index 794dade..464df6e 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -3,7 +3,6 @@
package com.android.server.wm;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
-import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
import static com.android.server.wm.WindowManagerService.LayoutFields.SET_ORIENTATION_CHANGE_COMPLETE;
import static com.android.server.wm.WindowManagerService.LayoutFields.SET_TURN_ON_SCREEN;
@@ -48,6 +47,7 @@
static final String TAG = "WindowStateAnimator";
+ // Unchanging local convenience fields.
final WindowManagerService mService;
final WindowState mWin;
final WindowState mAttachedWindow;
@@ -55,6 +55,7 @@
final Session mSession;
final WindowManagerPolicy mPolicy;
final Context mContext;
+ final boolean mIsWallpaper;
// If this is a universe background window, this is the transformation
// it is applying to the rest of the universe.
@@ -142,19 +143,22 @@
int mAttrFlags;
int mAttrType;
- public WindowStateAnimator(final WindowManagerService service, final WindowState win,
- final WindowState attachedWindow) {
+ public WindowStateAnimator(final WindowState win) {
+ final WindowManagerService service = win.mService;
+
mService = service;
- mWin = win;
- mAttachedWindow = attachedWindow;
- mAnimator = mService.mAnimator;
- mSession = win.mSession;
- mPolicy = mService.mPolicy;
- mContext = mService.mContext;
- mAttrFlags = win.mAttrs.flags;
- mAttrType = win.mAttrs.type;
+ mAnimator = service.mAnimator;
+ mPolicy = service.mPolicy;
+ mContext = service.mContext;
mAnimDw = service.mAppDisplayWidth;
mAnimDh = service.mAppDisplayHeight;
+
+ mWin = win;
+ mAttachedWindow = win.mAttachedWindow;
+ mSession = win.mSession;
+ mAttrFlags = win.mAttrs.flags;
+ mAttrType = win.mAttrs.type;
+ mIsWallpaper = win.mIsWallpaper;
}
public void setAnimation(Animation anim) {
@@ -309,7 +313,7 @@
mAnimLayer = mWin.mLayer;
if (mWin.mIsImWindow) {
mAnimLayer += mService.mInputMethodAnimLayerAdjustment;
- } else if (mWin.mIsWallpaper) {
+ } else if (mIsWallpaper) {
mAnimLayer += mService.mWallpaperAnimLayerAdjustment;
}
if (DEBUG_LAYERS) Slog.v(TAG, "Stepping win " + this
@@ -812,22 +816,21 @@
// Wallpapers are animated based on the "real" window they
// are currently targeting.
- if (mWin.mAttrs.type == TYPE_WALLPAPER && mService.mLowerWallpaperTarget == null
- && mService.mWallpaperTarget != null) {
- if (mService.mWallpaperTarget.mWinAnimator.mHasLocalTransformation &&
- mService.mWallpaperTarget.mWinAnimator.mAnimation != null &&
- !mService.mWallpaperTarget.mWinAnimator.mAnimation.getDetachWallpaper()) {
- attachedTransformation = mService.mWallpaperTarget.mWinAnimator.mTransformation;
+ if (mIsWallpaper && mAnimator.mLowerWallpaperTarget == null
+ && mAnimator.mWallpaperTarget != null) {
+ final WindowStateAnimator wallpaperAnimator = mAnimator.mWallpaperTarget.mWinAnimator;
+ if (wallpaperAnimator.mHasLocalTransformation &&
+ wallpaperAnimator.mAnimation != null &&
+ !wallpaperAnimator.mAnimation.getDetachWallpaper()) {
+ attachedTransformation = wallpaperAnimator.mTransformation;
if (WindowManagerService.DEBUG_WALLPAPER && attachedTransformation != null) {
Slog.v(TAG, "WP target attached xform: " + attachedTransformation);
}
}
- final AppWindowAnimator wpAppAnimator = mService.mWallpaperTarget.mAppToken == null
- ? null : mService.mWallpaperTarget.mAppToken.mAppAnimator;
- if (wpAppAnimator != null &&
- wpAppAnimator.hasTransformation &&
- wpAppAnimator.animation != null &&
- !wpAppAnimator.animation.getDetachWallpaper()) {
+ final AppWindowAnimator wpAppAnimator = mAnimator.mWpAppAnimator;
+ if (wpAppAnimator != null && wpAppAnimator.hasTransformation
+ && wpAppAnimator.animation != null
+ && !wpAppAnimator.animation.getDetachWallpaper()) {
appTransformation = wpAppAnimator.transformation;
if (WindowManagerService.DEBUG_WALLPAPER && appTransformation != null) {
Slog.v(TAG, "WP target app xform: " + appTransformation);
@@ -940,7 +943,7 @@
" screen=" + (screenAnimation ? mService.mAnimator.mScreenRotationAnimation.getEnterTransformation().getAlpha()
: "null"));
return;
- } else if (mWin.mIsWallpaper &&
+ } else if (mIsWallpaper &&
(mAnimator.mPendingActions & WindowAnimator.WALLPAPER_ACTION_PENDING) != 0) {
return;
}
@@ -1140,7 +1143,7 @@
setSurfaceBoundaries(recoveringMemory);
- if (mWin.mIsWallpaper && !mWin.mWallpaperVisible) {
+ if (mIsWallpaper && !mWin.mWallpaperVisible) {
// Wallpaper is no longer visible and there is no wp target => hide it.
hide();
} else if (w.mAttachedHidden || !w.isReadyForDisplay()) {
@@ -1199,7 +1202,7 @@
+ " during relayout");
if (showSurfaceRobustlyLocked()) {
mLastHidden = false;
- if (w.mIsWallpaper) {
+ if (mIsWallpaper) {
mService.dispatchWallpaperVisibility(w, true);
}
} else {
diff --git a/telephony/java/com/android/internal/telephony/ApnContext.java b/telephony/java/com/android/internal/telephony/ApnContext.java
index 3a3044e..9746398 100644
--- a/telephony/java/com/android/internal/telephony/ApnContext.java
+++ b/telephony/java/com/android/internal/telephony/ApnContext.java
@@ -50,6 +50,8 @@
String mReason;
+ int mRetryCount;
+
/**
* user/app requested connection on this APN
*/
@@ -64,6 +66,7 @@
mApnType = apnType;
mState = DataConnectionTracker.State.IDLE;
setReason(Phone.REASON_DATA_ENABLED);
+ setRetryCount(0);
mDataEnabled = new AtomicBoolean(false);
mDependencyMet = new AtomicBoolean(true);
mWaitingApnsPermanentFailureCountDown = new AtomicInteger(0);
@@ -182,6 +185,21 @@
return mReason;
}
+ public synchronized void setRetryCount(int retryCount) {
+ if (DBG) {
+ log("setRetryCount: " + retryCount);
+ }
+ mRetryCount = retryCount;
+ DataConnection dc = mDataConnection;
+ if (dc != null) {
+ dc.setRetryCount(retryCount);
+ }
+ }
+
+ public synchronized int getRetryCount() {
+ return mRetryCount;
+ }
+
public boolean isReady() {
return mDataEnabled.get() && mDependencyMet.get();
}
@@ -214,8 +232,8 @@
return "{mApnType=" + mApnType + " mState=" + getState() + " mWaitingApns=" + mWaitingApns +
" mWaitingApnsPermanentFailureCountDown=" + mWaitingApnsPermanentFailureCountDown +
" mApnSetting=" + mApnSetting + " mDataConnectionAc=" + mDataConnectionAc +
- " mReason=" + mReason + " mDataEnabled=" + mDataEnabled +
- " mDependencyMet=" + mDependencyMet + "}";
+ " mReason=" + mReason + " mRetryCount=" + mRetryCount +
+ " mDataEnabled=" + mDataEnabled + " mDependencyMet=" + mDependencyMet + "}";
}
protected void log(String s) {
diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java
index a6bd85e..d8aba92 100644
--- a/telephony/java/com/android/internal/telephony/DataConnection.java
+++ b/telephony/java/com/android/internal/telephony/DataConnection.java
@@ -445,6 +445,14 @@
}
/**
+ * set retry manager retryCount
+ */
+ public void setRetryCount(int retryCount) {
+ if (DBG) log("setRetryCount: " + retryCount);
+ mRetryMgr.setRetryCount(retryCount);
+ }
+
+ /**
* @return retry manager retryTimer
*/
public int getRetryTimer() {
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 588515b..0dee7a1 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -303,7 +303,8 @@
new HashMap<String, Integer>();
/** Phone.APN_TYPE_* ===> ApnContext */
- protected ConcurrentHashMap<String, ApnContext> mApnContexts;
+ protected ConcurrentHashMap<String, ApnContext> mApnContexts =
+ new ConcurrentHashMap<String, ApnContext>();
/* Currently active APN */
protected ApnSetting mActiveApn;
@@ -1203,6 +1204,9 @@
}
protected void resetAllRetryCounts() {
+ for (ApnContext ac : mApnContexts.values()) {
+ ac.setRetryCount(0);
+ }
for (DataConnection dc : mDataConnections.values()) {
dc.resetRetryCount();
}
diff --git a/telephony/java/com/android/internal/telephony/RetryManager.java b/telephony/java/com/android/internal/telephony/RetryManager.java
index ae451b9..250d99e 100644
--- a/telephony/java/com/android/internal/telephony/RetryManager.java
+++ b/telephony/java/com/android/internal/telephony/RetryManager.java
@@ -73,7 +73,7 @@
* {@hide}
*/
public class RetryManager {
- static public final String LOG_TAG = "RetryManager";
+ static public final String LOG_TAG = "GSM";
static public final boolean DBG = true;
static public final boolean VDBG = false;
@@ -304,7 +304,6 @@
/**
* Set retry count to the specified value
- * and turns off retrying forever.
*/
public void setRetryCount(int count) {
mRetryCount = count;
@@ -316,11 +315,18 @@
mRetryCount = 0;
}
- mRetryForever = false;
if (DBG) log("setRetryCount: " + mRetryCount);
}
/**
+ * Set retry forever to the specified value
+ */
+ public void setRetryForever(boolean retryForever) {
+ mRetryForever = retryForever;
+ if (DBG) log("setRetryForever: " + mRetryForever);
+ }
+
+ /**
* Clear the data-retry counter
*/
public void resetRetryCount() {
@@ -399,6 +405,6 @@
}
private void log(String s) {
- Log.d(LOG_TAG, s);
+ Log.d(LOG_TAG, "[RM] " + s);
}
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 83fc9c1..6b863a7 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -134,6 +134,8 @@
private static final String INTENT_RECONNECT_ALARM =
"com.android.internal.telephony.gprs-reconnect";
private static final String INTENT_RECONNECT_ALARM_EXTRA_TYPE = "reconnect_alarm_extra_type";
+ private static final String INTENT_RECONNECT_ALARM_EXTRA_RETRY_COUNT =
+ "reconnect_alaram_extra_retry_count";
private static final String INTENT_DATA_STALL_ALARM =
"com.android.internal.telephony.gprs-data-stall";
@@ -148,16 +150,23 @@
@Override
protected void onActionIntentReconnectAlarm(Intent intent) {
- if (DBG) log("GPRS reconnect alarm. Previous state was " + mState);
-
String reason = intent.getStringExtra(INTENT_RECONNECT_ALARM_EXTRA_REASON);
int connectionId = intent.getIntExtra(INTENT_RECONNECT_ALARM_EXTRA_TYPE, -1);
+ int retryCount = intent.getIntExtra(INTENT_RECONNECT_ALARM_EXTRA_RETRY_COUNT, 0);
DataConnectionAc dcac= mDataConnectionAsyncChannels.get(connectionId);
+ if (DBG) {
+ log("onActionIntentReconnectAlarm: mState=" + mState + " reason=" + reason +
+ " connectionId=" + connectionId + " retryCount=" + retryCount);
+ }
+
if (dcac != null) {
for (ApnContext apnContext : dcac.getApnListSync()) {
+ apnContext.setDataConnectionAc(null);
+ apnContext.setDataConnection(null);
apnContext.setReason(reason);
+ apnContext.setRetryCount(retryCount);
if (apnContext.getState() == State.FAILED) {
apnContext.setState(State.IDLE);
}
@@ -205,7 +214,6 @@
p.getContext().getContentResolver().registerContentObserver(
Telephony.Carriers.CONTENT_URI, true, mApnObserver);
- mApnContexts = new ConcurrentHashMap<String, ApnContext>();
initApnContextsAndDataConnection();
broadcastMessenger();
}
@@ -672,10 +680,15 @@
break;
}
}
- configureRetry(dcac.dataConnection, hasDefault);
+ configureRetry(dcac.dataConnection, hasDefault, 0);
}
}
+ // Be sure retry counts for Apncontexts and DC's are sync'd.
+ // When DCT/ApnContexts are refactored and we cleanup retrying
+ // this won't be needed.
+ resetAllRetryCounts();
+
// Only check for default APN state
for (ApnContext apnContext : mApnContexts.values()) {
if (apnContext.getState() == State.FAILED) {
@@ -1076,7 +1089,8 @@
// configure retry count if no other Apn is using the same connection.
if (refCount == 0) {
- configureRetry(dc, apn.canHandleType(Phone.APN_TYPE_DEFAULT));
+ configureRetry(dc, apn.canHandleType(Phone.APN_TYPE_DEFAULT),
+ apnContext.getRetryCount());
}
apnContext.setDataConnectionAc(dcac);
apnContext.setDataConnection(dc);
@@ -1328,7 +1342,7 @@
startNetStatPoll();
startDataStallAlarm(DATA_STALL_NOT_SUSPECTED);
// reset reconnect timer
- apnContext.getDataConnection().resetRetryCount();
+ apnContext.setRetryCount(0);
}
// TODO: For multiple Active APNs not exactly sure how to do this.
@@ -1599,6 +1613,10 @@
loge("reconnectAfterFail: apnContext == null, impossible");
return;
}
+ if (DBG) {
+ log("reconnectAfterFail: lastFailCause=" + lastFailCauseCode +
+ " retryOverride=" + retryOverride + " apnContext=" + apnContext);
+ }
if ((apnContext.getState() == State.FAILED) &&
(apnContext.getDataConnection() != null)) {
if (!apnContext.getDataConnection().isRetryNeeded()) {
@@ -1614,7 +1632,7 @@
if (DBG) log("reconnectAfterFail: activate failed, Reregistering to network");
mReregisterOnReconnectFailure = true;
mPhone.getServiceStateTracker().reRegisterNetwork(null);
- apnContext.getDataConnection().resetRetryCount();
+ apnContext.setRetryCount(0);
return;
}
}
@@ -1625,6 +1643,11 @@
if (nextReconnectDelay < 0) {
nextReconnectDelay = apnContext.getDataConnection().getRetryTimer();
apnContext.getDataConnection().increaseRetryCount();
+ if (DBG) {
+ log("reconnectAfterFail: increaseRetryCount=" +
+ apnContext.getDataConnection().getRetryCount() +
+ " nextReconnectDelay=" + nextReconnectDelay);
+ }
}
startAlarmForReconnect(nextReconnectDelay, apnContext);
@@ -1641,16 +1664,11 @@
private void startAlarmForReconnect(int delay, ApnContext apnContext) {
- if (DBG) {
- log("Schedule alarm for reconnect: activate failed. Scheduling next attempt for "
- + (delay / 1000) + "s");
- }
-
DataConnectionAc dcac = apnContext.getDataConnectionAc();
if ((dcac == null) || (dcac.dataConnection == null)) {
// should not happen, but just in case.
- loge("null dcac or dc.");
+ loge("startAlarmForReconnect: null dcac or dc.");
return;
}
@@ -1659,12 +1677,29 @@
Intent intent = new Intent(INTENT_RECONNECT_ALARM + '.' +
dcac.dataConnection.getDataConnectionId());
- intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_REASON, apnContext.getReason());
- intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_TYPE,
- dcac.dataConnection.getDataConnectionId());
+ String reason = apnContext.getReason();
+ intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_REASON, reason);
+ int connectionId = dcac.dataConnection.getDataConnectionId();
+ intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_TYPE, connectionId);
+
+ // TODO: Until a real fix is created, which probably entails pushing
+ // retires into the DC itself, this fix gets the retry count and
+ // puts it in the reconnect alarm. When the reconnect alarm fires
+ // onActionIntentReconnectAlarm is called which will use the value saved
+ // here and save it in the ApnContext and send the EVENT_CONNECT message
+ // which invokes setupData. Then setupData will use the value in the ApnContext
+ // and to tell the DC to set the retry count in the retry manager.
+ int retryCount = dcac.dataConnection.getRetryCount();
+ intent.putExtra(INTENT_RECONNECT_ALARM_EXTRA_RETRY_COUNT, retryCount);
+
+ if (DBG) {
+ log("startAlarmForReconnect: next attempt in " + (delay / 1000) + "s" +
+ " reason='" + reason + "' connectionId=" + connectionId +
+ " retryCount=" + retryCount);
+ }
PendingIntent alarmIntent = PendingIntent.getBroadcast (mPhone.getContext(), 0,
- intent, 0);
+ intent, PendingIntent.FLAG_UPDATE_CURRENT);
dcac.setReconnectIntentSync(alarmIntent);
am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
SystemClock.elapsedRealtime() + delay, alarmIntent);
@@ -1940,9 +1975,7 @@
// Make sure our reconnect delay starts at the initial value
// next time the radio comes on
- for (DataConnection dc : mDataConnections.values()) {
- dc.resetRetryCount();
- }
+ resetAllRetryCounts();
mReregisterOnReconnectFailure = false;
if (mPhone.getSimulatedRadioControl() != null) {
@@ -2285,7 +2318,11 @@
return conn;
}
- private void configureRetry(DataConnection dc, boolean forDefault) {
+ private void configureRetry(DataConnection dc, boolean forDefault, int retryCount) {
+ if (DBG) {
+ log("configureRetry: forDefault=" + forDefault + " retryCount=" + retryCount +
+ " dc=" + dc);
+ }
if (dc == null) return;
if (!dc.configureRetry(getReryConfig(forDefault))) {
@@ -2305,6 +2342,7 @@
}
}
}
+ dc.setRetryCount(retryCount);
}
private void destroyDataConnections() {
diff --git a/telephony/tests/telephonytests/src/com/android/internal/telephony/mockril/MockRilTest.java b/telephony/tests/telephonytests/src/com/android/internal/telephony/mockril/MockRilTest.java
index 3149ee1..a607ad0 100644
--- a/telephony/tests/telephonytests/src/com/android/internal/telephony/mockril/MockRilTest.java
+++ b/telephony/tests/telephonytests/src/com/android/internal/telephony/mockril/MockRilTest.java
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+
package com.android.internal.telephony.mockril;
import android.util.Log;
diff --git a/tests/RenderScriptTests/LivePreview/Android.mk b/tests/RenderScriptTests/LivePreview/Android.mk
index be7ab6e..1b45573 100644
--- a/tests/RenderScriptTests/LivePreview/Android.mk
+++ b/tests/RenderScriptTests/LivePreview/Android.mk
@@ -17,7 +17,7 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src)
diff --git a/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java b/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java
index bba3b5b..f21331f 100644
--- a/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java
+++ b/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/CameraPreviewActivity.java
@@ -299,6 +299,38 @@
}
+ private class ProcessPreviewDataTask extends AsyncTask<byte[], Void, Boolean> {
+ protected Boolean doInBackground(byte[]... datas) {
+ byte[] data = datas[0];
+
+ long t1 = java.lang.System.currentTimeMillis();
+
+ mFilterYuv.execute(data);
+ mFilterYuv.copyOut(mCallbackBitmap);
+
+ long t2 = java.lang.System.currentTimeMillis();
+ mTiming[mTimingSlot++] = t2 - t1;
+ if (mTimingSlot >= mTiming.length) {
+ float total = 0;
+ for (int i=0; i<mTiming.length; i++) {
+ total += (float)mTiming[i];
+ }
+ total /= mTiming.length;
+ Log.e(TAG, "time + " + total);
+ mTimingSlot = 0;
+ }
+
+ mCamera.addCallbackBuffer(data);
+ mProcessInProgress = false;
+ return true;
+ }
+
+ protected void onPostExecute(Boolean result) {
+ mFormatView.invalidate();
+ }
+
+ }
+
private long mTiming[] = new long[50];
private int mTimingSlot = 0;
@@ -307,6 +339,9 @@
mCamera.addCallbackBuffer(data);
return;
}
+ if (data == null) {
+ return;
+ }
int expectedBytes = mPreviewSize.width * mPreviewSize.height *
ImageFormat.getBitsPerPixel(ImageFormat.NV21) / 8;
@@ -328,33 +363,16 @@
Bitmap.createBitmap(
mPreviewSize.width, mPreviewSize.height,
Bitmap.Config.ARGB_8888);
- mFormatView.setImageBitmap(mCallbackBitmap);
mFilterYuv = new RsYuv(mRS, getResources(), mPreviewSize.width, mPreviewSize.height);
mFormatView.setImageBitmap(mCallbackBitmap);
}
- long t1 = java.lang.System.currentTimeMillis();
-
- mFilterYuv.execute(data);
- mFilterYuv.copyOut(mCallbackBitmap);
-
- long t2 = java.lang.System.currentTimeMillis();
- mTiming[mTimingSlot++] = t2 - t1;
- if (mTimingSlot >= mTiming.length) {
- float total = 0;
- for (int i=0; i<mTiming.length; i++) {
- total += (float)mTiming[i];
- }
- total /= mTiming.length;
- Log.e(TAG, "time + " + total);
- mTimingSlot = 0;
- }
-
mFormatView.invalidate();
mCamera.addCallbackBuffer(data);
- mProcessInProgress = false;
+ mProcessInProgress = true;
+ new ProcessPreviewDataTask().execute(data);
}
diff --git a/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/yuv.rs b/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/yuv.rs
index b81cf93..6057eff 100644
--- a/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/yuv.rs
+++ b/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/yuv.rs
@@ -65,47 +65,31 @@
return new_color;
}
-//float vignetteCenter = (img_width/2.0, img_height/2.0)
-
static float vignette_dist_mod;
+int2 vignette_half_dims;
static uchar4 vignette(uchar4 color, uint32_t x, uint32_t y) {
- x -= gWidth >> 1;
- y -= gHeight >> 1;
+ int2 xy = {x, y};
+ xy -= vignette_half_dims;
+ xy *= xy;
- uint32_t dist = (x * x + y * y);
- //float d = sqrt((float)dist) * vignette_dist_mod;
- float d = vignette_dist_mod * dist;
-
- //RS_DEBUG(d);
-
+ float d = vignette_dist_mod * (xy.x + xy.y);
ushort4 c = convert_ushort4(color);
c *= vignette_table[(int)d];
c >>= (ushort4)8;
return convert_uchar4(c);
}
-
-
void root(uchar4 *out, uint32_t x, uint32_t y) {
uchar Y = gYuvIn[(y * gWidth) + x];
uchar *uv = &gYuvIn[gWidth * gHeight];
uv += (((x>>1)<<1) + (y>>1) * gWidth);
-#if 0
- float4 p = toRGB_F(Y, uv[1], uv[0]);
- p = crossProcess(p);
- p = colortemp(p);
- out->rgba = rsPackColorTo8888(p);
-
-#else
uchar4 p = rsYuvToRGBA_uchar4(Y, uv[1], uv[0]);
p = crossProcess_i(p);
p = vignette(p, x, y);
out->rgba = p;
-#endif
-
out->a = 0xff;
}
@@ -131,7 +115,6 @@
lumen = clamp(lumen, 0.f, 1.f);
vignette_table[i] = (uchar)(lumen * 255.f + 0.5f);
- RS_DEBUG(lumen);
}
}
@@ -142,7 +125,7 @@
void setSize(int w, int h) {
gWidth = w;
gHeight = h;
-
+ vignette_half_dims = (int2){w / 2, h / 2};
vignette_dist_mod = 512.f;
vignette_dist_mod /= (float)(w*w + h*h) / 4.f;
diff --git a/tools/layoutlib/bridge/src/android/util/LruCache.java b/tools/layoutlib/bridge/src/android/util/LruCache.java
new file mode 100644
index 0000000..5208606
--- /dev/null
+++ b/tools/layoutlib/bridge/src/android/util/LruCache.java
@@ -0,0 +1,391 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.util;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * BEGIN LAYOUTLIB CHANGE
+ * This is a custom version that doesn't use the non standard LinkedHashMap#eldest.
+ * END LAYOUTLIB CHANGE
+ *
+ * A cache that holds strong references to a limited number of values. Each time
+ * a value is accessed, it is moved to the head of a queue. When a value is
+ * added to a full cache, the value at the end of that queue is evicted and may
+ * become eligible for garbage collection.
+ *
+ * <p>If your cached values hold resources that need to be explicitly released,
+ * override {@link #entryRemoved}.
+ *
+ * <p>If a cache miss should be computed on demand for the corresponding keys,
+ * override {@link #create}. This simplifies the calling code, allowing it to
+ * assume a value will always be returned, even when there's a cache miss.
+ *
+ * <p>By default, the cache size is measured in the number of entries. Override
+ * {@link #sizeOf} to size the cache in different units. For example, this cache
+ * is limited to 4MiB of bitmaps:
+ * <pre> {@code
+ * int cacheSize = 4 * 1024 * 1024; // 4MiB
+ * LruCache<String, Bitmap> bitmapCache = new LruCache<String, Bitmap>(cacheSize) {
+ * protected int sizeOf(String key, Bitmap value) {
+ * return value.getByteCount();
+ * }
+ * }}</pre>
+ *
+ * <p>This class is thread-safe. Perform multiple cache operations atomically by
+ * synchronizing on the cache: <pre> {@code
+ * synchronized (cache) {
+ * if (cache.get(key) == null) {
+ * cache.put(key, value);
+ * }
+ * }}</pre>
+ *
+ * <p>This class does not allow null to be used as a key or value. A return
+ * value of null from {@link #get}, {@link #put} or {@link #remove} is
+ * unambiguous: the key was not in the cache.
+ *
+ * <p>This class appeared in Android 3.1 (Honeycomb MR1); it's available as part
+ * of <a href="http://developer.android.com/sdk/compatibility-library.html">Android's
+ * Support Package</a> for earlier releases.
+ */
+public class LruCache<K, V> {
+ private final LinkedHashMap<K, V> map;
+
+ /** Size of this cache in units. Not necessarily the number of elements. */
+ private int size;
+ private int maxSize;
+
+ private int putCount;
+ private int createCount;
+ private int evictionCount;
+ private int hitCount;
+ private int missCount;
+
+ /**
+ * @param maxSize for caches that do not override {@link #sizeOf}, this is
+ * the maximum number of entries in the cache. For all other caches,
+ * this is the maximum sum of the sizes of the entries in this cache.
+ */
+ public LruCache(int maxSize) {
+ if (maxSize <= 0) {
+ throw new IllegalArgumentException("maxSize <= 0");
+ }
+ this.maxSize = maxSize;
+ this.map = new LinkedHashMap<K, V>(0, 0.75f, true);
+ }
+
+ /**
+ * Sets the size of the cache.
+ * @param maxSize The new maximum size.
+ *
+ * @hide
+ */
+ public void resize(int maxSize) {
+ if (maxSize <= 0) {
+ throw new IllegalArgumentException("maxSize <= 0");
+ }
+
+ synchronized (this) {
+ this.maxSize = maxSize;
+ }
+ trimToSize(maxSize);
+ }
+
+ /**
+ * Returns the value for {@code key} if it exists in the cache or can be
+ * created by {@code #create}. If a value was returned, it is moved to the
+ * head of the queue. This returns null if a value is not cached and cannot
+ * be created.
+ */
+ public final V get(K key) {
+ if (key == null) {
+ throw new NullPointerException("key == null");
+ }
+
+ V mapValue;
+ synchronized (this) {
+ mapValue = map.get(key);
+ if (mapValue != null) {
+ hitCount++;
+ return mapValue;
+ }
+ missCount++;
+ }
+
+ /*
+ * Attempt to create a value. This may take a long time, and the map
+ * may be different when create() returns. If a conflicting value was
+ * added to the map while create() was working, we leave that value in
+ * the map and release the created value.
+ */
+
+ V createdValue = create(key);
+ if (createdValue == null) {
+ return null;
+ }
+
+ synchronized (this) {
+ createCount++;
+ mapValue = map.put(key, createdValue);
+
+ if (mapValue != null) {
+ // There was a conflict so undo that last put
+ map.put(key, mapValue);
+ } else {
+ size += safeSizeOf(key, createdValue);
+ }
+ }
+
+ if (mapValue != null) {
+ entryRemoved(false, key, createdValue, mapValue);
+ return mapValue;
+ } else {
+ trimToSize(maxSize);
+ return createdValue;
+ }
+ }
+
+ /**
+ * Caches {@code value} for {@code key}. The value is moved to the head of
+ * the queue.
+ *
+ * @return the previous value mapped by {@code key}.
+ */
+ public final V put(K key, V value) {
+ if (key == null || value == null) {
+ throw new NullPointerException("key == null || value == null");
+ }
+
+ V previous;
+ synchronized (this) {
+ putCount++;
+ size += safeSizeOf(key, value);
+ previous = map.put(key, value);
+ if (previous != null) {
+ size -= safeSizeOf(key, previous);
+ }
+ }
+
+ if (previous != null) {
+ entryRemoved(false, key, previous, value);
+ }
+
+ trimToSize(maxSize);
+ return previous;
+ }
+
+ /**
+ * @param maxSize the maximum size of the cache before returning. May be -1
+ * to evict even 0-sized elements.
+ */
+ private void trimToSize(int maxSize) {
+ while (true) {
+ K key;
+ V value;
+ synchronized (this) {
+ if (size < 0 || (map.isEmpty() && size != 0)) {
+ throw new IllegalStateException(getClass().getName()
+ + ".sizeOf() is reporting inconsistent results!");
+ }
+
+ if (size <= maxSize) {
+ break;
+ }
+
+ // BEGIN LAYOUTLIB CHANGE
+ // get the last item in the linked list.
+ // This is not efficient, the goal here is to minimize the changes
+ // compared to the platform version.
+ Map.Entry<K, V> toEvict = null;
+ for (Map.Entry<K, V> entry : map.entrySet()) {
+ toEvict = entry;
+ }
+ // END LAYOUTLIB CHANGE
+
+ if (toEvict == null) {
+ break;
+ }
+
+ key = toEvict.getKey();
+ value = toEvict.getValue();
+ map.remove(key);
+ size -= safeSizeOf(key, value);
+ evictionCount++;
+ }
+
+ entryRemoved(true, key, value, null);
+ }
+ }
+
+ /**
+ * Removes the entry for {@code key} if it exists.
+ *
+ * @return the previous value mapped by {@code key}.
+ */
+ public final V remove(K key) {
+ if (key == null) {
+ throw new NullPointerException("key == null");
+ }
+
+ V previous;
+ synchronized (this) {
+ previous = map.remove(key);
+ if (previous != null) {
+ size -= safeSizeOf(key, previous);
+ }
+ }
+
+ if (previous != null) {
+ entryRemoved(false, key, previous, null);
+ }
+
+ return previous;
+ }
+
+ /**
+ * Called for entries that have been evicted or removed. This method is
+ * invoked when a value is evicted to make space, removed by a call to
+ * {@link #remove}, or replaced by a call to {@link #put}. The default
+ * implementation does nothing.
+ *
+ * <p>The method is called without synchronization: other threads may
+ * access the cache while this method is executing.
+ *
+ * @param evicted true if the entry is being removed to make space, false
+ * if the removal was caused by a {@link #put} or {@link #remove}.
+ * @param newValue the new value for {@code key}, if it exists. If non-null,
+ * this removal was caused by a {@link #put}. Otherwise it was caused by
+ * an eviction or a {@link #remove}.
+ */
+ protected void entryRemoved(boolean evicted, K key, V oldValue, V newValue) {}
+
+ /**
+ * Called after a cache miss to compute a value for the corresponding key.
+ * Returns the computed value or null if no value can be computed. The
+ * default implementation returns null.
+ *
+ * <p>The method is called without synchronization: other threads may
+ * access the cache while this method is executing.
+ *
+ * <p>If a value for {@code key} exists in the cache when this method
+ * returns, the created value will be released with {@link #entryRemoved}
+ * and discarded. This can occur when multiple threads request the same key
+ * at the same time (causing multiple values to be created), or when one
+ * thread calls {@link #put} while another is creating a value for the same
+ * key.
+ */
+ protected V create(K key) {
+ return null;
+ }
+
+ private int safeSizeOf(K key, V value) {
+ int result = sizeOf(key, value);
+ if (result < 0) {
+ throw new IllegalStateException("Negative size: " + key + "=" + value);
+ }
+ return result;
+ }
+
+ /**
+ * Returns the size of the entry for {@code key} and {@code value} in
+ * user-defined units. The default implementation returns 1 so that size
+ * is the number of entries and max size is the maximum number of entries.
+ *
+ * <p>An entry's size must not change while it is in the cache.
+ */
+ protected int sizeOf(K key, V value) {
+ return 1;
+ }
+
+ /**
+ * Clear the cache, calling {@link #entryRemoved} on each removed entry.
+ */
+ public final void evictAll() {
+ trimToSize(-1); // -1 will evict 0-sized elements
+ }
+
+ /**
+ * For caches that do not override {@link #sizeOf}, this returns the number
+ * of entries in the cache. For all other caches, this returns the sum of
+ * the sizes of the entries in this cache.
+ */
+ public synchronized final int size() {
+ return size;
+ }
+
+ /**
+ * For caches that do not override {@link #sizeOf}, this returns the maximum
+ * number of entries in the cache. For all other caches, this returns the
+ * maximum sum of the sizes of the entries in this cache.
+ */
+ public synchronized final int maxSize() {
+ return maxSize;
+ }
+
+ /**
+ * Returns the number of times {@link #get} returned a value that was
+ * already present in the cache.
+ */
+ public synchronized final int hitCount() {
+ return hitCount;
+ }
+
+ /**
+ * Returns the number of times {@link #get} returned null or required a new
+ * value to be created.
+ */
+ public synchronized final int missCount() {
+ return missCount;
+ }
+
+ /**
+ * Returns the number of times {@link #create(Object)} returned a value.
+ */
+ public synchronized final int createCount() {
+ return createCount;
+ }
+
+ /**
+ * Returns the number of times {@link #put} was called.
+ */
+ public synchronized final int putCount() {
+ return putCount;
+ }
+
+ /**
+ * Returns the number of values that have been evicted.
+ */
+ public synchronized final int evictionCount() {
+ return evictionCount;
+ }
+
+ /**
+ * Returns a copy of the current contents of the cache, ordered from least
+ * recently accessed to most recently accessed.
+ */
+ public synchronized final Map<K, V> snapshot() {
+ return new LinkedHashMap<K, V>(map);
+ }
+
+ @Override public synchronized final String toString() {
+ int accesses = hitCount + missCount;
+ int hitPercent = accesses != 0 ? (100 * hitCount / accesses) : 0;
+ return String.format("LruCache[maxSize=%d,hits=%d,misses=%d,hitRate=%d%%]",
+ maxSize, hitCount, missCount, hitPercent);
+ }
+}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index f9e48e2b..3ae660d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -732,14 +732,16 @@
for (int i = 0 ; i < attrs.length ; i++) {
Pair<String, Boolean> attribute = attributes.get(i);
- // look for the value in the given style
- ResourceValue resValue = mRenderResources.findItemInStyle(style, attribute.getFirst(),
- attribute.getSecond());
+ if (attribute != null) {
+ // look for the value in the given style
+ ResourceValue resValue = mRenderResources.findItemInStyle(style,
+ attribute.getFirst(), attribute.getSecond());
- if (resValue != null) {
- // resolve it to make sure there are no references left.
- ta.bridgeSetValue(i, attribute.getFirst(), attribute.getSecond(),
- mRenderResources.resolveResValue(resValue));
+ if (resValue != null) {
+ // resolve it to make sure there are no references left.
+ ta.bridgeSetValue(i, attribute.getFirst(), attribute.getSecond(),
+ mRenderResources.resolveResValue(resValue));
+ }
}
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
index 379fb81..e28375d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
@@ -53,6 +53,11 @@
}
@Override
+ public void moved(int arg0, int arg1) throws RemoteException {
+ // pass for now.
+ }
+
+ @Override
public void dispatchScreenState(boolean on) throws RemoteException {
// pass for now.
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java
index 1817ab5..62c886b 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java
@@ -233,7 +233,7 @@
BridgeContext bridgeContext = (BridgeContext) mContext;
RenderResources res = bridgeContext.getRenderResources();
- ResourceValue value = res.findItemInTheme(themeEntryName);
+ ResourceValue value = res.findItemInTheme(themeEntryName, true /*isFrameworkAttr*/);
value = res.resolveResValue(value);
if (value instanceof StyleResourceValue == false) {
@@ -243,24 +243,27 @@
StyleResourceValue style = (StyleResourceValue) value;
// get the background
- ResourceValue backgroundValue = res.findItemInStyle(style, "background");
+ ResourceValue backgroundValue = res.findItemInStyle(style, "background",
+ true /*isFrameworkAttr*/);
backgroundValue = res.resolveResValue(backgroundValue);
if (backgroundValue != null) {
Drawable d = ResourceHelper.getDrawable(backgroundValue, bridgeContext);
if (d != null) {
- setBackgroundDrawable(d);
+ setBackground(d);
}
}
TextView textView = getStyleableTextView();
if (textView != null) {
// get the text style
- ResourceValue textStyleValue = res.findItemInStyle(style, "titleTextStyle");
+ ResourceValue textStyleValue = res.findItemInStyle(style, "titleTextStyle",
+ true /*isFrameworkAttr*/);
textStyleValue = res.resolveResValue(textStyleValue);
if (textStyleValue instanceof StyleResourceValue) {
StyleResourceValue textStyle = (StyleResourceValue) textStyleValue;
- ResourceValue textSize = res.findItemInStyle(textStyle, "textSize");
+ ResourceValue textSize = res.findItemInStyle(textStyle, "textSize",
+ true /*isFrameworkAttr*/);
textSize = res.resolveResValue(textSize);
if (textSize != null) {
@@ -273,7 +276,8 @@
}
- ResourceValue textColor = res.findItemInStyle(textStyle, "textColor");
+ ResourceValue textColor = res.findItemInStyle(textStyle, "textColor",
+ true /*isFrameworkAttr*/);
textColor = res.resolveResValue(textColor);
if (textColor != null) {
ColorStateList stateList = ResourceHelper.getColorStateList(
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index 6840f46..e93b41d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -952,7 +952,8 @@
private void findBackground(RenderResources resources) {
if (getParams().isBgColorOverridden() == false) {
- mWindowBackground = resources.findItemInTheme("windowBackground");
+ mWindowBackground = resources.findItemInTheme("windowBackground",
+ true /*isFrameworkAttr*/);
if (mWindowBackground != null) {
mWindowBackground = resources.resolveResValue(mWindowBackground);
}
@@ -1003,7 +1004,8 @@
mActionBarSize = DEFAULT_TITLE_BAR_HEIGHT;
// get value from the theme.
- ResourceValue value = resources.findItemInTheme("actionBarSize");
+ ResourceValue value = resources.findItemInTheme("actionBarSize",
+ true /*isFrameworkAttr*/);
// resolve it
value = resources.resolveResValue(value);
@@ -1028,7 +1030,8 @@
mTitleBarSize = DEFAULT_TITLE_BAR_HEIGHT;
// get value from the theme.
- ResourceValue value = resources.findItemInTheme("windowTitleSize");
+ ResourceValue value = resources.findItemInTheme("windowTitleSize",
+ true /*isFrameworkAttr*/);
// resolve it
value = resources.resolveResValue(value);
@@ -1068,11 +1071,20 @@
}
}
+ /**
+ * Looks for a attribute in the current theme. The attribute is in the android
+ * namespace.
+ *
+ * @param resources the render resources
+ * @param name the name of the attribute
+ * @param defaultValue the default value.
+ * @return the value of the attribute or the default one if not found.
+ */
private boolean getBooleanThemeValue(RenderResources resources,
String name, boolean defaultValue) {
// get the title bar flag from the current theme.
- ResourceValue value = resources.findItemInTheme(name);
+ ResourceValue value = resources.findItemInTheme(name, true /*isFrameworkAttr*/);
// because it may reference something else, we resolve it.
value = resources.resolveResValue(value);
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
index 79e02c8..5109810 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
@@ -116,7 +116,6 @@
"android.view.View#isInEditMode",
"android.view.ViewRootImpl#isInTouchMode",
"android.view.inputmethod.InputMethodManager#getInstance",
- "android.util.Log#println_native",
"com.android.internal.util.XmlUtils#convertValueToInt",
"com.android.internal.textservice.ITextServicesManager$Stub#asInterface",
};
@@ -185,6 +184,7 @@
private final static String[] RENAMED_CLASSES =
new String[] {
"android.os.ServiceManager", "android.os._Original_ServiceManager",
+ "android.util.LruCache", "android.util._Original_LruCache",
"android.view.SurfaceView", "android.view._Original_SurfaceView",
"android.view.accessibility.AccessibilityManager", "android.view.accessibility._Original_AccessibilityManager",
"android.webkit.WebView", "android.webkit._Original_WebView",