Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd710e70 authored by Tim Murray's avatar Tim Murray
Browse files

Change flags to use int instead of long.

bug 15429629

Change-Id: Ideb983b17aa3c146d23f2be6bb0e9808cb6725b7
parent 08c06495
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -25542,7 +25542,7 @@ package android.renderscript {
    method public void contextDump();
    method public static android.renderscript.RenderScript create(android.content.Context);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, long);
    method public static android.renderscript.RenderScript create(android.content.Context, android.renderscript.RenderScript.ContextType, int);
    method public void destroy();
    method public void finish();
    method public final android.content.Context getApplicationContext();
@@ -25552,9 +25552,9 @@ package android.renderscript {
    method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
    method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
    method public void setPriority(android.renderscript.RenderScript.Priority);
    field public static final long CREATE_FLAG_LOW_LATENCY = 2L; // 0x2L
    field public static final long CREATE_FLAG_LOW_POWER = 4L; // 0x4L
    field public static final long CREATE_FLAG_NONE = 0L; // 0x0L
    field public static final int CREATE_FLAG_LOW_LATENCY = 2; // 0x2
    field public static final int CREATE_FLAG_LOW_POWER = 4; // 0x4
    field public static final int CREATE_FLAG_NONE = 0; // 0x0
  }
  public static final class RenderScript.ContextType extends java.lang.Enum {
+7 −7
Original line number Diff line number Diff line
@@ -64,23 +64,23 @@ public class RenderScript {
    static Method registerNativeFree;

    /*
     * Context creation flag which specifies a normal context.
     * Context creation flag that specifies a normal context.
    */
    public static final long CREATE_FLAG_NONE = 0x0000;
    public static final int CREATE_FLAG_NONE = 0x0000;

    /*
     * Context creation flag which specifies a context optimized for low
     * latency over peak performance. This is a hint and may have no effect
     * on some implementations.
    */
    public static final long CREATE_FLAG_LOW_LATENCY = 0x0002;
    public static final int CREATE_FLAG_LOW_LATENCY = 0x0002;

    /*
     * Context creation flag which specifies a context optimized for long
     * battery life over peak performance. This is a hint and may have no effect
     * on some implementations.
    */
    public static final long CREATE_FLAG_LOW_POWER = 0x0004;
    public static final int CREATE_FLAG_LOW_POWER = 0x0004;

    static {
        sInitialized = false;
@@ -1174,7 +1174,7 @@ public class RenderScript {
     * @param ctx The context.
     * @return RenderScript
     */
    public static RenderScript create(Context ctx, int sdkVersion, ContextType ct, long flags) {
    public static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
        if (!sInitialized) {
            Log.e(LOG_TAG, "RenderScript.create() called when disabled; someone is likely to crash");
            return null;
@@ -1187,7 +1187,7 @@ public class RenderScript {
        RenderScript rs = new RenderScript(ctx);

        rs.mDev = rs.nDeviceCreate();
        rs.mContext = rs.nContextCreate(rs.mDev, (int)flags, sdkVersion, ct.mID);
        rs.mContext = rs.nContextCreate(rs.mDev, flags, sdkVersion, ct.mID);
        rs.mContextType = ct;
        if (rs.mContext == 0) {
            throw new RSDriverException("Failed to create RS context.");
@@ -1229,7 +1229,7 @@ public class RenderScript {
     * @param flags The OR of the CREATE_FLAG_* options desired
     * @return RenderScript
     */
    public static RenderScript create(Context ctx, ContextType ct, long flags) {
    public static RenderScript create(Context ctx, ContextType ct, int flags) {
        int v = ctx.getApplicationInfo().targetSdkVersion;
        return create(ctx, v, ct, flags);
    }