Merge "Add drop shadow for drawPosText in hwui renderer."
diff --git a/api/current.txt b/api/current.txt
index 31bb0b8e..29e468b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -10504,6 +10504,7 @@
method public float getAccuracy();
method public double getAltitude();
method public float getBearing();
+ method public long getElapsedRealtimeNano();
method public android.os.Bundle getExtras();
method public double getLatitude();
method public double getLongitude();
@@ -10523,6 +10524,7 @@
method public void setAccuracy(float);
method public void setAltitude(double);
method public void setBearing(float);
+ method public void setElapsedRealtimeNano(long);
method public void setExtras(android.os.Bundle);
method public void setLatitude(double);
method public void setLongitude(double);
@@ -13765,6 +13767,174 @@
package android.opengl {
+ public class EGL14 {
+ ctor public EGL14();
+ method public static boolean eglBindAPI(int);
+ method public static boolean eglBindTexImage(android.opengl.EGLDisplay, android.opengl.EGLSurface, int);
+ method public static boolean eglChooseConfig(android.opengl.EGLDisplay, int[], int, android.opengl.EGLConfig[], int, int, int[], int);
+ method public static boolean eglCopyBuffers(android.opengl.EGLDisplay, android.opengl.EGLSurface, int);
+ method public static android.opengl.EGLContext eglCreateContext(android.opengl.EGLDisplay, android.opengl.EGLConfig, android.opengl.EGLContext, int[], int);
+ method public static android.opengl.EGLSurface eglCreatePbufferFromClientBuffer(android.opengl.EGLDisplay, int, int, android.opengl.EGLConfig, int[], int);
+ method public static android.opengl.EGLSurface eglCreatePbufferSurface(android.opengl.EGLDisplay, android.opengl.EGLConfig, int[], int);
+ method public static android.opengl.EGLSurface eglCreatePixmapSurface(android.opengl.EGLDisplay, android.opengl.EGLConfig, int, int[], int);
+ method public static android.opengl.EGLSurface eglCreateWindowSurface(android.opengl.EGLDisplay, android.opengl.EGLConfig, java.lang.Object, int[], int);
+ method public static boolean eglDestroyContext(android.opengl.EGLDisplay, android.opengl.EGLContext);
+ method public static boolean eglDestroySurface(android.opengl.EGLDisplay, android.opengl.EGLSurface);
+ method public static boolean eglGetConfigAttrib(android.opengl.EGLDisplay, android.opengl.EGLConfig, int, int[], int);
+ method public static boolean eglGetConfigs(android.opengl.EGLDisplay, android.opengl.EGLConfig[], int, int, int[], int);
+ method public static android.opengl.EGLContext eglGetCurrentContext();
+ method public static android.opengl.EGLDisplay eglGetCurrentDisplay();
+ method public static android.opengl.EGLSurface eglGetCurrentSurface(int);
+ method public static android.opengl.EGLDisplay eglGetDisplay(int);
+ method public static int eglGetError();
+ method public static boolean eglInitialize(android.opengl.EGLDisplay, int[], int, int[], int);
+ method public static boolean eglMakeCurrent(android.opengl.EGLDisplay, android.opengl.EGLSurface, android.opengl.EGLSurface, android.opengl.EGLContext);
+ method public static int eglQueryAPI();
+ method public static boolean eglQueryContext(android.opengl.EGLDisplay, android.opengl.EGLContext, int, int[], int);
+ method public static java.lang.String eglQueryString(android.opengl.EGLDisplay, int);
+ method public static boolean eglQuerySurface(android.opengl.EGLDisplay, android.opengl.EGLSurface, int, int[], int);
+ method public static boolean eglReleaseTexImage(android.opengl.EGLDisplay, android.opengl.EGLSurface, int);
+ method public static boolean eglReleaseThread();
+ method public static boolean eglSurfaceAttrib(android.opengl.EGLDisplay, android.opengl.EGLSurface, int, int);
+ method public static boolean eglSwapBuffers(android.opengl.EGLDisplay, android.opengl.EGLSurface);
+ method public static boolean eglSwapInterval(android.opengl.EGLDisplay, int);
+ method public static boolean eglTerminate(android.opengl.EGLDisplay);
+ method public static boolean eglWaitClient();
+ method public static boolean eglWaitGL();
+ method public static boolean eglWaitNative(int);
+ field public static final int EGL_ALPHA_MASK_SIZE = 12350; // 0x303e
+ field public static final int EGL_ALPHA_SIZE = 12321; // 0x3021
+ field public static final int EGL_BACK_BUFFER = 12420; // 0x3084
+ field public static final int EGL_BAD_ACCESS = 12290; // 0x3002
+ field public static final int EGL_BAD_ALLOC = 12291; // 0x3003
+ field public static final int EGL_BAD_ATTRIBUTE = 12292; // 0x3004
+ field public static final int EGL_BAD_CONFIG = 12293; // 0x3005
+ field public static final int EGL_BAD_CONTEXT = 12294; // 0x3006
+ field public static final int EGL_BAD_CURRENT_SURFACE = 12295; // 0x3007
+ field public static final int EGL_BAD_DISPLAY = 12296; // 0x3008
+ field public static final int EGL_BAD_MATCH = 12297; // 0x3009
+ field public static final int EGL_BAD_NATIVE_PIXMAP = 12298; // 0x300a
+ field public static final int EGL_BAD_NATIVE_WINDOW = 12299; // 0x300b
+ field public static final int EGL_BAD_PARAMETER = 12300; // 0x300c
+ field public static final int EGL_BAD_SURFACE = 12301; // 0x300d
+ field public static final int EGL_BIND_TO_TEXTURE_RGB = 12345; // 0x3039
+ field public static final int EGL_BIND_TO_TEXTURE_RGBA = 12346; // 0x303a
+ field public static final int EGL_BLUE_SIZE = 12322; // 0x3022
+ field public static final int EGL_BUFFER_DESTROYED = 12437; // 0x3095
+ field public static final int EGL_BUFFER_PRESERVED = 12436; // 0x3094
+ field public static final int EGL_BUFFER_SIZE = 12320; // 0x3020
+ field public static final int EGL_CLIENT_APIS = 12429; // 0x308d
+ field public static final int EGL_COLOR_BUFFER_TYPE = 12351; // 0x303f
+ field public static final int EGL_CONFIG_CAVEAT = 12327; // 0x3027
+ field public static final int EGL_CONFIG_ID = 12328; // 0x3028
+ field public static final int EGL_CONFORMANT = 12354; // 0x3042
+ field public static final int EGL_CONTEXT_CLIENT_TYPE = 12439; // 0x3097
+ field public static final int EGL_CONTEXT_CLIENT_VERSION = 12440; // 0x3098
+ field public static final int EGL_CONTEXT_LOST = 12302; // 0x300e
+ field public static final int EGL_CORE_NATIVE_ENGINE = 12379; // 0x305b
+ field public static final int EGL_DEFAULT_DISPLAY = 0; // 0x0
+ field public static final int EGL_DEPTH_SIZE = 12325; // 0x3025
+ field public static final int EGL_DISPLAY_SCALING = 10000; // 0x2710
+ field public static final int EGL_DRAW = 12377; // 0x3059
+ field public static final int EGL_EXTENSIONS = 12373; // 0x3055
+ field public static final int EGL_FALSE = 0; // 0x0
+ field public static final int EGL_GREEN_SIZE = 12323; // 0x3023
+ field public static final int EGL_HEIGHT = 12374; // 0x3056
+ field public static final int EGL_HORIZONTAL_RESOLUTION = 12432; // 0x3090
+ field public static final int EGL_LARGEST_PBUFFER = 12376; // 0x3058
+ field public static final int EGL_LEVEL = 12329; // 0x3029
+ field public static final int EGL_LUMINANCE_BUFFER = 12431; // 0x308f
+ field public static final int EGL_LUMINANCE_SIZE = 12349; // 0x303d
+ field public static final int EGL_MATCH_NATIVE_PIXMAP = 12353; // 0x3041
+ field public static final int EGL_MAX_PBUFFER_HEIGHT = 12330; // 0x302a
+ field public static final int EGL_MAX_PBUFFER_PIXELS = 12331; // 0x302b
+ field public static final int EGL_MAX_PBUFFER_WIDTH = 12332; // 0x302c
+ field public static final int EGL_MAX_SWAP_INTERVAL = 12348; // 0x303c
+ field public static final int EGL_MIN_SWAP_INTERVAL = 12347; // 0x303b
+ field public static final int EGL_MIPMAP_LEVEL = 12419; // 0x3083
+ field public static final int EGL_MIPMAP_TEXTURE = 12418; // 0x3082
+ field public static final int EGL_MULTISAMPLE_RESOLVE = 12441; // 0x3099
+ field public static final int EGL_MULTISAMPLE_RESOLVE_BOX = 12443; // 0x309b
+ field public static final int EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 512; // 0x200
+ field public static final int EGL_MULTISAMPLE_RESOLVE_DEFAULT = 12442; // 0x309a
+ field public static final int EGL_NATIVE_RENDERABLE = 12333; // 0x302d
+ field public static final int EGL_NATIVE_VISUAL_ID = 12334; // 0x302e
+ field public static final int EGL_NATIVE_VISUAL_TYPE = 12335; // 0x302f
+ field public static final int EGL_NONE = 12344; // 0x3038
+ field public static final int EGL_NON_CONFORMANT_CONFIG = 12369; // 0x3051
+ field public static final int EGL_NOT_INITIALIZED = 12289; // 0x3001
+ field public static android.opengl.EGLContext EGL_NO_CONTEXT;
+ field public static android.opengl.EGLDisplay EGL_NO_DISPLAY;
+ field public static android.opengl.EGLSurface EGL_NO_SURFACE;
+ field public static final int EGL_NO_TEXTURE = 12380; // 0x305c
+ field public static final int EGL_OPENGL_API = 12450; // 0x30a2
+ field public static final int EGL_OPENGL_BIT = 8; // 0x8
+ field public static final int EGL_OPENGL_ES2_BIT = 4; // 0x4
+ field public static final int EGL_OPENGL_ES_API = 12448; // 0x30a0
+ field public static final int EGL_OPENGL_ES_BIT = 1; // 0x1
+ field public static final int EGL_OPENVG_API = 12449; // 0x30a1
+ field public static final int EGL_OPENVG_BIT = 2; // 0x2
+ field public static final int EGL_OPENVG_IMAGE = 12438; // 0x3096
+ field public static final int EGL_PBUFFER_BIT = 1; // 0x1
+ field public static final int EGL_PIXEL_ASPECT_RATIO = 12434; // 0x3092
+ field public static final int EGL_PIXMAP_BIT = 2; // 0x2
+ field public static final int EGL_READ = 12378; // 0x305a
+ field public static final int EGL_RED_SIZE = 12324; // 0x3024
+ field public static final int EGL_RENDERABLE_TYPE = 12352; // 0x3040
+ field public static final int EGL_RENDER_BUFFER = 12422; // 0x3086
+ field public static final int EGL_RGB_BUFFER = 12430; // 0x308e
+ field public static final int EGL_SAMPLES = 12337; // 0x3031
+ field public static final int EGL_SAMPLE_BUFFERS = 12338; // 0x3032
+ field public static final int EGL_SINGLE_BUFFER = 12421; // 0x3085
+ field public static final int EGL_SLOW_CONFIG = 12368; // 0x3050
+ field public static final int EGL_STENCIL_SIZE = 12326; // 0x3026
+ field public static final int EGL_SUCCESS = 12288; // 0x3000
+ field public static final int EGL_SURFACE_TYPE = 12339; // 0x3033
+ field public static final int EGL_SWAP_BEHAVIOR = 12435; // 0x3093
+ field public static final int EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 1024; // 0x400
+ field public static final int EGL_TEXTURE_2D = 12383; // 0x305f
+ field public static final int EGL_TEXTURE_FORMAT = 12416; // 0x3080
+ field public static final int EGL_TEXTURE_RGB = 12381; // 0x305d
+ field public static final int EGL_TEXTURE_RGBA = 12382; // 0x305e
+ field public static final int EGL_TEXTURE_TARGET = 12417; // 0x3081
+ field public static final int EGL_TRANSPARENT_BLUE_VALUE = 12341; // 0x3035
+ field public static final int EGL_TRANSPARENT_GREEN_VALUE = 12342; // 0x3036
+ field public static final int EGL_TRANSPARENT_RED_VALUE = 12343; // 0x3037
+ field public static final int EGL_TRANSPARENT_RGB = 12370; // 0x3052
+ field public static final int EGL_TRANSPARENT_TYPE = 12340; // 0x3034
+ field public static final int EGL_TRUE = 1; // 0x1
+ field public static final int EGL_VENDOR = 12371; // 0x3053
+ field public static final int EGL_VERSION = 12372; // 0x3054
+ field public static final int EGL_VERTICAL_RESOLUTION = 12433; // 0x3091
+ field public static final int EGL_VG_ALPHA_FORMAT = 12424; // 0x3088
+ field public static final int EGL_VG_ALPHA_FORMAT_NONPRE = 12427; // 0x308b
+ field public static final int EGL_VG_ALPHA_FORMAT_PRE = 12428; // 0x308c
+ field public static final int EGL_VG_ALPHA_FORMAT_PRE_BIT = 64; // 0x40
+ field public static final int EGL_VG_COLORSPACE = 12423; // 0x3087
+ field public static final int EGL_VG_COLORSPACE_LINEAR = 12426; // 0x308a
+ field public static final int EGL_VG_COLORSPACE_LINEAR_BIT = 32; // 0x20
+ field public static final int EGL_VG_COLORSPACE_sRGB = 12425; // 0x3089
+ field public static final int EGL_WIDTH = 12375; // 0x3057
+ field public static final int EGL_WINDOW_BIT = 4; // 0x4
+ }
+
+ public class EGLConfig extends android.opengl.EGLObjectHandle {
+ }
+
+ public class EGLContext extends android.opengl.EGLObjectHandle {
+ }
+
+ public class EGLDisplay extends android.opengl.EGLObjectHandle {
+ }
+
+ public abstract class EGLObjectHandle {
+ ctor protected EGLObjectHandle(int);
+ method public int getHandle();
+ }
+
+ public class EGLSurface extends android.opengl.EGLObjectHandle {
+ }
+
public class ETC1 {
ctor public ETC1();
method public static void decodeBlock(java.nio.Buffer, java.nio.Buffer);
@@ -16174,6 +16344,7 @@
public final class SystemClock {
method public static long currentThreadTimeMillis();
method public static long elapsedRealtime();
+ method public static long elapsedRealtimeNano();
method public static boolean setCurrentTimeMillis(long);
method public static void sleep(long);
method public static long uptimeMillis();
@@ -26444,6 +26615,7 @@
method public boolean getLightTouchEnabled();
method public boolean getLoadWithOverviewMode();
method public synchronized boolean getLoadsImagesAutomatically();
+ method public boolean getMediaPlaybackRequiresUserGesture();
method public synchronized int getMinimumFontSize();
method public synchronized int getMinimumLogicalFontSize();
method public deprecated boolean getNavDump();
@@ -26493,6 +26665,7 @@
method public void setLightTouchEnabled(boolean);
method public void setLoadWithOverviewMode(boolean);
method public synchronized void setLoadsImagesAutomatically(boolean);
+ method public void setMediaPlaybackRequiresUserGesture(boolean);
method public synchronized void setMinimumFontSize(int);
method public synchronized void setMinimumLogicalFontSize(int);
method public deprecated void setNavDump(boolean);
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index f5f6f3b..5878619 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -79,7 +79,7 @@
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(libdir, pkgname, AID_SYSTEM) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
unlink(pkgdir);
return -errno;
@@ -95,7 +95,7 @@
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
unlink(libdir);
unlink(pkgdir);
return -errno;
@@ -202,7 +202,7 @@
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(pkgdir, pkgname, uid) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
unlink(pkgdir);
return -errno;
}
@@ -404,7 +404,7 @@
#ifdef HAVE_SELINUX
if (selinux_android_setfilecon(pkgpath, pkgname, s.st_uid) < 0) {
- LOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
+ ALOGE("cannot setfilecon dir '%s': %s\n", pkgpath, strerror(errno));
return -1;
}
#endif
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index f20fd33..809acac 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2708,7 +2708,12 @@
// metadata is available.
Intent upIntent = getParentActivityIntent();
if (upIntent != null) {
- if (shouldUpRecreateTask(upIntent)) {
+ if (mActivityInfo.taskAffinity == null) {
+ // Activities with a null affinity are special; they really shouldn't
+ // specify a parent activity intent in the first place. Just finish
+ // the current activity and call it a day.
+ finish();
+ } else if (shouldUpRecreateTask(upIntent)) {
TaskStackBuilder b = TaskStackBuilder.create(this);
onCreateNavigateUpTaskStack(b);
onPrepareNavigateUpTaskStack(b);
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index b0cc37b..1bf7785 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -22,6 +22,8 @@
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
+// TODO(cmautner): remove after fixing 6829431.
+import android.os.Debug;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
@@ -383,7 +385,8 @@
* Container for fragments associated with an activity.
*/
final class FragmentManagerImpl extends FragmentManager {
- static boolean DEBUG = false;
+ // TODO(cmautner): restore to false after fixing 6829431.
+ static boolean DEBUG = true;
static final String TAG = "FragmentManager";
static final String TARGET_REQUEST_CODE_STATE_TAG = "android:target_req_state";
@@ -732,6 +735,10 @@
void moveToState(Fragment f, int newState, int transit, int transitionStyle,
boolean keepActive) {
+ // TODO(cmautner): remove after fixing 6829431.
+ if (DEBUG) Log.v(TAG, "moveToState: " + f
+ + " oldState=" + f.mState + " newState=" + newState
+ + " mRemoving=" + f.mRemoving + " Callers=" + Debug.getCallers(5));
// Fragments that are not currently added will sit in the onCreate() state.
if (!f.mAdded && newState > Fragment.CREATED) {
newState = Fragment.CREATED;
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 46153e7..c2cb1ff 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -1674,9 +1674,6 @@
/**
* Show the input method. This is a call back to the
* IMF to handle showing the input method.
- * Close this input method's soft input area, removing it from the display.
- * The input method will continue running, but the user can no longer use
- * it to generate input by touching the screen.
* @param flags Provides additional operating flags. Currently may be
* 0 or have the {@link InputMethodManager#SHOW_FORCED
* InputMethodManager.} bit set.
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 318c0ae..b6e606c 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -542,14 +542,18 @@
private void acquireLocked() {
if (!mRefCounted || mCount++ == 0) {
+ // Do this even if the wake lock is already thought to be held (mHeld == true)
+ // because non-reference counted wake locks are not always properly released.
+ // For example, the keyguard's wake lock might be forcibly released by the
+ // power manager without the keyguard knowing. A subsequent call to acquire
+ // should immediately acquire the wake lock once again despite never having
+ // been explicitly released by the keyguard.
mHandler.removeCallbacks(mReleaser);
- if (!mHeld) {
- try {
- mService.acquireWakeLock(mFlags, mToken, mTag, mWorkSource);
- } catch (RemoteException e) {
- }
- mHeld = true;
+ try {
+ mService.acquireWakeLock(mFlags, mToken, mTag, mWorkSource);
+ } catch (RemoteException e) {
}
+ mHeld = true;
}
}
diff --git a/core/java/android/os/SystemClock.java b/core/java/android/os/SystemClock.java
index 7291739..a54c25b 100644
--- a/core/java/android/os/SystemClock.java
+++ b/core/java/android/os/SystemClock.java
@@ -46,15 +46,16 @@
* such as {@link Thread#sleep(long) Thread.sleep(millls)},
* {@link Object#wait(long) Object.wait(millis)}, and
* {@link System#nanoTime System.nanoTime()}. This clock is guaranteed
- * to be monotonic, and is the recommended basis for the general purpose
- * interval timing of user interface events, performance measurements,
- * and anything else that does not need to measure elapsed time during
- * device sleep. Most methods that accept a timestamp value expect the
- * {@link #uptimeMillis} clock.
+ * to be monotonic, and is suitable for interval timing when the
+ * interval does not span device sleep. Most methods that accept a
+ * timestamp value currently expect the {@link #uptimeMillis} clock.
*
- * <li> <p> {@link #elapsedRealtime} is counted in milliseconds since the
- * system was booted, including deep sleep. This clock should be used
- * when measuring time intervals that may span periods of system sleep.
+ * <li> <p> {@link #elapsedRealtime} and {@link #elapsedRealtimeNano}
+ * return the time since the system was booted, and include deep sleep.
+ * This clock is guaranteed to be monotonic, and continues to tick even
+ * when the CPU is in power saving modes, so is the recommend basis
+ * for general purpose interval timing.
+ *
* </ul>
*
* There are several mechanisms for controlling the timing of events:
@@ -150,7 +151,14 @@
* @return elapsed milliseconds since boot.
*/
native public static long elapsedRealtime();
-
+
+ /**
+ * Returns nanoseconds since boot, including time spent in sleep.
+ *
+ * @return elapsed nanoseconds since boot.
+ */
+ public static native long elapsedRealtimeNano();
+
/**
* Returns milliseconds running in the current thread.
*
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 043d1d4..697f38e 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6387,7 +6387,8 @@
case IMPORTANT_FOR_ACCESSIBILITY_NO:
return false;
case IMPORTANT_FOR_ACCESSIBILITY_AUTO:
- return isActionableForAccessibility() || hasListenersForAccessibility();
+ return isActionableForAccessibility() || hasListenersForAccessibility()
+ || getAccessibilityNodeProvider() != null;
default:
throw new IllegalArgumentException("Unknow important for accessibility mode: "
+ mode);
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 8705d20..58f0b85 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -355,6 +355,9 @@
}
case MSG_BIND: {
final InputBindResult res = (InputBindResult)msg.obj;
+ if (DEBUG) {
+ Log.i(TAG, "handleMessage: MSG_BIND " + res.sequence + "," + res.id);
+ }
synchronized (mH) {
if (mBindSequence < 0 || mBindSequence != res.sequence) {
Log.w(TAG, "Ignoring onBind: cur seq=" + mBindSequence
@@ -371,6 +374,9 @@
}
case MSG_UNBIND: {
final int sequence = msg.arg1;
+ if (DEBUG) {
+ Log.i(TAG, "handleMessage: MSG_UNBIND " + sequence);
+ }
boolean startInput = false;
synchronized (mH) {
if (mBindSequence == sequence) {
@@ -403,6 +409,9 @@
}
case MSG_SET_ACTIVE: {
final boolean active = msg.arg1 != 0;
+ if (DEBUG) {
+ Log.i(TAG, "handleMessage: MSG_SET_ACTIVE " + active + ", was " + mActive);
+ }
synchronized (mH) {
mActive = active;
mFullscreenMode = false;
@@ -420,7 +429,16 @@
// Check focus again in case that "onWindowFocus" is called before
// handling this message.
if (mServedView != null && mServedView.hasWindowFocus()) {
- checkFocus(mHasBeenInactive);
+ // "finishComposingText" has been already called above. So we
+ // should not call mServedInputConnection.finishComposingText here.
+ // Also, please note that this handler thread could be different
+ // from a thread that created mServedView. That could happen
+ // the current activity is running in the system process.
+ // In that case, we really should not call
+ // mServedInputConnection.finishComposingText.
+ if (checkFocusNoStartInput(mHasBeenInactive, false)) {
+ startInputInner(null, 0, 0, 0);
+ }
}
}
}
@@ -1231,20 +1249,16 @@
}
}
- private void checkFocus(boolean forceNewFocus) {
- if (checkFocusNoStartInput(forceNewFocus)) {
- startInputInner(null, 0, 0, 0);
- }
- }
-
/**
* @hide
*/
public void checkFocus() {
- checkFocus(false);
+ if (checkFocusNoStartInput(false, true)) {
+ startInputInner(null, 0, 0, 0);
+ }
}
- private boolean checkFocusNoStartInput(boolean forceNewFocus) {
+ private boolean checkFocusNoStartInput(boolean forceNewFocus, boolean finishComposingText) {
// This is called a lot, so short-circuit before locking.
if (mServedView == mNextServedView && !forceNewFocus) {
return false;
@@ -1278,7 +1292,7 @@
mServedConnecting = true;
}
- if (ic != null) {
+ if (finishComposingText && ic != null) {
ic.finishComposingText();
}
@@ -1323,7 +1337,7 @@
controlFlags |= CONTROL_WINDOW_FIRST;
}
- if (checkFocusNoStartInput(forceNewFocus)) {
+ if (checkFocusNoStartInput(forceNewFocus, true)) {
// We need to restart input on the current focus view. This
// should be done in conjunction with telling the system service
// about the window gaining focus, to help make the transition
diff --git a/core/java/android/webkit/JWebCoreJavaBridge.java b/core/java/android/webkit/JWebCoreJavaBridge.java
index e6eaa14..d9aeb70 100644
--- a/core/java/android/webkit/JWebCoreJavaBridge.java
+++ b/core/java/android/webkit/JWebCoreJavaBridge.java
@@ -89,6 +89,7 @@
private void fireSharedTimer() {
// clear the flag so that sharedTimerFired() can set a new timer
mHasInstantTimer = false;
+ removeMessages(TIMER_MESSAGE);
sharedTimerFired();
}
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 1a868d5..7a67a14 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -199,6 +199,26 @@
}
/**
+ * Sets whether the WebView requires a user gesture to play media.
+ * The default is true.
+ *
+ * @param require whether the WebView requires a user gesture to play media
+ */
+ public void setMediaPlaybackRequiresUserGesture(boolean require) {
+ throw new MustOverrideException();
+ }
+
+ /**
+ * Gets whether the WebView requires a user gesture to play media.
+ *
+ * @return true if the WebView requires a user gesture to play media
+ * @see #setMediaPlaybackRequiresUserGesture
+ */
+ public boolean getMediaPlaybackRequiresUserGesture() {
+ throw new MustOverrideException();
+ }
+
+ /**
* Sets whether the WebView should use its built-in zoom mechanisms. The
* built-in zoom mechanisms comprise on-screen zoom controls, which are
* displayed over the WebView's content, and the use of a pinch gesture to
diff --git a/core/java/android/webkit/WebSettingsClassic.java b/core/java/android/webkit/WebSettingsClassic.java
index 1288613..66651f7 100644
--- a/core/java/android/webkit/WebSettingsClassic.java
+++ b/core/java/android/webkit/WebSettingsClassic.java
@@ -34,7 +34,7 @@
*/
public class WebSettingsClassic extends WebSettings {
// TODO: Keep this up to date
- private static final String PREVIOUS_VERSION = "4.0.4";
+ private static final String PREVIOUS_VERSION = "4.1.1";
// WebView associated with this WebSettings.
private WebViewClassic mWebView;
@@ -116,6 +116,7 @@
private boolean mNeedInitialFocus = true;
private boolean mNavDump = false;
private boolean mSupportZoom = true;
+ private boolean mMediaPlaybackRequiresUserGesture = true;
private boolean mBuiltInZoomControls = false;
private boolean mDisplayZoomControls = true;
private boolean mAllowFileAccess = true;
@@ -459,6 +460,25 @@
}
/**
+ * @see android.webkit.WebSettings#setMediaPlaybackRequiresUserGesture(boolean)
+ */
+ @Override
+ public void setMediaPlaybackRequiresUserGesture(boolean support) {
+ if (mMediaPlaybackRequiresUserGesture != support) {
+ mMediaPlaybackRequiresUserGesture = support;
+ postSync();
+ }
+ }
+
+ /**
+ * @see android.webkit.WebSettings#getMediaPlaybackRequiresUserGesture()
+ */
+ @Override
+ public boolean getMediaPlaybackRequiresUserGesture() {
+ return mMediaPlaybackRequiresUserGesture;
+ }
+
+ /**
* @see android.webkit.WebSettings#setBuiltInZoomControls(boolean)
*/
@Override
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 7691f00..ad25704 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -333,16 +333,12 @@
@Deprecated
public interface PictureListener {
/**
- * Notifies the listener that the picture has changed.
+ * Used to provide notification that the WebView's picture has changed.
+ * See {@link WebView#capturePicture} for details of the picture.
*
* @param view the WebView that owns the picture
* @param picture the new picture
- * @deprecated Due to internal changes, the picture does not include
- * composited layers such as fixed position elements or
- * scrollable divs. While the PictureListener API can still
- * be used to detect changes in the WebView content, you
- * are advised against its usage until a replacement is
- * provided in a future Android release.
+ * @deprecated Deprecated due to internal changes.
*/
@Deprecated
public void onNewPicture(WebView view, Picture picture);
@@ -987,13 +983,18 @@
}
/**
- * Gets a new picture that captures the current display of this WebView.
- * This is a copy of the display, and will be unaffected if this WebView
- * later loads a different URL.
+ * Gets a new picture that captures the current contents of this WebView.
+ * The picture is of the entire document being displayed, and is not
+ * limited to the area currently displayed by this WebView. Also, the
+ * picture is a static copy and is unaffected by later changes to the
+ * content being displayed.
+ * <p>
+ * Note that due to internal changes, for API levels between
+ * {@link android.os.Build.VERSION_CODES#HONEYCOMB} and
+ * {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH} inclusive, the
+ * picture does not include fixed position elements or scrollable divs.
*
- * @return a picture containing the current contents of this WebView. Note
- * this picture is of the entire document, and is not restricted to
- * the bounds of the view.
+ * @return a picture that captures the current contents of this WebView
*/
public Picture capturePicture() {
checkThread();
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 40229af..59036e7 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -2197,12 +2197,20 @@
mEventHub.sendMessage(Message.obtain(null, EventHub.WEBKIT_DRAW));
}
m_skipDrawFlag = false;
+ m_skipDrawFlagLock.notify();
}
}
private void webkitDraw() {
synchronized (m_skipDrawFlagLock) {
if (m_skipDrawFlag) {
+ try {
+ // Aggressively throttle webkit to give the UI more CPU
+ // to catch up with
+ m_skipDrawFlagLock.wait(50);
+ } catch (InterruptedException e) {}
+ }
+ if (m_skipDrawFlag) {
m_drawWasSkipped = true;
return;
}
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 7334ac3..84fe8ce 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -76,6 +76,7 @@
private int mIconDpi;
private int mIconSize;
private int mMaxColumns;
+ private int mLastSelected = GridView.INVALID_POSITION;
private boolean mRegistered;
private final PackageMonitor mPackageMonitor = new PackageMonitor() {
@@ -247,6 +248,7 @@
if (mAlwaysUseOption) {
final int checkedPos = mGrid.getCheckedItemPosition();
final boolean enabled = checkedPos != GridView.INVALID_POSITION;
+ mLastSelected = checkedPos;
mAlwaysButton.setEnabled(enabled);
mOnceButton.setEnabled(enabled);
if (enabled) {
@@ -257,14 +259,15 @@
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- if (mAlwaysUseOption) {
- final int checkedPos = mGrid.getCheckedItemPosition();
- final boolean enabled = checkedPos != GridView.INVALID_POSITION;
- mAlwaysButton.setEnabled(enabled);
- mOnceButton.setEnabled(enabled);
- if (enabled) {
+ final int checkedPos = mGrid.getCheckedItemPosition();
+ final boolean hasValidSelection = checkedPos != GridView.INVALID_POSITION;
+ if (mAlwaysUseOption && (!hasValidSelection || mLastSelected != checkedPos)) {
+ mAlwaysButton.setEnabled(hasValidSelection);
+ mOnceButton.setEnabled(hasValidSelection);
+ if (hasValidSelection) {
mGrid.smoothScrollToPosition(checkedPos);
}
+ mLastSelected = checkedPos;
} else {
startSelected(position, false);
}
@@ -371,7 +374,8 @@
void showAppDetails(ResolveInfo ri) {
Intent in = new Intent().setAction("android.settings.APPLICATION_DETAILS_SETTINGS")
- .setData(Uri.fromParts("package", ri.activityInfo.packageName, null));
+ .setData(Uri.fromParts("package", ri.activityInfo.packageName, null))
+ .addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(in);
}
diff --git a/core/java/com/android/internal/net/VpnProfile.java b/core/java/com/android/internal/net/VpnProfile.java
new file mode 100644
index 0000000..154b16b
--- /dev/null
+++ b/core/java/com/android/internal/net/VpnProfile.java
@@ -0,0 +1,123 @@
+/*
+ * 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 com.android.internal.net;
+
+import java.nio.charset.Charsets;
+
+/**
+ * Parcel-like entity class for VPN profiles. To keep things simple, all
+ * fields are package private. Methods are provided for serialization, so
+ * storage can be implemented easily. Two rules are set for this class.
+ * First, all fields must be kept non-null. Second, always make a copy
+ * using clone() before modifying.
+ *
+ * @hide
+ */
+public class VpnProfile implements Cloneable {
+ // Match these constants with R.array.vpn_types.
+ public static final int TYPE_PPTP = 0;
+ public static final int TYPE_L2TP_IPSEC_PSK = 1;
+ public static final int TYPE_L2TP_IPSEC_RSA = 2;
+ public static final int TYPE_IPSEC_XAUTH_PSK = 3;
+ public static final int TYPE_IPSEC_XAUTH_RSA = 4;
+ public static final int TYPE_IPSEC_HYBRID_RSA = 5;
+ public static final int TYPE_MAX = 5;
+
+ // Entity fields.
+ public final String key; // -1
+ public String name = ""; // 0
+ public int type = TYPE_PPTP; // 1
+ public String server = ""; // 2
+ public String username = ""; // 3
+ public String password = ""; // 4
+ public String dnsServers = ""; // 5
+ public String searchDomains = ""; // 6
+ public String routes = ""; // 7
+ public boolean mppe = true; // 8
+ public String l2tpSecret = ""; // 9
+ public String ipsecIdentifier = "";// 10
+ public String ipsecSecret = ""; // 11
+ public String ipsecUserCert = ""; // 12
+ public String ipsecCaCert = ""; // 13
+ public String ipsecServerCert = "";// 14
+
+ // Helper fields.
+ public boolean saveLogin = false;
+
+ public VpnProfile(String key) {
+ this.key = key;
+ }
+
+ public static VpnProfile decode(String key, byte[] value) {
+ try {
+ if (key == null) {
+ return null;
+ }
+
+ String[] values = new String(value, Charsets.UTF_8).split("\0", -1);
+ // There can be 14 or 15 values in ICS MR1.
+ if (values.length < 14 || values.length > 15) {
+ return null;
+ }
+
+ VpnProfile profile = new VpnProfile(key);
+ profile.name = values[0];
+ profile.type = Integer.valueOf(values[1]);
+ if (profile.type < 0 || profile.type > TYPE_MAX) {
+ return null;
+ }
+ profile.server = values[2];
+ profile.username = values[3];
+ profile.password = values[4];
+ profile.dnsServers = values[5];
+ profile.searchDomains = values[6];
+ profile.routes = values[7];
+ profile.mppe = Boolean.valueOf(values[8]);
+ profile.l2tpSecret = values[9];
+ profile.ipsecIdentifier = values[10];
+ profile.ipsecSecret = values[11];
+ profile.ipsecUserCert = values[12];
+ profile.ipsecCaCert = values[13];
+ profile.ipsecServerCert = (values.length > 14) ? values[14] : "";
+
+ profile.saveLogin = !profile.username.isEmpty() || !profile.password.isEmpty();
+ return profile;
+ } catch (Exception e) {
+ // ignore
+ }
+ return null;
+ }
+
+ public byte[] encode() {
+ StringBuilder builder = new StringBuilder(name);
+ builder.append('\0').append(type);
+ builder.append('\0').append(server);
+ builder.append('\0').append(saveLogin ? username : "");
+ builder.append('\0').append(saveLogin ? password : "");
+ builder.append('\0').append(dnsServers);
+ builder.append('\0').append(searchDomains);
+ builder.append('\0').append(routes);
+ builder.append('\0').append(mppe);
+ builder.append('\0').append(l2tpSecret);
+ builder.append('\0').append(ipsecIdentifier);
+ builder.append('\0').append(ipsecSecret);
+ builder.append('\0').append(ipsecUserCert);
+ builder.append('\0').append(ipsecCaCert);
+ builder.append('\0').append(ipsecServerCert);
+ return builder.toString().getBytes(Charsets.UTF_8);
+ }
+}
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp
index 73696ec..d8a15df 100644
--- a/core/jni/android_opengl_GLES10.cpp
+++ b/core/jni/android_opengl_GLES10.cpp
@@ -75,14 +75,12 @@
}
static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -97,11 +95,10 @@
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
- return (void *) ((char *) data + offset);
+ return NULL;
}
static void
@@ -292,6 +289,7 @@
android_glColorPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -315,10 +313,15 @@
android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glCompressedTexImage2D(
(GLenum)target,
(GLint)level,
@@ -339,10 +342,15 @@
android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glCompressedTexSubImage2D(
(GLenum)target,
(GLint)level,
@@ -457,16 +465,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
- textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
+ textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (textures == NULL) {
+ char * _texturesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ textures = (GLuint *) (_texturesBase + _bufferOffset);
+ }
glDeleteTextures(
(GLsizei)n,
(GLuint *)textures
@@ -556,16 +569,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
- indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
+ indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
_exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
_exceptionMessage = "remaining() < count < needed";
goto exit;
}
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (GLvoid *) (_indicesBase + _bufferOffset);
+ }
glDrawElements(
(GLenum)mode,
(GLsizei)count,
@@ -706,10 +724,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_FOG_MODE)
@@ -741,6 +760,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glFogfv(
(GLenum)pname,
(GLfloat *)params
@@ -847,10 +870,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_FOG_MODE)
@@ -882,6 +906,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glFogxv(
(GLenum)pname,
(GLfixed *)params
@@ -990,16 +1018,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
- textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
+ textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (textures == NULL) {
+ char * _texturesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ textures = (GLuint *) (_texturesBase + _bufferOffset);
+ }
glGenTextures(
(GLsizei)n,
(GLuint *)textures
@@ -1411,10 +1444,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_ALPHA_BITS)
@@ -1752,6 +1786,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetIntegerv(
(GLenum)pname,
(GLint *)params
@@ -1864,10 +1902,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -1890,6 +1929,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glLightModelfv(
(GLenum)pname,
(GLfloat *)params
@@ -1987,10 +2030,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -2013,6 +2057,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glLightModelxv(
(GLenum)pname,
(GLfixed *)params
@@ -2138,10 +2186,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -2190,6 +2239,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glLightfv(
(GLenum)light,
(GLenum)pname,
@@ -2316,10 +2369,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -2368,6 +2422,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glLightxv(
(GLenum)light,
(GLenum)pname,
@@ -2455,10 +2513,15 @@
android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
- m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfloat *) (_mBase + _bufferOffset);
+ }
glLoadMatrixf(
(GLfloat *)m
);
@@ -2514,10 +2577,15 @@
android_glLoadMatrixx__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
- m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfixed *) (_mBase + _bufferOffset);
+ }
glLoadMatrixx(
(GLfixed *)m
);
@@ -2632,10 +2700,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -2670,6 +2739,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glMaterialfv(
(GLenum)face,
(GLenum)pname,
@@ -2782,10 +2855,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -2820,6 +2894,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glMaterialxv(
(GLenum)face,
(GLenum)pname,
@@ -2891,10 +2969,15 @@
android_glMultMatrixf__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
- m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfloat *) (_mBase + _bufferOffset);
+ }
glMultMatrixf(
(GLfloat *)m
);
@@ -2950,10 +3033,15 @@
android_glMultMatrixx__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
- m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfixed *) (_mBase + _bufferOffset);
+ }
glMultMatrixx(
(GLfixed *)m
);
@@ -3015,6 +3103,7 @@
android_glNormalPointerBounds__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -3127,10 +3216,15 @@
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) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+ }
glReadPixels(
(GLint)x,
(GLint)y,
@@ -3268,6 +3362,7 @@
android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -3377,10 +3472,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -3409,6 +3505,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexEnvfv(
(GLenum)target,
(GLenum)pname,
@@ -3515,10 +3615,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -3547,6 +3648,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexEnvxv(
(GLenum)target,
(GLenum)pname,
@@ -3567,11 +3672,16 @@
android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (pixels_buf) {
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ }
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexImage2D(
(GLenum)target,
@@ -3616,11 +3726,16 @@
android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (pixels_buf) {
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ }
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexSubImage2D(
(GLenum)target,
@@ -3665,6 +3780,7 @@
android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
diff --git a/core/jni/android_opengl_GLES10Ext.cpp b/core/jni/android_opengl_GLES10Ext.cpp
index 16a884a..1cd8e44 100644
--- a/core/jni/android_opengl_GLES10Ext.cpp
+++ b/core/jni/android_opengl_GLES10Ext.cpp
@@ -63,14 +63,12 @@
static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -85,11 +83,10 @@
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
- return (void *) ((char *) data + offset);
+ return NULL;
}
@@ -190,38 +187,48 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _mantissaArray = (jarray) 0;
+ jint _mantissaBufferOffset = (jint) 0;
jarray _exponentArray = (jarray) 0;
+ jint _exponentBufferOffset = (jint) 0;
GLbitfield _returnValue = -1;
jint _mantissaRemaining;
GLfixed *mantissa = (GLfixed *) 0;
jint _exponentRemaining;
GLint *exponent = (GLint *) 0;
- mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining);
+ mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining, &_mantissaBufferOffset);
if (_mantissaRemaining < 16) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
- exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining);
+ exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining, &_exponentBufferOffset);
if (_exponentRemaining < 16) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
+ if (mantissa == NULL) {
+ char * _mantissaBase = (char *)_env->GetPrimitiveArrayCritical(_mantissaArray, (jboolean *) 0);
+ mantissa = (GLfixed *) (_mantissaBase + _mantissaBufferOffset);
+ }
+ if (exponent == NULL) {
+ char * _exponentBase = (char *)_env->GetPrimitiveArrayCritical(_exponentArray, (jboolean *) 0);
+ exponent = (GLint *) (_exponentBase + _exponentBufferOffset);
+ }
_returnValue = glQueryMatrixxOES(
(GLfixed *)mantissa,
(GLint *)exponent
);
exit:
- if (_mantissaArray) {
- releasePointer(_env, _mantissaArray, exponent, _exception ? JNI_FALSE : JNI_TRUE);
- }
if (_exponentArray) {
- releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _exponentArray, exponent, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (_mantissaArray) {
+ releasePointer(_env, _mantissaArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
diff --git a/core/jni/android_opengl_GLES11.cpp b/core/jni/android_opengl_GLES11.cpp
index ee7cb12..dd50940 100644
--- a/core/jni/android_opengl_GLES11.cpp
+++ b/core/jni/android_opengl_GLES11.cpp
@@ -70,14 +70,12 @@
static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -92,11 +90,10 @@
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
- return (void *) ((char *) data + offset);
+ return NULL;
}
@@ -140,11 +137,12 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (data_buf) {
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
@@ -152,6 +150,10 @@
goto exit;
}
}
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glBufferData(
(GLenum)target,
(GLsizeiptr)size,
@@ -176,16 +178,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < size < needed";
goto exit;
}
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glBufferSubData(
(GLenum)target,
(GLintptr)offset,
@@ -253,10 +260,15 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
- equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
+ equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
+ if (equation == NULL) {
+ char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ equation = (GLfloat *) (_equationBase + _bufferOffset);
+ }
glClipPlanef(
(GLenum)plane,
(GLfloat *)equation
@@ -320,10 +332,15 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
- equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
+ equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
+ if (equation == NULL) {
+ char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ equation = (GLfixed *) (_equationBase + _bufferOffset);
+ }
glClipPlanex(
(GLenum)plane,
(GLfixed *)equation
@@ -417,16 +434,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
- buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
+ buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (buffers == NULL) {
+ char * _buffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ buffers = (GLuint *) (_buffersBase + _bufferOffset);
+ }
glDeleteBuffers(
(GLsizei)n,
(GLuint *)buffers
@@ -516,16 +538,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
- buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
+ buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (buffers == NULL) {
+ char * _buffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ buffers = (GLuint *) (_buffersBase + _bufferOffset);
+ }
glGenBuffers(
(GLsizei)n,
(GLuint *)buffers
@@ -588,10 +615,15 @@
android_glGetBooleanv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
- params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLboolean *) (_paramsBase + _bufferOffset);
+ }
glGetBooleanv(
(GLenum)pname,
(GLboolean *)params
@@ -659,16 +691,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetBufferParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -732,10 +769,15 @@
android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
- eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
+ eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
+ if (eqn == NULL) {
+ char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ eqn = (GLfloat *) (_eqnBase + _bufferOffset);
+ }
glGetClipPlanef(
(GLenum)pname,
(GLfloat *)eqn
@@ -793,10 +835,15 @@
android_glGetClipPlanex__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
- eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
+ eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
+ if (eqn == NULL) {
+ char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ eqn = (GLfixed *) (_eqnBase + _bufferOffset);
+ }
glGetClipPlanex(
(GLenum)pname,
(GLfixed *)eqn
@@ -854,10 +901,15 @@
android_glGetFixedv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetFixedv(
(GLenum)pname,
(GLfixed *)params
@@ -915,10 +967,15 @@
android_glGetFloatv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetFloatv(
(GLenum)pname,
(GLfloat *)params
@@ -1028,10 +1085,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -1080,6 +1138,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetLightfv(
(GLenum)light,
(GLenum)pname,
@@ -1195,10 +1257,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -1247,6 +1310,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetLightxv(
(GLenum)light,
(GLenum)pname,
@@ -1348,10 +1415,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -1386,6 +1454,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetMaterialfv(
(GLenum)face,
(GLenum)pname,
@@ -1487,10 +1559,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -1525,6 +1598,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetMaterialxv(
(GLenum)face,
(GLenum)pname,
@@ -1620,10 +1697,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -1652,6 +1730,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetTexEnvfv(
(GLenum)env,
(GLenum)pname,
@@ -1747,10 +1829,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -1779,6 +1862,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexEnviv(
(GLenum)env,
(GLenum)pname,
@@ -1874,10 +1961,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -1906,6 +1994,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexEnvxv(
(GLenum)env,
(GLenum)pname,
@@ -1979,16 +2071,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameterfv(
(GLenum)target,
(GLenum)pname,
@@ -2062,16 +2159,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -2145,16 +2247,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameterxv(
(GLenum)target,
(GLenum)pname,
@@ -2281,16 +2388,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glPointParameterfv(
(GLenum)pname,
(GLfloat *)params
@@ -2372,16 +2484,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glPointParameterxv(
(GLenum)pname,
(GLfixed *)params
@@ -2401,6 +2518,7 @@
android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -2521,10 +2639,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -2553,6 +2672,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexEnviv(
(GLenum)target,
(GLenum)pname,
@@ -2626,16 +2749,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexParameterfv(
(GLenum)target,
(GLenum)pname,
@@ -2720,16 +2848,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -2803,16 +2936,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexParameterxv(
(GLenum)target,
(GLenum)pname,
diff --git a/core/jni/android_opengl_GLES11Ext.cpp b/core/jni/android_opengl_GLES11Ext.cpp
index a05f809..073bbb2 100644
--- a/core/jni/android_opengl_GLES11Ext.cpp
+++ b/core/jni/android_opengl_GLES11Ext.cpp
@@ -72,14 +72,12 @@
static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -94,11 +92,9 @@
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
+ return NULL;
}
@@ -249,16 +245,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
- coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLshort *) (_coordsBase + _bufferOffset);
+ }
glDrawTexsvOES(
(GLshort *)coords
);
@@ -328,16 +329,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
- coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLint *) (_coordsBase + _bufferOffset);
+ }
glDrawTexivOES(
(GLint *)coords
);
@@ -407,16 +413,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
- coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLfixed *) (_coordsBase + _bufferOffset);
+ }
glDrawTexxvOES(
(GLfixed *)coords
);
@@ -499,16 +510,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
- coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLfloat *) (_coordsBase + _bufferOffset);
+ }
glDrawTexfvOES(
(GLfloat *)coords
);
@@ -527,10 +543,15 @@
android_glEGLImageTargetTexture2DOES__ILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLeglImageOES image = (GLeglImageOES) 0;
- image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining);
+ image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
+ if (image == NULL) {
+ char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ image = (GLeglImageOES) (_imageBase + _bufferOffset);
+ }
glEGLImageTargetTexture2DOES(
(GLenum)target,
(GLeglImageOES)image
@@ -545,10 +566,15 @@
android_glEGLImageTargetRenderbufferStorageOES__ILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jobject image_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLeglImageOES image = (GLeglImageOES) 0;
- image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining);
+ image = (GLeglImageOES)getPointer(_env, image_buf, &_array, &_remaining, &_bufferOffset);
+ if (image == NULL) {
+ char * _imageBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ image = (GLeglImageOES) (_imageBase + _bufferOffset);
+ }
glEGLImageTargetRenderbufferStorageOES(
(GLenum)target,
(GLeglImageOES)image
@@ -637,10 +663,15 @@
android_glClipPlanexOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
- equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
+ equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
+ if (equation == NULL) {
+ char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ equation = (GLfixed *) (_equationBase + _bufferOffset);
+ }
glClipPlanexOES(
(GLenum)plane,
(GLfixed *)equation
@@ -730,10 +761,15 @@
android_glFogxvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glFogxvOES(
(GLenum)pname,
(GLfixed *)params
@@ -814,16 +850,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
- eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
+ eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
+ if (eqn == NULL) {
+ char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ eqn = (GLfixed *) (_eqnBase + _bufferOffset);
+ }
glGetClipPlanexOES(
(GLenum)pname,
(GLfixed *)eqn
@@ -886,10 +927,15 @@
android_glGetFixedvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetFixedvOES(
(GLenum)pname,
(GLfixed *)params
@@ -948,10 +994,15 @@
android_glGetLightxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetLightxvOES(
(GLenum)light,
(GLenum)pname,
@@ -1011,10 +1062,15 @@
android_glGetMaterialxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetMaterialxvOES(
(GLenum)face,
(GLenum)pname,
@@ -1074,10 +1130,15 @@
android_glGetTexEnvxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint env, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexEnvxvOES(
(GLenum)env,
(GLenum)pname,
@@ -1137,10 +1198,15 @@
android_glGetTexParameterxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameterxvOES(
(GLenum)target,
(GLenum)pname,
@@ -1209,10 +1275,15 @@
android_glLightModelxvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glLightModelxvOES(
(GLenum)pname,
(GLfixed *)params
@@ -1282,10 +1353,15 @@
android_glLightxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint light, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glLightxvOES(
(GLenum)light,
(GLenum)pname,
@@ -1352,10 +1428,15 @@
android_glLoadMatrixxOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
- m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfixed *) (_mBase + _bufferOffset);
+ }
glLoadMatrixxOES(
(GLfixed *)m
);
@@ -1424,10 +1505,15 @@
android_glMaterialxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint face, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glMaterialxvOES(
(GLenum)face,
(GLenum)pname,
@@ -1485,10 +1571,15 @@
android_glMultMatrixxOES__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
- m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfixed *) (_mBase + _bufferOffset);
+ }
glMultMatrixxOES(
(GLfixed *)m
);
@@ -1593,10 +1684,15 @@
android_glPointParameterxvOES__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glPointParameterxvOES(
(GLenum)pname,
(GLfixed *)params
@@ -1718,10 +1814,15 @@
android_glTexEnvxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexEnvxvOES(
(GLenum)target,
(GLenum)pname,
@@ -1792,10 +1893,15 @@
android_glTexParameterxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexParameterxvOES(
(GLenum)target,
(GLenum)pname,
@@ -1895,16 +2001,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
- renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
+ renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (renderbuffers == NULL) {
+ char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
+ }
glDeleteRenderbuffersOES(
(GLsizei)n,
(GLuint *)renderbuffers
@@ -1976,16 +2087,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
- renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
+ renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (renderbuffers == NULL) {
+ char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
+ }
glGenRenderbuffersOES(
(GLsizei)n,
(GLuint *)renderbuffers
@@ -2070,16 +2186,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetRenderbufferParameterivOES(
(GLenum)target,
(GLenum)pname,
@@ -2173,16 +2294,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
- framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
+ framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (framebuffers == NULL) {
+ char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
+ }
glDeleteFramebuffersOES(
(GLsizei)n,
(GLuint *)framebuffers
@@ -2254,16 +2380,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
- framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
+ framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (framebuffers == NULL) {
+ char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
+ }
glGenFramebuffersOES(
(GLsizei)n,
(GLuint *)framebuffers
@@ -2373,16 +2504,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetFramebufferAttachmentParameterivOES(
(GLenum)target,
(GLenum)attachment,
@@ -2429,6 +2565,7 @@
android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -2452,6 +2589,7 @@
android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -2556,10 +2694,15 @@
android_glClipPlanefOES__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint plane, jobject equation_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
- equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
+ equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
+ if (equation == NULL) {
+ char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ equation = (GLfloat *) (_equationBase + _bufferOffset);
+ }
glClipPlanefOES(
(GLenum)plane,
(GLfloat *)equation
@@ -2626,16 +2769,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
- eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
+ eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
+ if (eqn == NULL) {
+ char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ eqn = (GLfloat *) (_eqnBase + _bufferOffset);
+ }
glGetClipPlanefOES(
(GLenum)pname,
(GLfloat *)eqn
@@ -2719,10 +2867,15 @@
android_glTexGenfvOES__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexGenfvOES(
(GLenum)coord,
(GLenum)pname,
@@ -2793,10 +2946,15 @@
android_glTexGenivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexGenivOES(
(GLenum)coord,
(GLenum)pname,
@@ -2867,10 +3025,15 @@
android_glTexGenxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexGenxvOES(
(GLenum)coord,
(GLenum)pname,
@@ -2930,10 +3093,15 @@
android_glGetTexGenfvOES__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetTexGenfvOES(
(GLenum)coord,
(GLenum)pname,
@@ -2993,10 +3161,15 @@
android_glGetTexGenivOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexGenivOES(
(GLenum)coord,
(GLenum)pname,
@@ -3056,10 +3229,15 @@
android_glGetTexGenxvOES__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint coord, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexGenxvOES(
(GLenum)coord,
(GLenum)pname,
diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp
index 87ff270..354b599 100644
--- a/core/jni/android_opengl_GLES20.cpp
+++ b/core/jni/android_opengl_GLES20.cpp
@@ -63,14 +63,12 @@
static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -85,11 +83,10 @@
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
- return (void *) ((char *) data + offset);
+ return NULL;
}
@@ -279,11 +276,12 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (data_buf) {
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
@@ -291,6 +289,10 @@
goto exit;
}
}
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glBufferData(
(GLenum)target,
(GLsizeiptr)size,
@@ -315,16 +317,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < size < needed";
goto exit;
}
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glBufferSubData(
(GLenum)target,
(GLintptr)offset,
@@ -417,10 +424,15 @@
android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glCompressedTexImage2D(
(GLenum)target,
(GLint)level,
@@ -441,10 +453,15 @@
android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glCompressedTexSubImage2D(
(GLenum)target,
(GLint)level,
@@ -579,16 +596,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
- buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
+ buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (buffers == NULL) {
+ char * _buffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ buffers = (GLuint *) (_buffersBase + _bufferOffset);
+ }
glDeleteBuffers(
(GLsizei)n,
(GLuint *)buffers
@@ -651,10 +673,15 @@
android_glDeleteFramebuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
- framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
+ framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
+ if (framebuffers == NULL) {
+ char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
+ }
glDeleteFramebuffers(
(GLsizei)n,
(GLuint *)framebuffers
@@ -721,10 +748,15 @@
android_glDeleteRenderbuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
- renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
+ renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
+ if (renderbuffers == NULL) {
+ char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
+ }
glDeleteRenderbuffers(
(GLsizei)n,
(GLuint *)renderbuffers
@@ -800,16 +832,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
- textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
+ textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (textures == NULL) {
+ char * _texturesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ textures = (GLuint *) (_texturesBase + _bufferOffset);
+ }
glDeleteTextures(
(GLsizei)n,
(GLuint *)textures
@@ -917,16 +954,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
- indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
+ indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
_exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
_exceptionMessage = "remaining() < count < needed";
goto exit;
}
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (GLvoid *) (_indicesBase + _bufferOffset);
+ }
glDrawElements(
(GLenum)mode,
(GLsizei)count,
@@ -1066,16 +1108,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
- buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
+ buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (buffers == NULL) {
+ char * _buffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ buffers = (GLuint *) (_buffersBase + _bufferOffset);
+ }
glGenBuffers(
(GLsizei)n,
(GLuint *)buffers
@@ -1147,10 +1194,15 @@
android_glGenFramebuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject framebuffers_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
- framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
+ framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
+ if (framebuffers == NULL) {
+ char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
+ }
glGenFramebuffers(
(GLsizei)n,
(GLuint *)framebuffers
@@ -1208,10 +1260,15 @@
android_glGenRenderbuffers__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint n, jobject renderbuffers_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
- renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
+ renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
+ if (renderbuffers == NULL) {
+ char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
+ }
glGenRenderbuffers(
(GLsizei)n,
(GLuint *)renderbuffers
@@ -1278,16 +1335,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
- textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
+ textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (textures == NULL) {
+ char * _texturesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ textures = (GLuint *) (_texturesBase + _bufferOffset);
+ }
glGenTextures(
(GLsizei)n,
(GLuint *)textures
@@ -1427,8 +1489,11 @@
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) {
jarray _lengthArray = (jarray) 0;
+ jint _lengthBufferOffset = (jint) 0;
jarray _sizeArray = (jarray) 0;
+ jint _sizeBufferOffset = (jint) 0;
jarray _typeArray = (jarray) 0;
+ jint _typeBufferOffset = (jint) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
jint _sizeRemaining;
@@ -1436,9 +1501,21 @@
jint _typeRemaining;
GLenum *type = (GLenum *) 0;
- length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining);
- size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining);
- type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining);
+ length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
+ size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
+ type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
+ if (length == NULL) {
+ char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
+ length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
+ }
+ if (size == NULL) {
+ char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
+ size = (GLint *) (_sizeBase + _sizeBufferOffset);
+ }
+ if (type == NULL) {
+ char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
+ type = (GLenum *) (_typeBase + _typeBufferOffset);
+ }
glGetActiveAttrib(
(GLuint)program,
(GLuint)index,
@@ -1448,14 +1525,14 @@
(GLenum *)type,
(char *)name
);
- if (_lengthArray) {
- releasePointer(_env, _lengthArray, type, JNI_TRUE);
+ if (_typeArray) {
+ releasePointer(_env, _typeArray, type, JNI_TRUE);
}
if (_sizeArray) {
releasePointer(_env, _sizeArray, size, JNI_TRUE);
}
- if (_typeArray) {
- releasePointer(_env, _typeArray, length, JNI_TRUE);
+ if (_lengthArray) {
+ releasePointer(_env, _lengthArray, length, JNI_TRUE);
}
}
@@ -1584,8 +1661,11 @@
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) {
jarray _lengthArray = (jarray) 0;
+ jint _lengthBufferOffset = (jint) 0;
jarray _sizeArray = (jarray) 0;
+ jint _sizeBufferOffset = (jint) 0;
jarray _typeArray = (jarray) 0;
+ jint _typeBufferOffset = (jint) 0;
jint _lengthRemaining;
GLsizei *length = (GLsizei *) 0;
jint _sizeRemaining;
@@ -1593,9 +1673,21 @@
jint _typeRemaining;
GLenum *type = (GLenum *) 0;
- length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining);
- size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining);
- type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining);
+ length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset);
+ size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset);
+ type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset);
+ if (length == NULL) {
+ char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0);
+ length = (GLsizei *) (_lengthBase + _lengthBufferOffset);
+ }
+ if (size == NULL) {
+ char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0);
+ size = (GLint *) (_sizeBase + _sizeBufferOffset);
+ }
+ if (type == NULL) {
+ char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0);
+ type = (GLenum *) (_typeBase + _typeBufferOffset);
+ }
glGetActiveUniform(
(GLuint)program,
(GLuint)index,
@@ -1605,14 +1697,14 @@
(GLenum *)type,
(char *)name
);
- if (_lengthArray) {
- releasePointer(_env, _lengthArray, type, JNI_TRUE);
+ if (_typeArray) {
+ releasePointer(_env, _typeArray, type, JNI_TRUE);
}
if (_sizeArray) {
releasePointer(_env, _sizeArray, size, JNI_TRUE);
}
- if (_typeArray) {
- releasePointer(_env, _typeArray, length, JNI_TRUE);
+ if (_lengthArray) {
+ releasePointer(_env, _lengthArray, length, JNI_TRUE);
}
}
@@ -1690,25 +1782,35 @@
android_glGetAttachedShaders__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint maxcount, jobject count_buf, jobject shaders_buf) {
jarray _countArray = (jarray) 0;
+ jint _countBufferOffset = (jint) 0;
jarray _shadersArray = (jarray) 0;
+ jint _shadersBufferOffset = (jint) 0;
jint _countRemaining;
GLsizei *count = (GLsizei *) 0;
jint _shadersRemaining;
GLuint *shaders = (GLuint *) 0;
- count = (GLsizei *)getPointer(_env, count_buf, &_countArray, &_countRemaining);
- shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining);
+ count = (GLsizei *)getPointer(_env, count_buf, &_countArray, &_countRemaining, &_countBufferOffset);
+ shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining, &_shadersBufferOffset);
+ if (count == NULL) {
+ char * _countBase = (char *)_env->GetPrimitiveArrayCritical(_countArray, (jboolean *) 0);
+ count = (GLsizei *) (_countBase + _countBufferOffset);
+ }
+ if (shaders == NULL) {
+ char * _shadersBase = (char *)_env->GetPrimitiveArrayCritical(_shadersArray, (jboolean *) 0);
+ shaders = (GLuint *) (_shadersBase + _shadersBufferOffset);
+ }
glGetAttachedShaders(
(GLuint)program,
(GLsizei)maxcount,
(GLsizei *)count,
(GLuint *)shaders
);
- if (_countArray) {
- releasePointer(_env, _countArray, shaders, JNI_TRUE);
- }
if (_shadersArray) {
- releasePointer(_env, _shadersArray, count, JNI_TRUE);
+ releasePointer(_env, _shadersArray, shaders, JNI_TRUE);
+ }
+ if (_countArray) {
+ releasePointer(_env, _countArray, count, JNI_TRUE);
}
}
@@ -1793,10 +1895,15 @@
android_glGetBooleanv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
- params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLboolean *) (_paramsBase + _bufferOffset);
+ }
glGetBooleanv(
(GLenum)pname,
(GLboolean *)params
@@ -1864,16 +1971,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetBufferParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -1946,10 +2058,15 @@
android_glGetFloatv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetFloatv(
(GLenum)pname,
(GLfloat *)params
@@ -2009,10 +2126,15 @@
android_glGetFramebufferAttachmentParameteriv__IIILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint attachment, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetFramebufferAttachmentParameteriv(
(GLenum)target,
(GLenum)attachment,
@@ -2412,10 +2534,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_ALPHA_BITS)
@@ -2753,6 +2876,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetIntegerv(
(GLenum)pname,
(GLint *)params
@@ -2816,10 +2943,15 @@
android_glGetProgramiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetProgramiv(
(GLuint)program,
(GLenum)pname,
@@ -2898,10 +3030,15 @@
android_glGetRenderbufferParameteriv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetRenderbufferParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -2961,10 +3098,15 @@
android_glGetShaderiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint shader, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetShaderiv(
(GLuint)shader,
(GLenum)pname,
@@ -3068,25 +3210,35 @@
android_glGetShaderPrecisionFormat__IILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint shadertype, jint precisiontype, jobject range_buf, jobject precision_buf) {
jarray _rangeArray = (jarray) 0;
+ jint _rangeBufferOffset = (jint) 0;
jarray _precisionArray = (jarray) 0;
+ jint _precisionBufferOffset = (jint) 0;
jint _rangeRemaining;
GLint *range = (GLint *) 0;
jint _precisionRemaining;
GLint *precision = (GLint *) 0;
- range = (GLint *)getPointer(_env, range_buf, &_rangeArray, &_rangeRemaining);
- precision = (GLint *)getPointer(_env, precision_buf, &_precisionArray, &_precisionRemaining);
+ range = (GLint *)getPointer(_env, range_buf, &_rangeArray, &_rangeRemaining, &_rangeBufferOffset);
+ precision = (GLint *)getPointer(_env, precision_buf, &_precisionArray, &_precisionRemaining, &_precisionBufferOffset);
+ if (range == NULL) {
+ char * _rangeBase = (char *)_env->GetPrimitiveArrayCritical(_rangeArray, (jboolean *) 0);
+ range = (GLint *) (_rangeBase + _rangeBufferOffset);
+ }
+ if (precision == NULL) {
+ char * _precisionBase = (char *)_env->GetPrimitiveArrayCritical(_precisionArray, (jboolean *) 0);
+ precision = (GLint *) (_precisionBase + _precisionBufferOffset);
+ }
glGetShaderPrecisionFormat(
(GLenum)shadertype,
(GLenum)precisiontype,
(GLint *)range,
(GLint *)precision
);
- if (_rangeArray) {
- releasePointer(_env, _rangeArray, precision, JNI_TRUE);
- }
if (_precisionArray) {
- releasePointer(_env, _precisionArray, range, JNI_TRUE);
+ releasePointer(_env, _precisionArray, precision, JNI_TRUE);
+ }
+ if (_rangeArray) {
+ releasePointer(_env, _rangeArray, range, JNI_TRUE);
}
}
@@ -3164,10 +3316,15 @@
android_glGetShaderSource__IILjava_nio_IntBuffer_2B
(JNIEnv *_env, jobject _this, jint shader, jint bufsize, jobject length_buf, jbyte source) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLsizei *length = (GLsizei *) 0;
- length = (GLsizei *)getPointer(_env, length_buf, &_array, &_remaining);
+ length = (GLsizei *)getPointer(_env, length_buf, &_array, &_remaining, &_bufferOffset);
+ if (length == NULL) {
+ char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ length = (GLsizei *) (_lengthBase + _bufferOffset);
+ }
glGetShaderSource(
(GLuint)shader,
(GLsizei)bufsize,
@@ -3242,16 +3399,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameterfv(
(GLenum)target,
(GLenum)pname,
@@ -3325,16 +3487,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -3399,10 +3566,15 @@
android_glGetUniformfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetUniformfv(
(GLuint)program,
(GLint)location,
@@ -3462,10 +3634,15 @@
android_glGetUniformiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint program, jint location, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetUniformiv(
(GLuint)program,
(GLint)location,
@@ -3558,10 +3735,15 @@
android_glGetVertexAttribfv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetVertexAttribfv(
(GLuint)index,
(GLenum)pname,
@@ -3621,10 +3803,15 @@
android_glGetVertexAttribiv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint index, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetVertexAttribiv(
(GLuint)index,
(GLenum)pname,
@@ -3765,10 +3952,15 @@
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) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+ }
glReadPixels(
(GLint)x,
(GLint)y,
@@ -3832,6 +4024,7 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
GLuint *shaders_base = (GLuint *) 0;
jint _shadersRemaining;
GLuint *shaders = (GLuint *) 0;
@@ -3855,7 +4048,11 @@
_env->GetPrimitiveArrayCritical(shaders_ref, (jboolean *)0);
shaders = shaders_base + offset;
- binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining);
+ binary = (GLvoid *)getPointer(_env, binary_buf, &_array, &_binaryRemaining, &_bufferOffset);
+ if (binary == NULL) {
+ char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ binary = (GLvoid *) (_binaryBase + _bufferOffset);
+ }
glShaderBinary(
(GLsizei)n,
(GLuint *)shaders,
@@ -3882,14 +4079,24 @@
android_glShaderBinary__ILjava_nio_IntBuffer_2ILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint n, jobject shaders_buf, jint binaryformat, jobject binary_buf, jint length) {
jarray _shadersArray = (jarray) 0;
+ jint _shadersBufferOffset = (jint) 0;
jarray _binaryArray = (jarray) 0;
+ jint _binaryBufferOffset = (jint) 0;
jint _shadersRemaining;
GLuint *shaders = (GLuint *) 0;
jint _binaryRemaining;
GLvoid *binary = (GLvoid *) 0;
- shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining);
- binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining);
+ shaders = (GLuint *)getPointer(_env, shaders_buf, &_shadersArray, &_shadersRemaining, &_shadersBufferOffset);
+ binary = (GLvoid *)getPointer(_env, binary_buf, &_binaryArray, &_binaryRemaining, &_binaryBufferOffset);
+ if (shaders == NULL) {
+ char * _shadersBase = (char *)_env->GetPrimitiveArrayCritical(_shadersArray, (jboolean *) 0);
+ shaders = (GLuint *) (_shadersBase + _shadersBufferOffset);
+ }
+ if (binary == NULL) {
+ char * _binaryBase = (char *)_env->GetPrimitiveArrayCritical(_binaryArray, (jboolean *) 0);
+ binary = (GLvoid *) (_binaryBase + _binaryBufferOffset);
+ }
glShaderBinary(
(GLsizei)n,
(GLuint *)shaders,
@@ -3897,11 +4104,11 @@
(GLvoid *)binary,
(GLsizei)length
);
- if (_shadersArray) {
- releasePointer(_env, _shadersArray, binary, JNI_FALSE);
- }
if (_binaryArray) {
- releasePointer(_env, _binaryArray, shaders, JNI_FALSE);
+ releasePointer(_env, _binaryArray, binary, JNI_FALSE);
+ }
+ if (_shadersArray) {
+ releasePointer(_env, _shadersArray, shaders, JNI_FALSE);
}
}
@@ -3992,11 +4199,16 @@
android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (pixels_buf) {
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ }
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexImage2D(
(GLenum)target,
@@ -4083,16 +4295,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexParameterfv(
(GLenum)target,
(GLenum)pname,
@@ -4177,16 +4394,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -4207,11 +4429,16 @@
android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (pixels_buf) {
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ }
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexSubImage2D(
(GLenum)target,
@@ -4288,10 +4515,15 @@
android_glUniform1fv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
- v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLfloat *) (_vBase + _bufferOffset);
+ }
glUniform1fv(
(GLint)location,
(GLsizei)count,
@@ -4361,10 +4593,15 @@
android_glUniform1iv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *v = (GLint *) 0;
- v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLint *) (_vBase + _bufferOffset);
+ }
glUniform1iv(
(GLint)location,
(GLsizei)count,
@@ -4435,10 +4672,15 @@
android_glUniform2fv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
- v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLfloat *) (_vBase + _bufferOffset);
+ }
glUniform2fv(
(GLint)location,
(GLsizei)count,
@@ -4509,10 +4751,15 @@
android_glUniform2iv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *v = (GLint *) 0;
- v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLint *) (_vBase + _bufferOffset);
+ }
glUniform2iv(
(GLint)location,
(GLsizei)count,
@@ -4584,10 +4831,15 @@
android_glUniform3fv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
- v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLfloat *) (_vBase + _bufferOffset);
+ }
glUniform3fv(
(GLint)location,
(GLsizei)count,
@@ -4659,10 +4911,15 @@
android_glUniform3iv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *v = (GLint *) 0;
- v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLint *) (_vBase + _bufferOffset);
+ }
glUniform3iv(
(GLint)location,
(GLsizei)count,
@@ -4735,10 +4992,15 @@
android_glUniform4fv__IILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *v = (GLfloat *) 0;
- v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLfloat *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLfloat *) (_vBase + _bufferOffset);
+ }
glUniform4fv(
(GLint)location,
(GLsizei)count,
@@ -4811,10 +5073,15 @@
android_glUniform4iv__IILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jobject v_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *v = (GLint *) 0;
- v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining);
+ v = (GLint *)getPointer(_env, v_buf, &_array, &_remaining, &_bufferOffset);
+ if (v == NULL) {
+ char * _vBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ v = (GLint *) (_vBase + _bufferOffset);
+ }
glUniform4iv(
(GLint)location,
(GLsizei)count,
@@ -4875,10 +5142,15 @@
android_glUniformMatrix2fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
- value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining);
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
glUniformMatrix2fv(
(GLint)location,
(GLsizei)count,
@@ -4940,10 +5212,15 @@
android_glUniformMatrix3fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
- value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining);
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
glUniformMatrix3fv(
(GLint)location,
(GLsizei)count,
@@ -5005,10 +5282,15 @@
android_glUniformMatrix4fv__IIZLjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint location, jint count, jboolean transpose, jobject value_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *value = (GLfloat *) 0;
- value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining);
+ value = (GLfloat *)getPointer(_env, value_buf, &_array, &_remaining, &_bufferOffset);
+ if (value == NULL) {
+ char * _valueBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ value = (GLfloat *) (_valueBase + _bufferOffset);
+ }
glUniformMatrix4fv(
(GLint)location,
(GLsizei)count,
@@ -5096,10 +5378,15 @@
android_glVertexAttrib1fv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
- values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
+ values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining, &_bufferOffset);
+ if (values == NULL) {
+ char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ values = (GLfloat *) (_valuesBase + _bufferOffset);
+ }
glVertexAttrib1fv(
(GLuint)indx,
(GLfloat *)values
@@ -5168,10 +5455,15 @@
android_glVertexAttrib2fv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
- values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
+ values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining, &_bufferOffset);
+ if (values == NULL) {
+ char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ values = (GLfloat *) (_valuesBase + _bufferOffset);
+ }
glVertexAttrib2fv(
(GLuint)indx,
(GLfloat *)values
@@ -5241,10 +5533,15 @@
android_glVertexAttrib3fv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
- values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
+ values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining, &_bufferOffset);
+ if (values == NULL) {
+ char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ values = (GLfloat *) (_valuesBase + _bufferOffset);
+ }
glVertexAttrib3fv(
(GLuint)indx,
(GLfloat *)values
@@ -5315,10 +5612,15 @@
android_glVertexAttrib4fv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint indx, jobject values_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *values = (GLfloat *) 0;
- values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining);
+ values = (GLfloat *)getPointer(_env, values_buf, &_array, &_remaining, &_bufferOffset);
+ if (values == NULL) {
+ char * _valuesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ values = (GLfloat *) (_valuesBase + _bufferOffset);
+ }
glVertexAttrib4fv(
(GLuint)indx,
(GLfloat *)values
@@ -5347,6 +5649,7 @@
android_glVertexAttribPointerBounds__IIIZILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint indx, jint size, jint type, jboolean normalized, jint stride, jobject ptr_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *ptr = (GLvoid *) 0;
diff --git a/core/jni/android_os_SELinux.cpp b/core/jni/android_os_SELinux.cpp
index eb99d2b..40443ff 100644
--- a/core/jni/android_os_SELinux.cpp
+++ b/core/jni/android_os_SELinux.cpp
@@ -90,14 +90,14 @@
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
if (env->ExceptionOccurred() != NULL) {
- LOGE("There was an issue with retrieving the file descriptor");
+ ALOGE("There was an issue with retrieving the file descriptor");
goto bail;
}
if (getpeercon(fd, &context) == -1)
goto bail;
- LOGV("getPeerCon: Successfully retrived context of peer socket '%s'", context);
+ ALOGV("getPeerCon: Successfully retrived context of peer socket '%s'", context);
securityString = env->NewStringUTF(context);
@@ -139,7 +139,7 @@
if ((ret = setfscreatecon(securityContext)) == -1)
goto bail;
- LOGV("setFSCreateCon: set new security context to '%s' ", context == NULL ? "default", context);
+ ALOGV("setFSCreateCon: set new security context to '%s' ", context == NULL ? "default", context);
bail:
if (constant_securityContext != NULL)
@@ -185,7 +185,7 @@
if ((ret = setfilecon(objectPath, newCon)) == -1)
goto bail;
- LOGV("setFileCon: Succesfully set security context '%s' for '%s'", newCon, objectPath);
+ ALOGV("setFileCon: Succesfully set security context '%s' for '%s'", newCon, objectPath);
bail:
env->ReleaseStringUTFChars(path, objectPath);
@@ -224,7 +224,7 @@
if (getfilecon(objectPath, &context) == -1)
goto bail;
- LOGV("getFileCon: Successfully retrived context '%s' for file '%s'", context, objectPath);
+ ALOGV("getFileCon: Successfully retrived context '%s' for file '%s'", context, objectPath);
securityString = env->NewStringUTF(context);
@@ -259,7 +259,7 @@
if (getcon(&context) == -1)
goto bail;
- LOGV("getCon: Successfully retrieved context '%s'", context);
+ ALOGV("getCon: Successfully retrieved context '%s'", context);
securityString = env->NewStringUTF(context);
@@ -295,7 +295,7 @@
if (getpidcon(checkPid, &context) == -1)
goto bail;
- LOGV("getPidCon: Successfully retrived context '%s' for pid '%d'", context, checkPid);
+ ALOGV("getPidCon: Successfully retrived context '%s' for pid '%d'", context, checkPid);
securityString = env->NewStringUTF(context);
@@ -442,7 +442,7 @@
accessGranted = selinux_check_access(myscon, mytcon, mytclass, myperm, NULL);
- LOGV("selinux_check_access returned %d", accessGranted);
+ ALOGV("selinux_check_access returned %d", accessGranted);
env->ReleaseStringUTFChars(scon, const_scon);
env->ReleaseStringUTFChars(tcon, const_tcon);
diff --git a/core/jni/android_os_SystemClock.cpp b/core/jni/android_os_SystemClock.cpp
index 66d58cd..78f989a 100644
--- a/core/jni/android_os_SystemClock.cpp
+++ b/core/jni/android_os_SystemClock.cpp
@@ -112,6 +112,15 @@
}
/*
+ * public static native long elapsedRealtimeNano();
+ */
+static jlong android_os_SystemClock_elapsedRealtimeNano(JNIEnv* env,
+ jobject clazz)
+{
+ return (jlong)elapsedRealtimeNano();
+}
+
+/*
* JNI registration.
*/
static JNINativeMethod gMethods[] = {
@@ -128,6 +137,8 @@
(void*) android_os_SystemClock_currentThreadTimeMicro },
{ "currentTimeMicro", "()J",
(void*) android_os_SystemClock_currentTimeMicro },
+ { "elapsedRealtimeNano", "()J",
+ (void*) android_os_SystemClock_elapsedRealtimeNano },
};
int register_android_os_SystemClock(JNIEnv* env)
{
diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp
index 0310dc7..9730c09 100644
--- a/core/jni/com_google_android_gles_jni_GLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp
@@ -114,14 +114,12 @@
}
static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
+getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
{
jint position;
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -139,11 +137,10 @@
if (*array == NULL) {
return (void*) NULL;
}
- offset = _env->CallStaticIntMethod(nioAccessClass,
+ *offset = _env->CallStaticIntMethod(nioAccessClass,
getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
- return (void *) ((char *) data + offset);
+ return NULL;
}
static void
@@ -181,10 +178,12 @@
if (allowIndirectBuffers(_env)) {
jarray array = 0;
jint remaining;
- buf = getPointer(_env, buffer, &array, &remaining);
+ jint offset;
+ buf = getPointer(_env, buffer, &array, &remaining, &offset);
if (array) {
releasePointer(_env, array, buf, 0);
}
+ buf = buf + offset;
} else {
jniThrowException(_env, "java/lang/IllegalArgumentException",
"Must use a native order direct Buffer");
@@ -418,6 +417,7 @@
android_glColorPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -441,10 +441,15 @@
android_glCompressedTexImage2D__IIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glCompressedTexImage2D(
(GLenum)target,
(GLint)level,
@@ -465,10 +470,15 @@
android_glCompressedTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jobject data_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glCompressedTexSubImage2D(
(GLenum)target,
(GLint)level,
@@ -583,16 +593,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
- textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
+ textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (textures == NULL) {
+ char * _texturesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ textures = (GLuint *) (_texturesBase + _bufferOffset);
+ }
glDeleteTextures(
(GLsizei)n,
(GLuint *)textures
@@ -682,16 +697,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *indices = (GLvoid *) 0;
- indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining);
+ indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < count) {
_exception = 1;
_exceptionType = "java/lang/ArrayIndexOutOfBoundsException";
_exceptionMessage = "remaining() < count < needed";
goto exit;
}
+ if (indices == NULL) {
+ char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ indices = (GLvoid *) (_indicesBase + _bufferOffset);
+ }
glDrawElements(
(GLenum)mode,
(GLsizei)count,
@@ -832,10 +852,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_FOG_MODE)
@@ -867,6 +888,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glFogfv(
(GLenum)pname,
(GLfloat *)params
@@ -973,10 +998,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_FOG_MODE)
@@ -1008,6 +1034,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glFogxv(
(GLenum)pname,
(GLfixed *)params
@@ -1116,16 +1146,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *textures = (GLuint *) 0;
- textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining);
+ textures = (GLuint *)getPointer(_env, textures_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (textures == NULL) {
+ char * _texturesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ textures = (GLuint *) (_texturesBase + _bufferOffset);
+ }
glGenTextures(
(GLsizei)n,
(GLuint *)textures
@@ -1537,10 +1572,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_ALPHA_BITS)
@@ -1878,6 +1914,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetIntegerv(
(GLenum)pname,
(GLint *)params
@@ -1990,10 +2030,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -2016,6 +2057,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glLightModelfv(
(GLenum)pname,
(GLfloat *)params
@@ -2113,10 +2158,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -2139,6 +2185,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glLightModelxv(
(GLenum)pname,
(GLfixed *)params
@@ -2264,10 +2314,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -2316,6 +2367,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glLightfv(
(GLenum)light,
(GLenum)pname,
@@ -2442,10 +2497,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -2494,6 +2550,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glLightxv(
(GLenum)light,
(GLenum)pname,
@@ -2581,10 +2641,15 @@
android_glLoadMatrixf__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
- m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfloat *) (_mBase + _bufferOffset);
+ }
glLoadMatrixf(
(GLfloat *)m
);
@@ -2640,10 +2705,15 @@
android_glLoadMatrixx__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
- m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfixed *) (_mBase + _bufferOffset);
+ }
glLoadMatrixx(
(GLfixed *)m
);
@@ -2758,10 +2828,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -2796,6 +2867,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glMaterialfv(
(GLenum)face,
(GLenum)pname,
@@ -2908,10 +2983,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -2946,6 +3022,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glMaterialxv(
(GLenum)face,
(GLenum)pname,
@@ -3017,10 +3097,15 @@
android_glMultMatrixf__Ljava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *m = (GLfloat *) 0;
- m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfloat *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfloat *) (_mBase + _bufferOffset);
+ }
glMultMatrixf(
(GLfloat *)m
);
@@ -3076,10 +3161,15 @@
android_glMultMatrixx__Ljava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jobject m_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *m = (GLfixed *) 0;
- m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining);
+ m = (GLfixed *)getPointer(_env, m_buf, &_array, &_remaining, &_bufferOffset);
+ if (m == NULL) {
+ char * _mBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ m = (GLfixed *) (_mBase + _bufferOffset);
+ }
glMultMatrixx(
(GLfixed *)m
);
@@ -3141,6 +3231,7 @@
android_glNormalPointerBounds__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -3253,10 +3344,15 @@
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) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
+ }
glReadPixels(
(GLint)x,
(GLint)y,
@@ -3394,6 +3490,7 @@
android_glTexCoordPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -3503,10 +3600,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -3535,6 +3633,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexEnvfv(
(GLenum)target,
(GLenum)pname,
@@ -3641,10 +3743,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -3673,6 +3776,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexEnvxv(
(GLenum)target,
(GLenum)pname,
@@ -3693,11 +3800,16 @@
android_glTexImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (pixels_buf) {
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ }
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexImage2D(
(GLenum)target,
@@ -3742,11 +3854,16 @@
android_glTexSubImage2D__IIIIIIIILjava_nio_Buffer_2
(JNIEnv *_env, jobject _this, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jobject pixels_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pixels = (GLvoid *) 0;
if (pixels_buf) {
- pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining);
+ pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
+ }
+ if (pixels == NULL) {
+ char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
glTexSubImage2D(
(GLenum)target,
@@ -3791,6 +3908,7 @@
android_glVertexPointerBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -3910,38 +4028,48 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _mantissaArray = (jarray) 0;
+ jint _mantissaBufferOffset = (jint) 0;
jarray _exponentArray = (jarray) 0;
+ jint _exponentBufferOffset = (jint) 0;
GLbitfield _returnValue = -1;
jint _mantissaRemaining;
GLfixed *mantissa = (GLfixed *) 0;
jint _exponentRemaining;
GLint *exponent = (GLint *) 0;
- mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining);
+ mantissa = (GLfixed *)getPointer(_env, mantissa_buf, &_mantissaArray, &_mantissaRemaining, &_mantissaBufferOffset);
if (_mantissaRemaining < 16) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
- exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining);
+ exponent = (GLint *)getPointer(_env, exponent_buf, &_exponentArray, &_exponentRemaining, &_exponentBufferOffset);
if (_exponentRemaining < 16) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 16 < needed";
goto exit;
}
+ if (mantissa == NULL) {
+ char * _mantissaBase = (char *)_env->GetPrimitiveArrayCritical(_mantissaArray, (jboolean *) 0);
+ mantissa = (GLfixed *) (_mantissaBase + _mantissaBufferOffset);
+ }
+ if (exponent == NULL) {
+ char * _exponentBase = (char *)_env->GetPrimitiveArrayCritical(_exponentArray, (jboolean *) 0);
+ exponent = (GLint *) (_exponentBase + _exponentBufferOffset);
+ }
_returnValue = glQueryMatrixxOES(
(GLfixed *)mantissa,
(GLint *)exponent
);
exit:
- if (_mantissaArray) {
- releasePointer(_env, _mantissaArray, exponent, _exception ? JNI_FALSE : JNI_TRUE);
- }
if (_exponentArray) {
- releasePointer(_env, _exponentArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
+ releasePointer(_env, _exponentArray, exponent, _exception ? JNI_FALSE : JNI_TRUE);
+ }
+ if (_mantissaArray) {
+ releasePointer(_env, _mantissaArray, mantissa, _exception ? JNI_FALSE : JNI_TRUE);
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
@@ -3967,11 +4095,12 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
if (data_buf) {
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
@@ -3979,6 +4108,10 @@
goto exit;
}
}
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glBufferData(
(GLenum)target,
(GLsizeiptr)size,
@@ -4003,16 +4136,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *data = (GLvoid *) 0;
- data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining);
+ data = (GLvoid *)getPointer(_env, data_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < size) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < size < needed";
goto exit;
}
+ if (data == NULL) {
+ char * _dataBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ data = (GLvoid *) (_dataBase + _bufferOffset);
+ }
glBufferSubData(
(GLenum)target,
(GLintptr)offset,
@@ -4086,16 +4224,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *equation = (GLfloat *) 0;
- equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining);
+ equation = (GLfloat *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
+ if (equation == NULL) {
+ char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ equation = (GLfloat *) (_equationBase + _bufferOffset);
+ }
glClipPlanef(
(GLenum)plane,
(GLfloat *)equation
@@ -4167,16 +4310,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *equation = (GLfixed *) 0;
- equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining);
+ equation = (GLfixed *)getPointer(_env, equation_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 4) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 4 < needed";
goto exit;
}
+ if (equation == NULL) {
+ char * _equationBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ equation = (GLfixed *) (_equationBase + _bufferOffset);
+ }
glClipPlanex(
(GLenum)plane,
(GLfixed *)equation
@@ -4272,16 +4420,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
- buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
+ buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (buffers == NULL) {
+ char * _buffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ buffers = (GLuint *) (_buffersBase + _bufferOffset);
+ }
glDeleteBuffers(
(GLsizei)n,
(GLuint *)buffers
@@ -4371,16 +4524,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *buffers = (GLuint *) 0;
- buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining);
+ buffers = (GLuint *)getPointer(_env, buffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (buffers == NULL) {
+ char * _buffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ buffers = (GLuint *) (_buffersBase + _bufferOffset);
+ }
glGenBuffers(
(GLsizei)n,
(GLuint *)buffers
@@ -4443,10 +4601,15 @@
android_glGetBooleanv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLboolean *params = (GLboolean *) 0;
- params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLboolean *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLboolean *) (_paramsBase + _bufferOffset);
+ }
glGetBooleanv(
(GLenum)pname,
(GLboolean *)params
@@ -4520,10 +4683,15 @@
android_glGetClipPlanef__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *eqn = (GLfloat *) 0;
- eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining);
+ eqn = (GLfloat *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
+ if (eqn == NULL) {
+ char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ eqn = (GLfloat *) (_eqnBase + _bufferOffset);
+ }
glGetClipPlanef(
(GLenum)pname,
(GLfloat *)eqn
@@ -4581,10 +4749,15 @@
android_glGetClipPlanex__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject eqn_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *eqn = (GLfixed *) 0;
- eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining);
+ eqn = (GLfixed *)getPointer(_env, eqn_buf, &_array, &_remaining, &_bufferOffset);
+ if (eqn == NULL) {
+ char * _eqnBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ eqn = (GLfixed *) (_eqnBase + _bufferOffset);
+ }
glGetClipPlanex(
(GLenum)pname,
(GLfixed *)eqn
@@ -4642,10 +4815,15 @@
android_glGetFixedv__ILjava_nio_IntBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetFixedv(
(GLenum)pname,
(GLfixed *)params
@@ -4703,10 +4881,15 @@
android_glGetFloatv__ILjava_nio_FloatBuffer_2
(JNIEnv *_env, jobject _this, jint pname, jobject params_buf) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetFloatv(
(GLenum)pname,
(GLfloat *)params
@@ -4816,10 +4999,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -4868,6 +5052,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetLightfv(
(GLenum)light,
(GLenum)pname,
@@ -4983,10 +5171,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SPOT_EXPONENT)
@@ -5035,6 +5224,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetLightxv(
(GLenum)light,
(GLenum)pname,
@@ -5136,10 +5329,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -5174,6 +5368,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetMaterialfv(
(GLenum)face,
(GLenum)pname,
@@ -5275,10 +5473,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_SHININESS)
@@ -5313,6 +5512,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetMaterialxv(
(GLenum)face,
(GLenum)pname,
@@ -5408,10 +5611,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -5440,6 +5644,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexEnviv(
(GLenum)env,
(GLenum)pname,
@@ -5535,10 +5743,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -5567,6 +5776,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexEnvxv(
(GLenum)env,
(GLenum)pname,
@@ -5640,16 +5853,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameterfv(
(GLenum)target,
(GLenum)pname,
@@ -5723,16 +5941,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -5806,16 +6029,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glGetTexParameterxv(
(GLenum)target,
(GLenum)pname,
@@ -5942,16 +6170,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glPointParameterfv(
(GLenum)pname,
(GLfloat *)params
@@ -6033,16 +6266,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glPointParameterxv(
(GLenum)pname,
(GLfixed *)params
@@ -6062,6 +6300,7 @@
android_glPointSizePointerOESBounds__IILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -6182,10 +6421,11 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
int _needed;
switch (pname) {
#if defined(GL_TEXTURE_ENV_MODE)
@@ -6214,6 +6454,10 @@
_exceptionMessage = "remaining() < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexEnviv(
(GLenum)target,
(GLenum)pname,
@@ -6287,16 +6531,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexParameterfv(
(GLenum)target,
(GLenum)pname,
@@ -6381,16 +6630,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexParameteriv(
(GLenum)target,
(GLenum)pname,
@@ -6464,16 +6718,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *params = (GLfixed *) 0;
- params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfixed *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 1) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 1 < needed";
goto exit;
}
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfixed *) (_paramsBase + _bufferOffset);
+ }
glTexParameterxv(
(GLenum)target,
(GLenum)pname,
@@ -6579,16 +6838,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *coords = (GLfloat *) 0;
- coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLfloat *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLfloat *) (_coordsBase + _bufferOffset);
+ }
glDrawTexfvOES(
(GLfloat *)coords
);
@@ -6671,16 +6935,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *coords = (GLint *) 0;
- coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLint *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLint *) (_coordsBase + _bufferOffset);
+ }
glDrawTexivOES(
(GLint *)coords
);
@@ -6763,16 +7032,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLshort *coords = (GLshort *) 0;
- coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLshort *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLshort *) (_coordsBase + _bufferOffset);
+ }
glDrawTexsvOES(
(GLshort *)coords
);
@@ -6855,16 +7129,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfixed *coords = (GLfixed *) 0;
- coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining);
+ coords = (GLfixed *)getPointer(_env, coords_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < 5) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < 5 < needed";
goto exit;
}
+ if (coords == NULL) {
+ char * _coordsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ coords = (GLfixed *) (_coordsBase + _bufferOffset);
+ }
glDrawTexxvOES(
(GLfixed *)coords
);
@@ -6890,6 +7169,7 @@
android_glMatrixIndexPointerOESBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -6925,6 +7205,7 @@
android_glWeightPointerOESBounds__IIILjava_nio_Buffer_2I
(JNIEnv *_env, jobject _this, jint size, jint type, jint stride, jobject pointer_buf, jint remaining) {
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLvoid *pointer = (GLvoid *) 0;
@@ -7114,16 +7395,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
- framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
+ framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (framebuffers == NULL) {
+ char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
+ }
glDeleteFramebuffersOES(
(GLint)n,
(GLuint *)framebuffers
@@ -7205,16 +7491,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
- renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
+ renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (renderbuffers == NULL) {
+ char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
+ }
glDeleteRenderbuffersOES(
(GLint)n,
(GLuint *)renderbuffers
@@ -7345,16 +7636,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *framebuffers = (GLuint *) 0;
- framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining);
+ framebuffers = (GLuint *)getPointer(_env, framebuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (framebuffers == NULL) {
+ char * _framebuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ framebuffers = (GLuint *) (_framebuffersBase + _bufferOffset);
+ }
glGenFramebuffersOES(
(GLint)n,
(GLuint *)framebuffers
@@ -7436,16 +7732,21 @@
const char * _exceptionType;
const char * _exceptionMessage;
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLuint *renderbuffers = (GLuint *) 0;
- renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining);
+ renderbuffers = (GLuint *)getPointer(_env, renderbuffers_buf, &_array, &_remaining, &_bufferOffset);
if (_remaining < n) {
_exception = 1;
_exceptionType = "java/lang/IllegalArgumentException";
_exceptionMessage = "remaining() < n < needed";
goto exit;
}
+ if (renderbuffers == NULL) {
+ char * _renderbuffersBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ renderbuffers = (GLuint *) (_renderbuffersBase + _bufferOffset);
+ }
glGenRenderbuffersOES(
(GLint)n,
(GLuint *)renderbuffers
@@ -7520,10 +7821,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetFramebufferAttachmentParameterivOES(
(GLint)target,
(GLint)attachment,
@@ -7594,10 +7900,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetRenderbufferParameterivOES(
(GLint)target,
(GLint)pname,
@@ -7667,10 +7978,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glGetTexGenfv(
(GLint)coord,
(GLint)pname,
@@ -7740,10 +8056,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexGeniv(
(GLint)coord,
(GLint)pname,
@@ -7813,10 +8134,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glGetTexGenxv(
(GLint)coord,
(GLint)pname,
@@ -7951,10 +8277,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLfloat *params = (GLfloat *) 0;
- params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLfloat *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLfloat *) (_paramsBase + _bufferOffset);
+ }
glTexGenfv(
(GLint)coord,
(GLint)pname,
@@ -8040,10 +8371,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexGeniv(
(GLint)coord,
(GLint)pname,
@@ -8129,10 +8465,15 @@
return;
}
jarray _array = (jarray) 0;
+ jint _bufferOffset = (jint) 0;
jint _remaining;
GLint *params = (GLint *) 0;
- params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining);
+ params = (GLint *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset);
+ if (params == NULL) {
+ char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
+ params = (GLint *) (_paramsBase + _bufferOffset);
+ }
glTexGenxv(
(GLint)coord,
(GLint)pname,
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index ee3b437..cae9a5b 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -246,7 +246,7 @@
<string name="permlab_retrieve_window_info" msgid="8532295199112519378">"استرداد معلومات النوافذ"</string>
<string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"للسماح لأحد التطبيقات باستعادة معلومات حول النوافذ من مدير النوافذ. يمكن أن تستعيد التطبيقات الضارة معلومات الغرض منها استخدام النظام الداخلي."</string>
<string name="permlab_filter_events" msgid="8675535648807427389">"تصفية الأحداث"</string>
- <string name="permdesc_filter_events" msgid="8006236315888347680">"للسماح لأحد التطبيقات بتسجيل فلتر إدخال يعمل على تصفية مجموعة البث من جميع أحداث المستخدمين قبل إرسالها. يمكن أن يتحكم برنامج ضار في واجهة المستخدم النظام بدون تدخل المستخدم."</string>
+ <string name="permdesc_filter_events" msgid="8006236315888347680">"للسماح لأحد التطبيقات بتسجيل فلتر إدخال يعمل على تصفية مجموعة البث من جميع أحداث المستخدمين قبل إرسالها. يمكن أن يتحكم برنامج ضار في واجهة المستخدم النظام دون تدخل المستخدم."</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"إيقاف تشغيل جزئي"</string>
<string name="permdesc_shutdown" msgid="7046500838746291775">"لوضع مدير الأنشطة في حالة إيقاف التشغيل. لا يتم تنفيذ إيقاف تشغيل كامل."</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"منع التبديل بين التطبيقات"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 6763ed7..e6e85ed 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1294,7 +1294,7 @@
<string name="activity_resolver_use_always" msgid="8017770747801494933">"Always"</string>
<string name="activity_resolver_use_once" msgid="2404644797149173758">"Just once"</string>
<string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
- <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Phones"</string>
+ <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Phone"</string>
<string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Headphones"</string>
<string name="default_audio_route_name_dock_speakers" msgid="6240602982276591864">"Dock speakers"</string>
<string name="default_audio_route_name_hdmi" msgid="7986404173839007682">"HDMI audio"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 941d5c3..fa98e56 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -44,7 +44,7 @@
<string name="passwordIncorrect" msgid="7612208839450128715">"رمز ورود اشتباه است."</string>
<string name="mmiComplete" msgid="8232527495411698359">"MMI کامل شد."</string>
<string name="badPin" msgid="9015277645546710014">"پین قدیمی که نوشتهاید صحیح نیست."</string>
- <string name="badPuk" msgid="5487257647081132201">"PUK که نوشته اید صحیح نیست."</string>
+ <string name="badPuk" msgid="5487257647081132201">"PUK که نوشتهاید صحیح نیست."</string>
<string name="mismatchPin" msgid="609379054496863419">"پینهایی که وارد کردهاید با یکدیگر مطابقت ندارند."</string>
<string name="invalidPin" msgid="3850018445187475377">"یک پین بنویسید که 4 تا 8 رقم باشد."</string>
<string name="invalidPuk" msgid="8761456210898036513">"یک PUK با 8 رقم یا بیشتر تایپ کنید."</string>
@@ -129,10 +129,10 @@
<string name="contentServiceSync" msgid="8353523060269335667">"همگام سازی"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"همگام سازی"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"تعداد موارد حذف شده <xliff:g id="CONTENT_TYPE">%s</xliff:g> بسیار زیاد است."</string>
- <string name="low_memory" product="tablet" msgid="6494019234102154896">"حافظه رایانه لوحی پر است! برخی از فایلها را حذف کنید تا فضا آزاد شود."</string>
+ <string name="low_memory" product="tablet" msgid="6494019234102154896">"حافظه رایانهٔ لوحی پر است! برخی از فایلها را حذف کنید تا فضا آزاد شود."</string>
<string name="low_memory" product="default" msgid="3475999286680000541">"حافظه تلفن پر است. بعضی از فایلها را حذف کنید تا فضا آزاد شود."</string>
<string name="me" msgid="6545696007631404292">"من"</string>
- <string name="power_dialog" product="tablet" msgid="8545351420865202853">"گزینههای رایانه لوحی"</string>
+ <string name="power_dialog" product="tablet" msgid="8545351420865202853">"گزینههای رایانهٔ لوحی"</string>
<string name="power_dialog" product="default" msgid="1319919075463988638">"گزینههای تلفن"</string>
<string name="silent_mode" msgid="7167703389802618663">"حالت ساکت"</string>
<string name="turn_on_radio" msgid="3912793092339962371">"روشن کردن بی سیم"</string>
@@ -143,14 +143,14 @@
<string name="silent_mode_vibrate" msgid="7072043388581551395">"زنگ لرزشی"</string>
<string name="silent_mode_ring" msgid="8592241816194074353">"زنگ روشن"</string>
<string name="shutdown_progress" msgid="2281079257329981203">"خاموش کردن..."</string>
- <string name="shutdown_confirm" product="tablet" msgid="3385745179555731470">"رایانه لوحی شما خاموش میشود."</string>
+ <string name="shutdown_confirm" product="tablet" msgid="3385745179555731470">"رایانهٔ لوحی شما خاموش میشود."</string>
<string name="shutdown_confirm" product="default" msgid="649792175242821353">"گوشی شما خاموش میشود."</string>
<string name="shutdown_confirm_question" msgid="2906544768881136183">"آیا میخواهید تلفن خاموش شود؟"</string>
<string name="reboot_safemode_title" msgid="7054509914500140361">"راهاندازی مجدد در حالت امن"</string>
- <string name="reboot_safemode_confirm" msgid="55293944502784668">"آیا میخواهید با حالت امن راهاندازی مجدد کنید؟ با این کار کلیه برنامههای شخص ثالثی که نصب کردهاید غیرفعال میشوند. با راهاندازی دوباره سیستم این برنامهها دوباره بازیابی میشوند."</string>
+ <string name="reboot_safemode_confirm" msgid="55293944502784668">"آیا میخواهید با حالت امن راهاندازی مجدد کنید؟ با این کار همهٔ برنامههای شخص ثالثی که نصب کردهاید غیرفعال میشوند. با راهاندازی دوباره سیستم این برنامهها دوباره بازیابی میشوند."</string>
<string name="recent_tasks_title" msgid="3691764623638127888">"اخیر"</string>
<string name="no_recent_tasks" msgid="8794906658732193473">"برنامههای جدید موجود نیست."</string>
- <string name="global_actions" product="tablet" msgid="408477140088053665">"گزینههای رایانه لوحی"</string>
+ <string name="global_actions" product="tablet" msgid="408477140088053665">"گزینههای رایانهٔ لوحی"</string>
<string name="global_actions" product="default" msgid="2406416831541615258">"گزینههای تلفن"</string>
<string name="global_action_lock" msgid="2844945191792119712">"قفل صفحه"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"خاموش کردن"</string>
@@ -168,7 +168,7 @@
<string name="permgrouplab_messages" msgid="7521249148445456662">"پیامهای شما"</string>
<string name="permgroupdesc_messages" msgid="7821999071003699236">"پیام کوتاه، ایمیل و دیگر پیامها را بخوانید."</string>
<string name="permgrouplab_personalInfo" msgid="3519163141070533474">"اطلاعات شخصی شما"</string>
- <string name="permgroupdesc_personalInfo" product="tablet" msgid="6975389054186265786">"دسترسی مستقیم به مخاطبین و تقویم ذخیره شده در رایانه لوحی."</string>
+ <string name="permgroupdesc_personalInfo" product="tablet" msgid="6975389054186265786">"دسترسی مستقیم به مخاطبین و تقویم ذخیره شده در رایانهٔ لوحی."</string>
<string name="permgroupdesc_personalInfo" product="default" msgid="5488050357388806068">"دسترسی مستقیم به مخاطبین و تقویم ذخیره شده در گوشی."</string>
<string name="permgrouplab_location" msgid="635149742436692049">"موقعیت مکانی شما"</string>
<string name="permgroupdesc_location" msgid="5704679763124170100">"بر موقعیت مکانی فیزیکی خود نظارت داشته باشید."</string>
@@ -176,8 +176,8 @@
<string name="permgroupdesc_network" msgid="4478299413241861987">"به ویژگیهای مختلف شبکه دسترسی داشته باشید."</string>
<string name="permgrouplab_accounts" msgid="3359646291125325519">"حسابهای شما"</string>
<string name="permgroupdesc_accounts" msgid="4948732641827091312">"به حسابهای موجود دسترسی داشته باشید."</string>
- <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"کنترلهای سخت افزار"</string>
- <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"دسترسی مستقیم به سخت افزار در گوشی."</string>
+ <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"کنترلهای سختافزار"</string>
+ <string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"دسترسی مستقیم به سختافزار در گوشی."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"تماسهای تلفنی"</string>
<string name="permgroupdesc_phoneCalls" msgid="7489701620446183770">"نظارت، ضبط و پردازش تماسهای تلفنی."</string>
<string name="permgrouplab_systemTools" msgid="4652191644082714048">"ابزارهای سیستم"</string>
@@ -208,10 +208,10 @@
<string name="permlab_sendSmsNoConfirmation" msgid="4781483105951730228">"ارسال پیامک بدون تأیید"</string>
<string name="permdesc_sendSmsNoConfirmation" msgid="402569800862935907">"به برنامه اجازه میدهد پیامکها را ارسال کند. این باعث ایجاد هزینههای پیشبینی نشده میشود. برنامههای مخرب ممکن است با ارسال پیام بدون تأیید شما هزینههایی را برای شما ایجاد کنند."</string>
<string name="permlab_readSms" msgid="8745086572213270480">"خواندن پیامهای نوشتاری شما (پیامک یا MMS)"</string>
- <string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"به برنامه اجازه میدهد پیامکهای ذخیره شده در رایانه لوحی یا سیم کارت شما را بخواند. این ویژگی به برنامه امکان میدهد همه پیامکها را صرفنظر از محتوا یا محرمانه بودن آنها بخواند."</string>
+ <string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"به برنامه اجازه میدهد پیامکهای ذخیره شده در رایانهٔ لوحی یا سیم کارت شما را بخواند. این ویژگی به برنامه امکان میدهد همه پیامکها را صرفنظر از محتوا یا محرمانه بودن آنها بخواند."</string>
<string name="permdesc_readSms" product="default" msgid="3695967533457240550">"به برنامه اجازه میدهد پیامکهای ذخیره شده در تلفن یا سیم کارت شما را بخواند. این ویژگی به برنامه امکان میدهد همه پیامکها را صرفنظر از محتوا یا محرمانه بودن آنها بخواند."</string>
<string name="permlab_writeSms" msgid="3216950472636214774">"ویرایش پیامهای نوشتاری شما (پیامک یا MMS)"</string>
- <string name="permdesc_writeSms" product="tablet" msgid="5160413947794501538">"به برنامه اجازه میدهد تا در پیامهای کوتاه ذخیره شده در رایانه لوحی یا سیم کارت بنویسد. برنامههای مخرب پیامهای شما را حذف میکنند."</string>
+ <string name="permdesc_writeSms" product="tablet" msgid="5160413947794501538">"به برنامه اجازه میدهد تا در پیامهای کوتاه ذخیره شده در رایانهٔ لوحی یا سیم کارت بنویسد. برنامههای مخرب پیامهای شما را حذف میکنند."</string>
<string name="permdesc_writeSms" product="default" msgid="7268668709052328567">"به برنامه اجازه میدهد تا در پیامهای کوتاه ذخیره شده در تلفن یا سیم کارت بنویسد. برنامههای مخرب میتوانند پیامهای شما را حذف کنند."</string>
<string name="permlab_receiveWapPush" msgid="5991398711936590410">"دریافت پیامهای نوشتاری (WAP)"</string>
<string name="permdesc_receiveWapPush" msgid="748232190220583385">"به برنامه اجازه میدهد پیامهای WAP را دریافت و پردازش کند. این مجوز میتواند پیامهای ارسالی به شما را بدون نمایش آنها به شما حذف یا کنترل کند."</string>
@@ -226,7 +226,7 @@
<string name="permlab_startAnyActivity" msgid="2918768238045206456">"شروع هر نوع فعالیت"</string>
<string name="permdesc_startAnyActivity" msgid="997823695343584001">"به برنامه اجازه میدهد هر فعالیتی را شروع کند بدون اینکه وضعیت صادرشده یا حفاظت با مجوز در نظر گرفته شود."</string>
<string name="permlab_setScreenCompatibility" msgid="6975387118861842061">"تنظیم سازگاری با صفحهٔ نمایش"</string>
- <string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"به برنامه کاربردی اجازه کنترل حالت سازگاری صفحهٔ نمایش برای برنامههای دیگر را میدهد. برنامههای خرابکار ممکن است باعث کارکرد نادرست دیگر برنامهها شوند."</string>
+ <string name="permdesc_setScreenCompatibility" msgid="692043618693917374">"به برنامهٔ کاربردی اجازه کنترل حالت سازگاری صفحهٔ نمایش برای برنامههای دیگر را میدهد. برنامههای خرابکار ممکن است باعث کارکرد نادرست دیگر برنامهها شوند."</string>
<string name="permlab_setDebugApp" msgid="3022107198686584052">"فعال کردن عیبیابی برنامه"</string>
<string name="permdesc_setDebugApp" msgid="4474512416299013256">"به برنامه اجازه میدهد تا عیبیابی را برای برنامهای دیگر فعال کند. برنامههای مخرب میتوانند از آن استفاده کنند تا اجرای برنامههای دیگر را متوقف کنند."</string>
<string name="permlab_changeConfiguration" msgid="4162092185124234480">"تغییر تنظیمات نمایشگر سیستم"</string>
@@ -244,27 +244,27 @@
<string name="permlab_retrieve_window_content" msgid="8022588608994589938">"بازیابی محتوای صفحه"</string>
<string name="permdesc_retrieve_window_content" msgid="3193269069469700265">"به برنامه اجازه میدهد تا محتوای پنجره فعال را بازیابی کند. برنامههای مخرب میتوانند کل محتوای پنجره را بازیابی کنند و همه متن آنرا به غیر از گذرواژهها امتحان کنند."</string>
<string name="permlab_retrieve_window_info" msgid="8532295199112519378">"بازیابی اطلاعات پنجره"</string>
- <string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"به یک برنامه کاربردی اجازه میدهد که اطلاعات مربوط به پنجرهها را از مدیریت پنجره بازیابی کند. برنامههای کاربردی مخرب ممکن است اطلاعاتی که برای استفاده سیستم داخلی درنظر گرفته شدهاند را بازیابی کنند."</string>
+ <string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"به یک برنامهٔ کاربردی اجازه میدهد که اطلاعات مربوط به پنجرهها را از مدیریت پنجره بازیابی کند. برنامههای کاربردی مخرب ممکن است اطلاعاتی که برای استفاده سیستم داخلی درنظر گرفته شدهاند را بازیابی کنند."</string>
<string name="permlab_filter_events" msgid="8675535648807427389">"فیلتر کردن رویدادها"</string>
- <string name="permdesc_filter_events" msgid="8006236315888347680">"به یک برنامه کاربردی اجازه میدهد یک فیلتر ورودی را که جریان تمام رویدادهای کاربران را قبل از ارسال شدن فیلتر میکند، ثبت نماید. برنامه کاربردی مخرب ممکن است رابط کاربری سیستم را بدون مداخله کاربر، کنترل کند."</string>
+ <string name="permdesc_filter_events" msgid="8006236315888347680">"به یک برنامهٔ کاربردی اجازه میدهد یک فیلتر ورودی را که جریان تمام رویدادهای کاربران را قبل از ارسال شدن فیلتر میکند، ثبت نماید. برنامه کاربردی مخرب ممکن است رابط کاربری سیستم را بدون مداخله کاربر، کنترل کند."</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"خاموش شدن جزئی"</string>
<string name="permdesc_shutdown" msgid="7046500838746291775">"مدیر فعالیت را در حالت خاموشی قرار میدهد. خاموشی را به صورت کامل انجام نمیدهد."</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"ممانعت از جابجایی برنامه"</string>
<string name="permdesc_stopAppSwitches" msgid="8262195802582255021">"اجازه نمیدهد کاربر به برنامه دیگری برود."</string>
- <string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"نظارت و کنترل راه اندازی همه برنامه"</string>
- <string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"به برنامه اجازه میدهد تا نحوه راه اندازی فعالیتهای سیستم را کنترل کند. برنامههای مخرب میتوانند کاملا با سیستم سازگار شوند. این مجوز فقط برای توسعه نیاز است و برای استفاده عادی نیست."</string>
+ <string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"نظارت و کنترل راهاندازی همه برنامه"</string>
+ <string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"به برنامه اجازه میدهد تا نحوه راهاندازی فعالیتهای سیستم را کنترل کند. برنامههای مخرب میتوانند کاملا با سیستم سازگار شوند. این مجوز فقط برای توسعه نیاز است و برای استفاده عادی نیست."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"ارسال پخش بسته حذف شده"</string>
<string name="permdesc_broadcastPackageRemoved" msgid="6621901216207931089">"به برنامه اجازه میدهد تا اعلان حذف بسته برنامه را پخش کند. برنامههای مخرب میتوانند از آن استفاده کنند تا هر برنامه در حال اجرای دیگر را از بین ببرد."</string>
<string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"ارسال پخش دریافت شده توسط پیامک"</string>
<string name="permdesc_broadcastSmsReceived" msgid="4152037720034365492">"به برنامه اجازه میدهد تا اعلان دریافت پیام کوتاه را پخش کند. برنامههای مخرب میتوانند از این برای جعل پیامهای کوتاه ورودی استفاده کنند."</string>
<string name="permlab_broadcastWapPush" msgid="3145347413028582371">"ارسال پخش دریافت شده توسط WAP-PUSH"</string>
- <string name="permdesc_broadcastWapPush" msgid="4783402525039442729">"به برنامه اجازه میدهد تا اعلانی را پخش کند که پیام WAP PUSH دریافت کرده است. برنامههای مخرب میتوانند از آن استفاده کنند تا دریافت پیام MMS را جعل کنند یا محتوای هر صفحه وب را با انواع مخرب جایگزین کنند."</string>
+ <string name="permdesc_broadcastWapPush" msgid="4783402525039442729">"به برنامه اجازه میدهد تا اعلانی را پخش کند که پیام WAP PUSH دریافت کرده است. برنامههای مخرب میتوانند از آن استفاده کنند تا دریافت پیام MMS را جعل کنند یا محتوای هر صفحهٔ وب را با انواع مخرب جایگزین کنند."</string>
<string name="permlab_setProcessLimit" msgid="2451873664363662666">"محدود کردن تعداد فرآیندهای در حال اجرا"</string>
<string name="permdesc_setProcessLimit" msgid="7318061314040879542">"به برنامه اجازه میدهد تا حداکثر تعداد پردازشهایی را که اجرا خواهد شد کنترل کند. هرگز برای برنامههای عادی لازم نیست."</string>
<string name="permlab_setAlwaysFinish" msgid="550958507798796965">"بستن اجباری برنامههای پسزمینه"</string>
<string name="permdesc_setAlwaysFinish" msgid="7471310652868841499">"به برنامه اجازه میدهد تا به محض اینکه فعالیتها به پسزمینه رفتند تمام شوند. برای برنامههای عادی نیازی نیست."</string>
<string name="permlab_batteryStats" msgid="7863923071360031652">"اصلاح کردن آمار مربوط به باتری"</string>
- <string name="permdesc_batteryStats" msgid="6835186932305744068">"به برنامه اجازه میدهد تا آمار جمع آوری شده باتری را تغییر دهد. برای استفاده برنامههای عادی نیست."</string>
+ <string name="permdesc_batteryStats" msgid="6835186932305744068">"به برنامه اجازه میدهد تا آمار جمعآوری شده باتری را تغییر دهد. برای استفاده برنامههای عادی نیست."</string>
<string name="permlab_backup" msgid="470013022865453920">"کنترل نسخهٔ پشتیبان سیستم و بازیابی"</string>
<string name="permdesc_backup" msgid="6912230525140589891">"به برنامه اجازه میدهد پشتیبان سیستم را کنترل کند و مکانیستم را بازیابی کند. برای استفاده برنامههای عادی نیست."</string>
<string name="permlab_confirm_full_backup" msgid="5557071325804469102">"تهیه نسخهٔ پشتیبان کامل را تأیید کرده یا عملیات را بازیابی کنید"</string>
@@ -278,7 +278,7 @@
<string name="permlab_manageAppTokens" msgid="1286505717050121370">"مدیریت نشانههای برنامه"</string>
<string name="permdesc_manageAppTokens" msgid="8043431713014395671">"به برنامه اجازه میدهد با ایجاد کنارگذر از سفارش عادی Z، نشانههای خود را ایجاد و مدیریت کند. برای برنامههای عادی مورد نیاز است."</string>
<string name="permlab_injectEvents" msgid="1378746584023586600">"کلیدها و دکمههای کنترل را فشار دهید"</string>
- <string name="permdesc_injectEvents" product="tablet" msgid="206352565599968632">"به برنامه اجازه میدهد تا رویدادهای ورودی خود (فشردن کلیدها و غیره) را تحویل دهد. برنامههای مخرب میتوانند از آن استفاده کنند تا کارکرد رایانه لوحی را کنترل کنند."</string>
+ <string name="permdesc_injectEvents" product="tablet" msgid="206352565599968632">"به برنامه اجازه میدهد تا رویدادهای ورودی خود (فشردن کلیدها و غیره) را تحویل دهد. برنامههای مخرب میتوانند از آن استفاده کنند تا کارکرد رایانهٔ لوحی را کنترل کنند."</string>
<string name="permdesc_injectEvents" product="default" msgid="653128057572326253">"به برنامه اجازه میدهد تا رویدادهای ورودی خود را به برنامههای دیگر تحویل دهد (فشردن کلیدها و غیره). برنامههای مخرب میتوانند از آن برای کنترل کارکرد تلفن استفاده کنند."</string>
<string name="permlab_readInputState" msgid="469428900041249234">"مواردی که مینویسید و کارهایی که انجام میدهید را ضبط کنید"</string>
<string name="permdesc_readInputState" msgid="8387754901688728043">"به برنامه اجازه میدهد تا کلیدهایی را که هنگام تعامل با برنامهٔ دیگر فشار میدهید ببیند (مانند تایپ کردن گذرواژه). برای برنامههای عادی مورد نیاز نیست."</string>
@@ -300,42 +300,42 @@
<string name="permdesc_setOrientation" msgid="3046126619316671476">"به برنامه اجازه میدهد تا چرخش صفحه را هر وقت بخواهد تغییر دهد. برای برنامههای عادی نیاز نیست."</string>
<string name="permlab_setPointerSpeed" msgid="9175371613322562934">"تغییر سرعت اشارهگر"</string>
<string name="permdesc_setPointerSpeed" msgid="6866563234274104233">"به برنامه اجازه میدهد تا سرعت ماوس و پد کنترل را هر وقت خواست تغییر دهد. برای برنامههای عادی نیاز نیست."</string>
- <string name="permlab_setKeyboardLayout" msgid="4778731703600909340">"تغییر چیدمان صفحه کلید"</string>
- <string name="permdesc_setKeyboardLayout" msgid="8480016771134175879">"به برنامه اجازه میدهد تا چیدمان صفحه کلید را تغییر دهد. این کار هیچگاه برای برنامههای عادی نیاز نیست."</string>
+ <string name="permlab_setKeyboardLayout" msgid="4778731703600909340">"تغییر چیدمان صفحهکلید"</string>
+ <string name="permdesc_setKeyboardLayout" msgid="8480016771134175879">"به برنامه اجازه میدهد تا چیدمان صفحهکلید را تغییر دهد. این کار هیچگاه برای برنامههای عادی نیاز نیست."</string>
<string name="permlab_signalPersistentProcesses" msgid="4539002991947376659">"ارسال سیگنالهای Linux به برنامهها"</string>
<string name="permdesc_signalPersistentProcesses" msgid="4896992079182649141">"به برنامه اجازه میدهد تا درخواست کند سیگنال ارائه شده به همه مراحل دائم ارسال شود."</string>
<string name="permlab_persistentActivity" msgid="8841113627955563938">"همیشه برنامه اجرا شود"</string>
- <string name="permdesc_persistentActivity" product="tablet" msgid="8525189272329086137">"به برنامه امکان میدهد قسمتهایی از خود را در حافظه دائمی کند. این کار حافظه موجود را برای سایر برنامهها محدود کرده و باعث کندی رایانه لوحی میشود."</string>
+ <string name="permdesc_persistentActivity" product="tablet" msgid="8525189272329086137">"به برنامه امکان میدهد قسمتهایی از خود را در حافظه دائمی کند. این کار حافظه موجود را برای سایر برنامهها محدود کرده و باعث کندی رایانهٔ لوحی میشود."</string>
<string name="permdesc_persistentActivity" product="default" msgid="4384760047508278272">"به برنامه امکان میدهد قسمتهایی از خود را در حافظه دائمی کند. این کار حافظه موجود را برای سایر برنامهها محدود کرده و باعث کندی تلفن میشود."</string>
<string name="permlab_deletePackages" msgid="184385129537705938">"حذف برنامهها"</string>
<string name="permdesc_deletePackages" msgid="7411480275167205081">"به برنامه اجازه میدهد تا بستههای Android را پاک کند. برنامههای مخرب میتوانند از آن استفاده کنند تا برنامههای مهم را حذف کنند."</string>
<string name="permlab_clearAppUserData" msgid="274109191845842756">"حذف دادههای برنامههای دیگر"</string>
<string name="permdesc_clearAppUserData" msgid="4625323684125459488">"به برنامه اجازه میدهد تا دادههای کاربر را پاک کند."</string>
- <string name="permlab_deleteCacheFiles" msgid="3128665571837408675">"حذف حافظه پنهان برنامههای دیگر"</string>
- <string name="permdesc_deleteCacheFiles" msgid="3812998599006730196">"به برنامه اجازه میدهد تا فایلهای حافظه پنهان را پاک کند."</string>
+ <string name="permlab_deleteCacheFiles" msgid="3128665571837408675">"حذف حافظهٔ پنهان برنامههای دیگر"</string>
+ <string name="permdesc_deleteCacheFiles" msgid="3812998599006730196">"به برنامه اجازه میدهد تا فایلهای حافظهٔ پنهان را پاک کند."</string>
<string name="permlab_getPackageSize" msgid="7472921768357981986">"اندازه گیری فضای حافظه برنامه"</string>
- <string name="permdesc_getPackageSize" msgid="3921068154420738296">"به برنامه اجازه میدهد تا کدها، دادهها و اندازههای حافظه پنهان خود را بازیابی کند"</string>
+ <string name="permdesc_getPackageSize" msgid="3921068154420738296">"به برنامه اجازه میدهد تا کدها، دادهها و اندازههای حافظهٔ پنهان خود را بازیابی کند"</string>
<string name="permlab_installPackages" msgid="2199128482820306924">"نصب مستقیم برنامه"</string>
<string name="permdesc_installPackages" msgid="5628530972548071284">"به برنامه اجازه میدهد تا بستههای Android به روز شده یا جدید را نصب کند. برنامههای مخرب میتوانند از این استفاده کنند تا برنامههای جدید را با مجوزهای قوی اختیاری اضافه کنند."</string>
- <string name="permlab_clearAppCache" msgid="7487279391723526815">"حذف تمام دادههای حافظه پنهان برنامه"</string>
- <string name="permdesc_clearAppCache" product="tablet" msgid="3523396284474042284">"به برنامه اجازه میدهد تا حافظه رایانه لوحی را با حذف فایلها در فهرست حافظه پنهان برنامه آزاد کند. معمولا دسترسی برای پردازش سیستم بسیار محدود است."</string>
- <string name="permdesc_clearAppCache" product="default" msgid="5067988373366292186">"به برنامه اجازه میدهد تا با حذف فایلها در فهرست حافظه پنهان برنامه حافظه تلفن را آزاد کند. معمولا دسترسی به پردازش سیستم بسیار محدود است."</string>
+ <string name="permlab_clearAppCache" msgid="7487279391723526815">"حذف تمام دادههای حافظهٔ پنهان برنامه"</string>
+ <string name="permdesc_clearAppCache" product="tablet" msgid="3523396284474042284">"به برنامه اجازه میدهد تا حافظه رایانهٔ لوحی را با حذف فایلها در فهرست حافظهٔ پنهان برنامه آزاد کند. معمولا دسترسی برای پردازش سیستم بسیار محدود است."</string>
+ <string name="permdesc_clearAppCache" product="default" msgid="5067988373366292186">"به برنامه اجازه میدهد تا با حذف فایلها در فهرست حافظهٔ پنهان برنامه حافظه تلفن را آزاد کند. معمولا دسترسی به پردازش سیستم بسیار محدود است."</string>
<string name="permlab_movePackage" msgid="3289890271645921411">"انتقال منابع برنامه"</string>
<string name="permdesc_movePackage" msgid="319562217778244524">"به برنامه اجازه میدهد تا منابع برنامه را از رسانه داخلی به رسانه خارجی و بالعکس منتقل کند."</string>
<string name="permlab_readLogs" msgid="6615778543198967614">"مطالعه دادههای گزارش حساس"</string>
- <string name="permdesc_readLogs" product="tablet" msgid="82061313293455151">"به برنامه اجازه میدهد فایلهای مختلف گزارش سیستم را بخواند. با این کار، برنامه اطلاعات کلی مربوط به کاری که با رایانه لوحی انجام میدهید را کشف میکند، که ممکن است حاوی اطلاعات شخصی و خصوصی باشند."</string>
+ <string name="permdesc_readLogs" product="tablet" msgid="82061313293455151">"به برنامه اجازه میدهد فایلهای مختلف گزارش سیستم را بخواند. با این کار، برنامه اطلاعات کلی مربوط به کاری که با رایانهٔ لوحی انجام میدهید را کشف میکند، که ممکن است حاوی اطلاعات شخصی و خصوصی باشند."</string>
<string name="permdesc_readLogs" product="default" msgid="2063438140241560443">"به برنامه اجازه میدهد تا فایلهای گزارش مختلف سیستم را بخواند. این کار به برنامه اجازه میدهد اطلاعات عمومی کاری که با تلفن انجام میدهید مثلا اطلاعات خصوصی و شخصی را کشف کند."</string>
<string name="permlab_anyCodecForPlayback" msgid="715805555823881818">"استفاده از هر رمزگشای رسانهای برای بازپخش"</string>
<string name="permdesc_anyCodecForPlayback" msgid="8283912488433189010">"اجازه میدهد برنامه از هر رمزگشای رسانه نصب شدهای استفاده کند تا برای پخش رمزگشایی شود."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"خواندن/نوشتن منابع متعلق به تشخیص"</string>
<string name="permdesc_diagnostic" msgid="6608295692002452283">"به برنامه اجازه میدهد هر منبعی را که متعلق به گروه تشخیص است بخواند و در آن بنویسد؛ بهعنوان مثال، فایلهای /dev. این امر بهصورت بالقوه میتواند بر پایدار بودن و امنیت سیستم تأثیر بگذارد. این تنها باید برای تشخیصهای مختص سختافزار توسط تولیدکننده یا اپراتور استفاده شود."</string>
<string name="permlab_changeComponentState" msgid="6335576775711095931">"فعال یا غیر فعال کردن اجزای برنامه"</string>
- <string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"به برنامه اجازه میدهد تا فعال بودن یا نبودن اجزای برنامهٔ دیگر را تغییر دهد. برنامههای مخرب میتوانند از آن استفاده کنند تا قابلیتهای مهم رایانه لوحی را غیرفعال کنند. باید دقت کرد که با این مجوز ممکن است وضعیت اجزای برنامه ناپایدار، ناهماهنگ یا غیرقابل استفاده شود."</string>
+ <string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"به برنامه اجازه میدهد تا فعال بودن یا نبودن اجزای برنامهٔ دیگر را تغییر دهد. برنامههای مخرب میتوانند از آن استفاده کنند تا قابلیتهای مهم رایانهٔ لوحی را غیرفعال کنند. باید دقت کرد که با این مجوز ممکن است وضعیت اجزای برنامه ناپایدار، ناهماهنگ یا غیرقابل استفاده شود."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"به برنامه اجازه میدهد تا فعال بودن یا غیرفعال بودن جزئیات برنامهٔ دیگر را تغییر دهد. برنامههای مخرب میتوانند از آن استفاده کنند تا ویژگیهای مهم را غیرفعال کنند. برای این مجوز باید دقت کنید چون ممکن است وضعیت جزئیات برنامه ناپایدار، بیثبات یا غیرقابل استفاده شود."</string>
<string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"ارائه یا لغو مجوزها"</string>
- <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"به یک برنامه کاربردی اجازه میدهد تا مجوزهای خاصی را برای خود یا دیگر برنامهها ارائه کرده یا آنها را لغو کند. برنامههای مضر از این حالت برای دسترسی به ویژگیهایی استفاده میکنند که شما اجازه آن را در اختیارشان قرار ندادهاید."</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"به یک برنامهٔ کاربردی اجازه میدهد تا مجوزهای خاصی را برای خود یا دیگر برنامهها ارائه کرده یا آنها را لغو کند. برنامههای مضر از این حالت برای دسترسی به ویژگیهایی استفاده میکنند که شما اجازه آن را در اختیارشان قرار ندادهاید."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"تنظیم برنامههای ترجیحی"</string>
- <string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"به برنامه اجازه میدهد تا برنامههای ترجیحی شما را تغییر دهد. برنامههای مخرب میتوانند بدون اعلان برنامههایی را که اجرا میشوند، تغییر دهند خود را به جای برنامههای کنونی قلمداد کنند تا دادههای شخصی را از شما جمع آوری کنند."</string>
+ <string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"به برنامه اجازه میدهد تا برنامههای ترجیحی شما را تغییر دهد. برنامههای مخرب میتوانند بدون اعلان برنامههایی را که اجرا میشوند، تغییر دهند خود را به جای برنامههای کنونی قلمداد کنند تا دادههای شخصی را از شما جمعآوری کنند."</string>
<string name="permlab_writeSettings" msgid="2226195290955224730">"اصلاح تنظیمات سیستم"</string>
<string name="permdesc_writeSettings" msgid="7775723441558907181">"به برنامه اجازه میدهد تا دادههای تنظیم سیستم را تغییر دهد. برنامههای مخرب میتوانند پیکربندی سیستم شما را خراب کنند."</string>
<string name="permlab_writeSecureSettings" msgid="204676251876718288">"اصلاح کردن تنظیمات سیستم ایمن"</string>
@@ -343,36 +343,36 @@
<string name="permlab_writeGservices" msgid="2149426664226152185">"اصلاح کردن نقشه سرویسهای Google"</string>
<string name="permdesc_writeGservices" msgid="1287309437638380229">"به برنامه اجازه میدهد تا نقشه سرویسهای Google را تغییر دهد. برای استفاده برنامههای عادی نیست."</string>
<string name="permlab_receiveBootCompleted" msgid="5312965565987800025">"اجرا شدن در هنگام راهاندازی"</string>
- <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7390304664116880704">"به برنامه اجازه میدهد تا به محض اتمام راهاندازی سیستم خودبخود شروع به کار کند. این کار ممکن است باعث شود مدت زمان بیشتری صرف شدوع به کار رایانه لوحی شود و به برنامه اجازه میدهد تا با اجرای همیشگی رایانه لوحی را کند کند."</string>
+ <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7390304664116880704">"به برنامه اجازه میدهد تا به محض اتمام راهاندازی سیستم خودبخود شروع به کار کند. این کار ممکن است باعث شود مدت زمان بیشتری صرف شدوع به کار رایانهٔ لوحی شود و به برنامه اجازه میدهد تا با اجرای همیشگی رایانهٔ لوحی را کند کند."</string>
<string name="permdesc_receiveBootCompleted" product="default" msgid="513950589102617504">"به برنامه اجازه میدهد تا به محض اینکه سیستم راهاندازی شد خودبخود شروع به کار کند. این کار باعث میشود مدت زمان بیشتری صرف شود تا تلفن شروع به کار کند و به برنامه اجازه میدهد تا کل تلفن کند شود چون همیشه در حال اجرا شدن است."</string>
<string name="permlab_broadcastSticky" msgid="7919126372606881614">"ارسال پخش چسبنده"</string>
- <string name="permdesc_broadcastSticky" product="tablet" msgid="7749760494399915651">"به برنامه اجازه میدهد تا پخشهای ماندگار را که پس از اتمام پخش باقی میمانند ارسال کند. استفاده بیش از حد این ویژگی ممکن است باعث مصرف بیش از حد حافظه و در نتیجه کندی یا ناپایداری رایانه لوحی شود."</string>
+ <string name="permdesc_broadcastSticky" product="tablet" msgid="7749760494399915651">"به برنامه اجازه میدهد تا پخشهای ماندگار را که پس از اتمام پخش باقی میمانند ارسال کند. استفاده بیش از حد این ویژگی ممکن است باعث مصرف بیش از حد حافظه و در نتیجه کندی یا ناپایداری رایانهٔ لوحی شود."</string>
<string name="permdesc_broadcastSticky" product="default" msgid="2825803764232445091">"به برنامه اجازه میدهد تا پخشهای ماندگار را که پس از اتمام پخش باقی میمانند ارسال کند. استفاده بیش از حد این ویژگی ممکن است باعث مصرف بیش از حد حافظه و در نتیجه کندی یا ناپایداری تلفن شود."</string>
<string name="permlab_readContacts" msgid="8348481131899886131">"خواندن مخاطبین شما"</string>
- <string name="permdesc_readContacts" product="tablet" msgid="5294866856941149639">"به برنامه اجازه میدهد دادههای مربوط به مخاطبین ذخیره شده در رایانه لوحی شما را بخواند از جمله، تعداد دفعات تماسهایی که برقرار کردهاید، ایمیلهایی که ارسال کردهاید یا به روشهای دیگری به افراد خاصی ارتباط برقرار کردهاید. این با برنامهها امکان میدهد دادههای مخاطب شما را ذخیره کنند و برنامههای مخرب ممکن است دادههای مخاطب را بدون اطلاع شما به اشتراک بگذارند."</string>
+ <string name="permdesc_readContacts" product="tablet" msgid="5294866856941149639">"به برنامه اجازه میدهد دادههای مربوط به مخاطبین ذخیره شده در رایانهٔ لوحی شما را بخواند از جمله، تعداد دفعات تماسهایی که برقرار کردهاید، ایمیلهایی که ارسال کردهاید یا به روشهای دیگری به افراد خاصی ارتباط برقرار کردهاید. این با برنامهها امکان میدهد دادههای مخاطب شما را ذخیره کنند و برنامههای مخرب ممکن است دادههای مخاطب را بدون اطلاع شما به اشتراک بگذارند."</string>
<string name="permdesc_readContacts" product="default" msgid="8440654152457300662">"به برنامه اجازه میدهد دادههای مربوط به مخاطبین ذخیره شده در تلفن شما را بخواند از جمله، تعداد دفعات تماسهایی که برقرار کردهاید، ایمیلهایی که ارسال کردهاید یا به روشهای دیگری با افراد خاصی ارتباط برقرار کردهاید. این به برنامهها امکان میدهد دادههای مخاطب شما را ذخیره کنند و برنامههای مخرب ممکن است دادههای مخاطب را بدون اطلاع شما به اشتراک بگذارند."</string>
<string name="permlab_writeContacts" msgid="5107492086416793544">"اصلاح مخاطبین شما"</string>
- <string name="permdesc_writeContacts" product="tablet" msgid="897243932521953602">"به برنامه اجازه میدهد دادههای مربوط به مخاطبین ذخیره شده در رایانه لوحی شما را از جمله تعداد تماسهایی که برقرار کردهاید، ایمیلهایی که ارسال کردهاید یا ارتباطاتی را که به هر شکل با مخاطبین خاصی برقرار کردید تغییر دهد. این مجوز به برنامه اجازه میدهد دادههای مخاطب را حذف نماید."</string>
+ <string name="permdesc_writeContacts" product="tablet" msgid="897243932521953602">"به برنامه اجازه میدهد دادههای مربوط به مخاطبین ذخیره شده در رایانهٔ لوحی شما را از جمله تعداد تماسهایی که برقرار کردهاید، ایمیلهایی که ارسال کردهاید یا ارتباطاتی را که به هر شکل با مخاطبین خاصی برقرار کردید تغییر دهد. این مجوز به برنامه اجازه میدهد دادههای مخاطب را حذف نماید."</string>
<string name="permdesc_writeContacts" product="default" msgid="589869224625163558">"به برنامه اجازه میدهد دادههای مربوط به مخاطبین ذخیره شده در تلفن شما را از جمله تعداد تماسهایی که برقرار کردهاید، ایمیلهایی که ارسال کردهاید یا ارتباطاتی را که به هر شکل با مخاطبین خاصی برقرار کردید تغییر دهد. این مجوز به برنامه اجازه میدهد دادههای مخاطب را حذف نماید."</string>
<string name="permlab_readCallLog" msgid="3478133184624102739">"خواندن گزارش تماس"</string>
- <string name="permdesc_readCallLog" product="tablet" msgid="3700645184870760285">"به برنامه اجازه میدهد گزارش تماس رایانه لوحی شما را بخواند از جمله دادههای مربوط به تماسهای ورودی و خروجی. این مجوز به برنامهها اجازه میدهد دادههای گزارش تماس شما را ذخیره کنند و برنامههای مخرب ممکن است دادههای گزارش تماس شما را بدون اطلاع شما به اشتراک بگذارند."</string>
+ <string name="permdesc_readCallLog" product="tablet" msgid="3700645184870760285">"به برنامه اجازه میدهد گزارش تماس رایانهٔ لوحی شما را بخواند از جمله دادههای مربوط به تماسهای ورودی و خروجی. این مجوز به برنامهها اجازه میدهد دادههای گزارش تماس شما را ذخیره کنند و برنامههای مخرب ممکن است دادههای گزارش تماس شما را بدون اطلاع شما به اشتراک بگذارند."</string>
<string name="permdesc_readCallLog" product="default" msgid="5777725796813217244">"به برنامه اجازه میدهد گزارش تماس تلفنی شما را بخواند از جمله دادههای مربوط به تماسهای ورودی و خروجی. این مجوز به برنامهها اجازه میدهد دادههای گزارش تماس شما را ذخیره کنند و برنامههای مخرب ممکن است دادههای گزارش تماس شما را بدون اطلاع شما به اشتراک بگذارند."</string>
<string name="permlab_writeCallLog" msgid="8552045664743499354">"نوشتن گزارش تماس"</string>
- <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"به برنامه اجازه میدهد گزارشات تماس رایانه لوحی شما، از جمله دادههایی درمورد تماسهای ورودی و خروجی را تغییر دهد. برنامههای مخرب ممکن است از این ویژگی برای پاک کردن یا تغییر گزارش تماس شما استفاده کنند."</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"به برنامه اجازه میدهد گزارشات تماس رایانهٔ لوحی شما، از جمله دادههایی درمورد تماسهای ورودی و خروجی را تغییر دهد. برنامههای مخرب ممکن است از این ویژگی برای پاک کردن یا تغییر گزارش تماس شما استفاده کنند."</string>
<string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"به برنامه اجازه میدهد گزارشات تماس تلفنی شما، از جمله دادههایی درمورد تماسهای ورودی و خروجی را تغییر دهد. برنامههای مخرب ممکن است از این ویژگی برای پاک کردن یا تغییر گزارش تماس شما استفاده کنند."</string>
<string name="permlab_readProfile" msgid="4701889852612716678">"خواندن کارت تماس شما"</string>
- <string name="permdesc_readProfile" product="default" msgid="5462475151849888848">"به برنامه اجازه میدهد اطلاعات نمایه شخصی ذخیره شده در دستگاه شما، مانند نام و اطلاعات تماس شما را بخواند. یعنی برنامه میتواند شما را شناسایی کند و ممکن است اطلاعات نمایه شما را به دیگران ارسال کند."</string>
+ <string name="permdesc_readProfile" product="default" msgid="5462475151849888848">"به برنامه اجازه میدهد اطلاعات نمایه شخصی ذخیره شده در دستگاه شما، مانند نام و اطلاعات تماس شما را بخواند. یعنی برنامه میتواند شما را شناسایی کند و ممکن است اطلاعات نمایهٔ شما را به دیگران ارسال کند."</string>
<string name="permlab_writeProfile" msgid="907793628777397643">"اصلاح کارت تماس شما"</string>
- <string name="permdesc_writeProfile" product="default" msgid="5552084294598465899">"به برنامه اجازه میدهد تا اطلاعات نمایه شخصی ذخیره شده در دستگاه شما، مانند نام و اطلاعات تماس شما را تغییر دهد یا اضافه کند. یعنی برنامه میتواند شما را شناسایی کند و ممکن است اطلاعات نمایه شما را برای دیگران ارسال کند."</string>
+ <string name="permdesc_writeProfile" product="default" msgid="5552084294598465899">"به برنامه اجازه میدهد تا اطلاعات نمایه شخصی ذخیره شده در دستگاه شما، مانند نام و اطلاعات تماس شما را تغییر دهد یا اضافه کند. یعنی برنامه میتواند شما را شناسایی کند و ممکن است اطلاعات نمایهٔ شما را برای دیگران ارسال کند."</string>
<string name="permlab_readSocialStream" product="default" msgid="1268920956152419170">"خواندن جریان اجتماعی شما"</string>
<string name="permdesc_readSocialStream" product="default" msgid="4255706027172050872">"به برنامه اجازه میدهد به بهروزرسانیهای اجتماعی از طرف شما و دوستان شما دسترسی پیدا کرده و آنها را همگامسازی کند. دقت کنید که هنگام اشتراکگذاری -- این ویژگی به برنامه اجازه میدهد ارتباطات بین شما و دوستان شما را در شبکههای اجتماعی، صرفنظر از محرمانه بودن آنها بخواند. توجه: این مجوز ممکن است در همه شبکههای اجتماعی اجرا نشود."</string>
<string name="permlab_writeSocialStream" product="default" msgid="3504179222493235645">"نوشتن در جریان اجتماعی شما"</string>
<string name="permdesc_writeSocialStream" product="default" msgid="3086557552204114849">"به برنامه اجازه میدهد بهروزرسانیهای اجتماعی از طرف دوستان شما را نمایش دهد. دقت کنید هنگام اشتراکگذاری اطلاعات -- این ویژگی به برنامه اجازه میدهد پیامهایی را که به نظر میرسد از طرف یکی از دوستان شما باشد ایجاد کند. توجه: این مجوز در همه شبکههای اجتماعی قابل اجرا نیست."</string>
<string name="permlab_readCalendar" msgid="5972727560257612398">"خواندن رویدادهای تقویم به همراه اطلاعات محرمانه"</string>
- <string name="permdesc_readCalendar" product="tablet" msgid="4216462049057658723">"به برنامه امکان میدهد همه رویدادهای تقویم ذخیره شده در رایانه لوحی شما را بخواند، از جمله رویدادهای دوستان یا همکاران. این ممکن است به برنامه امکان دهد دادههای تقویم شما را صرفنظر از محرمانه یا حساس بودن آنها به اشتراک گذاشته یا ذخیره کند."</string>
+ <string name="permdesc_readCalendar" product="tablet" msgid="4216462049057658723">"به برنامه امکان میدهد همه رویدادهای تقویم ذخیره شده در رایانهٔ لوحی شما را بخواند، از جمله رویدادهای دوستان یا همکاران. این ممکن است به برنامه امکان دهد دادههای تقویم شما را صرفنظر از محرمانه یا حساس بودن آنها به اشتراک گذاشته یا ذخیره کند."</string>
<string name="permdesc_readCalendar" product="default" msgid="7434548682470851583">"به برنامه امکان میدهد همه رویدادهای تقویم ذخیره شده در تلفن شما را بخواند، از جمله رویدادهای دوستان یا همکاران. این ممکن است به برنامه امکان دهد دادههای تقویم شما را صرفنظر از محرمانه یا حساس بودن آنها به اشتراک گذاشته یا ذخیره کند."</string>
<string name="permlab_writeCalendar" msgid="8438874755193825647">"افزودن یا تغییر رویدادهای تقویم و ارسال ایمیل به مهمانان بدون دخالت مالک"</string>
- <string name="permdesc_writeCalendar" product="tablet" msgid="6679035520113668528">"به برنامه اجازه میدهد رویدادهایی را که میتوانید در رایانه لوحی خود اصلاح نمایید، از جمله رویدادهای دوستان یا همکاران خود را، اضافه یا حذف کرده یا تغییر دهد. این ویژگی ممکن است به برنامه اجازه دهد پیامهایی را که به نظر میرسد از مالکین تقویم رسیده است ارسال نموده یا رویدادها را بدون اطلاع مالک اصلاح کنند."</string>
+ <string name="permdesc_writeCalendar" product="tablet" msgid="6679035520113668528">"به برنامه اجازه میدهد رویدادهایی را که میتوانید در رایانهٔ لوحی خود اصلاح نمایید، از جمله رویدادهای دوستان یا همکاران خود را، اضافه یا حذف کرده یا تغییر دهد. این ویژگی ممکن است به برنامه اجازه دهد پیامهایی را که به نظر میرسد از مالکین تقویم رسیده است ارسال نموده یا رویدادها را بدون اطلاع مالک اصلاح کنند."</string>
<string name="permdesc_writeCalendar" product="default" msgid="2324469496327249376">"به برنامه اجازه میدهد رویدادهایی را که میتوانید در تلفن خود اصلاح نمایید، از جمله رویدادهای دوستان یا همکاران خود را، اضافه یا حذف کرده یا تغییر دهد. این ویژگی ممکن است به برنامه اجازه دهد پیامهایی را که به نظر میرسد از مالکین تقویم رسیده است ارسال نموده یا رویدادها را بدون اطلاع مالک اصلاح کنند."</string>
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"منابع مکان کاذب برای تست"</string>
<string name="permdesc_accessMockLocation" msgid="5808711039482051824">"منابع موقعیت مکانی کاذب را برای تست کردن یا نصب یک ارائهدهنده موقعیت مکانی جدید ایجاد نمایید. این کار به برنامه امکان میدهد موقعیت مکانی و/یا وضعیت گزارش داده شده توسط سایر منابع موقعیت مکانی مانند GPS یا ارائهدهندگان موقعیت مکانی را نادیده بگیرد."</string>
@@ -381,7 +381,7 @@
<string name="permlab_installLocationProvider" msgid="6578101199825193873">"مجوز برای نصب یک ارائه دهنده مکان"</string>
<string name="permdesc_installLocationProvider" msgid="9066146120470591509">"منابع موقعیت مکانی کاذب را برای تست کردن یا نصب یک ارائهدهنده موقعیت مکانی جدید ایجاد نمایید. این کار به برنامه امکان میدهد موقعیت مکانی و/یا وضعیت گزارش داده شده توسط سایر منابع موقعیت مکانی مانند GPS یا ارائهدهندگان موقعیت مکانی را نادیده بگیرد."</string>
<string name="permlab_accessFineLocation" msgid="5885550969882561436">"موقعیت مکانی دقیق (GPS)"</string>
- <string name="permdesc_accessFineLocation" product="tablet" msgid="8960597421469894181">"به منابع موقعیت مکانی دقیق مانند سیستم موقعیتیابی جهانی در رایانه لوحی خود دسترسی پیدا کنید. وقتی سرویسهای موقعیت مکانی موجود و فعال باشند، این مجوز به برنامه اجازه میدهد موقعیت مکانی دقیق شما را تعیین کند."</string>
+ <string name="permdesc_accessFineLocation" product="tablet" msgid="8960597421469894181">"به منابع موقعیت مکانی دقیق مانند سیستم موقعیتیابی جهانی در رایانهٔ لوحی خود دسترسی پیدا کنید. وقتی سرویسهای موقعیت مکانی موجود و فعال باشند، این مجوز به برنامه اجازه میدهد موقعیت مکانی دقیق شما را تعیین کند."</string>
<string name="permdesc_accessFineLocation" product="default" msgid="239268765496141815">"به منابع موقعیت مکانی دقیق مانند سیستم موقعیتیابی جهانی در تلفن خود دسترسی پیدا کنید. وقتی سرویسهای موقعیت مکانی موجود و فعال باشند، این مجوز به برنامه اجازه میدهد موقعیت مکانی دقیق شما را تعیین کند."</string>
<string name="permlab_accessCoarseLocation" msgid="7422827215441638984">"موقعیت مکانی تقریبی (مبتنی بر شبکه)"</string>
<string name="permdesc_accessCoarseLocation" msgid="5383798877137640762">"به موقعیت مکانی تقریبی ارائهدهندگان موقعیت مکانی با استفاده از منابع شبکه مانند برج مخابراتی و Wi-Fi دسترسی پیدا کنید. وقتی این سرویسهای موقعیت مکانی موجود و فعال باشند، این مجوز به برنامه امکان میدهد موقعیت مکانی تقریبی شما را تعیین کند."</string>
@@ -395,14 +395,14 @@
<string name="permdesc_recordAudio" msgid="4906839301087980680">"به برنامه اجازه میدهد صدا را با میکروفن ضبط کند. این مجوز به برنامه اجازه میدهد صدا را در هر زمان که بخواهید بدون تأیید شما ضبط کند."</string>
<string name="permlab_camera" msgid="3616391919559751192">"عکسبرداری و فیلمبرداری"</string>
<string name="permdesc_camera" msgid="8497216524735535009">"به برنامه اجازه میدهد با دوربین به عکسبرداری و فیلمبرداری بپردازد. این مجوز به برنامه اجازه میدهد از دوربین در هر زمانی بدون تأیید شما استفاده کند."</string>
- <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"غیر فعال کردن دائم رایانه لوحی"</string>
+ <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"غیر فعال کردن دائم رایانهٔ لوحی"</string>
<string name="permlab_brick" product="default" msgid="8337817093326370537">"تلفن بطور دائمی غیرفعال شود"</string>
- <string name="permdesc_brick" product="tablet" msgid="4334818808001699530">"به برنامه اجازه میدهد تا رایانه لوحی را به طور کلی و دائمی غیرفعال کند. این کار بسیار خطرناک است."</string>
+ <string name="permdesc_brick" product="tablet" msgid="4334818808001699530">"به برنامه اجازه میدهد تا رایانهٔ لوحی را به طور کلی و دائمی غیرفعال کند. این کار بسیار خطرناک است."</string>
<string name="permdesc_brick" product="default" msgid="5788903297627283099">"به برنامه اجازه میدهد تا گوشی را به طور کلی و دائمی غیرفعال کند. این کار بسیار خطرناک است."</string>
- <string name="permlab_reboot" product="tablet" msgid="3436634972561795002">"راه اندازی مجدد اجباری رایانه لوحی"</string>
- <string name="permlab_reboot" product="default" msgid="2898560872462638242">"اجبار برنامه برای راه اندازی مجدد"</string>
- <string name="permdesc_reboot" product="tablet" msgid="8172056180063700741">"به برنامه اجازه میدهد تا سبب راه اندازی مجدد رایانه لوحی شود."</string>
- <string name="permdesc_reboot" product="default" msgid="5326008124289989969">"به برنامه اجازه میدهد تا سبب راه اندازی مجدد گوشی شود."</string>
+ <string name="permlab_reboot" product="tablet" msgid="3436634972561795002">"راهاندازی مجدد اجباری رایانهٔ لوحی"</string>
+ <string name="permlab_reboot" product="default" msgid="2898560872462638242">"اجبار برنامه برای راهاندازی مجدد"</string>
+ <string name="permdesc_reboot" product="tablet" msgid="8172056180063700741">"به برنامه اجازه میدهد تا سبب راهاندازی مجدد رایانهٔ لوحی شود."</string>
+ <string name="permdesc_reboot" product="default" msgid="5326008124289989969">"به برنامه اجازه میدهد تا سبب راهاندازی مجدد گوشی شود."</string>
<string name="permlab_mount_unmount_filesystems" product="nosdcard" msgid="2927361537942591841">"دسترسی به سیستم فایل حافظهٔ USB"</string>
<string name="permlab_mount_unmount_filesystems" product="default" msgid="4402305049890953810">"دسترسی به سیستم فایل کارت SD"</string>
<string name="permdesc_mount_unmount_filesystems" msgid="1829290701658992347">"به برنامه اجازه میدهد تا فایلهای سیستمی در حافظه جداشدنی نصب شود یا نصب آن لغو شود."</string>
@@ -427,14 +427,14 @@
<string name="permdesc_manageUsb" msgid="7776155430218239833">"به برنامه اجازه میدهد تا تنظیمات برگزیده و مجوزهای دستگاههای USB را مدیریت کند."</string>
<string name="permlab_accessMtp" msgid="4953468676795917042">"اعمال پروتکل MTP"</string>
<string name="permdesc_accessMtp" msgid="6532961200486791570">"دسترسی به درایور کرنل MTP جهت اعمال پروتکل MTP USB را اجازه میدهد."</string>
- <string name="permlab_hardware_test" msgid="4148290860400659146">"تست سخت افزار"</string>
+ <string name="permlab_hardware_test" msgid="4148290860400659146">"تست سختافزار"</string>
<string name="permdesc_hardware_test" msgid="6597964191208016605">"به برنامه اجازه میدهد به منظور تست سختافزار، قسمتهای جانبی مختلف را کنترل کنند."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"تماس مستقیم با شماره تلفنها"</string>
<string name="permdesc_callPhone" msgid="3740797576113760827">"به برنامه اجازه میدهد بدون دخالت شما با شمارههای تلفن تماس بگیرد. این ممکن است باعث ایجاد هزینه یا تماسهای پیشبینی نشده شود. توجه داشته باشید که این به برنامه اجازه نمیدهد به برقراری تماسهای اضطراری بپردازد. برنامههای مخرب ممکن است با برقراری تماس بدون تأیید شما هزینههایی را برای شما ایجاد کنند."</string>
<string name="permlab_callPrivileged" msgid="4198349211108497879">"تماس مستقیم با هر شماره تلفنی"</string>
<string name="permdesc_callPrivileged" msgid="1689024901509996810">"به برنامه اجازه میدهد تا بدون دخالت با هر شماره تلفنی تماس بگیرد، از جمله شمارههای اضطراری. برنامههای مخرب میتوانند تماسهای غیرضروری و غیر قانونی با خدمات اضطراری بگیرند."</string>
- <string name="permlab_performCdmaProvisioning" product="tablet" msgid="4842576994144604821">"راه اندازی مستقیم تنظیم رایانه لوحی CDMA"</string>
- <string name="permlab_performCdmaProvisioning" product="default" msgid="5604848095315421425">"شروع مستقیم راه اندازی تلفن CDMA"</string>
+ <string name="permlab_performCdmaProvisioning" product="tablet" msgid="4842576994144604821">"راهاندازی مستقیم تنظیم رایانهٔ لوحی CDMA"</string>
+ <string name="permlab_performCdmaProvisioning" product="default" msgid="5604848095315421425">"شروع مستقیم راهاندازی تلفن CDMA"</string>
<string name="permdesc_performCdmaProvisioning" msgid="1994193538802314186">"به برنامه اجازه میدهد تا شرایط مقررات CDMA را شروع کند. برنامههای مخرب میتوانند شرایط مقررات CDMA را در مواقع غیرضروری شروع کند."</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"کنترل اعلانهای بهروزرسانی مکان"</string>
<string name="permdesc_locationUpdates" msgid="1120741557891438876">"به برنامه اجازه میدهد اعلانهای بهروزرسانی موقعیت مکانی را از رادیو فعال/غیرفعال کند. برای استفاده برنامههای عادی نیست."</string>
@@ -446,17 +446,17 @@
<string name="permdesc_modifyPhoneState" msgid="1029877529007686732">"به برنامه اجازه میدهد ویژگیهای دستگاه را کنترل کند. برنامهای که این مجوز را دارد میتواند بدون اطلاع شما تعویض شبکه داشته باشد، رادیوی تلفن را روشن یا خاموش کند و کارهایی از این قبیل را انجام دهد."</string>
<string name="permlab_readPhoneState" msgid="9178228524507610486">"خواندن وضعیت تلفن و شناسه"</string>
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"به برنامه اجازه میدهد به ویژگیهای تلفن دستگاه شما دسترسی پیدا کند. این مجوز به برنامه اجازه میدهد شماره تلفن و شناسههای دستگاه، فعال بودن یک تماس و شماره راه دوری که با یک تماس متصل شده است را مشخص کند."</string>
- <string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ممانعت از به خواب رفتن رایانه لوحی"</string>
+ <string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"ممانعت از به خواب رفتن رایانهٔ لوحی"</string>
<string name="permlab_wakeLock" product="default" msgid="573480187941496130">"ممانعت از به خواب رفتن تلفن"</string>
- <string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"به برنامه اجازه میدهد تا از غیرفعال شدن رایانه لوحی جلوگیری کند."</string>
+ <string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"به برنامه اجازه میدهد تا از غیرفعال شدن رایانهٔ لوحی جلوگیری کند."</string>
<string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"به برنامه اجازه میدهد تا از غیرفعال شدن تلفن جلوگیری کند."</string>
- <string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"روشن/خاموش کردن رایانه لوحی"</string>
+ <string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"روشن/خاموش کردن رایانهٔ لوحی"</string>
<string name="permlab_devicePower" product="default" msgid="4928622470980943206">"روشن/خاموش کردن تلفن"</string>
- <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"به برنامه اجازه میدهد رایانه لوحی را روشن یا خاموش کند."</string>
+ <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"به برنامه اجازه میدهد رایانهٔ لوحی را روشن یا خاموش کند."</string>
<string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"به برنامه اجازه میدهد گوشی را روشن یا خاموش کند."</string>
<string name="permlab_factoryTest" msgid="3715225492696416187">"اجرا در حالت تست کارخانه"</string>
- <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"اجرا به عنوان تست سازنده سطح پایین، امکان دسترسی کامل به سخت افزار رایانه لوحی شما را فراهم میآورد. فقط زمانی که رایانه لوحی در حالت تست سازنده در حال اجراست قابل دسترسی است."</string>
- <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"اجرا به عنوان تست سازنده سطح پایین، امکان دسترسی کامل به سخت افزار تلفن شما را فراهم میآورد. فقط زمانی که تلفن در حالت تست سازنده در حال اجراست قابل دسترسی است."</string>
+ <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"اجرا به عنوان تست سازنده سطح پایین، امکان دسترسی کامل به سختافزار رایانهٔ لوحی شما را فراهم میآورد. فقط زمانی که رایانهٔ لوحی در حالت تست سازنده در حال اجراست قابل دسترسی است."</string>
+ <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"اجرا به عنوان تست سازنده سطح پایین، امکان دسترسی کامل به سختافزار تلفن شما را فراهم میآورد. فقط زمانی که تلفن در حالت تست سازنده در حال اجراست قابل دسترسی است."</string>
<string name="permlab_setWallpaper" msgid="6627192333373465143">"تنظیم تصویر زمینه"</string>
<string name="permdesc_setWallpaper" msgid="7373447920977624745">"به برنامه اجازه میدهد تا تصویر زمینه سیستم را تنظیم کند."</string>
<string name="permlab_setWallpaperHints" msgid="3278608165977736538">"تنظیم اندازه تصویر زمینه"</string>
@@ -464,15 +464,15 @@
<string name="permlab_masterClear" msgid="2315750423139697397">"بازنشانی سیستم به موارد پیشفرض کارخانه"</string>
<string name="permdesc_masterClear" msgid="3665380492633910226">"به برنامه اجازه میدهد تا بطور کامل سیستم را روی تنظیمات کارخانه بازنشانی کند، همه دادهها، پیکربندی و برنامههای نصب شده را پاک کند."</string>
<string name="permlab_setTime" msgid="2021614829591775646">"تنظیم ساعت"</string>
- <string name="permdesc_setTime" product="tablet" msgid="1896341438151152881">"به برنامه اجازه میدهد تا زمان ساعت رایانه لوحی را تغییر دهد."</string>
+ <string name="permdesc_setTime" product="tablet" msgid="1896341438151152881">"به برنامه اجازه میدهد تا زمان ساعت رایانهٔ لوحی را تغییر دهد."</string>
<string name="permdesc_setTime" product="default" msgid="1855702730738020">"به برنامه اجازه میدهد تا زمان ساعت تلفن را تغییر دهد."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"تنظیم منطقهٔ زمانی"</string>
- <string name="permdesc_setTimeZone" product="tablet" msgid="1676983712315827645">"به برنامه اجازه میدهد تا منطقهٔ زمانی رایانه لوحی را تغییر دهد."</string>
+ <string name="permdesc_setTimeZone" product="tablet" msgid="1676983712315827645">"به برنامه اجازه میدهد تا منطقهٔ زمانی رایانهٔ لوحی را تغییر دهد."</string>
<string name="permdesc_setTimeZone" product="default" msgid="4499943488436633398">"به برنامه اجازه میدهد تا منطقهٔ زمانی تلفن را تغییر دهد."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"عملکرد به عنوان AccountManagerService"</string>
<string name="permdesc_accountManagerService" msgid="1948455552333615954">"به برنامه اجازه میدهد با AccountAuthenticators تماس برقرار کند."</string>
<string name="permlab_getAccounts" msgid="1086795467760122114">"یافتن حسابها در دستگاه"</string>
- <string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"به برنامه اجازه میدهد به لیست حسابهای شناخته شده توسط رایانه لوحی دسترسی پیدا کند. این ممکن است حسابهای ایجاد شده توسط برنامههایی را که نصب کردهاید، شامل شود."</string>
+ <string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"به برنامه اجازه میدهد به لیست حسابهای شناخته شده توسط رایانهٔ لوحی دسترسی پیدا کند. این ممکن است حسابهای ایجاد شده توسط برنامههایی را که نصب کردهاید، شامل شود."</string>
<string name="permdesc_getAccounts" product="default" msgid="3448316822451807382">"به برنامه اجازه میدهد به لیست حسابهای شناخته شده توسط تلفن دسترسی پیدا کند. این ممکن است حسابهای ایجاد شده توسط برنامههایی را که نصب کردهاید، شامل شود."</string>
<string name="permlab_authenticateAccounts" msgid="5265908481172736933">"ایجاد حسابها و تنظیم گذرواژهها"</string>
<string name="permdesc_authenticateAccounts" msgid="5472124296908977260">"به برنامه اجازه میدهد از امکانات تأیید کننده اعتبار حساب AccountManager از جمله ایجاد حساب و دریافت و تنظیم گذرواژهها استفاده کند."</string>
@@ -497,18 +497,18 @@
<string name="permlab_changeWifiState" msgid="6550641188749128035">"اتصال به Wi-Fi و قطع اتصال از آن"</string>
<string name="permdesc_changeWifiState" msgid="7137950297386127533">"به برنامه اجازه میدهد تا به نقاط دسترسی Wi-Fi وصل شود و ارتباط خود را با آنها قطع کند و تغییراتی را در پیکربندی دستگاه برای شبکههای Wi-Fi ایجاد کند."</string>
<string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"دریافت چندگانه Wi-Fi را مجاز میکند"</string>
- <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="7969774021256336548">"به برنامه اجازه میدهد به دریافت بستههای ارسالی به همه دستگاههای موجود در شبکه Wi-Fi با استفاده از آدرسهای پخش چندگانه و نه فقط به رایانه لوحی شما بپردازند. این از توان مصرف بیشتری نسبت به حالت پخش غیرچندگانه استفاده میکند."</string>
+ <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="7969774021256336548">"به برنامه اجازه میدهد به دریافت بستههای ارسالی به همه دستگاههای موجود در شبکه Wi-Fi با استفاده از آدرسهای پخش چندگانه و نه فقط به رایانهٔ لوحی شما بپردازند. این از توان مصرف بیشتری نسبت به حالت پخش غیرچندگانه استفاده میکند."</string>
<string name="permdesc_changeWifiMulticastState" product="default" msgid="6851949706025349926">"به برنامه اجازه میدهد به دریافت بستههای ارسالی به همه دستگاههای موجود در شبکه Wi-Fi با استفاده از آدرسهای پخش چندگانه و نه فقط به تلفن شما بپردازند. این از توان مصرف بیشتری نسبت به حالت پخش غیرچندگانه استفاده میکند."</string>
<string name="permlab_bluetoothAdmin" msgid="6006967373935926659">"دسترسی به تنظیمات بلوتوث"</string>
- <string name="permdesc_bluetoothAdmin" product="tablet" msgid="6921177471748882137">"به برنامه اجازه میدهد تا رایانه لوحی بلوتوث محلی را پیکربندی کرده، دستگاههای راه دور را شناسایی کرده و با آنها جفت شود."</string>
+ <string name="permdesc_bluetoothAdmin" product="tablet" msgid="6921177471748882137">"به برنامه اجازه میدهد تا رایانهٔ لوحی بلوتوث محلی را پیکربندی کرده، دستگاههای راه دور را شناسایی کرده و با آنها جفت شود."</string>
<string name="permdesc_bluetoothAdmin" product="default" msgid="8931682159331542137">"به برنامه اجازه میدهد تا تلفن بلوتوث محلی را پیکربندی کند و دستگاههای راه دور را پیدا کند و با آنها جفت شود."</string>
<string name="permlab_accessWimaxState" msgid="7436749103151096452">"مشاهدهٔ اتصالات وایمکس"</string>
<string name="permdesc_accessWimaxState" msgid="6360102877261978887">"به برنامه امکان میدهد فعال بودن وایمکس و اطلاعات مربوط به هر یک از شبکههای وایمکس متصل را مشخص کند."</string>
<string name="permlab_changeWimaxState" msgid="2405042267131496579">"تغییر وضعیت WiMAX"</string>
- <string name="permdesc_changeWimaxState" product="tablet" msgid="3156456504084201805">"به برنامه امکان میدهد رایانه لوحی را به شبکههای وایمکس متصل کرده یا اتصال آن را از این شبکهها قطع کند."</string>
+ <string name="permdesc_changeWimaxState" product="tablet" msgid="3156456504084201805">"به برنامه امکان میدهد رایانهٔ لوحی را به شبکههای وایمکس متصل کرده یا اتصال آن را از این شبکهها قطع کند."</string>
<string name="permdesc_changeWimaxState" product="default" msgid="697025043004923798">"به برنامه امکان میدهد تا تلفن را به شبکههای وایمکس متصل کرده یا اتصال آنرا از این شبکهها قطع کند."</string>
<string name="permlab_bluetooth" msgid="6127769336339276828">"مرتبط سازی با دستگاههای بلوتوث"</string>
- <string name="permdesc_bluetooth" product="tablet" msgid="3480722181852438628">"به برنامه اجازه میدهد تا پیکربندی بلوتوث در رایانه لوحی را مشاهده کند و اتصال با دستگاههای مرتبط را برقرار کرده و بپذیرد."</string>
+ <string name="permdesc_bluetooth" product="tablet" msgid="3480722181852438628">"به برنامه اجازه میدهد تا پیکربندی بلوتوث در رایانهٔ لوحی را مشاهده کند و اتصال با دستگاههای مرتبط را برقرار کرده و بپذیرد."</string>
<string name="permdesc_bluetooth" product="default" msgid="3207106324452312739">"به برنامه اجازه میدهد تا پیکربندی بلوتوث در تلفن را مشاهده کند، و اتصالات دستگاههای مرتبط را برقرار کرده و بپذیرد."</string>
<string name="permlab_nfc" msgid="4423351274757876953">"کنترل ارتباط راه نزدیک"</string>
<string name="permdesc_nfc" msgid="7120611819401789907">"به برنامه اجازه میدهد تا با تگهای ارتباط میدان نزدیک (NFC)، کارتها و فایل خوان ارتباط برقرار کند."</string>
@@ -538,8 +538,8 @@
<string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"به برنامه اجازه میدهد تا در کارت SD بنویسد."</string>
<string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"تغییر/حذف محتواهای حافظه رسانه داخلی"</string>
<string name="permdesc_mediaStorageWrite" product="default" msgid="8189160597698529185">"به برنامه اجازه میدهد تا محتویات حافظه رسانه داخلی را تغییر دهد."</string>
- <string name="permlab_cache_filesystem" msgid="5656487264819669824">"دسترسی به سیستم فایل حافظه پنهان"</string>
- <string name="permdesc_cache_filesystem" msgid="5578967642265550955">"به برنامه اجازه میدهد تا سیستم فایل حافظه پنهان را بخواند و بنویسد."</string>
+ <string name="permlab_cache_filesystem" msgid="5656487264819669824">"دسترسی به سیستم فایل حافظهٔ پنهان"</string>
+ <string name="permdesc_cache_filesystem" msgid="5578967642265550955">"به برنامه اجازه میدهد تا سیستم فایل حافظهٔ پنهان را بخواند و بنویسد."</string>
<string name="permlab_use_sip" msgid="5986952362795870502">"علامتگذاری/دریافت تماسهای اینترنتی"</string>
<string name="permdesc_use_sip" msgid="4717632000062674294">"به برنامه اجازه میدهد تا از خدمات SIP استفاده کند و تماسهای اینترنتی بگیرد/دریافت کند."</string>
<string name="permlab_readNetworkUsageHistory" msgid="7862593283611493232">"خواندن سابقه استفاده از شبکه"</string>
@@ -551,19 +551,19 @@
<string name="policylab_limitPassword" msgid="4497420728857585791">"تنظیم قوانین رمز ورود"</string>
<string name="policydesc_limitPassword" msgid="3252114203919510394">"طول و نویسههای مجاز در گذرواژههای بازکردن قفل صفحه را کنترل کنید."</string>
<string name="policylab_watchLogin" msgid="914130646942199503">"نمایش تلاشهای قفل گشایی صفحه"</string>
- <string name="policydesc_watchLogin" product="tablet" msgid="3215729294215070072">"تعداد گذرواژههای اشتباه تایپ شده را هنگام بازکردن قفل صفحه کنترل میکند، و یا اگر دفعات زیادی گذرواژه اشتباه تایپ شود رایانه لوحی را قفل میکند و همه دادههای رایانه لوحی را پاک میکند."</string>
+ <string name="policydesc_watchLogin" product="tablet" msgid="3215729294215070072">"تعداد گذرواژههای اشتباه تایپ شده را هنگام بازکردن قفل صفحه کنترل میکند، و یا اگر دفعات زیادی گذرواژه اشتباه تایپ شود رایانهٔ لوحی را قفل میکند و همه دادههای رایانهٔ لوحی را پاک میکند."</string>
<string name="policydesc_watchLogin" product="default" msgid="5712323091846761073">"تعداد گذرواژههای نادرست تایپ شده را کنترل میکند. هنگام بازکردن قفل صفحه اگر دفعات زیادی گذرواژه نادرست تایپ کردهاید، تلفن را قفل کنید یا همه دادههای تلفن را پاک کنید."</string>
<string name="policylab_resetPassword" msgid="2620077191242688955">"تغییر رمز ورود قفل گشایی صفحه"</string>
<string name="policydesc_resetPassword" msgid="605963962301904458">"گذرواژه بازگشایی قفل صفحه را تغییر دهید."</string>
<string name="policylab_forceLock" msgid="2274085384704248431">"قفل کردن صفحه"</string>
<string name="policydesc_forceLock" msgid="1141797588403827138">"نحوه و زمان قفل شدن صفحه را کنترل کنید."</string>
<string name="policylab_wipeData" msgid="3910545446758639713">"پاک کردن تمام دادهها"</string>
- <string name="policydesc_wipeData" product="tablet" msgid="4306184096067756876">"با انجام بازنشانی به دادههای کارخانه، دادههای رایانه لوحی بدون هشدار پاک میشود."</string>
+ <string name="policydesc_wipeData" product="tablet" msgid="4306184096067756876">"با انجام بازنشانی به دادههای کارخانه، دادههای رایانهٔ لوحی بدون هشدار پاک میشود."</string>
<string name="policydesc_wipeData" product="default" msgid="5096895604574188391">"با انجام بازنشانی به دادههای کارخانه، دادههای تلفن بدون هشدار پاک میشود."</string>
<string name="policylab_setGlobalProxy" msgid="2784828293747791446">"تنظیم پروکسی جهانی دستگاه"</string>
<string name="policydesc_setGlobalProxy" msgid="6387497466660154931">"پروکسی جهانی دستگاه مورد نظر را جهت استفاده هنگام فعال بودن خط مشی تنظیم کنید. فقط اولین سرپرست دستگاه پروکسی جهانی مفید را تنظیم میکند."</string>
<string name="policylab_expirePassword" msgid="885279151847254056">"تنظیم زمان انقضای رمز ورود قفل صفحه"</string>
- <string name="policydesc_expirePassword" msgid="1729725226314691591">"کنترل کنید چند وقت یکبار باید گذرواژه صفحه قفل عوض شود."</string>
+ <string name="policydesc_expirePassword" msgid="1729725226314691591">"کنترل کنید چند وقت یک بار باید گذرواژه صفحه قفل عوض شود."</string>
<string name="policylab_encryptedStorage" msgid="8901326199909132915">"تنظیم رمزگذاری حافظه"</string>
<string name="policydesc_encryptedStorage" msgid="2637732115325316992">"باید اطلاعات ذخیره شده برنامه رمزگذاری شود."</string>
<string name="policylab_disableCamera" msgid="6395301023152297826">"غیر فعال کردن دوربین ها"</string>
@@ -707,7 +707,7 @@
<string name="lockscreen_battery_short" msgid="4477264849386850266">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"شارژر خود را متصل کنید."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"سیم کارت موجود نیست."</string>
- <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"سیم کارت درون رایانه لوحی نیست."</string>
+ <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"سیم کارت درون رایانهٔ لوحی نیست."</string>
<string name="lockscreen_missing_sim_message" product="default" msgid="2186920585695169078">"سیم کارت درون تلفن نیست."</string>
<string name="lockscreen_missing_sim_instructions" msgid="5372787138023272615">"سیم کارت را وارد کنید."</string>
<string name="lockscreen_missing_sim_instructions_long" msgid="3526573099019319472">"سیم کارت موجود نیست یا قابل خواندن نیست. یک سیم کارت وارد کنید."</string>
@@ -725,13 +725,13 @@
<string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"سیم کارت قفل شد."</string>
<string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"بازگشایی قفل سیم کارت..."</string>
<string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6481623830344107222">"الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیدهاید. "\n\n"لطفاً پس از <xliff:g id="NUMBER_1">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
- <string name="lockscreen_too_many_failed_password_attempts_dialog_message" msgid="2725973286239344555">"گذرواژه خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه تایپ کردهاید. "\n\n"پس از <xliff:g id="NUMBER_1">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
+ <string name="lockscreen_too_many_failed_password_attempts_dialog_message" msgid="2725973286239344555">"گذرواژهٔ خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه تایپ کردهاید. "\n\n"پس از <xliff:g id="NUMBER_1">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
<string name="lockscreen_too_many_failed_pin_attempts_dialog_message" msgid="6216672706545696955">"پین را<xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه تایپ کردهاید. "\n\n"پس از <xliff:g id="NUMBER_1">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
- <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیدهاید. بعد از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق، از شما خواسته میشود که برای بازگشایی قفل رایانه لوحی خود به Google وارد شوید."\n\n" لطفاً پس از <xliff:g id="NUMBER_2">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
- <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیده اید. پس از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق دیگر از شما خواسته میشود که برای بازگشایی قفل گوشی خود به برنامه Google وارد شوید."\n\n" لطفاً پس از <xliff:g id="NUMBER_2">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
- <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="6128106399745755604">"شما به اشتباه <xliff:g id="NUMBER_0">%d</xliff:g> بار اقدام به باز کردن قفل رایانه لوحی کردهاید. پس از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق دیگر، رایانه لوحی به پیشفرض کارخانه بازنشانی میشود و تمام دادههای کاربر از دست خواهد رفت."</string>
+ <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیدهاید. بعد از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق، از شما خواسته میشود که برای بازگشایی قفل رایانهٔ لوحی خود به Google وارد شوید."\n\n" لطفاً پس از <xliff:g id="NUMBER_2">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
+ <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%d</xliff:g> بار اشتباه کشیدهاید. پس از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق دیگر از شما خواسته میشود که برای بازگشایی قفل گوشی خود به برنامهٔ Google وارد شوید."\n\n" لطفاً پس از <xliff:g id="NUMBER_2">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
+ <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="6128106399745755604">"شما به اشتباه <xliff:g id="NUMBER_0">%d</xliff:g> بار اقدام به باز کردن قفل رایانهٔ لوحی کردهاید. پس از <xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق دیگر، رایانهٔ لوحی به پیشفرض کارخانه بازنشانی میشود و تمام دادههای کاربر از دست خواهد رفت."</string>
<string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="8603565142156826565">"شما به اشتباه <xliff:g id="NUMBER_0">%d</xliff:g> بار اقدام به باز کردن قفل تلفن کردهاید. پس از<xliff:g id="NUMBER_1">%d</xliff:g> تلاش ناموفق دیگر، تلفن به پیشفرض کارخانه بازنشانی میشود و تمام دادههای کاربر از دست خواهد رفت."</string>
- <string name="lockscreen_failed_attempts_now_wiping" product="tablet" msgid="280873516493934365">"شما به اشتباه اقدام به باز کردن قفل <xliff:g id="NUMBER">%d</xliff:g> رایانه لوحی کردهاید. رایانه لوحی در حال حاضر به پیشفرض کارخانه بازنشانی میشود."</string>
+ <string name="lockscreen_failed_attempts_now_wiping" product="tablet" msgid="280873516493934365">"شما به اشتباه اقدام به باز کردن قفل <xliff:g id="NUMBER">%d</xliff:g> رایانهٔ لوحی کردهاید. رایانهٔ لوحی در حال حاضر به پیشفرض کارخانه بازنشانی میشود."</string>
<string name="lockscreen_failed_attempts_now_wiping" product="default" msgid="3025504721764922246">"شما به اشتباه <xliff:g id="NUMBER">%d</xliff:g> بار اقدام به باز کردن قفل تلفن کردهاید. این تلفن در حال حاضر به پیشفرض کارخانه بازنشانی میشود."</string>
<string name="lockscreen_too_many_failed_attempts_countdown" msgid="6251480343394389665">"در <xliff:g id="NUMBER">%d</xliff:g> ثانیه دوباره امتحان کنید."</string>
<string name="lockscreen_forgot_pattern_button_text" msgid="2626999449610695930">"الگو را فراموش کردهاید؟"</string>
@@ -742,7 +742,7 @@
<string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"رمز ورود"</string>
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"ورود به سیستم"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"نام کاربر یا رمز ورود نامعتبر است."</string>
- <string name="lockscreen_glogin_account_recovery_hint" msgid="1696924763690379073">"نام کاربری یا گذرواژه خود را فراموش کردید؟"\n"از "<b>"google.com/accounts/recovery"</b>" بازدید کنید."</string>
+ <string name="lockscreen_glogin_account_recovery_hint" msgid="1696924763690379073">"نام کاربری یا گذرواژهٔ خود را فراموش کردید؟"\n"از "<b>"google.com/accounts/recovery"</b>" بازدید کنید."</string>
<string name="lockscreen_glogin_checking_password" msgid="7114627351286933867">"در حال بررسی..."</string>
<string name="lockscreen_unlock_label" msgid="737440483220667054">"بازگشایی قفل"</string>
<string name="lockscreen_sound_on_label" msgid="9068877576513425970">"صدا روشن"</string>
@@ -762,8 +762,8 @@
<string name="hour_cap_ampm" msgid="2083465992940444366">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"تست کارخانه انجام نشد"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"عملکرد FACTORY_TEST تنها برای بستههای نصب شده در /system/app پشتیبانی میشود."</string>
- <string name="factorytest_no_action" msgid="872991874799998561">"بسته ای یافت نشد که عملکرد FACTORY_TEST را ارائه کند."</string>
- <string name="factorytest_reboot" msgid="6320168203050791643">"راه اندازی مجدد"</string>
+ <string name="factorytest_no_action" msgid="872991874799998561">"بستهای یافت نشد که عملکرد FACTORY_TEST را ارائه کند."</string>
+ <string name="factorytest_reboot" msgid="6320168203050791643">"راهاندازی مجدد"</string>
<string name="js_dialog_title" msgid="1987483977834603872">"صفحه در \"<xliff:g id="TITLE">%s</xliff:g>\" میگوید:"</string>
<string name="js_dialog_title_default" msgid="6961903213729667573">"جاوا اسکریپت"</string>
<string name="js_dialog_before_unload" msgid="730366588032430474">"از این صفحه خارج میشوید؟"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"برای ادامه روی تأیید و برای ماندن در همین صفحه روی لغو کلیک کنید."</string>
@@ -790,7 +790,7 @@
<string name="permlab_readHistoryBookmarks" msgid="3775265775405106983">"خواندن سابقه و نشانکهای وب شما"</string>
<string name="permdesc_readHistoryBookmarks" msgid="8462378226600439658">"به برنامه اجازه میدهد سابقه نشانیهای اینترنتی را که مرورگر بازدید کرده است و همه نشانکهای مرورگر را بخواند. توجه: این مجوز توسط مرورگرهای شخص ثالث یا سایر برنامههای دارای قابلیت مرور وب قابل اجرا نیست."</string>
<string name="permlab_writeHistoryBookmarks" msgid="3714785165273314490">"نوشتن نشانکهای وب و سابقه"</string>
- <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="6825527469145760922">"به برنامه اجازه میدهد سابقه مرورگر یا نشانکهای ذخیره شده در رایانه لوحی شما را اصلاح کند. این ویژگی ممکن است به برنامه اجازه دهد دادههای مرورگر را حذف یا اصلاح کند. توجه: این مجوز ممکن است توسط مرورگرهای شخص ثالث یا سایر برنامههای دارای قابلیت مرور وب قابل اجرا نباشد."</string>
+ <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="6825527469145760922">"به برنامه اجازه میدهد سابقه مرورگر یا نشانکهای ذخیره شده در رایانهٔ لوحی شما را اصلاح کند. این ویژگی ممکن است به برنامه اجازه دهد دادههای مرورگر را حذف یا اصلاح کند. توجه: این مجوز ممکن است توسط مرورگرهای شخص ثالث یا سایر برنامههای دارای قابلیت مرور وب قابل اجرا نباشد."</string>
<string name="permdesc_writeHistoryBookmarks" product="default" msgid="8497389531014185509">"به برنامه اجازه میدهد سابقه مرورگر یا نشانکهای ذخیره شده در تلفن شما را اصلاح کند. این ویژگی ممکن است به برنامه اجازه دهد دادههای مرورگر را حذف یا اصلاح کند. توجه: این مجوز ممکن است توسط مرورگرهای شخص ثالث یا سایر برنامههای دارای قابلیت مرور وب قابل اجرا نباشد."</string>
<string name="permlab_setAlarm" msgid="1379294556362091814">"تنظیم یک هشدار"</string>
<string name="permdesc_setAlarm" msgid="316392039157473848">"به برنامه اجازه میدهد تا هشداری را در برنامه ساعت زنگدار نصب شده تنظیم کند. برخی از برنامههای ساعت زنگدار نمیتوانند این ویژگی را اعمال کنند."</string>
@@ -826,7 +826,7 @@
<string name="searchview_description_submit" msgid="2688450133297983542">"ارسال عبارت جستجو"</string>
<string name="searchview_description_voice" msgid="2453203695674994440">"جستجوی صوتی"</string>
<string name="enable_explore_by_touch_warning_title" msgid="7460694070309730149">"فعال کردن «کاوش با لمس»؟"</string>
- <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> میخواهد «کاوش با لمس» را فعال کند. وقتی «کاوش با لمس» فعال است، میتوانید توضیحاتی را برای آنچه که زیر انگشت شما است مشاهده کرده یا بشنوید یا برای استفاده از رایانه لوحی از حرکات اشاره استفاده کنید."</string>
+ <string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> میخواهد «کاوش با لمس» را فعال کند. وقتی «کاوش با لمس» فعال است، میتوانید توضیحاتی را برای آنچه که زیر انگشت شما است مشاهده کرده یا بشنوید یا برای استفاده از رایانهٔ لوحی از حرکات اشاره استفاده کنید."</string>
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> میخواهد «کاوش با لمس» را فعال کند. وقتی «کاوش با لمس» فعال است، میتوانید توضیحاتی را برای آنچه که زیر انگشت شما است مشاهده کرده یا بشنوید یا برای استفاده از تلفن خود از حرکات اشاره استفاده کنید."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"۱ ماه قبل"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"قبل از ۱ ماه گذشته"</string>
@@ -968,7 +968,7 @@
<string name="webpage_unresponsive" msgid="3272758351138122503">"این صفحه پاسخ نمیدهد."\n\n"آیا میخواهید آن را ببندید؟"</string>
<string name="launch_warning_title" msgid="1547997780506713581">"برنامه مجدداً هدایت شد"</string>
<string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> اکنون در حال اجرا است."</string>
- <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> از ابتدا راه اندازی شد."</string>
+ <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> از ابتدا راهاندازی شد."</string>
<string name="screen_compat_mode_scale" msgid="3202955667675944499">"مقیاس"</string>
<string name="screen_compat_mode_show" msgid="4013878876486655892">"همیشه نشان داده شود"</string>
<string name="screen_compat_mode_hint" msgid="1064524084543304459">"در تنظیمات سیستم >برنامهها > مورد دانلود شده آن را دوباره فعال کنید."</string>
@@ -1062,17 +1062,17 @@
<string name="perms_description_app" msgid="5139836143293299417">"ارائه شده توسط <xliff:g id="APP_NAME">%1$s</xliff:g> ."</string>
<string name="usb_storage_activity_title" msgid="4465055157209648641">"حافظه انبوه USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB متصل شد"</string>
- <string name="usb_storage_message" product="nosdcard" msgid="3308538094316477839">"شما از طریق USB به رایانه خود متصل شدهاید. اگر میخواهید فایلها را بین رایانه خود و حافظهٔ USB در Android کپی کنید، دکمه زیر را لمس کنید."</string>
- <string name="usb_storage_message" product="default" msgid="805351000446037811">"شما از طریق USB به رایانه خود متصل شدهاید. اگر میخواهید فایلها را بین رایانه خود و کارت SD در Android کپی کنید، دکمه زیر را لمس کنید."</string>
+ <string name="usb_storage_message" product="nosdcard" msgid="3308538094316477839">"شما از طریق USB به رایانهٔ خود متصل شدهاید. اگر میخواهید فایلها را بین رایانهٔ خود و حافظهٔ USB در Android کپی کنید، دکمه زیر را لمس کنید."</string>
+ <string name="usb_storage_message" product="default" msgid="805351000446037811">"شما از طریق USB به رایانهٔ خود متصل شدهاید. اگر میخواهید فایلها را بین رایانهٔ خود و کارت SD در Android کپی کنید، دکمه زیر را لمس کنید."</string>
<string name="usb_storage_button_mount" msgid="1052259930369508235">"روشن کردن دستگاه ذخیرهسازی USB"</string>
<string name="usb_storage_error_message" product="nosdcard" msgid="3017045217365540658">"هنگام استفاده از حافظهٔ USB برای حافظه انبوه USB مشکلی بوجود آمد."</string>
<string name="usb_storage_error_message" product="default" msgid="2876018512716970313">"هنگام استفاده از کارت SD برای حافظه ذخیره انبوه USB مشکلی بوجود آمد."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB متصل شد"</string>
- <string name="usb_storage_notification_message" msgid="939822783828183763">"برای کپی کردن فایلها از/به رایانه خود لمس کنید."</string>
+ <string name="usb_storage_notification_message" msgid="939822783828183763">"برای کپی کردن فایلها از/به رایانهٔ خود لمس کنید."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"خاموش کردن دستگاه ذخیرهسازی USB"</string>
<string name="usb_storage_stop_notification_message" msgid="1656852098555623822">"برای غیرفعال کردن حافظهٔ USB، لمس کنید."</string>
<string name="usb_storage_stop_title" msgid="660129851708775853">"دستگاه ذخیرهسازی USB در حال استفاده است"</string>
- <string name="usb_storage_stop_message" product="nosdcard" msgid="4264025280777219521">"قبل از غیرفعال کردن حافظهٔ USB، حافظهٔ USB مربوط به Android را در رایانه خود لغو نصب کنید (\"خارج کنید\")."</string>
+ <string name="usb_storage_stop_message" product="nosdcard" msgid="4264025280777219521">"قبل از غیرفعال کردن حافظهٔ USB، حافظهٔ USB مربوط به Android را در رایانهٔ خود لغو نصب کنید (\"خارج کنید\")."</string>
<string name="usb_storage_stop_message" product="default" msgid="8043969782460613114">"قبل از غیرفعال کردن حافظهٔ USB، کارت SD مربوط به Android را در رایانه لغو نصب کنید (\"خارج کنید\")."</string>
<string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"خاموش کردن دستگاه ذخیرهسازی USB"</string>
<string name="usb_storage_stop_error_message" msgid="1970374898263063836">"هنگام غیرفعال کردن حافظهٔ USB مشکلی بوجود آمد. بررسی کنید میزبان USB را لغو نصب کرده باشید، سپس دوباره امتحان کنید."</string>
@@ -1080,7 +1080,7 @@
<string name="dlg_confirm_kill_storage_users_text" msgid="5100428757107469454">"در صورت فعال کردن حافظهٔ USB، برخی از برنامههایی که از آنها استفاده میکنید متوقف میشوند و تا زمانی که حافظهٔ USB را غیرفعال نکنید امکان استفاده از آنها وجود نخواهد داشت."</string>
<string name="dlg_error_title" msgid="7323658469626514207">"راهاندازی USB ناموفق بود."</string>
<string name="dlg_ok" msgid="7376953167039865701">"تأیید"</string>
- <string name="usb_mtp_notification_title" msgid="3699913097391550394">"متصل شده به عنوان دستگاه رسانه ای"</string>
+ <string name="usb_mtp_notification_title" msgid="3699913097391550394">"متصل شده به عنوان دستگاه رسانهای"</string>
<string name="usb_ptp_notification_title" msgid="1960817192216064833">"متصل شده به عنوان دوربین"</string>
<string name="usb_cd_installer_notification_title" msgid="6774712827892090754">"متصل شده به عنوان نصب کننده"</string>
<string name="usb_accessory_notification_title" msgid="7848236974087653666">"به یک وسیله جانبی USB وصل شده است"</string>
@@ -1094,10 +1094,10 @@
<string name="adb_active_notification_message" msgid="1016654627626476142">"برای غیرفعال کردن اشکال زدایی USB لمس کنید."</string>
<string name="select_input_method" msgid="4653387336791222978">"انتخاب روش ورودی"</string>
<string name="configure_input_methods" msgid="9091652157722495116">"تنظیم روشهای ورودی"</string>
- <string name="use_physical_keyboard" msgid="6203112478095117625">"صفحه کلید فیزیکی"</string>
+ <string name="use_physical_keyboard" msgid="6203112478095117625">"صفحهکلید فیزیکی"</string>
<string name="hardware" msgid="7517821086888990278">"سختافزار"</string>
- <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"انتخاب طرحبندی صفحه کلید"</string>
- <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"برای انتخاب یک طرحبندی صفحه کلید لمس کنید…"</string>
+ <string name="select_keyboard_layout_notification_title" msgid="1407367017263030773">"انتخاب طرحبندی صفحهکلید"</string>
+ <string name="select_keyboard_layout_notification_message" msgid="4465907700449257063">"برای انتخاب یک طرحبندی صفحهکلید لمس کنید…"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"داوطلبین"</u></string>
@@ -1112,8 +1112,8 @@
<string name="ext_media_unmountable_notification_title" product="default" msgid="6410723906019100189">"کارت SD آسیب دیده"</string>
<string name="ext_media_unmountable_notification_message" product="nosdcard" msgid="1795917578395333280">"حافظهٔ USB خراب است. سعی کنید آنرا دوباره فرمت کنید."</string>
<string name="ext_media_unmountable_notification_message" product="default" msgid="1753898567525568253">"کارت SD خراب است. سعی کنید آنرا دوباره فرمت کنید."</string>
- <string name="ext_media_badremoval_notification_title" product="nosdcard" msgid="1661683031330951073">"حافظهٔ USB به صورت غیر منتظره جدا شد"</string>
- <string name="ext_media_badremoval_notification_title" product="default" msgid="6872152882604407837">"کارت SD به صورت غیر منتظره ای جدا شد"</string>
+ <string name="ext_media_badremoval_notification_title" product="nosdcard" msgid="1661683031330951073">"حافظهٔ USB به صورت غیرمنتظره جدا شد"</string>
+ <string name="ext_media_badremoval_notification_title" product="default" msgid="6872152882604407837">"کارت SD به صورت غیرمنتظرهای جدا شد"</string>
<string name="ext_media_badremoval_notification_message" product="nosdcard" msgid="4329848819865594241">"اتصال حافظهٔ USB را قبل از بیرون آوردن قطع کنید تا سبب از بین رفتن دادهها نشود."</string>
<string name="ext_media_badremoval_notification_message" product="default" msgid="7260183293747448241">"کارت SD را قبل از بیرون آوردن جدا کنید تا سبب از بین رفتن دادهها نشود."</string>
<string name="ext_media_safe_unmount_notification_title" product="nosdcard" msgid="3967973893270360230">"حافظهٔ USB را میتوانید با ایمنی جدا کنید"</string>
@@ -1283,7 +1283,7 @@
<string name="fingerprints" msgid="4516019619850763049">"اثر انگشت:"</string>
<string name="sha256_fingerprint" msgid="4391271286477279263">"اثر انگشت SHA-256:"</string>
<string name="sha1_fingerprint" msgid="7930330235269404581">"اثر انگشت SHA-1"</string>
- <string name="activity_chooser_view_see_all" msgid="4292569383976636200">"مشاهده همه"</string>
+ <string name="activity_chooser_view_see_all" msgid="4292569383976636200">"مشاهدهٔ همه"</string>
<string name="activity_chooser_view_dialog_title_default" msgid="4710013864974040615">"انتخاب فعالیت"</string>
<string name="share_action_provider_share_with" msgid="5247684435979149216">"اشتراکگذاری با"</string>
<string name="status_bar_device_locked" msgid="3092703448690669768">"دستگاه قفل است."</string>
@@ -1293,7 +1293,7 @@
<string name="SetupCallDefault" msgid="5834948469253758575">"تماس را میپذیرید؟"</string>
<string name="activity_resolver_use_always" msgid="8017770747801494933">"همیشه"</string>
<string name="activity_resolver_use_once" msgid="2404644797149173758">"فقط این بار"</string>
- <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"رایانه لوحی"</string>
+ <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"رایانهٔ لوحی"</string>
<string name="default_audio_route_name" product="default" msgid="4239291273420140123">"تلفن"</string>
<string name="default_audio_route_name_headphones" msgid="8119971843803439110">"هدفونها"</string>
<string name="default_audio_route_name_dock_speakers" msgid="6240602982276591864">"بلندگوهای جایگاه اتصال"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 43e22da..6fb20dd 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -244,9 +244,9 @@
<string name="permlab_retrieve_window_content" msgid="8022588608994589938">"epua maudhui ya skrini"</string>
<string name="permdesc_retrieve_window_content" msgid="3193269069469700265">"Inaruhusu programu kutoa maudhui ya dirisha amilifu. Programu hasidi zinaweza kutoa maudhui yote ya dirisha na kuchunguza maandishi yake yote isipokuwa nenosiri."</string>
<string name="permlab_retrieve_window_info" msgid="8532295199112519378">"okoa maelezo ya dirisha"</string>
- <string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"Huruhusu programu kuokoa maelezo kuhusu madirisha kutoka kwenye kidhibiti dirisha. Huenda programu hasidi ikaokoa maelezo ambayo yamekusudiwa kwa matumizi ya mfumo wa ndani."</string>
+ <string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"Huruhusu programu kuokoa maelezo kuhusu madirisha kutoka kwenye kidhibiti dirisha. Huenda programu hasidi ikakusanya maelezo ambayo yamekusudiwa kwa matumizi ya mfumo wa ndani."</string>
<string name="permlab_filter_events" msgid="8675535648807427389">"chuja matukio"</string>
- <string name="permdesc_filter_events" msgid="8006236315888347680">"Huruhusu programu kusajili kichujio ingizo kinachochuja mkondo wa matukio ya mtumiaji kabla ya kutumwa. Huenda programu hasidi zikadhibiti mfumo wa UI bila mtumiaji kuingilia kati."</string>
+ <string name="permdesc_filter_events" msgid="8006236315888347680">"Huruhusu programu kusajili kichujio ingizo kinachochuja mkondo wa matukio ya mtumiaji kabla ya kutumwa. Huenda programu hasidi ikadhibiti mfumo wa UI bila mtumiaji kuingilia kati."</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"Zima nusu"</string>
<string name="permdesc_shutdown" msgid="7046500838746291775">"Huweka kisimamia shughuli katika hali ya kuzima. Haiadhiri uzimaji kamili"</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"zuia swichi za app"</string>
@@ -474,8 +474,8 @@
<string name="permlab_getAccounts" msgid="1086795467760122114">"pata akaunti kwenye kifaa"</string>
<string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"Inaruhusu programu kupata orodha ya akaunti zinazojulikana kwa kompyuta kibao. Hii inaweza kujumuisha akaunti zozote zilizoundwa na programu ambazo umesakinisha."</string>
<string name="permdesc_getAccounts" product="default" msgid="3448316822451807382">"Inaruhusu programu kupata orodha ya akaunti zinazojulikana kwa simu. Hii inaweza kujumuisha akaunti zozote zilizoundwa na programu ambazo umesakinisha."</string>
- <string name="permlab_authenticateAccounts" msgid="5265908481172736933">"unda akaunti na weka manenosiri"</string>
- <string name="permdesc_authenticateAccounts" msgid="5472124296908977260">"Inaruhusu programu kutumia uwezo wa uthibitishaji akaunti wa KidhibitiAkaunti, pamoja na kuunda akaunti na kupata na kuweka nywila zao."</string>
+ <string name="permlab_authenticateAccounts" msgid="5265908481172736933">"fungua akaunti na weka manenosiri"</string>
+ <string name="permdesc_authenticateAccounts" msgid="5472124296908977260">"Inaruhusu programu kutumia uwezo wa uthibitishaji akaunti wa KidhibitiAkaunti, ikiwa ni pamoja na kufungua akaunti na kupata na kuweka manenosiri ya akaunti hizo."</string>
<string name="permlab_manageAccounts" msgid="4983126304757177305">"ongeza au uondoe akaunti"</string>
<string name="permdesc_manageAccounts" msgid="8698295625488292506">"Inaruhusu programu kutekeleza shughuli kama vile kuongeza na kutoa akaunti, na kufuta manenosiri yazo."</string>
<string name="permlab_useCredentials" msgid="235481396163877642">"tumia akaunti kwenye kifaa"</string>
@@ -741,7 +741,7 @@
<string name="lockscreen_glogin_username_hint" msgid="8846881424106484447">"Jina la mtumiaji (barua pepe)"</string>
<string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Nenosiri"</string>
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Ingia"</string>
- <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Jina batili la mtumiaji au nywila"</string>
+ <string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Jina la mtumiaji au nenosiri batili."</string>
<string name="lockscreen_glogin_account_recovery_hint" msgid="1696924763690379073">"Umesahau jina lako la mtumiaji au nenosiri?"\n"Tembela "<b>"google.com/accounts/recovery"</b>"."</string>
<string name="lockscreen_glogin_checking_password" msgid="7114627351286933867">"Inakagua..."</string>
<string name="lockscreen_unlock_label" msgid="737440483220667054">"Fungua"</string>
@@ -905,7 +905,7 @@
<string name="day" msgid="8144195776058119424">"siku"</string>
<string name="days" msgid="4774547661021344602">"siku"</string>
<string name="hour" msgid="2126771916426189481">"saa"</string>
- <string name="hours" msgid="894424005266852993">"masaa"</string>
+ <string name="hours" msgid="894424005266852993">"saa"</string>
<string name="minute" msgid="9148878657703769868">"dakika"</string>
<string name="minutes" msgid="5646001005827034509">"Dakika"</string>
<string name="second" msgid="3184235808021478">"sekunde"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index c7fc993..12f80da 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -243,14 +243,10 @@
<string name="permdesc_dump" msgid="1778299088692290329">"允许应用检索系统的内部状态。恶意应用可能会检索一般情况下绝不需要检索的多种私人信息和安全信息。"</string>
<string name="permlab_retrieve_window_content" msgid="8022588608994589938">"检索屏幕内容"</string>
<string name="permdesc_retrieve_window_content" msgid="3193269069469700265">"允许应用检索活动窗口的内容。恶意应用可能会检索整个窗口的内容,并检查其中除密码以外的所有文字。"</string>
- <!-- no translation found for permlab_retrieve_window_info (8532295199112519378) -->
- <skip />
- <!-- no translation found for permdesc_retrieve_window_info (4998836370424186849) -->
- <skip />
- <!-- no translation found for permlab_filter_events (8675535648807427389) -->
- <skip />
- <!-- no translation found for permdesc_filter_events (8006236315888347680) -->
- <skip />
+ <string name="permlab_retrieve_window_info" msgid="8532295199112519378">"检索窗口信息"</string>
+ <string name="permdesc_retrieve_window_info" msgid="4998836370424186849">"允许应用通过窗口管理器检索窗口信息。恶意应用可能会检索供内部系统使用的信息。"</string>
+ <string name="permlab_filter_events" msgid="8675535648807427389">"过滤活动"</string>
+ <string name="permdesc_filter_events" msgid="8006236315888347680">"允许应用注册输入过滤器,这类过滤器会在所有用户活动分派之前对这些用户活动的信息流进行过滤。恶意应用可能会在没有用户干预的情况下控制系统用户界面。"</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"部分关机"</string>
<string name="permdesc_shutdown" msgid="7046500838746291775">"使活动管理器进入关闭状态。不执行彻底关机。"</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"禁止切换应用"</string>
diff --git a/docs/html/distribute/index.jd b/docs/html/distribute/index.jd
index c27bc62..c0ed6a8 100644
--- a/docs/html/distribute/index.jd
+++ b/docs/html/distribute/index.jd
@@ -13,10 +13,10 @@
<img src="/images/home/google-play.png">
</div>
<div class="copy" style="position:relative;left:480px;width:360;">
- <h1>Your Apps on Google Play</h1>
+ <h1 style="margin-bottom:10px;">Your Apps on Google Play</h1>
<p>The most visited store in the world for Android apps. Cloud-connected and always synced, it's never been easier for users to find and download your apps.</p>
- <p><a class="landing-page-link" href="http://youtu.be/g5SzWc8-X0M">Watch a video</a></p>
+ <p><a class="button" href="https://play.google.com/apps/publish/">Go to Developer Console »</a></p>
</div> </div>
</div>
<div class="distribute-features col-13" style="clear:both;margin-top:246px;">
diff --git a/docs/html/guide/practices/index.jd b/docs/html/guide/practices/index.jd
index e218b50..04a43c5 100644
--- a/docs/html/guide/practices/index.jd
+++ b/docs/html/guide/practices/index.jd
@@ -10,7 +10,7 @@
<div class="col-12">
<h3>Blog Articles</h3>
- <a href="android-developers.blogspot.com/2010/10/improving-app-quality.html">
+ <a href="http://android-developers.blogspot.com/2010/10/improving-app-quality.html">
<h4>Improving App Quality</h4>
<p>One way of improving your app’s visibility in the ecosystem is by deploying well-targeted
mobile advertising campaigns and cross-app promotions. However, there’s another time-tested method
@@ -23,7 +23,7 @@
your designs to the action bar in order to promote a consistent Android user experience.</p>
</a>
- <a href="android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html">
+ <a href="http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html">
<h4>New Tools For Managing Screen Sizes</h4>
<p>Android 3.2 includes new tools for supporting devices with a wide range of screen sizes.
One important result is better support for a new size of screen; what is typically called a “7-inch”
@@ -31,7 +31,7 @@
different screen sizes.</p>
</a>
- <a href="android-developers.blogspot.com/2011/03/identifying-app-installations.html">
+ <a href="http://android-developers.blogspot.com/2011/03/identifying-app-installations.html">
<h4>Identifying App Installations</h4>
<p>It is very common, and perfectly reasonable, for a developer to want to track individual
installations of their apps. It sounds plausible just to call TelephonyManager.getDeviceId() and use
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 8a91ec8..2105a50 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -57,9 +57,9 @@
<dt><a name="reparent"></a>{@code android:allowTaskReparenting}</dt>
<dd>Whether or not activities that the application defines can move from
the task that started them to the task they have an affinity for when that task
-is next brought to the front — "{@code true}" if they can move, and
-"{@code false}" if they must remain with the task where they started.
-The default value is "{@code false}".
+is next brought to the front — {@code "true"} if they can move, and
+{@code "false"} if they must remain with the task where they started.
+The default value is {@code "false"}.
<p>
The
@@ -73,9 +73,9 @@
<dt><a name="agent"></a>{@code android:backupAgent}</dt>
<dd>The name of the class that implement's the application's backup agent,
a subclass of {@link android.app.backup.BackupAgent}. The attribute value should be
-a fully qualified class name (such as, "{@code com.example.project.MyBackupAgent}").
+a fully qualified class name (such as, {@code "com.example.project.MyBackupAgent"}).
However, as a shorthand, if the first character of the name is a period
-(for example, "{@code .MyBackupAgent}"), it is appended to the
+(for example, {@code ".MyBackupAgent"}), it is appended to the
package name specified in the
<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code>
element.
@@ -86,29 +86,29 @@
<dt><a name="debug"></a>{@code android:debuggable}</dt>
<dd>Whether or not the application can be debugged, even when running
-on a device in user mode — "{@code true}" if it can be, and "{@code false}"
-if not. The default value is "{@code false}".</dd>
+on a device in user mode — {@code "true"} if it can be, and {@code "false"}
+if not. The default value is {@code "false"}.</dd>
<dt><a name="desc"></a>{@code android:description}</dt>
<dd>User-readable text about the application, longer and more descriptive than the application label. The value must be set as a reference to a string resource. Unlike the label, it cannot be a raw string. There is no default value.</dd>
<dt><a name="enabled"></a>{@code android:enabled}</dt>
<dd>Whether or not the Android system can instantiate components of
-the application — "{@code true}" if it can, and "{@code false}"
-if not. If the value is "{@code true}", each component's
+the application — {@code "true"} if it can, and {@code "false"}
+if not. If the value is {@code "true"}, each component's
{@code enabled} attribute determines whether that component is enabled
-or not. If the value is "{@code false}", it overrides the
+or not. If the value is {@code "false"}, it overrides the
component-specific values; all components are disabled.
<p>
-The default value is "{@code true}".
+The default value is {@code "true"}.
</p></dd>
<dt><a name="code"></a>{@code android:hasCode}</dt>
-<dd>Whether or not the application contains any code — "{@code true}"
-if it does, and "{@code false}" if not. When the value is "{@code false}",
+<dd>Whether or not the application contains any code — {@code "true"}
+if it does, and {@code "false"} if not. When the value is {@code "false"},
the system does not try to load any application code when launching components.
-The default value is "{@code true}".
+The default value is {@code "true"}.
<p>
An application would not have any code of its own only if it's using nothing
@@ -118,10 +118,14 @@
<dt><a name="hwaccel"></a>{@code android:hardwareAccelerated}</dt>
<dd>Whether or not hardware-accelerated rendering should be enabled for all
-Activities and Views in this application — "{@code true}" if it
-should be enabled, and "{@code false}" if not. The default value is "{@code false}".
+activities and views in this application — {@code "true"} if it
+should be enabled, and {@code "false"} if not. The default value is {@code "true"} if you've set
+either <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>
+or <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
+to {@code "14"} or higher; otherwise, it's {@code "false"}.
-<p>Starting from Android 3.0, a hardware-accelerated OpenGL renderer is
+<p>Starting from Android 3.0 (API level 11), a hardware-accelerated OpenGL renderer is
available to applications, to improve performance for many common 2D graphics
operations. When the hardware-accelerated renderer is enabled, most operations
in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated.
@@ -132,6 +136,9 @@
<p>Note that not all of the OpenGL 2D operations are accelerated. If you enable
the hardware-accelerated renderer, test your application to ensure that it can
make use of the renderer without errors.</p>
+
+<p>For more information, read the <a href="{@docRoot}guide/topics/graphics/hardware-accel.html"
+>Hardware Acceleration</a> guide.</p>
</dd>
<dt><a name="icon"></a>{@code android:icon}</dt>
@@ -146,7 +153,7 @@
<p>
This attribute must be set as a reference to a drawable resource containing
-the image (for example {@code "@drawable/icon"}). There is no default icon.
+the image (for example {@code "@drawable/icon"}). There is no default icon.
</p></dd>
<dt><a name="killrst"></a>{@code android:killAfterRestore}</dt>
@@ -233,8 +240,8 @@
<dt><a name="persistent"></a>{@code android:persistent}</dt>
<dd>Whether or not the application should remain running at all times —
-"{@code true}" if it should, and "{@code false}" if not. The default value
-is "{@code false}". Applications should not normally set this flag;
+{@code "true"} if it should, and {@code "false"} if not. The default value
+is {@code "false"}. Applications should not normally set this flag;
persistence mode is intended only for certain system applications.</dd>
<dt><a name="proc"></a>{@code android:process}</dt>
diff --git a/docs/html/guide/topics/manifest/uses-sdk-element.jd b/docs/html/guide/topics/manifest/uses-sdk-element.jd
index 29dcb56..61f03b9 100644
--- a/docs/html/guide/topics/manifest/uses-sdk-element.jd
+++ b/docs/html/guide/topics/manifest/uses-sdk-element.jd
@@ -230,7 +230,13 @@
<table>
<tr><th>Platform Version</th><th>API Level</th><th>VERSION_CODE</th><th>Notes</th></tr>
- <tr><td><a href="{@docRoot}about/versions/android-4.0.3.html">Android 4.0.3</a></td>
+ <tr><td><a href="{@docRoot}about/versions/android-4.1.html">Android 4.1, 4.1.1</a></td>
+ <td><a href="{@docRoot}sdk/api_diff/16/changes.html" title="Diff Report">16</a></td>
+ <td>{@link android.os.Build.VERSION_CODES#JELLY_BEAN}</td>
+ <td><a href="{@docRoot}about/versions/jelly-bean.html">Platform
+Highlights</a></td></tr>
+
+ <tr><td><a href="{@docRoot}about/versions/android-4.0.3.html">Android 4.0.3, 4.0.4</a></td>
<td><a href="{@docRoot}sdk/api_diff/15/changes.html" title="Diff Report">15</a></td>
<td>{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1}</td>
<td rowspan="2"><a href="{@docRoot}about/versions/android-4.0-highlights.html">Platform
diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd
index 41961a3..983aef8 100755
--- a/docs/html/guide/topics/resources/localization.jd
+++ b/docs/html/guide/topics/resources/localization.jd
@@ -48,8 +48,6 @@
<h2>See also</h2>
<ol>
- <li><a
-href="{@docRoot}resources/tutorials/localization/index.html">Hello, L10N Tutorial</a></li>
<li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a></li>
<li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a></li>
<li><a href="{@docRoot}reference/android/app/Activity.html#ActivityLifecycle">Activity Lifecycle</a></li>
@@ -87,11 +85,8 @@
</li>
</ul>
-<p>The <a
-href="{@docRoot}resources/tutorials/localization/index.html">Hello, L10N
-</a> tutorial takes you through the steps of creating a simple localized
-application that uses locale-specific resources in the way described in this
-document. </p>
+<p>For a short guide to localizing strings in your app, see the training lesson, <a
+href="{@docRoot}training/basics/supporting-devices/languages.html">Supporting Different Languages</a>. </p>
<h2 id="resource-switching">Overview: Resource-Switching in Android</h2>
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 8930c7f..1d47ed7 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -43,11 +43,11 @@
<img src="{@docRoot}images/home/google-io.png">
</div>
<div class="content-right col-5">
- <h1>Watch Android at <br/>Google I/O!</h1>
- <p>See the keynote and more than 40 Android developer sessions streamed live from Moscone Center in San Francisco.</p>
- <p>Begins June 27, 9AM PDT (UTC-7).</p>
- <p><a href="https://developers.google.com/events/io/sessions#android"
-class="button">See the Android Sessions</a></p>
+ <h1>Android videos<br/> from Google I/O!</h1>
+ <p>If you couldn't make it to Google I/O this year or want to review some of the material,
+ all of the Android sessions are now available for viewing online.</p>
+ <p><a href="http://www.youtube.com/playlist?list=PL4C6BCDE45E05F49E&feature=plcp"
+class="button">Watch the Android sessions</a></p>
</div>
</li>
<li class="item carousel-home">
@@ -68,7 +68,6 @@
<!-- /End slideshow -->
-
</div>
<div class="wrap" style="padding-bottom:20px">
<!-- Section links -->
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 0038fac..df97855 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -2,21 +2,21 @@
header.hide=1
page.metaDescription=Download the official Android SDK to develop apps for Android-powered devices.
-sdk.win_installer=installer_r20-windows.exe
-sdk.win_installer_bytes=70497095
-sdk.win_installer_checksum=0f25321554e2f88b247320d6a3bc1a7a
+sdk.win_installer=installer_r20.0.1-windows.exe
+sdk.win_installer_bytes=70486979
+sdk.win_installer_checksum=a8df28a29c7b8598e4c50f363692256d
-sdk.win_download=android-sdk_r20-windows.zip
-sdk.win_bytes=90353014
-sdk.win_checksum=b62b0f80f559c0ac670e9f058a21f0df
+sdk.win_download=android-sdk_r20.0.1-windows.zip
+sdk.win_bytes=90370975
+sdk.win_checksum=5774f536892036f87d3bf6502862cea5
-sdk.mac_download=android-sdk_r20-macosx.zip
-sdk.mac_bytes=58203018
-sdk.mac_checksum=b6b6035ccec55ec2aa057438eb1db1f4
+sdk.mac_download=android-sdk_r20.0.1-macosx.zip
+sdk.mac_bytes=58217336
+sdk.mac_checksum=cc132d04bc551b23b0c507cf5943df57
-sdk.linux_download=android-sdk_r20-linux.tgz
-sdk.linux_bytes=82589455
-sdk.linux_checksum=22a81cf1d4a951c62f71a8758290e9bb
+sdk.linux_download=android-sdk_r20.0.1-linux.tgz
+sdk.linux_bytes=82607616
+sdk.linux_checksum=cd7176831087f53e46123dd91551be32
@jd:body
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index b276da4..60f67a2 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -1,9 +1,9 @@
page.title=Installing the Eclipse Plugin
walkthru=1
-adt.zip.version=20.0.0
-adt.zip.download=ADT-20.0.0.zip
-adt.zip.bytes=12387628
-adt.zip.checksum=ea0fc934af3b6b89097f0146c7822ed0
+adt.zip.version=20.0.1
+adt.zip.download=ADT-20.0.1.zip
+adt.zip.bytes=12387574
+adt.zip.checksum=6ebd7f8566bfd2cd031b07d56d49542d
@jd:body
diff --git a/docs/html/tools/revisions/platforms.jd b/docs/html/tools/revisions/platforms.jd
index db0cbab..6163fbc 100644
--- a/docs/html/tools/revisions/platforms.jd
+++ b/docs/html/tools/revisions/platforms.jd
@@ -36,6 +36,107 @@
+
+<h2 id="4.1">Android 4.1</h2>
+
+
+<p class="caution"><strong>Important:</strong> To download the new Android
+4.0.x system components from the Android SDK Manager, you must first update the
+SDK tools to revision 20 or later and restart the Android SDK Manager. If you do not,
+the Android 4.1 system components will not be available for download.</p>
+
+<div class="toggle-content opened">
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-opened.png"
+class="toggle-content-img" alt="" />Revision 2</a> <em>(July 2012)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+
+ <p>Maintenance update. The system version is 4.1.1.</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r20 or higher is required.</dd>
+ </dl>
+
+ </div>
+</div>
+
+<div class="toggle-content closed" >
+
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png"
+class="toggle-content-img" alt="" />Revision 1</a> <em>(June 2012)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+
+ <p>Initial release. The system version is 4.1.0.</p>
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>SDK Tools r20 or higher is required.</dd>
+ </dl>
+
+ </div>
+</div>
+
+<h3>Emulator Skins</h3>
+
+<p>The downloadable platform includes the following emulator skins:</p>
+
+<ul>
+ <li>
+ QVGA (240x320, low density, small screen)
+ </li>
+ <li>
+ WQVGA400 (240x400, low density, normal screen)
+ </li>
+ <li>
+ WQVGA432 (240x432, low density, normal screen)
+ </li>
+ <li>
+ HVGA (320x480, medium density, normal screen)
+ </li>
+ <li>
+ WVGA800 (480x800, high density, normal screen)
+ </li>
+ <li>
+ WVGA854 (480x854 high density, normal screen)
+ </li>
+ <li>
+ WXGA720 (1280x720, extra-high density, normal screen)
+ </li>
+ <li>
+ WSVGA (1024x600, medium density, large screen)
+ </li>
+ <li>
+ WXGA800-7in (1280x800, high density, large screen) <span class="new">new</span>
+ </li>
+ <li>
+ WXGA800 (1280x800, medium density, xlarge screen)
+ </li>
+</ul>
+
+<p>To test your application on an emulator that represents the <a
+href="http://play.google.com/nexus7">Nexus 7</a> tablet device, you can create an AVD with
+the new WXGA800-7in skin. For best performance, make sure to enable <a
+href="{@docRoot}tools/devices/emulator.html#accel-graphics">graphics acceleration</a> in the
+emulator configuration.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<h2 id="4.0.3">Android 4.0.3</h2>
@@ -44,10 +145,10 @@
SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
the Android 4.0.x system components will not be available for download.</p>
-<div class="toggle-content opened">
+<div class="toggle-content closed">
<p><a href="#" onclick="return toggleContent(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png"
+ <img src="{@docRoot}assets/images/triangle-closed.png"
class="toggle-content-img" alt="" />Revision 3</a> <em>(March 2012)</em>
</p>
@@ -135,15 +236,6 @@
</li>
</ul>
-<p>To test your application on an emulator that represents the latest Android device, you can create
-an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator
-currently doesn't support the new on-screen navigation bar for devices without hardware navigation
-buttons, so when using this skin, you must use keyboard keys <em>Home</em> for the Home button,
-<em>ESC</em> for the Back button, and <em>F2</em> or <em>Page-up</em> for the Menu button.</p>
-
-<p>However, due to performance issues in the emulator when running high-resolution screens such as
-the one for the WXGA720 skin, we recommend that you primarily use the traditional WVGA800 skin
-(hdpi, normal screen) to test your application.</p>
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index aa21423..947e463 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -95,7 +95,47 @@
<div class="toggleable opened">
<a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
+ <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
+ width="9px" />
+ADT 20.0.1</a> <em>(June 2012)</em>
+ <div class="toggleme">
+<dl>
+ <dt>Dependencies:</dt>
+
+ <dd>
+ <ul>
+ <li>Java 1.6 or higher is required for ADT 20.0.1.</li>
+ <li>Eclipse Helios (Version 3.6.2) or higher is required for ADT 20.0.1.</li>
+ <li>ADT 20.0.1 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK
+ Tools r20.0.1</a>. If you haven't already installed SDK Tools r20.0.1 into your SDK, use the
+ Android SDK Manager to do so.</li>
+ </ul>
+ </dd>
+
+ <dt>Bug fixes:</dt>
+ <dd>
+ <ul>
+ <li>Fixed issue in the New Project Wizard related to installation of the Support Library.</li>
+ <li>Fixed several issues with New Project Wizard related to templates.</li>
+ <li>Fixed issue with the text-based launcher icon in New Project Wizard.</li>
+ <li>Fixed issue with sticky error markers in Java files.</li>
+ <li>Fixed problem with manifest merger when exporting release {@code .apk} files.</li>
+ <li>Fixed NDK support to automatically find include path on Windows.</li>
+ <li>Fixed editor startup exception for new configurations where editor would come up blank.</li>
+ <li>Added support for {@code xxhdpi} density, which was included in API Level 16.</li>
+ <li>Fixed a bug in the {@code lint} check for unprotected broadcast receivers to ignore
+unprotected receivers for default Android actions.</li>
+ </ul>
+ </dd>
+
+</dl>
+
+</div>
+</div>
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
width="9px" />
ADT 20.0.0</a> <em>(June 2012)</em>
<div class="toggleme">
@@ -325,7 +365,7 @@
<ul>
<li>Fixed problem using Layout Editor with {@link android.widget.SlidingDrawer} which could
not be dragged into the layout on some platforms.</li>
- <li>Fixed preview rendering for {@link android.widget.SlidingDrawer} and
+ <li>Fixed preview rendering for {@link android.widget.SlidingDrawer} and
{@link android.widget.TabHost}.
(<a href="http://code.google.com/p/android/issues/detail?id=23022">Issue 23022</a>).</li>
<li>Fixed issues that could prevent layout rendering due to unresolvable resources.
diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index 6be3168..216a304 100644
--- a/docs/html/tools/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -1,16 +1,16 @@
ndk=true
-ndk.win_download=android-ndk-r8-windows.zip
-ndk.win_bytes=109928336
-ndk.win_checksum=37b1a2576f28752fcc09e1b9c07e3f14
+ndk.win_download=android-ndk-r8b-windows.zip
+ndk.win_bytes=188724991
+ndk.win_checksum=6d290d4f2729ef2063c5ae5b1e335622
-ndk.mac_download=android-ndk-r8-darwin-x86.tar.bz2
-ndk.mac_bytes=96650992
-ndk.mac_checksum=81ce5de731f945692123b377afe0bad9
+ndk.mac_download=android-ndk-r8b-darwin-x86.tar.bz2
+ndk.mac_bytes=181255568
+ndk.mac_checksum=94fe392194ea41f8a70cfce0dee3870f
-ndk.linux_download=android-ndk-r8-linux-x86.tar.bz2
-ndk.linux_bytes=88310791
-ndk.linux_checksum=5c9afc9695ad67c61f82fbf896803c05
+ndk.linux_download=android-ndk-r8b-linux-x86.tar.bz2
+ndk.linux_bytes=160466240
+ndk.linux_checksum=6694ccc04d543500f0661a75f6c46526
page.title=Android NDK
@@ -41,7 +41,7 @@
</ol>
</div>
</div>
-
+
<p>The NDK is a toolset that allows you to implement parts
of your app using native-code languages such as C and C++. For certain types of apps,
this can be helpful so that you may reuse existing code libraries written in these
@@ -62,12 +62,12 @@
<h2 id="Downloads">Downloads</h2>
-
+
<script>
$('#Downloads').after($('#download-table'));
</script>
-
-
+
+
<h2 id="Revisions">Revisions</h2>
<p>The sections below provide information and notes about successive releases of
@@ -115,12 +115,204 @@
<div class="toggleable open">
<a href="#" onclick="return toggleDiv(this)"><img src=
"{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px">
+ Android NDK, Revision 8b</a> <em>(July 2012)</em>
+
+ <div class="toggleme">
+ <p>The main features of this release are a new GNU Compiler Collection (GCC) 4.6 toolchain and
+GNU Debugger (GDB) 7.3.x which adds debugging support for the Android 4.1 (API Level 16) system
+image.</p>
+
+ <dl>
+ <dt>Important bug fixes:</dt>
+
+ <dd>
+ <ul>
+ <li>Fixed {@code LOCAL_SHORT_COMMANDS} issues on Mac OS, Windows Cygwin environments for
+static libraries. List file generation is faster, and it is not regenerated to avoid repeated
+project rebuilds.</li>
+ <li>Fixed several issues in {@code ndk-gdb}:
+ <ul>
+ <li>Updated tool to pass flags {@code -e}, {@code -d} and {@code -s} to adb more
+consistently.</li>
+ <li>Updated tool to accept device serial names containing spaces.</li>
+ <li>Updated tool to retrieve {@code /system/bin/link} information, so {@code gdb} on
+the host can set a breakpoint in {@code __dl_rtld_db_dlactivity} and be aware of linker activity
+(e.g., rescan {@code solib} symbols when {@code dlopen()} is called).</li>
+ </ul>
+ </li>
+ <li>Fixed {@code ndk-build clean} on Windows, which was failing to remove
+{@code ./libs/*/lib*.so}.</li>
+ <li>Fixed {@code ndk-build.cmd} to return a non-zero {@code ERRORLEVEL} when {@code make}
+fails.</li>
+ <li>Fixed {@code libc.so} to stop incorrectly exporting the {@code __exidx_start} and
+{@code __exidx_end} symbols.</li>
+ <li>Fixed {@code SEGV} when unwinding the stack past {@code __libc_init} for ARM and
+MIPS.</li>
+ </ul>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Important changes:</dt>
+
+ <dd>
+ <ul>
+ <li>Added GCC 4.6 toolchain ({@code binutils} 2.21 with {@code gold} and GDB 7.3.x) to
+co-exist with the original GCC 4.4.3 toolchain ({@code binutils} 2.19 and GDB 6.6).</p>
+ <ul>
+ <li>GCC 4.6 is now the default toolchain. You may set {@code
+NDK_TOOLCHAIN_VERSION=4.4.3} in {@code Android.mk} to select the original one.</li>
+ <li>Support for the {@code gold} linker is only available for ARM and x86
+architectures on Linux and Mac OS hosts. This support is disabled by default. Add {@code
+LOCAL_C_FLAGS += -fuse-ld=gold} in {@code Android.mk} to enable it.</li>
+ <li>Programs compiled with {@code -fPIE} require the new {@code GDB} for debugging,
+including binaries in Android 4.1 (API Level 16) system images.</li>
+ <li>The {@code binutils} 2.21 {@code ld} tool contains back-ported fixes from
+version 2.22:
+ <ul>
+ <li>Fixed {@code ld --gc-sections}, which incorrectly retains zombie references to
+external libraries. (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=13177">more
+info</a>).</li>
+ <li>Fixed ARM {@code strip} command to preserve the original {@code p_align} and
+{@code p_flags} in {@code GNU_RELRO} section if they are valid. Without this fix, programs
+built with {@code -fPIE} could not be debugged. (<a
+href="http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.552&r2=1.553">more info</a>)</li>
+ </ul>
+ </li>
+ <li>Disabled {@code sincos()} optimization for compatibility with older
+ platforms.</li>
+ </ul>
+ </li>
+
+ <li>Updated build options to enable the Never eXecute (NX) bit and {@code relro}/{@code
+bind_now} protections by default:
+ <ul>
+ <li>Added {@code --noexecstack} to assembler and {@code -z noexecstack} to linker
+that provides NX protection against buffer overflow attacks by enabling NX bit on stack and
+heap.</li>
+ <li>Added {@code -z relro} and {@code -z now} to linker for hardening of internal
+data sections after linking to guard against security vulnerabilities caused by memory corruption.
+(more info: <a href="http://www.akkadia.org/drepper/nonselsec.pdf">1</a>,
+<a href="http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html">2</a>)</li>
+
+ <li>These features can be disabled using the following options:
+ <ol>
+ <li>Disable NX protection by setting the {@code --execstack} option for the
+assembler and {@code -z execstack} for the linker.</li>
+ <li>Disable hardening of internal data by setting the {@code -z norelro} and
+{@code -z lazy} options for the linker.</li>
+ <li>Disable these protections in the NDK {@code jni/Android.mk} by setting the
+following options:
+<pre>
+LOCAL_DISABLE_NO_EXECUTE=true # disable "--noexecstack" and "-z noexecstack"
+DISABLE_RELRO=true # disable "-z relro" and "-z now"</li>
+</pre>
+ </ol>
+ <p>See {@code docs/ANDROID-MK.html} for more details.</p>
+ </li>
+ </ul>
+ </li>
+
+ <li>Added branding for Android executables with the {@code .note.ABI-tag} section (in
+{@code crtbegin_static/dynamic.o}) so that debugging tools can act accordingly. The structure
+member and values are defined as follows:</p>
+<pre>
+static const struct {
+ int32_t namesz; /* = 4, sizeof ("GNU") */
+ int32_t descsz; /* = 6 * sizeof(int32_t) */
+ int32_t type; /* = 1 */
+ char name[sizeof "GNU"]; /* = "GNU" */
+ int32_t os; /* = 0 */
+ int32_t major; /* = 2 */
+ int32_t minor; /* = 6 */
+ int32_t teeny; /* = 15 */
+ int32_t os_variant; /* = 1 */
+ int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */
+}</pre>
+ </li>
+ </ul>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Other bug fixes:</dt>
+
+ <dd>
+ <ul>
+ <li>Fixed {@code mips-linux-gnu} relocation truncated to fit {@code R_MIPS_TLS_LDM} issue.
+ (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12637">more info</a>)</li>
+ <li>Fixed {@code ld} tool segfaults when using {@code --gc-sections}.
+ (<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12845">more info</a>)
+ </li>
+ <li>Fixed MIPS {@code GOT_PAGE} counting issue.
+ (<a href="http://sourceware.org/ml/binutils/2011-05/msg00198.html">more info</a>)</li>
+ <li>Fixed follow warning symbol link for {@code mips_elf_count_got_symbols}.</li>
+ <li>Fixed follow warning symbol link for {@code mips_elf_allocate_lazy_stub}.</li>
+ <li>Moved MIPS {@code .dynamic} to the data segment, so that it is writable.</li>
+ <li>Replaced hard-coded values for symbols with correct segment sizes for MIPS.</li>
+ <li>Removed the {@code -mno-shared} option from the defaults in the MIPS toolchain.
+The default for Android toolchain is {@code -fPIC} (or {@code -fpic} if supported). If you do not
+explicitly specify {@code -mshared}, {@code -fpic}, {@code -fPIC}, {@code -fpie}, or {@code -fPIE},
+the MIPS compiler adds {@code -mno-shared} that turns off PIC. Fixed compiler not to add
+{@code -mno-shared} in this case.</li>
+ <li>Fixed wrong package names in samples {@code hello-jni} and {@code two-libs} so that
+the {@code tests} project underneath it can compile.</li>
+ </ul>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Other Changes:</dt>
+
+ <dd>
+ <ul>
+ <li>Changed locations of binaries:
+ <ul>
+ <li>Moved {@code gdbserver} from
+{@code toolchain/<arch-os-ver>/prebuilt/gdbserver} to
+{@code prebuilt/android-<arch>/gdbserver/gdbserver}.</li>
+ <li>Renamed x86 toolchain prefix from {@code i686-android-linux-} to
+{@code i686-linux-android-}.</li>
+ <li>Moved {@code sources/cxx-stl/gnu-libstdc++/include} and {@code lib} to
+{@code sources/cxx-stl/gnu-libstdc++/4.6} when compiled with GCC 4.6, or
+{@code sources/cxx-stl/gnu-libstdc++/4.4.3} when compiled with GCC 4.4.3.</li>
+ <li>Moved {@code libbfd.a} and {@code libintl.a} from {@code lib/} to {@code
+lib32/}.</li>
+ </ul>
+ </li>
+
+ <li>Added and improved various scripts in the rebuild and test NDK toolchain:
+ <ul>
+ <li>Added {@code build-mingw64-toolchain.sh} to generate a new Linux-hosted toolchain
+that generates Win32 and Win64 executables.</li>
+ <li>Improved speed of {@code download-toolchain-sources.sh} by using the {@code
+clone} command and only using {@code checkout} for the directories that are needed to build the NDK
+toolchain binaries.</li>
+ <li>Added {@code build-host-gcc.sh} and {@code build-host-gdb.sh} scripts.</li>
+ <li>Added {@code tests/check-release.sh} to check the content of a given NDK
+installation directory, or an existing NDK package.</li>
+ <li>Rewrote the {@code tests/standalone/run.sh} standalone tests .</li>
+ </ul>
+ </li>
+ <li>Removed {@code if_dl.h} header from all platforms and architectures. The {@code
+AF_LINK} and {@code sockaddr_dl} elements it describes are specific to BSD (i.e., they don't exist
+in Linux).</li>
+ </ul>
+ </dd>
+ </dl>
+
+ </div>
+</div>
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)"><img src=
+ "{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px">
Android NDK, Revision 8</a> <em>(May 2012)</em>
<div class="toggleme">
<p>This release of the NDK includes support for MIPS ABI and a few additional fixes.</p>
- </dl>
+ <dl>
<dt>New features:</dt>
<dd>
@@ -910,7 +1102,7 @@
as well as control over platform audio effects</li>
<li>Access to assets packaged in an <code>.apk</code> file.</li>
-
+
</ul>
</li>
@@ -927,7 +1119,7 @@
<li>Provides a default C++ STL implementation (based on STLport) as a helper module. It can be used either
as a static or shared library (details and usage examples are in sources/android/stlport/README). Prebuilt
binaries for STLport (static or shared) and GNU libstdc++ (static only) are also provided if you choose to
- compile against those libraries instead of the default C++ STL implementation.
+ compile against those libraries instead of the default C++ STL implementation.
C++ Exceptions and RTTI are not supported in the default STL implementation. For more information, see
docs/CPLUSPLUS-SUPPORT.HTML.</li>
@@ -938,8 +1130,8 @@
<li>Adds an EGL library that lets you create and manage OpenGL ES textures and
services.</li>
-
- <li>Adds new sample applications, <code>native-plasma</code> and <code>native-activity</code>,
+
+ <li>Adds new sample applications, <code>native-plasma</code> and <code>native-activity</code>,
to demonstrate how to write a native activity.</li>
<li>Includes many bugfixes and other small improvements; see docs/CHANGES.html for a more
@@ -1103,25 +1295,25 @@
</dl>
</div>
</div>
-
-
-
-
-
+
+
+
+
+
<!-- ####################### END OF RELEASE NOTES ####################### -->
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1287,32 +1479,32 @@
android:minSdkVersion="8" /></code> attribute value in its manifest.</li>
</ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<h2 id="Installing">Installing the NDK</h2>
<p>Installing the NDK on your development computer is straightforward and involves extracting the
NDK from its download package.</p>
@@ -1339,7 +1531,7 @@
<p>You are now ready to start working with the NDK.</p>
-
+
<h2 id="GetStarted">Getting Started with the NDK</h2>
<p>Once you've installed the NDK successfully, take a few minutes to read the documentation
@@ -1402,13 +1594,13 @@
to use them or any other framework API, you can still write JNI code to do so.</p>
</li>
</ul>
-
-
-
-
-
+
+
+
+
+
<h2 id="Contents">Contents of the NDK</h2>
-
+
<p>The NDK contains the APIs, documentation, and sample
applications that help you write your native code. Specifically:</p>
@@ -1478,9 +1670,9 @@
<li>libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).</li>
<li>A Minimal set of headers for C++ support</li>
-
+
<li>OpenSL ES native audio libraries</li>
-
+
<li>Android native application APIS</li>
</ul>
@@ -1510,13 +1702,13 @@
system</li>
<li>OVERVIEW.HTML — provides an overview of the NDK capabilities and usage</li>
-
+
<li>ANDROID-MK.HTML — describes the use of the Android.mk file, which defines the native
sources you want to compile</li>
-
+
<li>APPLICATION-MK.HTML — describes the use of the Application.mk file, which describes
- the native sources required by your Android application</li>
- <li>CPLUSPLUS-SUPPORT.HTML — describes the C++ support provided in the Android NDK</li>
+ the native sources required by your Android application</li>
+ <li>CPLUSPLUS-SUPPORT.HTML — describes the C++ support provided in the Android NDK</li>
<li>CPU-ARCH-ABIS.HTML — a description of supported CPU architectures and how to target
them.</li>
@@ -1527,15 +1719,15 @@
<li>CHANGES.HTML — a complete list of changes to the NDK across all releases.</li>
<li>DEVELOPMENT.HTML — describes how to modify the NDK and generate release packages for it</li>
-
+
<li>HOWTO.HTML — information about common tasks associated with NDK development</li>
-
+
<li>IMPORT-MODULE.HTML — describes how to share and reuse modules</li>
-
+
<li>LICENSES.HTML — information about the various open source licenses that govern the Android NDK</li>
-
+
<li>NATIVE-ACTIVITY.HTML — describes how to implement native activities</li>
-
+
<li>NDK-BUILD.HTML — describes the usage of the ndk-build script</li>
<li>NDK-GDB.HTML — describes how to use the native code debugger</li>
@@ -1544,13 +1736,13 @@
<li>STANDALONE-TOOLCHAIN.HTML — describes how to use Android NDK toolchain as a standalone
compiler (still in beta).</li>
-
+
<li>SYSTEM-ISSUES.HTML — known issues in the Android system images that you should be
aware of, if you are developing using the NDK.</li>
<li>STABLE-APIS.HTML — a complete list of the stable APIs exposed by headers in the
NDK.</li>
-
+
</ul>
<p>Additionally, the package includes detailed information about the "bionic" C library provided
@@ -1562,10 +1754,10 @@
offers.</li>
</ul>
-
-
-
-
+
+
+
+
<h3 id="Samples">Sample apps</h3>
<p>The NDK includes sample applications that illustrate how to use native code in your Android
@@ -1624,10 +1816,10 @@
<li>If you are developing with Ant, use the <code>android</code> tool to create the build file
for each of the sample projects at <code><ndk>/samples/<name>/</code>.
Then set up an AVD, if necessary, build your project in the usual way, and run it in the
- emulator.</li>
-
+ emulator.</li>
+
</ul>
-
+
<p>For more information about developing with the Android SDK tools and what
you need to do to create, build, and run your applications, see
the <a href="{@docRoot}tools/workflow/index.html">Overview</a>
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index 14d1aa4..039c4b5 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -24,51 +24,51 @@
<p>For a summary of all known issues in SDK Tools, see <a
href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
-<script type="text/javascript">
-function toggleDiv(link) {
- var toggleable = $(link).parent();
- if (toggleable.hasClass("closed")) {
- //$(".toggleme", toggleable).slideDown("fast");
- toggleable.removeClass("closed");
- toggleable.addClass("open");
- $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot + "assets/images/triangle-opened.png"));
- } else {
- //$(".toggleme", toggleable).slideUp("fast");
- toggleable.removeClass("open");
- toggleable.addClass("closed");
- $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot + "assets/images/triangle-closed.png"));
- }
- return false;
-}
-</script>
-<style>
-.toggleable {
-padding: 5px 0 0;
-}
-.toggleme {
- padding: 10px 0 0 20px;
-}
-.toggleable a {
- text-decoration:none;
-}
-.toggleme a {
- text-decoration:underline;
-}
-.toggleable.closed .toggleme {
- display:none;
-}
-#jd-content .toggle-img {
- margin:0 5px 3px 0;
-}
-</style>
-<div class="toggleable opened">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 20</a> <em>(June 2012)</em>
+<div class="toggle-content opened">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 20.0.1</a> <em>(July 2012)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
+
+ <dl>
+ <dt>Dependencies:</dt>
+ <dd>
+ <ul>
+ <li>Android SDK Platform-tools revision 12 or later.</li>
+ <li>If you are developing in Eclipse with ADT, note that the SDK Tools r20.0.1 is designed
+ for use with ADT 20.0.1 and later. If you haven't already, update your
+ <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 20.0.1.</li>
+ <li>If you are developing outside Eclipse, you must have
+ <a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
+ </ul>
+ </dd>
+ <dt>Bug fixes:</dt>
+ <dd>
+ <ul>
+ <li>Fixed wrong check on build state that forced repetitive Java code recompilation.</li>
+ <li>Fixed problems with running more than one emulator and running multiple emulators
+with GPU acceleration.</li>
+ <li>Improved resize algorithm for better rendering on scaled emulator windows.</li>
+ <li>Fixed a bug in the {@code lint} check for unprotected broadcast receivers to ignore
+unprotected receivers for default Android actions.</li>
+ <li>Fixed build issue for projects using Renderscript.</li>
+ <li>Fixed memory leak in the emulator.</li>
+ </ul>
+ </dd>
+ </dl>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 20</a> <em>(June 2012)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -137,13 +137,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 19</a> <em>(April 2012)</em>
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 19</a> <em>(April 2012)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
<p class="note"><strong>Note:</strong> This update of SDK Tools is only available through
the <a href="{@docRoot}sdk/exploring.html">Android SDK Manager</a>. Use this tool to
download and install this update.</p>
@@ -171,13 +171,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 18</a> <em>(April 2012)</em>
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 18</a> <em>(April 2012)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
<p class="caution"><strong>Important:</strong> To download the new Android
4.0 system components from the Android SDK Manager, you must first update the
SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -213,13 +213,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 17</a> <em>(March 2012)</em>
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 17</a> <em>(March 2012)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
<p class="caution"><strong>Important:</strong> To download the new Android
4.0 system components from the Android SDK Manager, you must first update the
SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -317,13 +317,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 16</a> <em>(December 2011)</em>
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 16</a> <em>(December 2011)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
<p class="caution"><strong>Important:</strong> To download the new Android
4.0 system components from the Android SDK Manager, you must first update the
SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -367,13 +367,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 15</a> <em>(October 2011)</em>
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 15</a> <em>(October 2011)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
<p class="caution"><strong>Important:</strong> To download the new Android
4.0 system components from the Android SDK Manager, you must first update the
SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
@@ -415,13 +415,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
- SDK Tools, Revision 14</a> <em>(October 2011)</em>
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 14</a> <em>(October 2011)</em>
+ </p>
- <div class="toggleme">
+ <div class="toggle-content-toggleme">
<p class="note"><strong>Important:</strong> To download the new Android
4.0 system components from the Android SDK Manager, you must first update the
SDK tools to revision 14 and restart the Android SDK Manager. If you do not,
@@ -470,12 +470,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
- width="9px" />
-SDK Tools, Revision 13</a> <em>(September 2011)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 13</a> <em>(September 2011)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -500,11 +501,13 @@
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 12</a> <em>(July 2011)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 12</a> <em>(July 2011)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -526,11 +529,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 11</a> <em>(May 2011)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 11</a> <em>(May 2011)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -552,12 +557,13 @@
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
-width="9px" />
-SDK Tools, Revision 10</a> <em>(February 2011)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 10</a> <em>(February 2011)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -582,11 +588,13 @@
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 9</a> <em>(January 2011)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 9</a> <em>(January 2011)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -639,12 +647,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 8</a> <em>(December 2010)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 8</a> <em>(December 2010)</em>
+ </p>
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -706,12 +715,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 7</a> <em>(September 2010)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 7</a> <em>(September 2010)</em>
+ </p>
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -739,12 +749,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 6</a> <em>(May 2010)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 6</a> <em>(May 2010)</em>
+ </p>
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd>
@@ -769,12 +780,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 5</a> <em>(March 2010)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 5</a> <em>(March 2010)</em>
+ </p>
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd><ul>
@@ -817,12 +829,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 4</a> <em>(December 2009)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 4</a> <em>(December 2009)</em>
+ </p>
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd><p>SDK Tools r4 is compatible with ADT 0.9.5 and later, but not
@@ -866,12 +879,13 @@
</div>
</div>
-<div class="toggleable closed">
- <a href="#" onclick="return toggleDiv(this)">
- <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px" />
-SDK Tools, Revision 3</a> <em>(October 2009)</em>
- <div class="toggleme">
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 3</a> <em>(October 2009)</em>
+ </p>
+ <div class="toggle-content-toggleme">
<dl>
<dt>Dependencies:</dt>
<dd><p>SDK Tools r3 is compatible with ADT 0.9.4 and later, but not
diff --git a/keystore/tests/src/android/security/KeyStoreTest.java b/keystore/tests/src/android/security/KeyStoreTest.java
index 008d682..91c56d6 100755
--- a/keystore/tests/src/android/security/KeyStoreTest.java
+++ b/keystore/tests/src/android/security/KeyStoreTest.java
@@ -35,9 +35,9 @@
public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
private static final String TEST_PASSWD = "12345678";
private static final String TEST_PASSWD2 = "87654321";
- private static final String TEST_KEYNAME = "testkey";
- private static final String TEST_KEYNAME1 = "testkey1";
- private static final String TEST_KEYNAME2 = "testkey2";
+ private static final String TEST_KEYNAME = "test-key";
+ private static final String TEST_KEYNAME1 = "test-key.1";
+ private static final String TEST_KEYNAME2 = "test-key.2";
private static final byte[] TEST_KEYVALUE = "test value".getBytes(Charsets.UTF_8);
// "Hello, World" in Chinese
@@ -45,10 +45,12 @@
private static final byte[] TEST_I18N_VALUE = TEST_I18N_KEY.getBytes(Charsets.UTF_8);
// Test vector data for signatures
- private static final byte[] TEST_DATA = {
- (byte) 0x00, (byte) 0xA0, (byte) 0xFF, (byte) 0x0A, (byte) 0x00, (byte) 0xFF,
- (byte) 0xAA, (byte) 0x55, (byte) 0x05, (byte) 0x5A,
- };
+ private static final byte[] TEST_DATA = new byte[256];
+ static {
+ for (int i = 0; i < TEST_DATA.length; i++) {
+ TEST_DATA[i] = (byte) i;
+ }
+ }
private KeyStore mKeyStore = null;
@@ -155,9 +157,9 @@
}
public void testDelete() throws Exception {
- assertTrue(mKeyStore.delete(TEST_KEYNAME));
+ assertFalse(mKeyStore.delete(TEST_KEYNAME));
mKeyStore.password(TEST_PASSWD);
- assertTrue(mKeyStore.delete(TEST_KEYNAME));
+ assertFalse(mKeyStore.delete(TEST_KEYNAME));
mKeyStore.put(TEST_KEYNAME, TEST_KEYVALUE);
assertTrue(Arrays.equals(TEST_KEYVALUE, mKeyStore.get(TEST_KEYNAME)));
diff --git a/libs/hwui/Debug.h b/libs/hwui/Debug.h
index 7d150bb..6795ac3 100644
--- a/libs/hwui/Debug.h
+++ b/libs/hwui/Debug.h
@@ -65,9 +65,6 @@
// Turn on to enable additional debugging in the font renderers
#define DEBUG_FONT_RENDERER 0
-// Force gamma correction in shaders
-#define DEBUG_FONT_RENDERER_FORCE_SHADER_GAMMA 0
-
// Turn on to dump display list state
#define DEBUG_DISPLAY_LIST 0
diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h
index 6b174d6..fb945a8 100644
--- a/libs/hwui/Extensions.h
+++ b/libs/hwui/Extensions.h
@@ -39,9 +39,6 @@
#define EXT_LOGD(...)
#endif
-// Vendor strings
-#define VENDOR_IMG "Imagination Technologies"
-
///////////////////////////////////////////////////////////////////////////////
// Classes
///////////////////////////////////////////////////////////////////////////////
@@ -69,10 +66,6 @@
mHasDebugMarker = hasExtension("GL_EXT_debug_marker");
mHasDebugLabel = hasExtension("GL_EXT_debug_label");
- const char* vendor = (const char*) glGetString(GL_VENDOR);
- EXT_LOGD("Vendor: %s", vendor);
- mNeedsHighpTexCoords = strcmp(vendor, VENDOR_IMG) == 0;
-
// We don't need to copy the string, the OpenGL ES spec
// guarantees the result of glGetString to point to a
// static string as long as our OpenGL context is valid
@@ -81,7 +74,6 @@
inline bool hasNPot() const { return mHasNPot; }
inline bool hasFramebufferFetch() const { return mHasFramebufferFetch; }
- inline bool needsHighpTexCoords() const { return mNeedsHighpTexCoords; }
inline bool hasDiscardFramebuffer() const { return mHasDiscardFramebuffer; }
inline bool hasDebugMarker() const { return mHasDebugMarker; }
inline bool hasDebugLabel() const { return mHasDebugLabel; }
@@ -101,7 +93,6 @@
const char* mExtensions;
bool mHasNPot;
- bool mNeedsHighpTexCoords;
bool mHasFramebufferFetch;
bool mHasDiscardFramebuffer;
bool mHasDebugMarker;
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index ff9c2df..7f0ed73 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -697,8 +697,7 @@
}
CacheTexture* FontRenderer::createCacheTexture(int width, int height, bool allocate) {
- uint8_t* textureMemory = NULL;
- CacheTexture* cacheTexture = new CacheTexture(textureMemory, width, height);
+ CacheTexture* cacheTexture = new CacheTexture(width, height);
if (allocate) {
allocateTextureMemory(cacheTexture);
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index 021cad9..9ed6932 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -61,9 +61,8 @@
class CacheTexture {
public:
- CacheTexture() { }
- CacheTexture(uint8_t* texture, uint16_t width, uint16_t height) :
- mTexture(texture), mTextureId(0), mWidth(width), mHeight(height),
+ CacheTexture(uint16_t width, uint16_t height) :
+ mTexture(NULL), mTextureId(0), mWidth(width), mHeight(height),
mLinearFiltering(false) { }
~CacheTexture() {
if (mTexture) {
diff --git a/libs/hwui/GammaFontRenderer.cpp b/libs/hwui/GammaFontRenderer.cpp
index 226f4bc..bd0a4b3 100644
--- a/libs/hwui/GammaFontRenderer.cpp
+++ b/libs/hwui/GammaFontRenderer.cpp
@@ -42,17 +42,17 @@
GammaFontRenderer* GammaFontRenderer::createRenderer() {
// Choose the best renderer
char property[PROPERTY_VALUE_MAX];
- if (property_get(PROPERTY_TEXT_GAMMA_SHADER, property, DEFAULT_TEXT_GAMMA_SHADER) > 0) {
- if (!strcasecmp(property, "true")) {
- return new ShaderGammaFontRenderer();
+ if (property_get(PROPERTY_TEXT_GAMMA_METHOD, property, DEFAULT_TEXT_GAMMA_METHOD) > 0) {
+ if (!strcasecmp(property, "lookup")) {
+ return new LookupGammaFontRenderer();
+ } else if (!strcasecmp(property, "shader")) {
+ return new ShaderGammaFontRenderer(false);
+ } else if (!strcasecmp(property, "shader3")) {
+ return new ShaderGammaFontRenderer(true);
}
}
-#if DEBUG_FONT_RENDERER_FORCE_SHADER_GAMMA
- return new ShaderGammaFontRenderer();
-#else
- return new LookupGammaFontRenderer();
-#endif
+ return new Lookup3GammaFontRenderer();
}
GammaFontRenderer::GammaFontRenderer() {
@@ -96,20 +96,26 @@
// Shader-based renderer
///////////////////////////////////////////////////////////////////////////////
-ShaderGammaFontRenderer::ShaderGammaFontRenderer(): GammaFontRenderer() {
+ShaderGammaFontRenderer::ShaderGammaFontRenderer(bool multiGamma): GammaFontRenderer() {
INIT_LOGD("Creating shader gamma font renderer");
mRenderer = NULL;
+ mMultiGamma = multiGamma;
}
void ShaderGammaFontRenderer::describe(ProgramDescription& description,
const SkPaint* paint) const {
if (paint->getShader() == NULL) {
- const int l = luminance(paint);
+ if (mMultiGamma) {
+ const int l = luminance(paint);
- if (l <= mBlackThreshold) {
- description.hasGammaCorrection = true;
- description.gamma = mGamma;
- } else if (l >= mWhiteThreshold) {
+ if (l <= mBlackThreshold) {
+ description.hasGammaCorrection = true;
+ description.gamma = mGamma;
+ } else if (l >= mWhiteThreshold) {
+ description.hasGammaCorrection = true;
+ description.gamma = 1.0f / mGamma;
+ }
+ } else {
description.hasGammaCorrection = true;
description.gamma = 1.0f / mGamma;
}
@@ -131,16 +137,32 @@
INIT_LOGD("Creating lookup gamma font renderer");
// Compute the gamma tables
+ const float gamma = 1.0f / mGamma;
+
+ for (uint32_t i = 0; i <= 255; i++) {
+ mGammaTable[i] = uint8_t((float)::floor(pow(i / 255.0f, gamma) * 255.0f + 0.5f));
+ }
+
+ mRenderer = NULL;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Lookup-based renderer, using 3 different correction tables
+///////////////////////////////////////////////////////////////////////////////
+
+Lookup3GammaFontRenderer::Lookup3GammaFontRenderer(): GammaFontRenderer() {
+ INIT_LOGD("Creating lookup3 gamma font renderer");
+
+ // Compute the gamma tables
const float blackGamma = mGamma;
const float whiteGamma = 1.0f / mGamma;
for (uint32_t i = 0; i <= 255; i++) {
- mGammaTable[i] = i;
-
const float v = i / 255.0f;
const float black = pow(v, blackGamma);
const float white = pow(v, whiteGamma);
+ mGammaTable[i] = i;
mGammaTable[256 + i] = uint8_t((float)::floor(black * 255.0f + 0.5f));
mGammaTable[512 + i] = uint8_t((float)::floor(white * 255.0f + 0.5f));
}
@@ -149,20 +171,20 @@
memset(mRenderersUsageCount, 0, sizeof(uint32_t) * kGammaCount);
}
-LookupGammaFontRenderer::~LookupGammaFontRenderer() {
+Lookup3GammaFontRenderer::~Lookup3GammaFontRenderer() {
for (int i = 0; i < kGammaCount; i++) {
delete mRenderers[i];
}
}
-void LookupGammaFontRenderer::clear() {
+void Lookup3GammaFontRenderer::clear() {
for (int i = 0; i < kGammaCount; i++) {
delete mRenderers[i];
mRenderers[i] = NULL;
}
}
-void LookupGammaFontRenderer::flush() {
+void Lookup3GammaFontRenderer::flush() {
int count = 0;
int min = -1;
uint32_t minCount = UINT_MAX;
@@ -190,7 +212,7 @@
}
}
-FontRenderer* LookupGammaFontRenderer::getRenderer(Gamma gamma) {
+FontRenderer* Lookup3GammaFontRenderer::getRenderer(Gamma gamma) {
FontRenderer* renderer = mRenderers[gamma];
if (!renderer) {
renderer = new FontRenderer();
@@ -201,7 +223,7 @@
return renderer;
}
-FontRenderer& LookupGammaFontRenderer::getFontRenderer(const SkPaint* paint) {
+FontRenderer& Lookup3GammaFontRenderer::getFontRenderer(const SkPaint* paint) {
if (paint->getShader() == NULL) {
const int l = luminance(paint);
diff --git a/libs/hwui/GammaFontRenderer.h b/libs/hwui/GammaFontRenderer.h
index 8e1db78..c4a50be 100644
--- a/libs/hwui/GammaFontRenderer.h
+++ b/libs/hwui/GammaFontRenderer.h
@@ -59,6 +59,7 @@
void clear() {
delete mRenderer;
+ mRenderer = NULL;
}
void flush() {
@@ -79,23 +80,71 @@
}
uint32_t getFontRendererSize(uint32_t fontRenderer) const {
- return mRenderer->getCacheSize();
+ return mRenderer ? mRenderer->getCacheSize() : 0;
}
void describe(ProgramDescription& description, const SkPaint* paint) const;
void setupProgram(ProgramDescription& description, Program* program) const;
private:
- ShaderGammaFontRenderer();
+ ShaderGammaFontRenderer(bool multiGamma);
FontRenderer* mRenderer;
+ bool mMultiGamma;
friend class GammaFontRenderer;
};
class LookupGammaFontRenderer: public GammaFontRenderer {
public:
- ~LookupGammaFontRenderer();
+ ~LookupGammaFontRenderer() {
+ delete mRenderer;
+ }
+
+ void clear() {
+ delete mRenderer;
+ }
+
+ void flush() {
+ if (mRenderer) {
+ mRenderer->flushLargeCaches();
+ }
+ }
+
+ FontRenderer& getFontRenderer(const SkPaint* paint) {
+ if (!mRenderer) {
+ mRenderer = new FontRenderer;
+ mRenderer->setGammaTable(&mGammaTable[0]);
+ }
+ return *mRenderer;
+ }
+
+ uint32_t getFontRendererCount() const {
+ return 1;
+ }
+
+ uint32_t getFontRendererSize(uint32_t fontRenderer) const {
+ return mRenderer ? mRenderer->getCacheSize() : 0;
+ }
+
+ void describe(ProgramDescription& description, const SkPaint* paint) const {
+ }
+
+ void setupProgram(ProgramDescription& description, Program* program) const {
+ }
+
+private:
+ LookupGammaFontRenderer();
+
+ FontRenderer* mRenderer;
+ uint8_t mGammaTable[256];
+
+ friend class GammaFontRenderer;
+};
+
+class Lookup3GammaFontRenderer: public GammaFontRenderer {
+public:
+ ~Lookup3GammaFontRenderer();
void clear();
void flush();
@@ -122,7 +171,7 @@
}
private:
- LookupGammaFontRenderer();
+ Lookup3GammaFontRenderer();
enum Gamma {
kGammaDefault = 0,
diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp
index 3678788..c7ab9c5 100644
--- a/libs/hwui/GradientCache.cpp
+++ b/libs/hwui/GradientCache.cpp
@@ -16,8 +16,6 @@
#define LOG_TAG "OpenGLRenderer"
-#include <GLES2/gl2.h>
-
#include <SkCanvas.h>
#include <SkGradientShader.h>
@@ -45,6 +43,8 @@
INIT_LOGD(" Using default gradient cache size of %.2fMB", DEFAULT_GRADIENT_CACHE_SIZE);
}
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
+
mCache.setOnEntryRemovedListener(this);
}
@@ -116,8 +116,11 @@
Texture* GradientCache::addLinearGradient(GradientCacheEntry& gradient,
uint32_t* colors, float* positions, int count, SkShader::TileMode tileMode) {
+ int width = 256 * (count - 1);
+ width = width < mMaxTextureSize ? width : mMaxTextureSize;
+
SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, 1024, 1);
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, 1);
bitmap.allocPixels();
bitmap.eraseColor(0);
diff --git a/libs/hwui/GradientCache.h b/libs/hwui/GradientCache.h
index ac34684..59515a1 100644
--- a/libs/hwui/GradientCache.h
+++ b/libs/hwui/GradientCache.h
@@ -17,6 +17,8 @@
#ifndef ANDROID_HWUI_GRADIENT_CACHE_H
#define ANDROID_HWUI_GRADIENT_CACHE_H
+#include <GLES2/gl2.h>
+
#include <SkShader.h>
#include <utils/Mutex.h>
@@ -152,6 +154,8 @@
uint32_t mSize;
uint32_t mMaxSize;
+ GLint mMaxTextureSize;
+
Vector<SkShader*> mGarbage;
mutable Mutex mLock;
}; // class GradientCache
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index fe056b0..6d781c7 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1783,6 +1783,7 @@
int color, SkXfermode::Mode mode) {
float inverseScaleX = 1.0f;
float inverseScaleY = 1.0f;
+
// The quad that we use needs to account for scaling.
if (CC_UNLIKELY(!mSnapshot->transform->isPureTranslate())) {
Matrix4 *mat = mSnapshot->transform;
@@ -1798,24 +1799,6 @@
inverseScaleY = (scaleY != 0) ? (inverseScaleY / scaleY) : 0;
}
- setupDraw();
- setupDrawNoTexture();
- setupDrawAALine();
- setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha);
- setupDrawColorFilter();
- setupDrawShader();
- setupDrawBlending(true, mode);
- setupDrawProgram();
- setupDrawModelViewIdentity(true);
- setupDrawColorUniforms();
- setupDrawColorFilterUniforms();
- setupDrawShaderIdentityUniforms();
-
- AAVertex rects[4];
- AAVertex* aaVertices = &rects[0];
- void* widthCoords = ((GLbyte*) aaVertices) + gVertexAAWidthOffset;
- void* lengthCoords = ((GLbyte*) aaVertices) + gVertexAALengthOffset;
-
float boundarySizeX = .5 * inverseScaleX;
float boundarySizeY = .5 * inverseScaleY;
@@ -1825,32 +1808,51 @@
top -= boundarySizeY;
bottom += boundarySizeY;
- float width = right - left;
- float height = bottom - top;
-
- int widthSlot;
- int lengthSlot;
-
- float boundaryWidthProportion = (width != 0) ? (2 * boundarySizeX) / width : 0;
- float boundaryHeightProportion = (height != 0) ? (2 * boundarySizeY) / height : 0;
- setupDrawAALine((void*) aaVertices, widthCoords, lengthCoords,
- boundaryWidthProportion, widthSlot, lengthSlot);
-
- int boundaryLengthSlot = mCaches.currentProgram->getUniform("boundaryLength");
- int inverseBoundaryLengthSlot = mCaches.currentProgram->getUniform("inverseBoundaryLength");
- glUniform1f(boundaryLengthSlot, boundaryHeightProportion);
- glUniform1f(inverseBoundaryLengthSlot, (1.0f / boundaryHeightProportion));
-
if (!quickReject(left, top, right, bottom)) {
+ setupDraw();
+ setupDrawNoTexture();
+ setupDrawAALine();
+ setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha);
+ setupDrawColorFilter();
+ setupDrawShader();
+ setupDrawBlending(true, mode);
+ setupDrawProgram();
+ setupDrawModelViewIdentity(true);
+ setupDrawColorUniforms();
+ setupDrawColorFilterUniforms();
+ setupDrawShaderIdentityUniforms();
+
+ AAVertex rects[4];
+ AAVertex* aaVertices = &rects[0];
+ void* widthCoords = ((GLbyte*) aaVertices) + gVertexAAWidthOffset;
+ void* lengthCoords = ((GLbyte*) aaVertices) + gVertexAALengthOffset;
+
+ int widthSlot;
+ int lengthSlot;
+
+ float width = right - left;
+ float height = bottom - top;
+
+ float boundaryWidthProportion = (width != 0) ? (2 * boundarySizeX) / width : 0;
+ float boundaryHeightProportion = (height != 0) ? (2 * boundarySizeY) / height : 0;
+ setupDrawAALine((void*) aaVertices, widthCoords, lengthCoords,
+ boundaryWidthProportion, widthSlot, lengthSlot);
+
+ int boundaryLengthSlot = mCaches.currentProgram->getUniform("boundaryLength");
+ int inverseBoundaryLengthSlot = mCaches.currentProgram->getUniform("inverseBoundaryLength");
+ glUniform1f(boundaryLengthSlot, boundaryHeightProportion);
+ glUniform1f(inverseBoundaryLengthSlot, (1.0f / boundaryHeightProportion));
+
AAVertex::set(aaVertices++, left, bottom, 1, 1);
AAVertex::set(aaVertices++, left, top, 1, 0);
AAVertex::set(aaVertices++, right, bottom, 0, 1);
AAVertex::set(aaVertices++, right, top, 0, 0);
dirtyLayer(left, top, right, bottom, *mSnapshot->transform);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- }
- finishDrawAALine(widthSlot, lengthSlot);
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+
+ finishDrawAALine(widthSlot, lengthSlot);
+ }
}
/**
@@ -1922,6 +1924,9 @@
}
getAlphaAndMode(paint, &alpha, &mode);
+
+ mCaches.enableScissor();
+
setupDraw();
setupDrawNoTexture();
if (isAA) {
@@ -2052,7 +2057,7 @@
const float top = fmin(p1.y, fmin(p2.y, fmin(p3.y, p4.y)));
const float bottom = fmax(p1.y, fmax(p2.y, fmax(p3.y, p4.y)));
- if (!quickReject(left, top, right, bottom)) {
+ if (!quickRejectNoScissor(left, top, right, bottom)) {
if (!isAA) {
if (prevVertex != NULL) {
// Issue two repeat vertices to create degenerate triangles to bridge
@@ -2157,6 +2162,10 @@
TextureVertex pointsData[verticesCount];
TextureVertex* vertex = &pointsData[0];
+ // TODO: We should optimize this method to not generate vertices for points
+ // that lie outside of the clip.
+ mCaches.enableScissor();
+
setupDraw();
setupDrawNoTexture();
setupDrawPoint(strokeWidth);
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index fc60279..70bd1a8 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -65,25 +65,19 @@
const char* gVS_Header_Varyings_IsAA =
"varying float widthProportion;\n"
"varying float lengthProportion;\n";
-const char* gVS_Header_Varyings_HasBitmap[2] = {
- // Default precision
- "varying vec2 outBitmapTexCoords;\n",
- // High precision
- "varying highp vec2 outBitmapTexCoords;\n"
-};
-const char* gVS_Header_Varyings_PointHasBitmap[2] = {
- // Default precision
- "varying vec2 outPointBitmapTexCoords;\n",
- // High precision
- "varying highp vec2 outPointBitmapTexCoords;\n"
-};
+const char* gVS_Header_Varyings_HasBitmap =
+ "varying highp vec2 outBitmapTexCoords;\n";
+const char* gVS_Header_Varyings_PointHasBitmap =
+ "varying highp vec2 outPointBitmapTexCoords;\n";
+// TODO: These values are used to sample from textures,
+// they may need to be highp
const char* gVS_Header_Varyings_HasGradient[3] = {
// Linear
- "varying vec2 linear;\n",
+ "varying highp vec2 linear;\n",
// Circular
- "varying vec2 circular;\n",
+ "varying highp vec2 circular;\n",
// Sweep
- "varying vec2 sweep;\n"
+ "varying highp vec2 sweep;\n"
};
const char* gVS_Main =
"\nvoid main(void) {\n";
@@ -167,7 +161,7 @@
" lowp vec4 fragColor;\n";
const char* gFS_Main_PointBitmapTexCoords =
- " vec2 outBitmapTexCoords = outPointBitmapTexCoords + "
+ " highp vec2 outBitmapTexCoords = outPointBitmapTexCoords + "
"((gl_PointCoord - vec2(0.5, 0.5)) * textureDimension * vec2(pointSize, pointSize));\n";
// Fast cases
@@ -242,10 +236,10 @@
// Linear
" vec4 gradientColor = texture2D(gradientSampler, linear);\n",
// Circular
- " float index = length(circular);\n"
+ " highp float index = length(circular);\n"
" vec4 gradientColor = texture2D(gradientSampler, vec2(index, 0.5));\n",
// Sweep
- " float index = atan(sweep.y, sweep.x) * 0.15915494309; // inv(2 * PI)\n"
+ " highp float index = atan(sweep.y, sweep.x) * 0.15915494309; // inv(2 * PI)\n"
" vec4 gradientColor = texture2D(gradientSampler, vec2(index - floor(index), 0.5));\n"
};
const char* gFS_Main_FetchBitmap =
@@ -439,10 +433,9 @@
shader.append(gVS_Header_Varyings_HasGradient[description.gradientType]);
}
if (description.hasBitmap) {
- int index = Caches::getInstance().extensions.needsHighpTexCoords() ? 1 : 0;
shader.append(description.isPoint ?
- gVS_Header_Varyings_PointHasBitmap[index] :
- gVS_Header_Varyings_HasBitmap[index]);
+ gVS_Header_Varyings_PointHasBitmap :
+ gVS_Header_Varyings_HasBitmap);
}
// Begin the shader
@@ -501,10 +494,9 @@
shader.append(gVS_Header_Varyings_HasGradient[description.gradientType]);
}
if (description.hasBitmap) {
- int index = Caches::getInstance().extensions.needsHighpTexCoords() ? 1 : 0;
shader.append(description.isPoint ?
- gVS_Header_Varyings_PointHasBitmap[index] :
- gVS_Header_Varyings_HasBitmap[index]);
+ gVS_Header_Varyings_PointHasBitmap :
+ gVS_Header_Varyings_HasBitmap);
}
// Uniforms
@@ -704,13 +696,13 @@
}
void ProgramCache::generateTextureWrap(String8& shader, GLenum wrapS, GLenum wrapT) {
- shader.append("\nvec2 wrap(vec2 texCoords) {\n");
+ shader.append("\nhighp vec2 wrap(highp vec2 texCoords) {\n");
if (wrapS == GL_MIRRORED_REPEAT) {
- shader.append(" float xMod2 = mod(texCoords.x, 2.0);\n");
+ shader.append(" highp float xMod2 = mod(texCoords.x, 2.0);\n");
shader.append(" if (xMod2 > 1.0) xMod2 = 2.0 - xMod2;\n");
}
if (wrapT == GL_MIRRORED_REPEAT) {
- shader.append(" float yMod2 = mod(texCoords.y, 2.0);\n");
+ shader.append(" highp float yMod2 = mod(texCoords.y, 2.0);\n");
shader.append(" if (yMod2 > 1.0) yMod2 = 2.0 - yMod2;\n");
}
shader.append(" return vec2(");
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 4a12e39..3f3b39a 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -74,13 +74,29 @@
#define PROPERTY_TEXT_CACHE_HEIGHT "ro.hwui.text_cache_height"
// Indicates whether gamma correction should be applied in the shaders
-// or in lookup tables. Accepted values: true, false
-#define PROPERTY_TEXT_GAMMA_SHADER "ro.hwui.text_gamma_shader"
+// or in lookup tables. Accepted values:
+//
+// - "lookup3", correction based on lookup tables. Gamma correction
+// is different for black and white text (see thresholds below)
+//
+// - "lookup", correction based on a single lookup table
+//
+// - "shader3", correction applied by a GLSL shader. Gamma correction
+// is different for black and white text (see thresholds below)
+//
+// - "shader", correction applied by a GLSL shader
+//
+// See PROPERTY_TEXT_GAMMA, PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD and
+// PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD for more control.
+#define PROPERTY_TEXT_GAMMA_METHOD "hwui.text_gamma_correction"
+#define DEFAULT_TEXT_GAMMA_METHOD "lookup"
// Gamma (>= 1.0, <= 10.0)
-#define PROPERTY_TEXT_GAMMA "ro.text_gamma"
-#define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "ro.text_gamma.black_threshold"
-#define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "ro.text_gamma.white_threshold"
+#define PROPERTY_TEXT_GAMMA "hwui.text_gamma"
+// Luminance threshold below which black gamma correction is applied. Range: [0..255]
+#define PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD "hwui.text_gamma.black_threshold"
+// Lumincance threshold above which white gamma correction is applied. Range: [0..255]
+#define PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD "hwui.text_gamma.white_threshold"
// Converts a number of mega-bytes into bytes
#define MB(s) s * 1024 * 1024
@@ -96,8 +112,6 @@
#define DEFAULT_TEXTURE_CACHE_FLUSH_RATE 0.6f
-#define DEFAULT_TEXT_GAMMA_SHADER "false"
-
#define DEFAULT_TEXT_GAMMA 1.4f
#define DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD 64
#define DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD 192
diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp
index cf5f822..2153a8b 100644
--- a/libs/hwui/ResourceCache.cpp
+++ b/libs/hwui/ResourceCache.cpp
@@ -48,7 +48,8 @@
void ResourceCache::incrementRefcount(void* resource, ResourceType resourceType) {
Mutex::Autolock _l(mLock);
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ssize_t index = mCache->indexOfKey(resource);
+ ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
if (ref == NULL || mCache->size() == 0) {
ref = new ResourceReference(resourceType);
mCache->add(resource, ref);
@@ -78,7 +79,8 @@
void ResourceCache::decrementRefcount(void* resource) {
Mutex::Autolock _l(mLock);
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ssize_t index = mCache->indexOfKey(resource);
+ ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
if (ref == NULL) {
// Should not get here - shouldn't get a call to decrement if we're not yet tracking it
return;
@@ -111,12 +113,13 @@
void ResourceCache::recycle(SkBitmap* resource) {
Mutex::Autolock _l(mLock);
- if (mCache->indexOfKey(resource) < 0) {
+ ssize_t index = mCache->indexOfKey(resource);
+ if (index < 0) {
// not tracking this resource; just recycle the pixel data
resource->setPixels(NULL, NULL);
return;
}
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ResourceReference* ref = mCache->valueAt(index);
if (ref == NULL) {
// Should not get here - shouldn't get a call to recycle if we're not yet tracking it
return;
@@ -129,7 +132,8 @@
void ResourceCache::destructor(SkPath* resource) {
Mutex::Autolock _l(mLock);
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ssize_t index = mCache->indexOfKey(resource);
+ ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
if (ref == NULL) {
// If we're not tracking this resource, just delete it
if (Caches::hasInstance()) {
@@ -146,7 +150,8 @@
void ResourceCache::destructor(SkBitmap* resource) {
Mutex::Autolock _l(mLock);
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ssize_t index = mCache->indexOfKey(resource);
+ ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
if (ref == NULL) {
// If we're not tracking this resource, just delete it
if (Caches::hasInstance()) {
@@ -163,7 +168,8 @@
void ResourceCache::destructor(SkiaShader* resource) {
Mutex::Autolock _l(mLock);
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ssize_t index = mCache->indexOfKey(resource);
+ ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
if (ref == NULL) {
// If we're not tracking this resource, just delete it
delete resource;
@@ -177,7 +183,8 @@
void ResourceCache::destructor(SkiaColorFilter* resource) {
Mutex::Autolock _l(mLock);
- ResourceReference* ref = mCache->indexOfKey(resource) >= 0 ? mCache->valueFor(resource) : NULL;
+ ssize_t index = mCache->indexOfKey(resource);
+ ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL;
if (ref == NULL) {
// If we're not tracking this resource, just delete it
delete resource;
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index aacf857..5ad60ab 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -19,6 +19,7 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.SystemClock;
import android.util.Printer;
import java.text.DecimalFormat;
@@ -59,6 +60,7 @@
private String mProvider;
private long mTime = 0;
+ private long mElapsedRealtimeNano = 0;
private double mLatitude = 0.0;
private double mLongitude = 0.0;
private boolean mHasAltitude = false;
@@ -84,6 +86,7 @@
public void dump(Printer pw, String prefix) {
pw.println(prefix + "mProvider=" + mProvider + " mTime=" + mTime);
+ pw.println(prefix + "mElapsedRealtimeNano=" + mElapsedRealtimeNano);
pw.println(prefix + "mLatitude=" + mLatitude + " mLongitude=" + mLongitude);
pw.println(prefix + "mHasAltitude=" + mHasAltitude + " mAltitude=" + mAltitude);
pw.println(prefix + "mHasSpeed=" + mHasSpeed + " mSpeed=" + mSpeed);
@@ -118,6 +121,7 @@
public void set(Location l) {
mProvider = l.mProvider;
mTime = l.mTime;
+ mElapsedRealtimeNano = l.mElapsedRealtimeNano;
mLatitude = l.mLatitude;
mLongitude = l.mLongitude;
mHasAltitude = l.mHasAltitude;
@@ -137,6 +141,7 @@
public void reset() {
mProvider = null;
mTime = 0;
+ mElapsedRealtimeNano = 0;
mLatitude = 0;
mLongitude = 0;
mHasAltitude = false;
@@ -467,23 +472,62 @@
}
/**
- * Returns the UTC time of this fix, in milliseconds since January 1,
+ * Return the UTC time of this fix, in milliseconds since January 1,
* 1970.
+ * <p>Note that the UTC time on a device is not monotonic: it
+ * can jump forwards or backwards unpredictably. So always use
+ * {@link #getElapsedRealtimeNano()} when calculating time deltas.
+ * <p>On the other hand, {@link #getTime()} is useful for presenting
+ * a human readable time to the user, or for carefully comparing
+ * location fixes across reboot or across devices.
+ * <p>This method will always return a valid timestamp on
+ * Locations generated by a {@link LocationProvider}.
+ *
+ * @return time of fix, in milliseconds since January 1, 1970.
*/
public long getTime() {
return mTime;
}
/**
- * Sets the UTC time of this fix, in milliseconds since January 1,
+ * Set the UTC time of this fix, in milliseconds since January 1,
* 1970.
+ *
+ * @param time UTC time of this fix, in milliseconds since January 1, 1970
*/
public void setTime(long time) {
mTime = time;
}
/**
- * Returns the latitude of this fix.
+ * Return the time of this fix, in elapsed real-time since system boot.
+ * <p>This value can be reliably compared to
+ * {@link android.os.SystemClock#elapsedRealtimeNano()},
+ * to calculate the age of a fix, and to compare Location fixes, since
+ * elapsed real-time is guaranteed monotonic for each system boot, and
+ * continues to increment even when the system is in deep sleep.
+ * <p>This method will always return a valid timestamp on
+ * Locations generated by a {@link LocationProvider}.
+ *
+ * @return elapsed real-time of fix, in nanoseconds since system boot.
+ */
+ public long getElapsedRealtimeNano() {
+ return mElapsedRealtimeNano;
+ }
+
+ /**
+ * Set the time of this fix, in elapsed real-time since system boot.
+ *
+ * @param time elapsed real-time of fix, in nanoseconds since system boot.
+ */
+ public void setElapsedRealtimeNano(long time) {
+ mElapsedRealtimeNano = time;
+ }
+
+ /**
+ * Return the latitude of this fix.
+ * <p>This method will always return a valid latitude on
+ * Locations generated by a {@link LocationProvider}.
*/
public double getLatitude() {
return mLatitude;
@@ -497,7 +541,9 @@
}
/**
- * Returns the longitude of this fix.
+ * Return the longitude of this fix.
+ * <p>This method will always return a valid longitude on
+ * Locations generated by a {@link LocationProvider}.
*/
public double getLongitude() {
return mLongitude;
@@ -619,16 +665,27 @@
}
/**
- * Returns true if the provider is able to report accuracy information,
- * false otherwise. The default implementation returns false.
+ * Return true if this Location has an associated accuracy.
+ * <p>All Location objects generated by a {@link LocationProvider}
+ * will have an accuracy.
*/
public boolean hasAccuracy() {
return mHasAccuracy;
}
/**
- * Returns the accuracy of the fix in meters. If hasAccuracy() is false,
- * 0.0 is returned.
+ * Return the accuracy of this Location fix.
+ * <p>Accuracy is measured in meters, and indicates the
+ * radius of 95% confidence.
+ * In other words, there is a 95% probability that the
+ * true location is within a circle centered at the reported
+ * location, with radius of the reported accuracy.
+ * <p>This is only a measure of horizontal accuracy, and does
+ * not indicate the accuracy of bearing, velocity or altitude
+ * if those are included in this Location.
+ * <p>If {@link #hasAccuracy} is false, 0.0 is returned.
+ * <p>All Location object generated by a {@link LocationProvider}
+ * will have a valid accuracy.
*/
public float getAccuracy() {
return mAccuracy;
@@ -653,6 +710,37 @@
}
/**
+ * Return true if this Location object has enough data set to
+ * be considered a valid fix from a {@link LocationProvider}.
+ * @see #makeComplete
+ * @hide
+ */
+ public boolean isComplete() {
+ if (mProvider == null) return false;
+ if (!mHasAccuracy) return false;
+ if (mTime == 0) return false;
+ if (mElapsedRealtimeNano == 0) return false;
+ return true;
+ }
+
+ /**
+ * Helper to fill in incomplete fields.
+ * Only use this to assist in backwards compatibility
+ * with Location objects received from applications.
+ * @see #isComplete
+ * @hide
+ */
+ public void makeComplete() {
+ if (mProvider == null) mProvider = "?";
+ if (!mHasAccuracy) {
+ mHasAccuracy = true;
+ mAccuracy = 100.0f;
+ }
+ if (mTime == 0) mTime = System.currentTimeMillis();
+ if (mElapsedRealtimeNano == 0) mElapsedRealtimeNano = SystemClock.elapsedRealtimeNano();
+ }
+
+ /**
* Returns additional provider-specific information about the
* location fix as a Bundle. The keys and values are determined
* by the provider. If no additional information is available,
@@ -681,6 +769,7 @@
@Override public String toString() {
return "Location[mProvider=" + mProvider +
",mTime=" + mTime +
+ ",mElapsedRealtimeNano=" + mElapsedRealtimeNano +
",mLatitude=" + mLatitude +
",mLongitude=" + mLongitude +
",mHasAltitude=" + mHasAltitude +
@@ -700,6 +789,7 @@
String provider = in.readString();
Location l = new Location(provider);
l.mTime = in.readLong();
+ l.mElapsedRealtimeNano = in.readLong();
l.mLatitude = in.readDouble();
l.mLongitude = in.readDouble();
l.mHasAltitude = in.readInt() != 0;
@@ -726,6 +816,7 @@
public void writeToParcel(Parcel parcel, int flags) {
parcel.writeString(mProvider);
parcel.writeLong(mTime);
+ parcel.writeLong(mElapsedRealtimeNano);
parcel.writeDouble(mLatitude);
parcel.writeDouble(mLongitude);
parcel.writeInt(mHasAltitude ? 1 : 0);
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index ff74f41..15a2928 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -19,11 +19,13 @@
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
+import android.os.Build;
import android.os.Bundle;
import android.os.Looper;
import android.os.RemoteException;
import android.os.Handler;
import android.os.Message;
+import android.os.SystemClock;
import android.util.Log;
import com.android.internal.location.DummyLocationProvider;
@@ -1220,8 +1222,11 @@
}
/**
- * Sets a mock location for the given provider. This location will be used in place
- * of any actual location from the provider.
+ * Sets a mock location for the given provider.
+ * <p>This location will be used in place of any actual location from the provider.
+ * The location object must have a minimum number of fields set to be
+ * considered a valid LocationProvider Location, as per documentation
+ * on {@link Location} class.
*
* @param provider the provider name
* @param loc the mock location
@@ -1230,8 +1235,20 @@
* or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
* Settings.Secure.ALLOW_MOCK_LOCATION}} system setting is not enabled
* @throws IllegalArgumentException if no provider with the given name exists
+ * @throws IllegalArgumentException if the location is incomplete
*/
public void setTestProviderLocation(String provider, Location loc) {
+ if (!loc.isComplete()) {
+ if (mContext.getApplicationInfo().targetSdkVersion <= Build.VERSION_CODES.JELLY_BEAN) {
+ // for backwards compatibility, allow mock locations that are incomplete
+ Log.w(TAG, "Incomplete Location object", new Throwable());
+ loc.makeComplete();
+ } else {
+ throw new IllegalArgumentException(
+ "Location object not complete. Missing timestamps or accuracy?");
+ }
+ }
+
try {
mService.setTestProviderLocation(provider, loc);
} catch (RemoteException ex) {
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index e76d25a..870a4a9 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -2026,6 +2026,7 @@
if (msg.obj instanceof Parcel) {
Parcel parcel = (Parcel)msg.obj;
TimedText text = new TimedText(parcel);
+ parcel.recycle();
mOnTimedTextListener.onTimedText(mMediaPlayer, text);
}
}
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index de22e09..c2a6889 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -72,7 +72,6 @@
JNIMediaPlayerListener();
jclass mClass; // Reference to MediaPlayer class
jobject mObject; // Weak ref to MediaPlayer Java object to call on
- jobject mParcel;
};
JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz)
@@ -91,7 +90,6 @@
// We use a weak reference so the MediaPlayer object can be garbage collected.
// The reference is only used as a proxy for callbacks.
mObject = env->NewGlobalRef(weak_thiz);
- mParcel = env->NewGlobalRef(createJavaParcelObject(env));
}
JNIMediaPlayerListener::~JNIMediaPlayerListener()
@@ -100,20 +98,18 @@
JNIEnv *env = AndroidRuntime::getJNIEnv();
env->DeleteGlobalRef(mObject);
env->DeleteGlobalRef(mClass);
-
- recycleJavaParcelObject(env, mParcel);
- env->DeleteGlobalRef(mParcel);
}
void JNIMediaPlayerListener::notify(int msg, int ext1, int ext2, const Parcel *obj)
{
JNIEnv *env = AndroidRuntime::getJNIEnv();
if (obj && obj->dataSize() > 0) {
- if (mParcel != NULL) {
- Parcel* nativeParcel = parcelForJavaObject(env, mParcel);
+ jobject jParcel = createJavaParcelObject(env);
+ if (jParcel != NULL) {
+ Parcel* nativeParcel = parcelForJavaObject(env, jParcel);
nativeParcel->setData(obj->data(), obj->dataSize());
env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
- msg, ext1, ext2, mParcel);
+ msg, ext1, ext2, jParcel);
}
} else {
env->CallStaticVoidMethod(mClass, fields.post_event, mObject,
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java
index 31fc04a..4cdc272 100644
--- a/opengl/java/android/opengl/EGL14.java
+++ b/opengl/java/android/opengl/EGL14.java
@@ -24,10 +24,10 @@
import android.view.SurfaceView;
import android.view.SurfaceHolder;
-
/**
-* @hide
-*/
+ * EGL 1.4
+ *
+ */
public class EGL14 {
public static final int EGL_DEFAULT_DISPLAY = 0;
@@ -150,18 +150,18 @@
static {
_nativeClassInit();
}
- /* @hide C function EGLint eglGetError ( void ) */
+ // C function EGLint eglGetError ( void )
public static native int eglGetError(
);
- /* @hide C function EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
+ // 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 ) */
+ // C function EGLBoolean eglInitialize ( EGLDisplay dpy, EGLint *major, EGLint *minor )
public static native boolean eglInitialize(
EGLDisplay dpy,
@@ -171,7 +171,7 @@
int minorOffset
);
- /* @hide C function EGLBoolean eglTerminate ( EGLDisplay dpy ) */
+ // C function EGLBoolean eglTerminate ( EGLDisplay dpy )
public static native boolean eglTerminate(
EGLDisplay dpy
@@ -183,7 +183,7 @@
EGLDisplay dpy,
int name
);
- /* @hide C function EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+ // C function EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config )
public static native boolean eglGetConfigs(
EGLDisplay dpy,
@@ -194,7 +194,7 @@
int num_configOffset
);
- /* @hide C function EGLBoolean eglChooseConfig ( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+ // 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,
@@ -207,7 +207,7 @@
int num_configOffset
);
- /* @hide C function EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value ) */
+ // C function EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value )
public static native boolean eglGetConfigAttrib(
EGLDisplay dpy,
@@ -265,7 +265,7 @@
return surface;
}
- /* @hide C function EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list ) */
+ // C function EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list )
public static native EGLSurface eglCreatePbufferSurface(
EGLDisplay dpy,
@@ -274,7 +274,7 @@
int offset
);
- /* @hide C function EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) */
+ // C function EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list )
public static native EGLSurface eglCreatePixmapSurface(
EGLDisplay dpy,
@@ -284,14 +284,14 @@
int offset
);
- /* @hide C function EGLBoolean eglDestroySurface ( EGLDisplay dpy, EGLSurface surface ) */
+ // 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 ) */
+ // C function EGLBoolean eglQuerySurface ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value )
public static native boolean eglQuerySurface(
EGLDisplay dpy,
@@ -301,28 +301,28 @@
int offset
);
- /* @hide C function EGLBoolean eglBindAPI ( EGLenum api ) */
+ // C function EGLBoolean eglBindAPI ( EGLenum api )
public static native boolean eglBindAPI(
int api
);
- /* @hide C function EGLenum eglQueryAPI ( void ) */
+ // C function EGLenum eglQueryAPI ( void )
public static native int eglQueryAPI(
);
- /* @hide C function EGLBoolean eglWaitClient ( void ) */
+ // C function EGLBoolean eglWaitClient ( void )
public static native boolean eglWaitClient(
);
- /* @hide C function EGLBoolean eglReleaseThread ( void ) */
+ // 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 ) */
+ // C function EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list )
public static native EGLSurface eglCreatePbufferFromClientBuffer(
EGLDisplay dpy,
@@ -333,7 +333,7 @@
int offset
);
- /* @hide C function EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value ) */
+ // C function EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value )
public static native boolean eglSurfaceAttrib(
EGLDisplay dpy,
@@ -342,7 +342,7 @@
int value
);
- /* @hide C function EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+ // C function EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer )
public static native boolean eglBindTexImage(
EGLDisplay dpy,
@@ -350,7 +350,7 @@
int buffer
);
- /* @hide C function EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+ // C function EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer )
public static native boolean eglReleaseTexImage(
EGLDisplay dpy,
@@ -358,14 +358,14 @@
int buffer
);
- /* @hide C function EGLBoolean eglSwapInterval ( EGLDisplay dpy, EGLint interval ) */
+ // 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 ) */
+ // C function EGLContext eglCreateContext ( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list )
public static native EGLContext eglCreateContext(
EGLDisplay dpy,
@@ -375,14 +375,14 @@
int offset
);
- /* @hide C function EGLBoolean eglDestroyContext ( EGLDisplay dpy, EGLContext ctx ) */
+ // 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 ) */
+ // C function EGLBoolean eglMakeCurrent ( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx )
public static native boolean eglMakeCurrent(
EGLDisplay dpy,
@@ -391,23 +391,23 @@
EGLContext ctx
);
- /* @hide C function EGLContext eglGetCurrentContext ( void ) */
+ // C function EGLContext eglGetCurrentContext ( void )
public static native EGLContext eglGetCurrentContext(
);
- /* @hide C function EGLSurface eglGetCurrentSurface ( EGLint readdraw ) */
+ // C function EGLSurface eglGetCurrentSurface ( EGLint readdraw )
public static native EGLSurface eglGetCurrentSurface(
int readdraw
);
- /* @hide C function EGLDisplay eglGetCurrentDisplay ( void ) */
+ // C function EGLDisplay eglGetCurrentDisplay ( void )
public static native EGLDisplay eglGetCurrentDisplay(
);
- /* @hide C function EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value ) */
+ // C function EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value )
public static native boolean eglQueryContext(
EGLDisplay dpy,
@@ -417,25 +417,25 @@
int offset
);
- /* @hide C function EGLBoolean eglWaitGL ( void ) */
+ // C function EGLBoolean eglWaitGL ( void )
public static native boolean eglWaitGL(
);
- /* @hide C function EGLBoolean eglWaitNative ( EGLint engine ) */
+ // C function EGLBoolean eglWaitNative ( EGLint engine )
public static native boolean eglWaitNative(
int engine
);
- /* @hide C function EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface ) */
+ // 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 ) */
+ // C function EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target )
public static native boolean eglCopyBuffers(
EGLDisplay dpy,
diff --git a/opengl/java/android/opengl/EGLConfig.java b/opengl/java/android/opengl/EGLConfig.java
index d9aebfc..d457c9f 100644
--- a/opengl/java/android/opengl/EGLConfig.java
+++ b/opengl/java/android/opengl/EGLConfig.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLConfig objects.
+ *
*/
public class EGLConfig extends EGLObjectHandle {
- public EGLConfig(int handle) {
+ private EGLConfig(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@
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
index 7b194f3..41b8ef1 100644
--- a/opengl/java/android/opengl/EGLContext.java
+++ b/opengl/java/android/opengl/EGLContext.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLContext objects.
+ *
*/
public class EGLContext extends EGLObjectHandle {
- public EGLContext(int handle) {
+ private EGLContext(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@
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
index a090cf0..17d1a64 100644
--- a/opengl/java/android/opengl/EGLDisplay.java
+++ b/opengl/java/android/opengl/EGLDisplay.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLDisplay objects.
+ *
*/
public class EGLDisplay extends EGLObjectHandle {
- public EGLDisplay(int handle) {
+ private EGLDisplay(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@
EGLDisplay that = (EGLDisplay) o;
return getHandle() == that.getHandle();
}
-
- @Override
- public int hashCode() {
- return getHandle();
- }
}
diff --git a/opengl/java/android/opengl/EGLObjectHandle.java b/opengl/java/android/opengl/EGLObjectHandle.java
index 01f9bd4..d2710de 100644
--- a/opengl/java/android/opengl/EGLObjectHandle.java
+++ b/opengl/java/android/opengl/EGLObjectHandle.java
@@ -18,16 +18,30 @@
package android.opengl;
/**
- * @hide
+ * Base class for wrapped EGL objects.
+ *
*/
public abstract class EGLObjectHandle {
private final int mHandle;
- public EGLObjectHandle(int handle) {
+ protected EGLObjectHandle(int handle) {
mHandle = handle;
}
+ /**
+ * Returns the native handle of the wrapped EGL object. This handle can be
+ * cast to the corresponding native type on the native side.
+ *
+ * For example, EGLDisplay dpy = (EGLDisplay)handle;
+ *
+ * @return the native handle of the wrapped EGL object.
+ */
public int getHandle() {
return mHandle;
}
+
+ @Override
+ public int hashCode() {
+ return getHandle();
+ }
}
diff --git a/opengl/java/android/opengl/EGLSurface.java b/opengl/java/android/opengl/EGLSurface.java
index 4800a64..65bec4f 100644
--- a/opengl/java/android/opengl/EGLSurface.java
+++ b/opengl/java/android/opengl/EGLSurface.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLSurface objects.
+ *
*/
public class EGLSurface extends EGLObjectHandle {
- public EGLSurface(int handle) {
+ private EGLSurface(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@
EGLSurface that = (EGLSurface) o;
return getHandle() == that.getHandle();
}
-
- @Override
- public int hashCode() {
- return getHandle();
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 0bdf84a..cb69660 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -21,6 +21,7 @@
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.ActivityOptions;
+import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -845,8 +846,9 @@
private void startApplicationDetailsActivity(String packageName) {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.fromParts("package", packageName, null));
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- getContext().startActivity(intent);
+ intent.setComponent(intent.resolveActivity(mContext.getPackageManager()));
+ TaskStackBuilder.create(getContext())
+ .addNextIntentWithParentStack(intent).startActivities();
}
public boolean onInterceptTouchEvent(MotionEvent ev) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index bd8be1f..b392648 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -16,9 +16,24 @@
package com.android.systemui.statusbar;
+import com.android.internal.statusbar.IStatusBarService;
+import com.android.internal.statusbar.StatusBarIcon;
+import com.android.internal.statusbar.StatusBarIconList;
+import com.android.internal.statusbar.StatusBarNotification;
+import com.android.internal.widget.SizeAdaptiveLayout;
+import com.android.systemui.R;
+import com.android.systemui.SearchPanelView;
+import com.android.systemui.SystemUI;
+import com.android.systemui.recent.RecentTasksLoader;
+import com.android.systemui.recent.RecentsPanelView;
+import com.android.systemui.recent.TaskDescription;
+import com.android.systemui.statusbar.policy.NotificationRowLayout;
+import com.android.systemui.statusbar.tablet.StatusBarPanel;
+
import android.app.ActivityManagerNative;
import android.app.KeyguardManager;
import android.app.PendingIntent;
+import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
@@ -51,22 +66,6 @@
import android.widget.PopupMenu;
import android.widget.RemoteViews;
-import com.android.internal.statusbar.IStatusBarService;
-import com.android.internal.statusbar.StatusBarIcon;
-import com.android.internal.statusbar.StatusBarIconList;
-import com.android.internal.statusbar.StatusBarNotification;
-import com.android.internal.widget.SizeAdaptiveLayout;
-import com.android.systemui.R;
-import com.android.systemui.SearchPanelView;
-import com.android.systemui.SystemUI;
-import com.android.systemui.recent.RecentTasksLoader;
-import com.android.systemui.recent.RecentsPanelView;
-import com.android.systemui.recent.TaskDescription;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.NotificationData.Entry;
-import com.android.systemui.statusbar.policy.NotificationRowLayout;
-import com.android.systemui.statusbar.tablet.StatusBarPanel;
-
import java.util.ArrayList;
public abstract class BaseStatusBar extends SystemUI implements
@@ -299,8 +298,8 @@
private void startApplicationDetailsActivity(String packageName) {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.fromParts("package", packageName, null));
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- mContext.startActivity(intent);
+ intent.setComponent(intent.resolveActivity(mContext.getPackageManager()));
+ TaskStackBuilder.create(mContext).addNextIntentWithParentStack(intent).startActivities();
}
protected View.OnLongClickListener getNotificationLongClicker() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index ffe3db2..460619c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1215,6 +1215,7 @@
+ " mExpandedVisible=" + mExpandedVisible
+ " mExpanded=" + mExpanded
+ " mAnimating=" + mAnimating
+ + " mAnimatingReveal=" + mAnimatingReveal
+ " mAnimY=" + mAnimY
+ " mAnimVel=" + mAnimVel
+ " flags=" + flags);
@@ -1235,7 +1236,7 @@
}
int y;
- if (mAnimating) {
+ if (mAnimating || mAnimatingReveal) {
y = (int)mAnimY;
} else {
y = getExpandedViewMaxHeight()-1;
@@ -1270,6 +1271,10 @@
if (!mExpandedVisible) {
return;
}
+
+ // Ensure the panel is fully collapsed (just in case; bug 6765842)
+ updateExpandedViewPos(0);
+
mExpandedVisible = false;
mPile.setLayoutTransitionsEnabled(false);
if (mNavigationBarView != null)
@@ -1992,9 +1997,14 @@
@Override
protected void updateExpandedViewPos(int expandedPosition) {
if (SPEW) {
- Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
+ Slog.d(TAG, "updateExpandedViewPos: expandedPosition=" + expandedPosition
//+ " mTrackingParams.y=" + ((mTrackingParams == null) ? "?" : mTrackingParams.y)
+ + " mTracking=" + mTracking
+ " mTrackingPosition=" + mTrackingPosition
+ + " mExpandedVisible=" + mExpandedVisible
+ + " mAnimating=" + mAnimating
+ + " mAnimatingReveal=" + mAnimatingReveal
+ + " mClosing=" + mClosing
+ " gravity=" + mNotificationPanelGravity);
}
int panelh = 0;
@@ -2003,6 +2013,7 @@
// If the expanded view is not visible, make sure they're still off screen.
// Maybe the view was resized.
if (!mExpandedVisible) {
+ if (SPEW) Slog.d(TAG, "updateExpandedViewPos: view not visible, bailing");
updateExpandedInvisiblePosition();
return;
}
@@ -2023,13 +2034,21 @@
}
// catch orientation changes and other peculiar cases
- if (panelh > disph || (panelh < disph && !mTracking && !mAnimating)) {
+ if (panelh > 0 &&
+ ((panelh > disph) ||
+ (panelh < disph && !mTracking && !mAnimating))) {
+ if (SPEW) Slog.d(TAG, "updateExpandedViewPos: orientation change?");
panelh = disph;
} else if (panelh < 0) {
panelh = 0;
}
- if (panelh == mTrackingPosition) return;
+ if (SPEW) Slog.d(TAG, "updateExpandedViewPos: adjusting size to panelh=" + panelh);
+
+ if (panelh == mTrackingPosition) {
+ if (SPEW) Slog.d(TAG, "updateExpandedViewPos: panelh == mTrackingPosition, bailing");
+ return;
+ }
mTrackingPosition = panelh;
@@ -2186,8 +2205,7 @@
private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
- || Intent.ACTION_SCREEN_OFF.equals(action)) {
+ if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
int flags = CommandQueue.FLAG_EXCLUDE_NONE;
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
String reason = intent.getStringExtra("reason");
@@ -2197,6 +2215,10 @@
}
animateCollapse(flags);
}
+ else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
+ // no waiting!
+ performCollapse();
+ }
else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
updateResources();
repositionNavigationBar();
diff --git a/packages/VpnDialogs/res/values-fa/strings.xml b/packages/VpnDialogs/res/values-fa/strings.xml
index 7bd5590..ec163af 100644
--- a/packages/VpnDialogs/res/values-fa/strings.xml
+++ b/packages/VpnDialogs/res/values-fa/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> تلاش میکند یک اتصال VPN ایجاد کند."</string>
- <string name="warning" msgid="5470743576660160079">"با ادامه دادن، به برنامه کاربردی اجازه میدهید تمام ترافیک شبکه را رهگیری کند. "<b>"تا به برنامه اعتماد نکردید آن را قبول نکنید."</b>" در غیر این صورت، این ریسک را قبول میکنید که دادههای شما توسط یک نرمافزار مخرب به خطر بیفتد."</string>
+ <string name="warning" msgid="5470743576660160079">"با ادامه دادن، به برنامهٔ کاربردی اجازه میدهید تمام ترافیک شبکه را رهگیری کند. "<b>"تا به برنامه اعتماد نکردید آن را قبول نکنید."</b>" در غیر این صورت، این ریسک را قبول میکنید که دادههای شما توسط یک نرمافزار مخرب به خطر بیفتد."</string>
<string name="accept" msgid="2889226408765810173">"من به این برنامه اعتماد دارم."</string>
<string name="legacy_title" msgid="192936250066580964">"VPN متصل است"</string>
<string name="configure" msgid="4905518375574791375">"پیکربندی"</string>
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 06b056d..1498a11 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -1532,6 +1532,11 @@
throw new SecurityException("Requires INSTALL_LOCATION_PROVIDER permission");
}
+ if (!location.isComplete()) {
+ Log.w(TAG, "Dropping incomplete location: " + location);
+ return;
+ }
+
mLocationHandler.removeMessages(MESSAGE_LOCATION_CHANGED, location);
Message m = Message.obtain(mLocationHandler, MESSAGE_LOCATION_CHANGED, location);
m.arg1 = (passive ? 1 : 0);
@@ -1588,7 +1593,8 @@
// Check whether sufficient time has passed
long minTime = record.mMinTime;
- if (loc.getTime() - lastLoc.getTime() < minTime - MAX_PROVIDER_SCHEDULING_JITTER) {
+ long delta = (loc.getElapsedRealtimeNano() - lastLoc.getElapsedRealtimeNano()) / 1000000L;
+ if (delta < minTime - MAX_PROVIDER_SCHEDULING_JITTER) {
return false;
}
diff --git a/services/java/com/android/server/UiModeManagerService.java b/services/java/com/android/server/UiModeManagerService.java
index d1f92a7..5299b71 100644
--- a/services/java/com/android/server/UiModeManagerService.java
+++ b/services/java/com/android/server/UiModeManagerService.java
@@ -308,7 +308,7 @@
/* if new location is older than the current one, the devices hasn't
* moved.
*/
- if (location.getTime() < mLocation.getTime()) {
+ if (location.getElapsedRealtimeNano() < mLocation.getElapsedRealtimeNano()) {
return false;
}
@@ -764,7 +764,8 @@
mLocationManager.getLastKnownLocation(providers.next());
// pick the most recent location
if (location == null || (lastKnownLocation != null &&
- location.getTime() < lastKnownLocation.getTime())) {
+ location.getElapsedRealtimeNano() <
+ lastKnownLocation.getElapsedRealtimeNano())) {
location = lastKnownLocation;
}
}
@@ -781,6 +782,7 @@
location.setLatitude(0);
location.setAccuracy(417000.0f);
location.setTime(System.currentTimeMillis());
+ location.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNano());
}
synchronized (mLock) {
mLocation = location;
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
index 4ad6140..8e75d94 100755
--- a/services/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
@@ -1078,6 +1078,9 @@
mLocation.setLatitude(latitude);
mLocation.setLongitude(longitude);
mLocation.setTime(timestamp);
+ // It would be nice to push the elapsed real-time timestamp
+ // further down the stack, but this is still useful
+ mLocation.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNano());
}
if ((flags & LOCATION_HAS_ALTITUDE) == LOCATION_HAS_ALTITUDE) {
mLocation.setAltitude(altitude);
diff --git a/services/java/com/android/server/location/LocationBasedCountryDetector.java b/services/java/com/android/server/location/LocationBasedCountryDetector.java
index d4fb8ee..38871d7 100755
--- a/services/java/com/android/server/location/LocationBasedCountryDetector.java
+++ b/services/java/com/android/server/location/LocationBasedCountryDetector.java
@@ -114,7 +114,9 @@
for (String provider : providers) {
Location lastKnownLocation = mLocationManager.getLastKnownLocation(provider);
if (lastKnownLocation != null) {
- if (bestLocation == null || bestLocation.getTime() < lastKnownLocation.getTime()) {
+ if (bestLocation == null ||
+ bestLocation.getElapsedRealtimeNano() <
+ lastKnownLocation.getElapsedRealtimeNano()) {
bestLocation = lastKnownLocation;
}
}
diff --git a/telephony/tests/telephonytests/src/com/android/internal/telephony/SmsUsageMonitorShortCodeTest.java b/telephony/tests/telephonytests/src/com/android/internal/telephony/SmsUsageMonitorShortCodeTest.java
deleted file mode 100644
index 3bb7c06..0000000
--- a/telephony/tests/telephonytests/src/com/android/internal/telephony/SmsUsageMonitorShortCodeTest.java
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * Copyright (C) 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 com.android.internal.telephony;
-
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import static com.android.internal.telephony.SmsUsageMonitor.CATEGORY_FREE_SHORT_CODE;
-import static com.android.internal.telephony.SmsUsageMonitor.CATEGORY_NOT_SHORT_CODE;
-import static com.android.internal.telephony.SmsUsageMonitor.CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE;
-import static com.android.internal.telephony.SmsUsageMonitor.CATEGORY_PREMIUM_SHORT_CODE;
-import static com.android.internal.telephony.SmsUsageMonitor.CATEGORY_STANDARD_SHORT_CODE;
-
-/**
- * Test cases for SMS short code pattern matching in SmsUsageMonitor.
- */
-public class SmsUsageMonitorShortCodeTest extends AndroidTestCase {
-
- private static final class ShortCodeTest {
- final String countryIso;
- final String address;
- final int category;
-
- ShortCodeTest(String countryIso, String destAddress, int category) {
- this.countryIso = countryIso;
- this.address = destAddress;
- this.category = category;
- }
- }
-
- /**
- * List of short code test cases.
- */
- private static final ShortCodeTest[] sShortCodeTests = new ShortCodeTest[] {
- new ShortCodeTest("al", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("al", "4321", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("al", "54321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("al", "15191", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("al", "55500", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("al", "55600", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("al", "654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("am", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("am", "101", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("am", "102", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("am", "103", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("am", "222", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("am", "1111", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("am", "9999", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("am", "1121", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("am", "1141", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("am", "1161", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("am", "3024", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("at", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("at", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("at", "0901234", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("at", "0900666266", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("au", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("au", "180000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("au", "190000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("au", "1900000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("au", "19000000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("au", "19998882", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("az", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("az", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "12345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "87744", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "3301", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "3302", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "9012", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "9014", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "9394", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "87744", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "93101", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("az", "123456", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("be", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("be", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("be", "567890", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("be", "8000", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("be", "6566", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("be", "7777", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("bg", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("bg", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("bg", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("bg", "12345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("bg", "1816", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("bg", "1915", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("bg", "1916", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("bg", "1935", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("bg", "18423", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("by", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("by", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("by", "3336", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("by", "5013", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("by", "5014", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("by", "7781", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("ca", "911", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ca", "+18005551234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ca", "8005551234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ca", "20000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ca", "200000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ca", "2000000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ca", "60999", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ca", "88188", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("ch", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ch", "123", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ch", "234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ch", "3456", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ch", "98765", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ch", "543", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ch", "83111", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ch", "234567", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ch", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("cn", "120", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("cn", "1062503000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("cn", "1065123456", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("cn", "1066335588", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("cy", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("cy", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("cy", "4321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("cy", "54321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("cy", "654321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("cy", "7510", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("cy", "987654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("cz", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("cz", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("cz", "9090150", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("cz", "90901599", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("cz", "987654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("de", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("de", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("de", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "12345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "8888", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "11111", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "11886", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "22022", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "23300", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "3434", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "34567", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "41414", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "55655", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "66766", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "66777", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "77677", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "80888", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "1232286", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("de", "987654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("dk", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("dk", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("dk", "1259", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("dk", "16123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("dk", "987654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("ee", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ee", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("ee", "123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "1259", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "15330", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "17999", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "17010", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "17013", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "9034567", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ee", "34567890", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("es", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("es", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("es", "25165", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("es", "27333", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("es", "995399", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("es", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("fi", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("fi", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("fi", "12345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fi", "123456", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fi", "17159", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fi", "17163", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fi", "0600123", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fi", "070012345", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fi", "987654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("fr", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("fr", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("fr", "34567", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("fr", "45678", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fr", "81185", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("fr", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("gb", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("gb", "999", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("gb", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("gb", "4567", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gb", "45678", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gb", "56789", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gb", "79067", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gb", "80079", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gb", "654321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gb", "7654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("ge", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ge", "8765", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ge", "2345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ge", "8012", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ge", "8013", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ge", "8014", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ge", "8889", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("gr", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("gr", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("gr", "54321", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gr", "19567", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gr", "19678", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("gr", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("hu", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("hu", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("hu", "012", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("hu", "0123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("hu", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("hu", "1784", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("hu", "2345", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("hu", "01234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("hu", "012345678", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("hu", "0123456789", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("hu", "1234567890", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("hu", "0691227910", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("hu", "2345678901", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("hu", "01234567890", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("ie", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ie", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("ie", "50123", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("ie", "51234", CATEGORY_STANDARD_SHORT_CODE),
- new ShortCodeTest("ie", "52345", CATEGORY_STANDARD_SHORT_CODE),
- new ShortCodeTest("ie", "57890", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ie", "67890", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ie", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("il", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("il", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("il", "4422", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("il", "4545", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("il", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("it", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("it", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("it", "4567", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("it", "48000", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("it", "45678", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("it", "56789", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("it", "456789", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("kg", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("kg", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kg", "4152", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kg", "4157", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kg", "4449", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kg", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("kz", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("kz", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kz", "9194", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kz", "7790", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("kz", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("lt", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("lt", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("lt", "123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lt", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lt", "1381", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lt", "1394", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lt", "1645", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lt", "12345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lt", "123456", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("lu", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("lu", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("lu", "1234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("lu", "12345", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("lu", "64747", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lu", "678901", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("lv", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("lv", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("lv", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lv", "1819", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lv", "1863", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lv", "1874", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("lv", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("mx", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("mx", "2345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("mx", "7766", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("mx", "23456", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("mx", "53035", CATEGORY_PREMIUM_SHORT_CODE),
-
- new ShortCodeTest("my", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("my", "1234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("my", "23456", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("my", "32298", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("my", "33776", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("my", "345678", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("nl", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("nl", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("nl", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nl", "4466", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nl", "5040", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nl", "23456", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("no", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("no", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("no", "2201", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("no", "2226", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("no", "2227", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("no", "23456", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("no", "234567", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("nz", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("nz", "123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nz", "2345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nz", "3903", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nz", "8995", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("nz", "23456", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("pl", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("pl", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("pl", "7890", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pl", "34567", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pl", "7910", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pl", "74240", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pl", "79866", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pl", "92525", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pl", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("pt", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("pt", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("pt", "61000", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pt", "62345", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pt", "68304", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pt", "69876", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("pt", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("ro", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ro", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("ro", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ro", "1263", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ro", "1288", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ro", "1314", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ro", "1380", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ro", "7890", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ro", "12345", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("ru", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ru", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ru", "1161", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ru", "2097", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ru", "3933", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ru", "7781", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ru", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("se", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("se", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("se", "1234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("se", "72345", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("se", "72999", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("se", "123456", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("se", "87654321", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("sg", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("sg", "1234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("sg", "70000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("sg", "79999", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("sg", "73800", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("sg", "74688", CATEGORY_STANDARD_SHORT_CODE),
- new ShortCodeTest("sg", "987654", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("si", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("si", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("si", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("si", "3838", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("si", "72999", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("sk", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("sk", "116117", CATEGORY_FREE_SHORT_CODE),
- new ShortCodeTest("sk", "1234", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("sk", "6674", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("sk", "7604", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("sk", "72999", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("tj", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("tj", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("tj", "1161", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("tj", "1171", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("tj", "4161", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("tj", "4449", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("tj", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("ua", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ua", "5432", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ua", "4448", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ua", "7094", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ua", "7540", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("ua", "98765", CATEGORY_NOT_SHORT_CODE),
-
- new ShortCodeTest("us", "911", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("us", "+18005551234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("us", "8005551234", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("us", "20000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("us", "200000", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("us", "2000000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("us", "20433", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("us", "21472", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("us", "23333", CATEGORY_PREMIUM_SHORT_CODE),
- new ShortCodeTest("us", "99807", CATEGORY_PREMIUM_SHORT_CODE),
-
- // generic rules for other countries: 5 digits or less considered potential short code
- new ShortCodeTest("zz", "2000000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("zz", "54321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("zz", "4321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("zz", "321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("zz", "112", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest(null, "2000000", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest(null, "54321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest(null, "4321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest(null, "321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest(null, "112", CATEGORY_NOT_SHORT_CODE),
- };
-
- @SmallTest
- public void testSmsUsageMonitor() {
- SmsUsageMonitor monitor = new SmsUsageMonitor(getContext());
- for (ShortCodeTest test : sShortCodeTests) {
- assertEquals("country: " + test.countryIso + " number: " + test.address,
- test.category, monitor.checkDestination(test.address, test.countryIso));
- }
- }
-}
diff --git a/tests/RenderScriptTests/ImageProcessing/res/layout/main.xml b/tests/RenderScriptTests/ImageProcessing/res/layout/main.xml
index 08a010d..bd56d62 100644
--- a/tests/RenderScriptTests/ImageProcessing/res/layout/main.xml
+++ b/tests/RenderScriptTests/ImageProcessing/res/layout/main.xml
@@ -50,8 +50,12 @@
android:textSize="8pt"
android:text="@string/saturation"/>
</LinearLayout>
+ <Spinner
+ android:id="@+id/filterselection"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"/>
<TextView
- android:id="@+id/inSaturationText"
+ android:id="@+id/slider1Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="8pt"
@@ -59,13 +63,13 @@
android:layout_marginTop="15sp"
android:text="@string/saturation"/>
<SeekBar
- android:id="@+id/inSaturation"
+ android:id="@+id/slider1"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
- android:id="@+id/inGammaText"
+ android:id="@+id/slider2Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="8pt"
@@ -73,13 +77,13 @@
android:layout_marginTop="15sp"
android:text="@string/gamma"/>
<SeekBar
- android:id="@+id/inGamma"
+ android:id="@+id/slider2"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
- android:id="@+id/outWhiteText"
+ android:id="@+id/slider3Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10sp"
@@ -87,13 +91,13 @@
android:textSize="8pt"
android:text="@string/out_white"/>
<SeekBar
- android:id="@+id/outWhite"
+ android:id="@+id/slider3"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
- android:id="@+id/inWhiteText"
+ android:id="@+id/slider4Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="8pt"
@@ -101,49 +105,21 @@
android:layout_marginTop="15sp"
android:text="@string/in_white"/>
<SeekBar
- android:id="@+id/inWhite"
+ android:id="@+id/slider4"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
- android:id="@+id/outBlackText"
+ android:id="@+id/slider5Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="8pt"
android:layout_marginLeft="10sp"
android:layout_marginTop="15sp"
- android:text="@string/out_black"/>
+ android:text="@string/in_white"/>
<SeekBar
- android:id="@+id/outBlack"
- android:layout_marginLeft="10sp"
- android:layout_marginRight="10sp"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- <TextView
- android:id="@+id/inBlackText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="8pt"
- android:layout_marginLeft="10sp"
- android:layout_marginTop="15sp"
- android:text="@string/in_black"/>
- <SeekBar
- android:id="@+id/inBlack"
- android:layout_marginLeft="10sp"
- android:layout_marginRight="10sp"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- <TextView
- android:id="@+id/blurText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="8pt"
- android:layout_marginLeft="10sp"
- android:layout_marginTop="15sp"
- android:text="@string/blur_description"/>
- <SeekBar
- android:id="@+id/radius"
+ android:id="@+id/slider5"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:layout_width="match_parent"
diff --git a/tests/RenderScriptTests/ImageProcessing/res/layout/spinner_layout.xml b/tests/RenderScriptTests/ImageProcessing/res/layout/spinner_layout.xml
new file mode 100644
index 0000000..8196bbf
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/res/layout/spinner_layout.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Copyright (C) 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.
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:padding="10dp"
+ android:textSize="16sp"
+/>
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blur25.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blur25.java
new file mode 100644
index 0000000..697bbb1
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blur25.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 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 com.android.rs.image;
+
+import java.lang.Math;
+
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.RenderScript;
+import android.renderscript.Script;
+import android.renderscript.ScriptC;
+import android.renderscript.Type;
+import android.util.Log;
+import android.widget.SeekBar;
+import android.widget.TextView;
+
+public class Blur25 extends TestBase {
+ private int MAX_RADIUS = 25;
+ private ScriptC_threshold mScript;
+ private ScriptC_vertical_blur mScriptVBlur;
+ private ScriptC_horizontal_blur mScriptHBlur;
+ private int mRadius = MAX_RADIUS;
+ private float mSaturation = 1.0f;
+ private Allocation mScratchPixelsAllocation1;
+ private Allocation mScratchPixelsAllocation2;
+
+
+ public boolean onBar1Setup(SeekBar b, TextView t) {
+ t.setText("Radius");
+ b.setProgress(100);
+ return true;
+ }
+ public boolean onBar2Setup(SeekBar b, TextView t) {
+ b.setProgress(50);
+ t.setText("Saturation");
+ return true;
+ }
+
+
+ public void onBar1Changed(int progress) {
+ float fRadius = progress / 100.0f;
+ fRadius *= (float)(MAX_RADIUS);
+ mRadius = (int)fRadius;
+ mScript.set_radius(mRadius);
+ }
+ public void onBar2Changed(int progress) {
+ mSaturation = (float)progress / 50.0f;
+ mScriptVBlur.invoke_setSaturation(mSaturation);
+ }
+
+
+ public void createTest(android.content.res.Resources res) {
+ int width = mInPixelsAllocation.getType().getX();
+ int height = mInPixelsAllocation.getType().getY();
+
+ Type.Builder tb = new Type.Builder(mRS, Element.F32_4(mRS));
+ tb.setX(width);
+ tb.setY(height);
+ mScratchPixelsAllocation1 = Allocation.createTyped(mRS, tb.create());
+ mScratchPixelsAllocation2 = Allocation.createTyped(mRS, tb.create());
+
+ mScriptVBlur = new ScriptC_vertical_blur(mRS, res, R.raw.vertical_blur);
+ mScriptHBlur = new ScriptC_horizontal_blur(mRS, res, R.raw.horizontal_blur);
+
+ mScript = new ScriptC_threshold(mRS, res, R.raw.threshold);
+ mScript.set_width(width);
+ mScript.set_height(height);
+ mScript.set_radius(mRadius);
+
+ mScriptVBlur.invoke_setSaturation(mSaturation);
+
+ mScript.bind_InPixel(mInPixelsAllocation);
+ mScript.bind_OutPixel(mOutPixelsAllocation);
+ mScript.bind_ScratchPixel1(mScratchPixelsAllocation1);
+ mScript.bind_ScratchPixel2(mScratchPixelsAllocation2);
+
+ mScript.set_vBlurScript(mScriptVBlur);
+ mScript.set_hBlurScript(mScriptHBlur);
+ }
+
+ public void runTest() {
+ mScript.invoke_filter();
+ }
+
+ public void setupBenchmark() {
+ mScript.set_radius(MAX_RADIUS);
+ }
+
+ public void exitBenchmark() {
+ mScript.set_radius(mRadius);
+ }
+}
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Greyscale.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Greyscale.java
new file mode 100644
index 0000000..3db210a
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Greyscale.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 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 com.android.rs.image;
+
+import java.lang.Math;
+
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.RenderScript;
+import android.renderscript.Script;
+import android.renderscript.ScriptC;
+import android.renderscript.Type;
+import android.util.Log;
+
+public class Greyscale extends TestBase {
+ private ScriptC_greyscale mScript;
+
+ public void createTest(android.content.res.Resources res) {
+ mScript = new ScriptC_greyscale(mRS, res, R.raw.greyscale);
+ }
+
+ public void runTest() {
+ mScript.forEach_root(mInPixelsAllocation, mOutPixelsAllocation);
+ }
+
+}
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
index 7368260..e085582 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 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.
@@ -29,124 +29,65 @@
import android.renderscript.Script;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.SeekBar;
+import android.widget.Spinner;
import android.widget.TextView;
import android.view.View;
import android.util.Log;
import java.lang.Math;
public class ImageProcessingActivity extends Activity
- implements SurfaceHolder.Callback,
- SeekBar.OnSeekBarChangeListener {
+ implements SeekBar.OnSeekBarChangeListener {
private final String TAG = "Img";
- private Bitmap mBitmapIn;
- private Bitmap mBitmapOut;
- private ScriptC_threshold mScript;
- private ScriptC_vertical_blur mScriptVBlur;
- private ScriptC_horizontal_blur mScriptHBlur;
- private int mRadius = 0;
- private SeekBar mRadiusSeekBar;
+ Bitmap mBitmapIn;
+ Bitmap mBitmapOut;
+ String mTestNames[];
- private float mInBlack = 0.0f;
- private SeekBar mInBlackSeekBar;
- private float mOutBlack = 0.0f;
- private SeekBar mOutBlackSeekBar;
- private float mInWhite = 255.0f;
- private SeekBar mInWhiteSeekBar;
- private float mOutWhite = 255.0f;
- private SeekBar mOutWhiteSeekBar;
- private float mGamma = 1.0f;
- private SeekBar mGammaSeekBar;
+ private SeekBar mBar1;
+ private SeekBar mBar2;
+ private SeekBar mBar3;
+ private SeekBar mBar4;
+ private SeekBar mBar5;
+ private TextView mText1;
+ private TextView mText2;
+ private TextView mText3;
+ private TextView mText4;
+ private TextView mText5;
private float mSaturation = 1.0f;
- private SeekBar mSaturationSeekBar;
private TextView mBenchmarkResult;
-
- @SuppressWarnings({"FieldCanBeLocal"})
- private RenderScript mRS;
- @SuppressWarnings({"FieldCanBeLocal"})
- private Type mPixelType;
- @SuppressWarnings({"FieldCanBeLocal"})
- private Allocation mInPixelsAllocation;
- @SuppressWarnings({"FieldCanBeLocal"})
- private Allocation mOutPixelsAllocation;
- @SuppressWarnings({"FieldCanBeLocal"})
- private Allocation mScratchPixelsAllocation1;
- private Allocation mScratchPixelsAllocation2;
+ private Spinner mTestSpinner;
private SurfaceView mSurfaceView;
private ImageView mDisplayView;
- private boolean mIsProcessing;
+ private boolean mDoingBenchmark;
- class FilterCallback extends RenderScript.RSMessageHandler {
- private Runnable mAction = new Runnable() {
- public void run() {
+ private TestBase mTest;
- synchronized (mDisplayView) {
- mIsProcessing = false;
- }
-
- mOutPixelsAllocation.copyTo(mBitmapOut);
- mDisplayView.invalidate();
- }
- };
-
- @Override
- public void run() {
- mSurfaceView.removeCallbacks(mAction);
- mSurfaceView.post(mAction);
- }
- }
-
- int in[];
- int interm[];
- int out[];
- int MAX_RADIUS = 25;
- // Store our coefficients here
- float gaussian[];
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (fromUser) {
- if (seekBar == mRadiusSeekBar) {
- float fRadius = progress / 100.0f;
- fRadius *= (float)(MAX_RADIUS);
- mRadius = (int)fRadius;
-
- mScript.set_radius(mRadius);
- } else if (seekBar == mInBlackSeekBar) {
- mInBlack = (float)progress;
- mScriptVBlur.invoke_setLevels(mInBlack, mOutBlack, mInWhite, mOutWhite);
- } else if (seekBar == mOutBlackSeekBar) {
- mOutBlack = (float)progress;
- mScriptVBlur.invoke_setLevels(mInBlack, mOutBlack, mInWhite, mOutWhite);
- } else if (seekBar == mInWhiteSeekBar) {
- mInWhite = (float)progress + 127.0f;
- mScriptVBlur.invoke_setLevels(mInBlack, mOutBlack, mInWhite, mOutWhite);
- } else if (seekBar == mOutWhiteSeekBar) {
- mOutWhite = (float)progress + 127.0f;
- mScriptVBlur.invoke_setLevels(mInBlack, mOutBlack, mInWhite, mOutWhite);
- } else if (seekBar == mGammaSeekBar) {
- mGamma = (float)progress/100.0f;
- mGamma = Math.max(mGamma, 0.1f);
- mGamma = 1.0f / mGamma;
- mScriptVBlur.invoke_setGamma(mGamma);
- } else if (seekBar == mSaturationSeekBar) {
- mSaturation = (float)progress / 50.0f;
- mScriptVBlur.invoke_setSaturation(mSaturation);
+ if (seekBar == mBar1) {
+ mTest.onBar1Changed(progress);
+ } else if (seekBar == mBar2) {
+ mTest.onBar2Changed(progress);
+ } else if (seekBar == mBar3) {
+ mTest.onBar3Changed(progress);
+ } else if (seekBar == mBar4) {
+ mTest.onBar4Changed(progress);
+ } else if (seekBar == mBar5) {
+ mTest.onBar5Changed(progress);
}
- synchronized (mDisplayView) {
- if (mIsProcessing) {
- return;
- }
- mIsProcessing = true;
- }
-
- mScript.invoke_filter();
+ mTest.runTest();
+ mTest.updateBitmap(mBitmapOut);
+ mDisplayView.invalidate();
}
}
@@ -156,6 +97,83 @@
public void onStopTrackingTouch(SeekBar seekBar) {
}
+ void setupBars() {
+ mBar1.setVisibility(View.VISIBLE);
+ mText1.setVisibility(View.VISIBLE);
+ mTest.onBar1Setup(mBar1, mText1);
+
+ mBar2.setVisibility(View.VISIBLE);
+ mText2.setVisibility(View.VISIBLE);
+ mTest.onBar2Setup(mBar2, mText2);
+
+ mBar3.setVisibility(View.VISIBLE);
+ mText3.setVisibility(View.VISIBLE);
+ mTest.onBar3Setup(mBar3, mText3);
+
+ mBar4.setVisibility(View.VISIBLE);
+ mText4.setVisibility(View.VISIBLE);
+ mTest.onBar4Setup(mBar4, mText4);
+
+ mBar5.setVisibility(View.VISIBLE);
+ mText5.setVisibility(View.VISIBLE);
+ mTest.onBar5Setup(mBar5, mText5);
+ }
+
+
+ void changeTest(int testID) {
+ switch(testID) {
+ case 0:
+ mTest = new LevelsV4(false, false);
+ break;
+ case 1:
+ mTest = new LevelsV4(false, true);
+ break;
+ case 2:
+ mTest = new LevelsV4(true, false);
+ break;
+ case 3:
+ mTest = new LevelsV4(true, true);
+ break;
+ case 4:
+ mTest = new Blur25();
+ break;
+ case 5:
+ mTest = new Greyscale();
+ break;
+ }
+
+ mTest.createBaseTest(this, mBitmapIn);
+ setupBars();
+
+ mTest.runTest();
+ mTest.updateBitmap(mBitmapOut);
+ mDisplayView.invalidate();
+ mBenchmarkResult.setText("Result: not run");
+ }
+
+ void setupTests() {
+ mTestNames = new String[6];
+ mTestNames[0] = "Levels Vec3 Relaxed";
+ mTestNames[1] = "Levels Vec4 Relaxed";
+ mTestNames[2] = "Levels Vec3 Full";
+ mTestNames[3] = "Levels Vec4 Full";
+ mTestNames[4] = "Blur radius 25";
+ mTestNames[5] = "Greyscale";
+ mTestSpinner.setAdapter(new ArrayAdapter<String>(
+ this, R.layout.spinner_layout, mTestNames));
+ }
+
+ private AdapterView.OnItemSelectedListener mTestSpinnerListener =
+ new AdapterView.OnItemSelectedListener() {
+ public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+ changeTest(pos);
+ }
+
+ public void onNothingSelected(AdapterView parent) {
+
+ }
+ };
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -165,94 +183,38 @@
mBitmapOut = loadBitmap(R.drawable.city);
mSurfaceView = (SurfaceView) findViewById(R.id.surface);
- mSurfaceView.getHolder().addCallback(this);
mDisplayView = (ImageView) findViewById(R.id.display);
mDisplayView.setImageBitmap(mBitmapOut);
- mRadiusSeekBar = (SeekBar) findViewById(R.id.radius);
- mRadiusSeekBar.setOnSeekBarChangeListener(this);
+ mBar1 = (SeekBar) findViewById(R.id.slider1);
+ mBar2 = (SeekBar) findViewById(R.id.slider2);
+ mBar3 = (SeekBar) findViewById(R.id.slider3);
+ mBar4 = (SeekBar) findViewById(R.id.slider4);
+ mBar5 = (SeekBar) findViewById(R.id.slider5);
- mInBlackSeekBar = (SeekBar)findViewById(R.id.inBlack);
- mInBlackSeekBar.setOnSeekBarChangeListener(this);
- mInBlackSeekBar.setMax(128);
- mInBlackSeekBar.setProgress(0);
- mOutBlackSeekBar = (SeekBar)findViewById(R.id.outBlack);
- mOutBlackSeekBar.setOnSeekBarChangeListener(this);
- mOutBlackSeekBar.setMax(128);
- mOutBlackSeekBar.setProgress(0);
+ mBar1.setOnSeekBarChangeListener(this);
+ mBar2.setOnSeekBarChangeListener(this);
+ mBar3.setOnSeekBarChangeListener(this);
+ mBar4.setOnSeekBarChangeListener(this);
+ mBar5.setOnSeekBarChangeListener(this);
- mInWhiteSeekBar = (SeekBar)findViewById(R.id.inWhite);
- mInWhiteSeekBar.setOnSeekBarChangeListener(this);
- mInWhiteSeekBar.setMax(128);
- mInWhiteSeekBar.setProgress(128);
- mOutWhiteSeekBar = (SeekBar)findViewById(R.id.outWhite);
- mOutWhiteSeekBar.setOnSeekBarChangeListener(this);
- mOutWhiteSeekBar.setMax(128);
- mOutWhiteSeekBar.setProgress(128);
+ mText1 = (TextView) findViewById(R.id.slider1Text);
+ mText2 = (TextView) findViewById(R.id.slider2Text);
+ mText3 = (TextView) findViewById(R.id.slider3Text);
+ mText4 = (TextView) findViewById(R.id.slider4Text);
+ mText5 = (TextView) findViewById(R.id.slider5Text);
- mGammaSeekBar = (SeekBar)findViewById(R.id.inGamma);
- mGammaSeekBar.setOnSeekBarChangeListener(this);
- mGammaSeekBar.setMax(150);
- mGammaSeekBar.setProgress(100);
-
- mSaturationSeekBar = (SeekBar)findViewById(R.id.inSaturation);
- mSaturationSeekBar.setOnSeekBarChangeListener(this);
- mSaturationSeekBar.setProgress(50);
+ mTestSpinner = (Spinner) findViewById(R.id.filterselection);
+ mTestSpinner.setOnItemSelectedListener(mTestSpinnerListener);
mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText);
mBenchmarkResult.setText("Result: not run");
+
+ setupTests();
+ changeTest(0);
}
- public void surfaceCreated(SurfaceHolder holder) {
- createScript();
- mScript.invoke_filter();
- mOutPixelsAllocation.copyTo(mBitmapOut);
- }
-
- public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
- }
-
- public void surfaceDestroyed(SurfaceHolder holder) {
- }
-
- private void createScript() {
- mRS = RenderScript.create(this);
- mRS.setMessageHandler(new FilterCallback());
-
- mInPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapIn,
- Allocation.MipmapControl.MIPMAP_NONE,
- Allocation.USAGE_SCRIPT);
- mOutPixelsAllocation = Allocation.createFromBitmap(mRS, mBitmapOut,
- Allocation.MipmapControl.MIPMAP_NONE,
- Allocation.USAGE_SCRIPT);
-
- Type.Builder tb = new Type.Builder(mRS, Element.F32_4(mRS));
- tb.setX(mBitmapIn.getWidth());
- tb.setY(mBitmapIn.getHeight());
- mScratchPixelsAllocation1 = Allocation.createTyped(mRS, tb.create());
- mScratchPixelsAllocation2 = Allocation.createTyped(mRS, tb.create());
-
- mScriptVBlur = new ScriptC_vertical_blur(mRS, getResources(), R.raw.vertical_blur);
- mScriptHBlur = new ScriptC_horizontal_blur(mRS, getResources(), R.raw.horizontal_blur);
-
- mScript = new ScriptC_threshold(mRS, getResources(), R.raw.threshold);
- mScript.set_width(mBitmapIn.getWidth());
- mScript.set_height(mBitmapIn.getHeight());
- mScript.set_radius(mRadius);
-
- mScriptVBlur.invoke_setLevels(mInBlack, mOutBlack, mInWhite, mOutWhite);
- mScriptVBlur.invoke_setGamma(mGamma);
- mScriptVBlur.invoke_setSaturation(mSaturation);
-
- mScript.bind_InPixel(mInPixelsAllocation);
- mScript.bind_OutPixel(mOutPixelsAllocation);
- mScript.bind_ScratchPixel1(mScratchPixelsAllocation1);
- mScript.bind_ScratchPixel2(mScratchPixelsAllocation2);
-
- mScript.set_vBlurScript(mScriptVBlur);
- mScript.set_hBlurScript(mScriptHBlur);
- }
private Bitmap loadBitmap(int resource) {
final BitmapFactory.Options options = new BitmapFactory.Options();
@@ -278,26 +240,29 @@
// For benchmark test
public long getBenchmark() {
+ mDoingBenchmark = true;
+
+ mTest.setupBenchmark();
+ long result = 0;
+
+ Log.v(TAG, "Warming");
+ long t = java.lang.System.currentTimeMillis() + 2000;
+ do {
+ mTest.runTest();
+ mTest.finish();
+ } while (t > java.lang.System.currentTimeMillis());
+
+
Log.v(TAG, "Benchmarking");
- int oldRadius = mRadius;
- mRadius = MAX_RADIUS;
- mScript.set_radius(mRadius);
-
- mScript.invoke_filter();
- mRS.finish();
-
- long t = java.lang.System.currentTimeMillis();
-
- mScript.invoke_filter();
- mOutPixelsAllocation.copyTo(mBitmapOut);
-
+ t = java.lang.System.currentTimeMillis();
+ mTest.runTest();
+ mTest.finish();
t = java.lang.System.currentTimeMillis() - t;
- Log.v(TAG, "getBenchmark: Renderscript frame time core ms " + t);
- mRadius = oldRadius;
- mScript.set_radius(mRadius);
- mScript.invoke_filter();
- mOutPixelsAllocation.copyTo(mBitmapOut);
+ Log.v(TAG, "getBenchmark: Renderscript frame time core ms " + t);
+ mTest.exitBenchmark();
+ mDoingBenchmark = false;
+
return t;
}
}
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/LevelsV4.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/LevelsV4.java
new file mode 100644
index 0000000..9eb5647
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/LevelsV4.java
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 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 com.android.rs.image;
+
+import java.lang.Math;
+
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.RenderScript;
+import android.renderscript.Matrix3f;
+import android.renderscript.Script;
+import android.renderscript.ScriptC;
+import android.renderscript.Type;
+import android.util.Log;
+import android.widget.SeekBar;
+import android.widget.TextView;
+
+
+public class LevelsV4 extends TestBase {
+ private ScriptC_levels_relaxed mScriptR;
+ private ScriptC_levels_full mScriptF;
+ private float mInBlack = 0.0f;
+ private float mOutBlack = 0.0f;
+ private float mInWhite = 255.0f;
+ private float mOutWhite = 255.0f;
+ private float mSaturation = 1.0f;
+
+ Matrix3f satMatrix = new Matrix3f();
+ float mInWMinInB;
+ float mOutWMinOutB;
+ float mOverInWMinInB;
+
+ boolean mUseFull;
+ boolean mUseV4;
+
+ LevelsV4(boolean useFull, boolean useV4) {
+ mUseFull = useFull;
+ mUseV4 = useV4;
+ }
+
+
+ private void setLevels() {
+ mInWMinInB = mInWhite - mInBlack;
+ mOutWMinOutB = mOutWhite - mOutBlack;
+ mOverInWMinInB = 1.f / mInWMinInB;
+
+ mScriptR.set_inBlack(mInBlack);
+ mScriptR.set_outBlack(mOutBlack);
+ mScriptR.set_inWMinInB(mInWMinInB);
+ mScriptR.set_outWMinOutB(mOutWMinOutB);
+ mScriptR.set_overInWMinInB(mOverInWMinInB);
+ mScriptF.set_inBlack(mInBlack);
+ mScriptF.set_outBlack(mOutBlack);
+ mScriptF.set_inWMinInB(mInWMinInB);
+ mScriptF.set_outWMinOutB(mOutWMinOutB);
+ mScriptF.set_overInWMinInB(mOverInWMinInB);
+ }
+
+ private void setSaturation() {
+ float rWeight = 0.299f;
+ float gWeight = 0.587f;
+ float bWeight = 0.114f;
+ float oneMinusS = 1.0f - mSaturation;
+
+ satMatrix.set(0, 0, oneMinusS * rWeight + mSaturation);
+ satMatrix.set(0, 1, oneMinusS * rWeight);
+ satMatrix.set(0, 2, oneMinusS * rWeight);
+ satMatrix.set(1, 0, oneMinusS * gWeight);
+ satMatrix.set(1, 1, oneMinusS * gWeight + mSaturation);
+ satMatrix.set(1, 2, oneMinusS * gWeight);
+ satMatrix.set(2, 0, oneMinusS * bWeight);
+ satMatrix.set(2, 1, oneMinusS * bWeight);
+ satMatrix.set(2, 2, oneMinusS * bWeight + mSaturation);
+ mScriptR.set_colorMat(satMatrix);
+ mScriptF.set_colorMat(satMatrix);
+ }
+
+ public boolean onBar1Setup(SeekBar b, TextView t) {
+ b.setProgress(50);
+ t.setText("Saturation");
+ return true;
+ }
+ public boolean onBar2Setup(SeekBar b, TextView t) {
+ b.setMax(128);
+ b.setProgress(0);
+ t.setText("In Black");
+ return true;
+ }
+ public boolean onBar3Setup(SeekBar b, TextView t) {
+ b.setMax(128);
+ b.setProgress(0);
+ t.setText("Out Black");
+ return true;
+ }
+ public boolean onBar4Setup(SeekBar b, TextView t) {
+ b.setMax(128);
+ b.setProgress(128);
+ t.setText("Out White");
+ return true;
+ }
+ public boolean onBar5Setup(SeekBar b, TextView t) {
+ b.setMax(128);
+ b.setProgress(128);
+ t.setText("Out White");
+ return true;
+ }
+
+ public void onBar1Changed(int progress) {
+ mSaturation = (float)progress / 50.0f;
+ setSaturation();
+ }
+ public void onBar2Changed(int progress) {
+ mInBlack = (float)progress;
+ setLevels();
+ }
+ public void onBar3Changed(int progress) {
+ mOutBlack = (float)progress;
+ setLevels();
+ }
+ public void onBar4Changed(int progress) {
+ mInWhite = (float)progress + 127.0f;
+ setLevels();
+ }
+ public void onBar5Changed(int progress) {
+ mOutWhite = (float)progress + 127.0f;
+ setLevels();
+ }
+
+ public void createTest(android.content.res.Resources res) {
+ mScriptR = new ScriptC_levels_relaxed(mRS, res, R.raw.levels_relaxed);
+ mScriptF = new ScriptC_levels_full(mRS, res, R.raw.levels_full);
+ setSaturation();
+ setLevels();
+ }
+
+ public void runTest() {
+ if (mUseFull) {
+ if (mUseV4) {
+ mScriptF.forEach_root4(mInPixelsAllocation, mOutPixelsAllocation);
+ } else {
+ mScriptF.forEach_root(mInPixelsAllocation, mOutPixelsAllocation);
+ }
+ } else {
+ if (mUseV4) {
+ mScriptR.forEach_root4(mInPixelsAllocation, mOutPixelsAllocation);
+ } else {
+ mScriptR.forEach_root(mInPixelsAllocation, mOutPixelsAllocation);
+ }
+ }
+ }
+
+}
+
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
new file mode 100644
index 0000000..3a6241d
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 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 com.android.rs.image;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.graphics.BitmapFactory;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.renderscript.ScriptC;
+import android.renderscript.RenderScript;
+import android.renderscript.Type;
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.Script;
+import android.view.SurfaceView;
+import android.view.SurfaceHolder;
+import android.widget.ImageView;
+import android.widget.SeekBar;
+import android.widget.TextView;
+import android.view.View;
+import android.util.Log;
+import java.lang.Math;
+
+public class TestBase {
+ protected final String TAG = "Img";
+
+ protected RenderScript mRS;
+ protected Allocation mInPixelsAllocation;
+ protected Allocation mOutPixelsAllocation;
+
+ // Override to use UI elements
+ public void onBar1Changed(int progress) {
+ }
+ public void onBar2Changed(int progress) {
+ }
+ public void onBar3Changed(int progress) {
+ }
+ public void onBar4Changed(int progress) {
+ }
+ public void onBar5Changed(int progress) {
+ }
+
+ // Override to use UI elements
+ // Unused bars will be hidden.
+ public boolean onBar1Setup(SeekBar b, TextView t) {
+ b.setVisibility(View.INVISIBLE);
+ t.setVisibility(View.INVISIBLE);
+ return false;
+ }
+ public boolean onBar2Setup(SeekBar b, TextView t) {
+ b.setVisibility(View.INVISIBLE);
+ t.setVisibility(View.INVISIBLE);
+ return false;
+ }
+ public boolean onBar3Setup(SeekBar b, TextView t) {
+ b.setVisibility(View.INVISIBLE);
+ t.setVisibility(View.INVISIBLE);
+ return false;
+ }
+ public boolean onBar4Setup(SeekBar b, TextView t) {
+ b.setVisibility(View.INVISIBLE);
+ t.setVisibility(View.INVISIBLE);
+ return false;
+ }
+ public boolean onBar5Setup(SeekBar b, TextView t) {
+ b.setVisibility(View.INVISIBLE);
+ t.setVisibility(View.INVISIBLE);
+ return false;
+ }
+
+ public final void createBaseTest(ImageProcessingActivity act, Bitmap b) {
+ mRS = RenderScript.create(act);
+ mInPixelsAllocation = Allocation.createFromBitmap(mRS, b,
+ Allocation.MipmapControl.MIPMAP_NONE,
+ Allocation.USAGE_SCRIPT);
+ mOutPixelsAllocation = Allocation.createFromBitmap(mRS, b,
+ Allocation.MipmapControl.MIPMAP_NONE,
+ Allocation.USAGE_SCRIPT);
+ createTest(act.getResources());
+ }
+
+ // Must override
+ public void createTest(android.content.res.Resources res) {
+ android.util.Log.e("img", "implement createTest");
+ }
+
+ // Must override
+ public void runTest() {
+ }
+
+ public void finish() {
+ mRS.finish();
+ }
+
+ public void updateBitmap(Bitmap b) {
+ mOutPixelsAllocation.copyTo(b);
+ }
+
+ // Override to configure specific benchmark config.
+ public void setupBenchmark() {
+ }
+
+ // Override to reset after benchmark.
+ public void exitBenchmark() {
+ }
+}
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/greyscale.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/greyscale.rs
new file mode 100644
index 0000000..c420cac
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/greyscale.rs
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#pragma version(1)
+#pragma rs java_package_name(com.android.rs.image)
+#pragma rs_fp_relaxed
+
+const static float3 gMonoMult = {0.299f, 0.587f, 0.114f};
+
+void root(const uchar4 *v_in, uchar4 *v_out) {
+ float4 f4 = rsUnpackColor8888(*v_in);
+
+ float3 mono = dot(f4.rgb, gMonoMult);
+ *v_out = rsPackColorTo8888(mono);
+}
+
+
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels.rsh b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels.rsh
new file mode 100644
index 0000000..7c5d930
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels.rsh
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 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.
+ */
+
+float inBlack;
+float outBlack;
+float inWMinInB;
+float outWMinOutB;
+float overInWMinInB;
+rs_matrix3x3 colorMat;
+
+void root(const uchar4 *in, uchar4 *out, uint32_t x, uint32_t y) {
+ float3 pixel = convert_float4(in[0]).rgb;
+ pixel = rsMatrixMultiply(&colorMat, pixel);
+ pixel = clamp(pixel, 0.f, 255.f);
+ pixel = (pixel - inBlack) * overInWMinInB;
+ pixel = pixel * outWMinOutB + outBlack;
+ pixel = clamp(pixel, 0.f, 255.f);
+ out->xyz = convert_uchar3(pixel);
+ out->w = 0xff;
+}
+
+void root4(const uchar4 *in, uchar4 *out, uint32_t x, uint32_t y) {
+ float4 pixel = convert_float4(in[0]);
+ pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
+ pixel = clamp(pixel, 0.f, 255.f);
+ pixel = (pixel - inBlack) * overInWMinInB;
+ pixel = pixel * outWMinOutB + outBlack;
+ pixel = clamp(pixel, 0.f, 255.f);
+ out->xyzw = convert_uchar4(pixel);
+}
+
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels_full.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels_full.rs
new file mode 100644
index 0000000..da6a291
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels_full.rs
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#pragma version(1)
+#pragma rs java_package_name(com.android.rs.image)
+
+#include "levels.rsh"
+
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels_relaxed.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels_relaxed.rs
new file mode 100644
index 0000000..b115445
--- /dev/null
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/levels_relaxed.rs
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#pragma version(1)
+#pragma rs java_package_name(com.android.rs.image)
+#pragma rs_fp_relaxed
+
+#include "levels.rsh"
+
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs
index d93238c..77cd5be 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs
@@ -88,6 +88,6 @@
fs.ain = rsGetAllocation(ScratchPixel2);
rsForEach(vBlurScript, fs.ain, rsGetAllocation(OutPixel), &fs, sizeof(fs));
- rsSendToClientBlocking(CMD_FINISHED);
+ //rsSendToClientBlocking(CMD_FINISHED);
}
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vertical_blur.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vertical_blur.rs
index a6da192..60fd71b 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vertical_blur.rs
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/vertical_blur.rs
@@ -3,29 +3,9 @@
#include "ip.rsh"
-static float inBlack;
-static float outBlack;
-static float inWhite;
-static float outWhite;
-static float3 gamma;
static float saturation;
-
-static float inWMinInB;
-static float outWMinOutB;
-static float overInWMinInB;
static rs_matrix3x3 colorMat;
-void setLevels(float iBlk, float oBlk, float iWht, float oWht) {
- inBlack = iBlk;
- outBlack = oBlk;
- inWhite = iWht;
- outWhite = oWht;
-
- inWMinInB = inWhite - inBlack;
- outWMinOutB = outWhite - outBlack;
- overInWMinInB = 1.f / inWMinInB;
-}
-
void setSaturation(float sat) {
saturation = sat;
@@ -52,10 +32,6 @@
rsMatrixSet(&colorMat, 2, 2, oneMinusS * bWeight + saturation);
}
-void setGamma(float g) {
- gamma = (float3)g;
-}
-
void root(uchar4 *out, const void *usrData, uint32_t x, uint32_t y) {
const FilterStruct *fs = (const FilterStruct *)usrData;
float3 blurredPixel = 0;
@@ -76,12 +52,8 @@
}
float3 temp = rsMatrixMultiply(&colorMat, blurredPixel);
- temp = (clamp(temp, 0.f, 255.f) - inBlack) * overInWMinInB;
- if (gamma.x != 1.0f)
- temp = pow(temp, (float3)gamma);
- temp = clamp(temp * outWMinOutB + outBlack, 0.f, 255.f);
-
+ temp = clamp(temp, 0.f, 255.f);
out->xyz = convert_uchar3(temp);
- //output->w = input->w;
+ out->w = 0xff;
}
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index a69adc1..ee076e6 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -2210,7 +2210,7 @@
status_t
writeProguardForXml(ProguardKeepSet* keep, const sp<AaptFile>& layoutFile,
- const char* startTag, const KeyedVector<String8, NamespaceAttributePair>* tagAttrPairs)
+ const char* startTag, const KeyedVector<String8, Vector<NamespaceAttributePair> >* tagAttrPairs)
{
status_t err;
ResXMLTree tree;
@@ -2254,17 +2254,21 @@
} else if (tagAttrPairs != NULL) {
ssize_t tagIndex = tagAttrPairs->indexOfKey(tag);
if (tagIndex >= 0) {
- const NamespaceAttributePair& nsAttr = tagAttrPairs->valueAt(tagIndex);
- ssize_t attrIndex = tree.indexOfAttribute(nsAttr.ns, nsAttr.attr);
- if (attrIndex < 0) {
- // fprintf(stderr, "%s:%d: <%s> does not have attribute %s:%s.\n",
- // layoutFile->getPrintableSource().string(), tree.getLineNumber(),
- // tag.string(), nsAttr.ns, nsAttr.attr);
- } else {
- size_t len;
- addProguardKeepRule(keep,
- String8(tree.getAttributeStringValue(attrIndex, &len)), NULL,
- layoutFile->getPrintableSource(), tree.getLineNumber());
+ const Vector<NamespaceAttributePair>& nsAttrVector = tagAttrPairs->valueAt(tagIndex);
+ for (size_t i = 0; i < nsAttrVector.size(); i++) {
+ const NamespaceAttributePair& nsAttr = nsAttrVector[i];
+
+ ssize_t attrIndex = tree.indexOfAttribute(nsAttr.ns, nsAttr.attr);
+ if (attrIndex < 0) {
+ // fprintf(stderr, "%s:%d: <%s> does not have attribute %s:%s.\n",
+ // layoutFile->getPrintableSource().string(), tree.getLineNumber(),
+ // tag.string(), nsAttr.ns, nsAttr.attr);
+ } else {
+ size_t len;
+ addProguardKeepRule(keep,
+ String8(tree.getAttributeStringValue(attrIndex, &len)), NULL,
+ layoutFile->getPrintableSource(), tree.getLineNumber());
+ }
}
}
}
@@ -2280,9 +2284,18 @@
return NO_ERROR;
}
-static void addTagAttrPair(KeyedVector<String8, NamespaceAttributePair>* dest,
+static void addTagAttrPair(KeyedVector<String8, Vector<NamespaceAttributePair> >* dest,
const char* tag, const char* ns, const char* attr) {
- dest->add(String8(tag), NamespaceAttributePair(ns, attr));
+ String8 tagStr(tag);
+ ssize_t index = dest->indexOfKey(tagStr);
+
+ if (index < 0) {
+ Vector<NamespaceAttributePair> vector;
+ vector.add(NamespaceAttributePair(ns, attr));
+ dest->add(tagStr, vector);
+ } else {
+ dest->editValueAt(index).add(NamespaceAttributePair(ns, attr));
+ }
}
status_t
@@ -2291,13 +2304,13 @@
status_t err;
// tag:attribute pairs that should be checked in layout files.
- KeyedVector<String8, NamespaceAttributePair> kLayoutTagAttrPairs;
+ KeyedVector<String8, Vector<NamespaceAttributePair> > kLayoutTagAttrPairs;
addTagAttrPair(&kLayoutTagAttrPairs, "view", NULL, "class");
addTagAttrPair(&kLayoutTagAttrPairs, "fragment", NULL, "class");
addTagAttrPair(&kLayoutTagAttrPairs, "fragment", RESOURCES_ANDROID_NAMESPACE, "name");
// tag:attribute pairs that should be checked in xml files.
- KeyedVector<String8, NamespaceAttributePair> kXmlTagAttrPairs;
+ KeyedVector<String8, Vector<NamespaceAttributePair> > kXmlTagAttrPairs;
addTagAttrPair(&kXmlTagAttrPairs, "PreferenceScreen", RESOURCES_ANDROID_NAMESPACE, "fragment");
addTagAttrPair(&kXmlTagAttrPairs, "header", RESOURCES_ANDROID_NAMESPACE, "fragment");
@@ -2307,7 +2320,7 @@
const sp<AaptDir>& d = dirs.itemAt(k);
const String8& dirName = d->getLeaf();
const char* startTag = NULL;
- const KeyedVector<String8, NamespaceAttributePair>* tagAttrPairs = NULL;
+ const KeyedVector<String8, Vector<NamespaceAttributePair> >* tagAttrPairs = NULL;
if ((dirName == String8("layout")) || (strncmp(dirName.string(), "layout-", 7) == 0)) {
tagAttrPairs = &kLayoutTagAttrPairs;
} else if ((dirName == String8("xml")) || (strncmp(dirName.string(), "xml-", 4) == 0)) {
@@ -2339,6 +2352,7 @@
if (overlay.get()) {
return writeProguardForLayouts(keep, overlay);
}
+
return NO_ERROR;
}