Merge "Accounting for widget padding in dips instead of pixels" into jb-dev
diff --git a/api/current.txt b/api/current.txt
index bb4430b..846c2b7 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -2017,6 +2017,7 @@
method protected void onServiceConnected();
method public final boolean performGlobalAction(int);
method public final void setServiceInfo(android.accessibilityservice.AccessibilityServiceInfo);
+ field public static final int GESTURE_DOUBLE_TAP = 17; // 0x11
field public static final int GESTURE_SWIPE_DOWN = 2; // 0x2
field public static final int GESTURE_SWIPE_DOWN_AND_LEFT = 15; // 0xf
field public static final int GESTURE_SWIPE_DOWN_AND_RIGHT = 16; // 0x10
@@ -2033,8 +2034,7 @@
field public static final int GESTURE_SWIPE_UP_AND_DOWN = 7; // 0x7
field public static final int GESTURE_SWIPE_UP_AND_LEFT = 13; // 0xd
field public static final int GESTURE_SWIPE_UP_AND_RIGHT = 14; // 0xe
- field public static final int GESTURE_TWO_FINGER_LONG_PRESS = 18; // 0x12
- field public static final int GESTURE_TWO_FINGER_TAP = 17; // 0x11
+ field public static final int GESTURE_TAP_AND_HOLD = 18; // 0x12
field public static final int GLOBAL_ACTION_BACK = 1; // 0x1
field public static final int GLOBAL_ACTION_HOME = 2; // 0x2
field public static final int GLOBAL_ACTION_NOTIFICATIONS = 4; // 0x4
@@ -18585,95 +18585,104 @@
package android.renderscript {
- public deprecated class Allocation extends android.renderscript.BaseObj {
- method public deprecated void copy1DRangeFrom(int, int, int[]);
- method public deprecated void copy1DRangeFrom(int, int, short[]);
- method public deprecated void copy1DRangeFrom(int, int, byte[]);
- method public deprecated void copy1DRangeFrom(int, int, float[]);
- method public deprecated void copy1DRangeFrom(int, int, android.renderscript.Allocation, int);
- method public deprecated void copy1DRangeFromUnchecked(int, int, int[]);
- method public deprecated void copy1DRangeFromUnchecked(int, int, short[]);
- method public deprecated void copy1DRangeFromUnchecked(int, int, byte[]);
- method public deprecated void copy1DRangeFromUnchecked(int, int, float[]);
- method public deprecated void copy2DRangeFrom(int, int, int, int, byte[]);
- method public deprecated void copy2DRangeFrom(int, int, int, int, short[]);
- method public deprecated void copy2DRangeFrom(int, int, int, int, int[]);
- method public deprecated void copy2DRangeFrom(int, int, int, int, float[]);
- method public deprecated void copy2DRangeFrom(int, int, int, int, android.renderscript.Allocation, int, int);
- method public deprecated void copy2DRangeFrom(int, int, android.graphics.Bitmap);
- method public deprecated void copyFrom(android.renderscript.BaseObj[]);
- method public deprecated void copyFrom(int[]);
- method public deprecated void copyFrom(short[]);
- method public deprecated void copyFrom(byte[]);
- method public deprecated void copyFrom(float[]);
- method public deprecated void copyFrom(android.graphics.Bitmap);
- method public deprecated void copyFromUnchecked(int[]);
- method public deprecated void copyFromUnchecked(short[]);
- method public deprecated void copyFromUnchecked(byte[]);
- method public deprecated void copyFromUnchecked(float[]);
- method public deprecated void copyTo(android.graphics.Bitmap);
- method public deprecated void copyTo(byte[]);
- method public deprecated void copyTo(short[]);
- method public deprecated void copyTo(int[]);
- method public deprecated void copyTo(float[]);
- method public static deprecated android.renderscript.Allocation createCubemapFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
- method public static deprecated android.renderscript.Allocation createCubemapFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap);
- method public static deprecated android.renderscript.Allocation createCubemapFromCubeFaces(android.renderscript.RenderScript, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
- method public static deprecated android.renderscript.Allocation createCubemapFromCubeFaces(android.renderscript.RenderScript, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap);
- method public static deprecated android.renderscript.Allocation createFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
- method public static deprecated android.renderscript.Allocation createFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap);
- method public static deprecated android.renderscript.Allocation createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, int, android.renderscript.Allocation.MipmapControl, int);
- method public static deprecated android.renderscript.Allocation createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, int);
- method public static deprecated android.renderscript.Allocation createFromString(android.renderscript.RenderScript, java.lang.String, int);
- method public static deprecated android.renderscript.Allocation createSized(android.renderscript.RenderScript, android.renderscript.Element, int, int);
- method public static deprecated android.renderscript.Allocation createSized(android.renderscript.RenderScript, android.renderscript.Element, int);
- method public static deprecated android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, android.renderscript.Allocation.MipmapControl, int);
- method public static deprecated android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, int);
- method public static deprecated android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type);
- method public deprecated void generateMipmaps();
- method public deprecated android.renderscript.Type getType();
- method public deprecated synchronized void resize(int);
- method public deprecated void setFromFieldPacker(int, android.renderscript.FieldPacker);
- method public deprecated void setFromFieldPacker(int, int, android.renderscript.FieldPacker);
- method public deprecated void syncAll(int);
- field public static final deprecated int USAGE_GRAPHICS_CONSTANTS = 8; // 0x8
- field public static final deprecated int USAGE_GRAPHICS_RENDER_TARGET = 16; // 0x10
- field public static final deprecated int USAGE_GRAPHICS_TEXTURE = 2; // 0x2
- field public static final deprecated int USAGE_GRAPHICS_VERTEX = 4; // 0x4
- field public static final deprecated int USAGE_SCRIPT = 1; // 0x1
+ public class Allocation extends android.renderscript.BaseObj {
+ method public void copy1DRangeFrom(int, int, int[]);
+ method public void copy1DRangeFrom(int, int, short[]);
+ method public void copy1DRangeFrom(int, int, byte[]);
+ method public void copy1DRangeFrom(int, int, float[]);
+ method public void copy1DRangeFrom(int, int, android.renderscript.Allocation, int);
+ method public void copy1DRangeFromUnchecked(int, int, int[]);
+ method public void copy1DRangeFromUnchecked(int, int, short[]);
+ method public void copy1DRangeFromUnchecked(int, int, byte[]);
+ method public void copy1DRangeFromUnchecked(int, int, float[]);
+ method public void copy2DRangeFrom(int, int, int, int, byte[]);
+ method public void copy2DRangeFrom(int, int, int, int, short[]);
+ method public void copy2DRangeFrom(int, int, int, int, int[]);
+ method public void copy2DRangeFrom(int, int, int, int, float[]);
+ method public void copy2DRangeFrom(int, int, int, int, android.renderscript.Allocation, int, int);
+ method public void copy2DRangeFrom(int, int, android.graphics.Bitmap);
+ method public void copyFrom(android.renderscript.BaseObj[]);
+ method public void copyFrom(int[]);
+ method public void copyFrom(short[]);
+ method public void copyFrom(byte[]);
+ method public void copyFrom(float[]);
+ method public void copyFrom(android.graphics.Bitmap);
+ method public void copyFromUnchecked(int[]);
+ method public void copyFromUnchecked(short[]);
+ method public void copyFromUnchecked(byte[]);
+ method public void copyFromUnchecked(float[]);
+ method public void copyTo(android.graphics.Bitmap);
+ method public void copyTo(byte[]);
+ method public void copyTo(short[]);
+ method public void copyTo(int[]);
+ method public void copyTo(float[]);
+ method public static android.renderscript.Allocation createCubemapFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
+ method public static android.renderscript.Allocation createCubemapFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap);
+ method public static android.renderscript.Allocation createCubemapFromCubeFaces(android.renderscript.RenderScript, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
+ method public static android.renderscript.Allocation createCubemapFromCubeFaces(android.renderscript.RenderScript, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap, android.graphics.Bitmap);
+ method public static android.renderscript.Allocation createFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap, android.renderscript.Allocation.MipmapControl, int);
+ method public static android.renderscript.Allocation createFromBitmap(android.renderscript.RenderScript, android.graphics.Bitmap);
+ method public static android.renderscript.Allocation createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, int, android.renderscript.Allocation.MipmapControl, int);
+ method public static android.renderscript.Allocation createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, int);
+ method public static android.renderscript.Allocation createFromString(android.renderscript.RenderScript, java.lang.String, int);
+ method public static android.renderscript.Allocation createSized(android.renderscript.RenderScript, android.renderscript.Element, int, int);
+ method public static android.renderscript.Allocation createSized(android.renderscript.RenderScript, android.renderscript.Element, int);
+ method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, android.renderscript.Allocation.MipmapControl, int);
+ method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type, int);
+ method public static android.renderscript.Allocation createTyped(android.renderscript.RenderScript, android.renderscript.Type);
+ method public void generateMipmaps();
+ method public int getBytesSize();
+ method public android.renderscript.Element getElement();
+ method public android.view.Surface getSurface();
+ method public android.renderscript.Type getType();
+ method public int getUsage();
+ method public void ioReceive();
+ method public void ioSend();
+ method public synchronized void resize(int);
+ method public void setFromFieldPacker(int, android.renderscript.FieldPacker);
+ method public void setFromFieldPacker(int, int, android.renderscript.FieldPacker);
+ method public void setSurface(android.view.Surface);
+ method public void syncAll(int);
+ field public static final int USAGE_GRAPHICS_CONSTANTS = 8; // 0x8
+ field public static final int USAGE_GRAPHICS_RENDER_TARGET = 16; // 0x10
+ field public static final int USAGE_GRAPHICS_TEXTURE = 2; // 0x2
+ field public static final int USAGE_GRAPHICS_VERTEX = 4; // 0x4
+ field public static final int USAGE_IO_INPUT = 32; // 0x20
+ field public static final int USAGE_IO_OUTPUT = 64; // 0x40
+ field public static final int USAGE_SCRIPT = 1; // 0x1
}
- public static final deprecated class Allocation.MipmapControl extends java.lang.Enum {
+ public static final class Allocation.MipmapControl extends java.lang.Enum {
method public static android.renderscript.Allocation.MipmapControl valueOf(java.lang.String);
method public static final android.renderscript.Allocation.MipmapControl[] values();
- enum_constant public static final deprecated android.renderscript.Allocation.MipmapControl MIPMAP_FULL;
- enum_constant public static final deprecated android.renderscript.Allocation.MipmapControl MIPMAP_NONE;
- enum_constant public static final deprecated android.renderscript.Allocation.MipmapControl MIPMAP_ON_SYNC_TO_TEXTURE;
+ enum_constant public static final android.renderscript.Allocation.MipmapControl MIPMAP_FULL;
+ enum_constant public static final android.renderscript.Allocation.MipmapControl MIPMAP_NONE;
+ enum_constant public static final android.renderscript.Allocation.MipmapControl MIPMAP_ON_SYNC_TO_TEXTURE;
}
- public deprecated class AllocationAdapter extends android.renderscript.Allocation {
- method public static deprecated android.renderscript.AllocationAdapter create1D(android.renderscript.RenderScript, android.renderscript.Allocation);
- method public static deprecated android.renderscript.AllocationAdapter create2D(android.renderscript.RenderScript, android.renderscript.Allocation);
- method public deprecated void setFace(android.renderscript.Type.CubemapFace);
- method public deprecated void setLOD(int);
- method public deprecated void setY(int);
- method public deprecated void setZ(int);
+ public class AllocationAdapter extends android.renderscript.Allocation {
+ method public static android.renderscript.AllocationAdapter create1D(android.renderscript.RenderScript, android.renderscript.Allocation);
+ method public static android.renderscript.AllocationAdapter create2D(android.renderscript.RenderScript, android.renderscript.Allocation);
+ method public void setFace(android.renderscript.Type.CubemapFace);
+ method public void setLOD(int);
+ method public void setY(int);
+ method public void setZ(int);
}
- public deprecated class BaseObj {
- method public deprecated synchronized void destroy();
- method public deprecated java.lang.String getName();
- method public deprecated void setName(java.lang.String);
+ public class BaseObj {
+ method public synchronized void destroy();
+ method public java.lang.String getName();
+ method public void setName(java.lang.String);
}
- public deprecated class Byte2 {
+ public class Byte2 {
ctor public Byte2();
ctor public Byte2(byte, byte);
field public byte x;
field public byte y;
}
- public deprecated class Byte3 {
+ public class Byte3 {
ctor public Byte3();
ctor public Byte3(byte, byte, byte);
field public byte x;
@@ -18681,7 +18690,7 @@
field public byte z;
}
- public deprecated class Byte4 {
+ public class Byte4 {
ctor public Byte4();
ctor public Byte4(byte, byte, byte, byte);
field public byte w;
@@ -18690,14 +18699,14 @@
field public byte z;
}
- public deprecated class Double2 {
+ public class Double2 {
ctor public Double2();
ctor public Double2(double, double);
field public double x;
field public double y;
}
- public deprecated class Double3 {
+ public class Double3 {
ctor public Double3();
ctor public Double3(double, double, double);
field public double x;
@@ -18705,7 +18714,7 @@
field public double z;
}
- public deprecated class Double4 {
+ public class Double4 {
ctor public Double4();
ctor public Double4(double, double, double, double);
field public double w;
@@ -18714,83 +18723,92 @@
field public double z;
}
- public deprecated class Element extends android.renderscript.BaseObj {
- method public static deprecated android.renderscript.Element ALLOCATION(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element A_8(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F32(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F32_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F32_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F32_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F64(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F64_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F64_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element F64_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element FONT(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I16(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I16_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I16_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I16_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I32(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I32_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I32_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I32_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I64(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I64_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I64_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I64_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I8(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I8_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I8_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element I8_4(android.renderscript.RenderScript);
+ public class Element extends android.renderscript.BaseObj {
+ method public static android.renderscript.Element ALLOCATION(android.renderscript.RenderScript);
+ method public static android.renderscript.Element A_8(android.renderscript.RenderScript);
+ method public static android.renderscript.Element BOOLEAN(android.renderscript.RenderScript);
+ method public static android.renderscript.Element ELEMENT(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F32(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F32_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F32_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F64(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F64_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F64_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element F64_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element FONT(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I16(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I16_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I16_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I16_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I32(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I32_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I32_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I32_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I64(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I64_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I64_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I64_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I8(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I8_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I8_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element I8_4(android.renderscript.RenderScript);
method public static deprecated android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element MATRIX_4X4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element MESH(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element PROGRAM_FRAGMENT(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element PROGRAM_RASTER(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element PROGRAM_STORE(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element PROGRAM_VERTEX(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element RGBA_4444(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element RGBA_5551(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element RGBA_8888(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element RGB_565(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element RGB_888(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element SAMPLER(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element SCRIPT(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element TYPE(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U16(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U16_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U16_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U16_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U32(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U32_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U32_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U32_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U64(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U64_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U64_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U64_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U8(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U8_2(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U8_3(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element U8_4(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Element createPixel(android.renderscript.RenderScript, android.renderscript.Element.DataType, android.renderscript.Element.DataKind);
- method public static deprecated android.renderscript.Element createVector(android.renderscript.RenderScript, android.renderscript.Element.DataType, int);
- method public deprecated boolean isCompatible(android.renderscript.Element);
- method public deprecated boolean isComplex();
+ method public static android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element MATRIX_4X4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element MESH(android.renderscript.RenderScript);
+ method public static android.renderscript.Element PROGRAM_FRAGMENT(android.renderscript.RenderScript);
+ method public static android.renderscript.Element PROGRAM_RASTER(android.renderscript.RenderScript);
+ method public static android.renderscript.Element PROGRAM_STORE(android.renderscript.RenderScript);
+ method public static android.renderscript.Element PROGRAM_VERTEX(android.renderscript.RenderScript);
+ method public static android.renderscript.Element RGBA_4444(android.renderscript.RenderScript);
+ method public static android.renderscript.Element RGBA_5551(android.renderscript.RenderScript);
+ method public static android.renderscript.Element RGBA_8888(android.renderscript.RenderScript);
+ method public static android.renderscript.Element RGB_565(android.renderscript.RenderScript);
+ method public static android.renderscript.Element RGB_888(android.renderscript.RenderScript);
+ method public static android.renderscript.Element SAMPLER(android.renderscript.RenderScript);
+ method public static android.renderscript.Element SCRIPT(android.renderscript.RenderScript);
+ method public static android.renderscript.Element TYPE(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U16(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U16_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U16_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U16_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U32(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U32_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U32_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U32_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U64(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U64_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U64_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U64_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U8(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U8_2(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U8_3(android.renderscript.RenderScript);
+ method public static android.renderscript.Element U8_4(android.renderscript.RenderScript);
+ method public static android.renderscript.Element createPixel(android.renderscript.RenderScript, android.renderscript.Element.DataType, android.renderscript.Element.DataKind);
+ method public static android.renderscript.Element createVector(android.renderscript.RenderScript, android.renderscript.Element.DataType, int);
+ method public int getBytesSize();
+ method public android.renderscript.Element.DataKind getDataKind();
+ method public android.renderscript.Element.DataType getDataType();
+ method public android.renderscript.Element getSubElement(int);
+ method public int getSubElementArraySize(int);
+ method public int getSubElementCount();
+ method public java.lang.String getSubElementName(int);
+ method public int getSubElementOffsetBytes(int);
+ method public int getVectorSize();
+ method public boolean isCompatible(android.renderscript.Element);
+ method public boolean isComplex();
}
- public static deprecated class Element.Builder {
- ctor public deprecated Element.Builder(android.renderscript.RenderScript);
- method public deprecated android.renderscript.Element.Builder add(android.renderscript.Element, java.lang.String, int);
- method public deprecated android.renderscript.Element.Builder add(android.renderscript.Element, java.lang.String);
- method public deprecated android.renderscript.Element create();
+ public static class Element.Builder {
+ ctor public Element.Builder(android.renderscript.RenderScript);
+ method public android.renderscript.Element.Builder add(android.renderscript.Element, java.lang.String, int);
+ method public android.renderscript.Element.Builder add(android.renderscript.Element, java.lang.String);
+ method public android.renderscript.Element create();
}
- public static final deprecated class Element.DataKind extends java.lang.Enum {
+ public static final class Element.DataKind extends java.lang.Enum {
method public static android.renderscript.Element.DataKind valueOf(java.lang.String);
method public static final android.renderscript.Element.DataKind[] values();
enum_constant public static final android.renderscript.Element.DataKind PIXEL_A;
@@ -18802,7 +18820,7 @@
enum_constant public static final android.renderscript.Element.DataKind USER;
}
- public static final deprecated class Element.DataType extends java.lang.Enum {
+ public static final class Element.DataType extends java.lang.Enum {
method public static android.renderscript.Element.DataType valueOf(java.lang.String);
method public static final android.renderscript.Element.DataType[] values();
enum_constant public static final android.renderscript.Element.DataType BOOLEAN;
@@ -18811,6 +18829,7 @@
enum_constant public static final android.renderscript.Element.DataType MATRIX_2X2;
enum_constant public static final android.renderscript.Element.DataType MATRIX_3X3;
enum_constant public static final android.renderscript.Element.DataType MATRIX_4X4;
+ enum_constant public static final android.renderscript.Element.DataType NONE;
enum_constant public static final android.renderscript.Element.DataType RS_ALLOCATION;
enum_constant public static final android.renderscript.Element.DataType RS_ELEMENT;
enum_constant public static final android.renderscript.Element.DataType RS_FONT;
@@ -18835,7 +18854,7 @@
enum_constant public static final android.renderscript.Element.DataType UNSIGNED_8;
}
- public deprecated class FieldPacker {
+ public class FieldPacker {
ctor public FieldPacker(int);
method public void addBoolean(boolean);
method public void addF32(float);
@@ -18912,14 +18931,14 @@
method public deprecated android.renderscript.BaseObj getObject();
}
- public deprecated class Float2 {
+ public class Float2 {
ctor public Float2();
ctor public Float2(float, float);
field public float x;
field public float y;
}
- public deprecated class Float3 {
+ public class Float3 {
ctor public Float3();
ctor public Float3(float, float, float);
field public float x;
@@ -18927,7 +18946,7 @@
field public float z;
}
- public deprecated class Float4 {
+ public class Float4 {
ctor public Float4();
ctor public Float4(float, float, float, float);
field public float w;
@@ -18953,14 +18972,14 @@
enum_constant public static final deprecated android.renderscript.Font.Style NORMAL;
}
- public deprecated class Int2 {
+ public class Int2 {
ctor public Int2();
ctor public Int2(int, int);
field public int x;
field public int y;
}
- public deprecated class Int3 {
+ public class Int3 {
ctor public Int3();
ctor public Int3(int, int, int);
field public int x;
@@ -18968,7 +18987,7 @@
field public int z;
}
- public deprecated class Int4 {
+ public class Int4 {
ctor public Int4();
ctor public Int4(int, int, int, int);
field public int w;
@@ -18977,14 +18996,14 @@
field public int z;
}
- public deprecated class Long2 {
+ public class Long2 {
ctor public Long2();
ctor public Long2(long, long);
field public long x;
field public long y;
}
- public deprecated class Long3 {
+ public class Long3 {
ctor public Long3();
ctor public Long3(long, long, long);
field public long x;
@@ -18992,7 +19011,7 @@
field public long z;
}
- public deprecated class Long4 {
+ public class Long4 {
ctor public Long4();
ctor public Long4(long, long, long, long);
field public long w;
@@ -19001,78 +19020,78 @@
field public long z;
}
- public deprecated class Matrix2f {
- ctor public deprecated Matrix2f();
- ctor public deprecated Matrix2f(float[]);
- method public deprecated float get(int, int);
- method public deprecated float[] getArray();
- method public deprecated void load(android.renderscript.Matrix2f);
- method public deprecated void loadIdentity();
- method public deprecated void loadMultiply(android.renderscript.Matrix2f, android.renderscript.Matrix2f);
- method public deprecated void loadRotate(float);
- method public deprecated void loadScale(float, float);
- method public deprecated void multiply(android.renderscript.Matrix2f);
- method public deprecated void rotate(float);
- method public deprecated void scale(float, float);
- method public deprecated void set(int, int, float);
- method public deprecated void transpose();
+ public class Matrix2f {
+ ctor public Matrix2f();
+ ctor public Matrix2f(float[]);
+ method public float get(int, int);
+ method public float[] getArray();
+ method public void load(android.renderscript.Matrix2f);
+ method public void loadIdentity();
+ method public void loadMultiply(android.renderscript.Matrix2f, android.renderscript.Matrix2f);
+ method public void loadRotate(float);
+ method public void loadScale(float, float);
+ method public void multiply(android.renderscript.Matrix2f);
+ method public void rotate(float);
+ method public void scale(float, float);
+ method public void set(int, int, float);
+ method public void transpose();
}
- public deprecated class Matrix3f {
- ctor public deprecated Matrix3f();
- ctor public deprecated Matrix3f(float[]);
- method public deprecated float get(int, int);
- method public deprecated float[] getArray();
- method public deprecated void load(android.renderscript.Matrix3f);
- method public deprecated void loadIdentity();
- method public deprecated void loadMultiply(android.renderscript.Matrix3f, android.renderscript.Matrix3f);
- method public deprecated void loadRotate(float, float, float, float);
- method public deprecated void loadRotate(float);
- method public deprecated void loadScale(float, float);
- method public deprecated void loadScale(float, float, float);
- method public deprecated void loadTranslate(float, float);
- method public deprecated void multiply(android.renderscript.Matrix3f);
- method public deprecated void rotate(float, float, float, float);
- method public deprecated void rotate(float);
- method public deprecated void scale(float, float);
- method public deprecated void scale(float, float, float);
- method public deprecated void set(int, int, float);
- method public deprecated void translate(float, float);
- method public deprecated void transpose();
+ public class Matrix3f {
+ ctor public Matrix3f();
+ ctor public Matrix3f(float[]);
+ method public float get(int, int);
+ method public float[] getArray();
+ method public void load(android.renderscript.Matrix3f);
+ method public void loadIdentity();
+ method public void loadMultiply(android.renderscript.Matrix3f, android.renderscript.Matrix3f);
+ method public void loadRotate(float, float, float, float);
+ method public void loadRotate(float);
+ method public void loadScale(float, float);
+ method public void loadScale(float, float, float);
+ method public void loadTranslate(float, float);
+ method public void multiply(android.renderscript.Matrix3f);
+ method public void rotate(float, float, float, float);
+ method public void rotate(float);
+ method public void scale(float, float);
+ method public void scale(float, float, float);
+ method public void set(int, int, float);
+ method public void translate(float, float);
+ method public void transpose();
}
- public deprecated class Matrix4f {
- ctor public deprecated Matrix4f();
- ctor public deprecated Matrix4f(float[]);
- method public deprecated float get(int, int);
- method public deprecated float[] getArray();
- method public deprecated boolean inverse();
- method public deprecated boolean inverseTranspose();
- method public deprecated void load(android.renderscript.Matrix4f);
- method public deprecated void loadFrustum(float, float, float, float, float, float);
- method public deprecated void loadIdentity();
- method public deprecated void loadMultiply(android.renderscript.Matrix4f, android.renderscript.Matrix4f);
- method public deprecated void loadOrtho(float, float, float, float, float, float);
- method public deprecated void loadOrthoWindow(int, int);
- method public deprecated void loadPerspective(float, float, float, float);
- method public deprecated void loadProjectionNormalized(int, int);
- method public deprecated void loadRotate(float, float, float, float);
- method public deprecated void loadScale(float, float, float);
- method public deprecated void loadTranslate(float, float, float);
- method public deprecated void multiply(android.renderscript.Matrix4f);
- method public deprecated void rotate(float, float, float, float);
- method public deprecated void scale(float, float, float);
- method public deprecated void set(int, int, float);
- method public deprecated void translate(float, float, float);
- method public deprecated void transpose();
+ public class Matrix4f {
+ ctor public Matrix4f();
+ ctor public Matrix4f(float[]);
+ method public float get(int, int);
+ method public float[] getArray();
+ method public boolean inverse();
+ method public boolean inverseTranspose();
+ method public void load(android.renderscript.Matrix4f);
+ method public void loadFrustum(float, float, float, float, float, float);
+ method public void loadIdentity();
+ method public void loadMultiply(android.renderscript.Matrix4f, android.renderscript.Matrix4f);
+ method public void loadOrtho(float, float, float, float, float, float);
+ method public void loadOrthoWindow(int, int);
+ method public void loadPerspective(float, float, float, float);
+ method public void loadProjectionNormalized(int, int);
+ method public void loadRotate(float, float, float, float);
+ method public void loadScale(float, float, float);
+ method public void loadTranslate(float, float, float);
+ method public void multiply(android.renderscript.Matrix4f);
+ method public void rotate(float, float, float, float);
+ method public void scale(float, float, float);
+ method public void set(int, int, float);
+ method public void translate(float, float, float);
+ method public void transpose();
}
- public deprecated class Mesh extends android.renderscript.BaseObj {
- method public deprecated android.renderscript.Allocation getIndexSetAllocation(int);
- method public deprecated android.renderscript.Mesh.Primitive getPrimitive(int);
- method public deprecated int getPrimitiveCount();
- method public deprecated android.renderscript.Allocation getVertexAllocation(int);
- method public deprecated int getVertexAllocationCount();
+ public class Mesh extends android.renderscript.BaseObj {
+ method public android.renderscript.Allocation getIndexSetAllocation(int);
+ method public android.renderscript.Mesh.Primitive getPrimitive(int);
+ method public int getPrimitiveCount();
+ method public android.renderscript.Allocation getVertexAllocation(int);
+ method public int getVertexAllocationCount();
}
public static deprecated class Mesh.AllocationBuilder {
@@ -19085,27 +19104,27 @@
method public deprecated int getCurrentVertexTypeIndex();
}
- public static deprecated class Mesh.Builder {
- ctor public deprecated Mesh.Builder(android.renderscript.RenderScript, int);
- method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Type, android.renderscript.Mesh.Primitive);
- method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Mesh.Primitive);
- method public deprecated android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Element, int, android.renderscript.Mesh.Primitive);
- method public deprecated android.renderscript.Mesh.Builder addVertexType(android.renderscript.Type) throws java.lang.IllegalStateException;
- method public deprecated android.renderscript.Mesh.Builder addVertexType(android.renderscript.Element, int) throws java.lang.IllegalStateException;
- method public deprecated android.renderscript.Mesh create();
- method public deprecated int getCurrentIndexSetIndex();
- method public deprecated int getCurrentVertexTypeIndex();
+ public static class Mesh.Builder {
+ ctor public Mesh.Builder(android.renderscript.RenderScript, int);
+ method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Type, android.renderscript.Mesh.Primitive);
+ method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Mesh.Primitive);
+ method public android.renderscript.Mesh.Builder addIndexSetType(android.renderscript.Element, int, android.renderscript.Mesh.Primitive);
+ method public android.renderscript.Mesh.Builder addVertexType(android.renderscript.Type) throws java.lang.IllegalStateException;
+ method public android.renderscript.Mesh.Builder addVertexType(android.renderscript.Element, int) throws java.lang.IllegalStateException;
+ method public android.renderscript.Mesh create();
+ method public int getCurrentIndexSetIndex();
+ method public int getCurrentVertexTypeIndex();
}
- public static final deprecated class Mesh.Primitive extends java.lang.Enum {
+ public static final class Mesh.Primitive extends java.lang.Enum {
method public static android.renderscript.Mesh.Primitive valueOf(java.lang.String);
method public static final android.renderscript.Mesh.Primitive[] values();
- enum_constant public static final deprecated android.renderscript.Mesh.Primitive LINE;
- enum_constant public static final deprecated android.renderscript.Mesh.Primitive LINE_STRIP;
- enum_constant public static final deprecated android.renderscript.Mesh.Primitive POINT;
- enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE;
- enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE_FAN;
- enum_constant public static final deprecated android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
+ enum_constant public static final android.renderscript.Mesh.Primitive LINE;
+ enum_constant public static final android.renderscript.Mesh.Primitive LINE_STRIP;
+ enum_constant public static final android.renderscript.Mesh.Primitive POINT;
+ enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE;
+ enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_FAN;
+ enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
}
public static deprecated class Mesh.TriangleMeshBuilder {
@@ -19122,42 +19141,48 @@
field public static final deprecated int TEXTURE_0 = 256; // 0x100
}
- public deprecated class Program extends android.renderscript.BaseObj {
- method public deprecated void bindConstants(android.renderscript.Allocation, int);
- method public deprecated void bindSampler(android.renderscript.Sampler, int) throws java.lang.IllegalArgumentException;
- method public deprecated void bindTexture(android.renderscript.Allocation, int) throws java.lang.IllegalArgumentException;
+ public class Program extends android.renderscript.BaseObj {
+ method public void bindConstants(android.renderscript.Allocation, int);
+ method public void bindSampler(android.renderscript.Sampler, int) throws java.lang.IllegalArgumentException;
+ method public void bindTexture(android.renderscript.Allocation, int) throws java.lang.IllegalArgumentException;
+ method public android.renderscript.Type getConstant(int);
+ method public int getConstantCount();
+ method public int getTextureCount();
+ method public java.lang.String getTextureName(int);
+ method public android.renderscript.Program.TextureType getTextureType(int);
}
public static class Program.BaseProgramBuilder {
- ctor protected deprecated Program.BaseProgramBuilder(android.renderscript.RenderScript);
- method public deprecated android.renderscript.Program.BaseProgramBuilder addConstant(android.renderscript.Type) throws java.lang.IllegalStateException;
- method public deprecated android.renderscript.Program.BaseProgramBuilder addTexture(android.renderscript.Program.TextureType) throws java.lang.IllegalArgumentException;
- method public deprecated int getCurrentConstantIndex();
- method public deprecated int getCurrentTextureIndex();
- method protected deprecated void initProgram(android.renderscript.Program);
- method public deprecated android.renderscript.Program.BaseProgramBuilder setShader(java.lang.String);
- method public deprecated android.renderscript.Program.BaseProgramBuilder setShader(android.content.res.Resources, int);
+ ctor protected Program.BaseProgramBuilder(android.renderscript.RenderScript);
+ method public android.renderscript.Program.BaseProgramBuilder addConstant(android.renderscript.Type) throws java.lang.IllegalStateException;
+ method public android.renderscript.Program.BaseProgramBuilder addTexture(android.renderscript.Program.TextureType) throws java.lang.IllegalArgumentException;
+ method public android.renderscript.Program.BaseProgramBuilder addTexture(android.renderscript.Program.TextureType, java.lang.String) throws java.lang.IllegalArgumentException;
+ method public int getCurrentConstantIndex();
+ method public int getCurrentTextureIndex();
+ method protected void initProgram(android.renderscript.Program);
+ method public android.renderscript.Program.BaseProgramBuilder setShader(java.lang.String);
+ method public android.renderscript.Program.BaseProgramBuilder setShader(android.content.res.Resources, int);
}
- public static final deprecated class Program.TextureType extends java.lang.Enum {
+ public static final class Program.TextureType extends java.lang.Enum {
method public static android.renderscript.Program.TextureType valueOf(java.lang.String);
method public static final android.renderscript.Program.TextureType[] values();
- enum_constant public static final deprecated android.renderscript.Program.TextureType TEXTURE_2D;
- enum_constant public static final deprecated android.renderscript.Program.TextureType TEXTURE_CUBE;
+ enum_constant public static final android.renderscript.Program.TextureType TEXTURE_2D;
+ enum_constant public static final android.renderscript.Program.TextureType TEXTURE_CUBE;
}
- public deprecated class ProgramFragment extends android.renderscript.Program {
+ public class ProgramFragment extends android.renderscript.Program {
}
public static class ProgramFragment.Builder extends android.renderscript.Program.BaseProgramBuilder {
- ctor public deprecated ProgramFragment.Builder(android.renderscript.RenderScript);
- method public deprecated android.renderscript.ProgramFragment create();
+ ctor public ProgramFragment.Builder(android.renderscript.RenderScript);
+ method public android.renderscript.ProgramFragment create();
}
public deprecated class ProgramFragmentFixedFunction extends android.renderscript.ProgramFragment {
}
- public static class ProgramFragmentFixedFunction.Builder {
+ public static deprecated class ProgramFragmentFixedFunction.Builder {
ctor public deprecated ProgramFragmentFixedFunction.Builder(android.renderscript.RenderScript);
method public deprecated android.renderscript.ProgramFragmentFixedFunction create();
method public deprecated android.renderscript.ProgramFragmentFixedFunction.Builder setPointSpriteTexCoordinateReplacement(boolean);
@@ -19183,97 +19208,110 @@
enum_constant public static final deprecated android.renderscript.ProgramFragmentFixedFunction.Builder.Format RGBA;
}
- public deprecated class ProgramRaster extends android.renderscript.BaseObj {
- method public static deprecated android.renderscript.ProgramRaster CULL_BACK(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.ProgramRaster CULL_FRONT(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.ProgramRaster CULL_NONE(android.renderscript.RenderScript);
+ public class ProgramRaster extends android.renderscript.BaseObj {
+ method public static android.renderscript.ProgramRaster CULL_BACK(android.renderscript.RenderScript);
+ method public static android.renderscript.ProgramRaster CULL_FRONT(android.renderscript.RenderScript);
+ method public static android.renderscript.ProgramRaster CULL_NONE(android.renderscript.RenderScript);
+ method public android.renderscript.ProgramRaster.CullMode getCullMode();
+ method public boolean isPointSpriteEnabled();
}
- public static deprecated class ProgramRaster.Builder {
- ctor public deprecated ProgramRaster.Builder(android.renderscript.RenderScript);
- method public deprecated android.renderscript.ProgramRaster create();
- method public deprecated android.renderscript.ProgramRaster.Builder setCullMode(android.renderscript.ProgramRaster.CullMode);
- method public deprecated android.renderscript.ProgramRaster.Builder setPointSpriteEnabled(boolean);
+ public static class ProgramRaster.Builder {
+ ctor public ProgramRaster.Builder(android.renderscript.RenderScript);
+ method public android.renderscript.ProgramRaster create();
+ method public android.renderscript.ProgramRaster.Builder setCullMode(android.renderscript.ProgramRaster.CullMode);
+ method public android.renderscript.ProgramRaster.Builder setPointSpriteEnabled(boolean);
}
- public static final deprecated class ProgramRaster.CullMode extends java.lang.Enum {
+ public static final class ProgramRaster.CullMode extends java.lang.Enum {
method public static android.renderscript.ProgramRaster.CullMode valueOf(java.lang.String);
method public static final android.renderscript.ProgramRaster.CullMode[] values();
- enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode BACK;
- enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode FRONT;
- enum_constant public static final deprecated android.renderscript.ProgramRaster.CullMode NONE;
+ enum_constant public static final android.renderscript.ProgramRaster.CullMode BACK;
+ enum_constant public static final android.renderscript.ProgramRaster.CullMode FRONT;
+ enum_constant public static final android.renderscript.ProgramRaster.CullMode NONE;
}
- public deprecated class ProgramStore extends android.renderscript.BaseObj {
- method public static deprecated android.renderscript.ProgramStore BLEND_ALPHA_DEPTH_NONE(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.ProgramStore BLEND_ALPHA_DEPTH_TEST(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.ProgramStore BLEND_NONE_DEPTH_NONE(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.ProgramStore BLEND_NONE_DEPTH_TEST(android.renderscript.RenderScript);
+ public class ProgramStore extends android.renderscript.BaseObj {
+ method public static android.renderscript.ProgramStore BLEND_ALPHA_DEPTH_NONE(android.renderscript.RenderScript);
+ method public static android.renderscript.ProgramStore BLEND_ALPHA_DEPTH_TEST(android.renderscript.RenderScript);
+ method public static android.renderscript.ProgramStore BLEND_NONE_DEPTH_NONE(android.renderscript.RenderScript);
+ method public static android.renderscript.ProgramStore BLEND_NONE_DEPTH_TEST(android.renderscript.RenderScript);
+ method public android.renderscript.ProgramStore.BlendDstFunc getBlendDstFunc();
+ method public android.renderscript.ProgramStore.BlendSrcFunc getBlendSrcFunc();
+ method public android.renderscript.ProgramStore.DepthFunc getDepthFunc();
+ method public boolean isColorMaskAlphaEnabled();
+ method public boolean isColorMaskBlueEnabled();
+ method public boolean isColorMaskGreenEnabled();
+ method public boolean isColorMaskRedEnabled();
+ method public boolean isDepthMaskEnabled();
+ method public boolean isDitherEnabled();
}
- public static final deprecated class ProgramStore.BlendDstFunc extends java.lang.Enum {
+ public static final class ProgramStore.BlendDstFunc extends java.lang.Enum {
method public static android.renderscript.ProgramStore.BlendDstFunc valueOf(java.lang.String);
method public static final android.renderscript.ProgramStore.BlendDstFunc[] values();
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc DST_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc ONE;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc ONE_MINUS_DST_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc ONE_MINUS_SRC_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc ONE_MINUS_SRC_COLOR;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc SRC_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc SRC_COLOR;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendDstFunc ZERO;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc DST_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc ONE;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc ONE_MINUS_DST_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc ONE_MINUS_SRC_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc ONE_MINUS_SRC_COLOR;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc SRC_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc SRC_COLOR;
+ enum_constant public static final android.renderscript.ProgramStore.BlendDstFunc ZERO;
}
- public static final deprecated class ProgramStore.BlendSrcFunc extends java.lang.Enum {
+ public static final class ProgramStore.BlendSrcFunc extends java.lang.Enum {
method public static android.renderscript.ProgramStore.BlendSrcFunc valueOf(java.lang.String);
method public static final android.renderscript.ProgramStore.BlendSrcFunc[] values();
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc DST_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc DST_COLOR;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc ONE;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc ONE_MINUS_DST_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc ONE_MINUS_DST_COLOR;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc ONE_MINUS_SRC_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc SRC_ALPHA;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc SRC_ALPHA_SATURATE;
- enum_constant public static final deprecated android.renderscript.ProgramStore.BlendSrcFunc ZERO;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc DST_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc DST_COLOR;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc ONE;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc ONE_MINUS_DST_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc ONE_MINUS_DST_COLOR;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc ONE_MINUS_SRC_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc SRC_ALPHA;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc SRC_ALPHA_SATURATE;
+ enum_constant public static final android.renderscript.ProgramStore.BlendSrcFunc ZERO;
}
- public static deprecated class ProgramStore.Builder {
+ public static class ProgramStore.Builder {
ctor public ProgramStore.Builder(android.renderscript.RenderScript);
- method public deprecated android.renderscript.ProgramStore create();
- method public deprecated android.renderscript.ProgramStore.Builder setBlendFunc(android.renderscript.ProgramStore.BlendSrcFunc, android.renderscript.ProgramStore.BlendDstFunc);
- method public deprecated android.renderscript.ProgramStore.Builder setColorMaskEnabled(boolean, boolean, boolean, boolean);
- method public deprecated android.renderscript.ProgramStore.Builder setDepthFunc(android.renderscript.ProgramStore.DepthFunc);
- method public deprecated android.renderscript.ProgramStore.Builder setDepthMaskEnabled(boolean);
- method public deprecated android.renderscript.ProgramStore.Builder setDitherEnabled(boolean);
+ method public android.renderscript.ProgramStore create();
+ method public android.renderscript.ProgramStore.Builder setBlendFunc(android.renderscript.ProgramStore.BlendSrcFunc, android.renderscript.ProgramStore.BlendDstFunc);
+ method public android.renderscript.ProgramStore.Builder setColorMaskEnabled(boolean, boolean, boolean, boolean);
+ method public android.renderscript.ProgramStore.Builder setDepthFunc(android.renderscript.ProgramStore.DepthFunc);
+ method public android.renderscript.ProgramStore.Builder setDepthMaskEnabled(boolean);
+ method public android.renderscript.ProgramStore.Builder setDitherEnabled(boolean);
}
- public static final deprecated class ProgramStore.DepthFunc extends java.lang.Enum {
+ public static final class ProgramStore.DepthFunc extends java.lang.Enum {
method public static android.renderscript.ProgramStore.DepthFunc valueOf(java.lang.String);
method public static final android.renderscript.ProgramStore.DepthFunc[] values();
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc ALWAYS;
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc EQUAL;
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc GREATER;
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc GREATER_OR_EQUAL;
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc LESS;
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc LESS_OR_EQUAL;
- enum_constant public static final deprecated android.renderscript.ProgramStore.DepthFunc NOT_EQUAL;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc ALWAYS;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc EQUAL;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc GREATER;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc GREATER_OR_EQUAL;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc LESS;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc LESS_OR_EQUAL;
+ enum_constant public static final android.renderscript.ProgramStore.DepthFunc NOT_EQUAL;
}
- public deprecated class ProgramVertex extends android.renderscript.Program {
+ public class ProgramVertex extends android.renderscript.Program {
+ method public android.renderscript.Element getInput(int);
+ method public int getInputCount();
}
- public static deprecated class ProgramVertex.Builder extends android.renderscript.Program.BaseProgramBuilder {
- ctor public deprecated ProgramVertex.Builder(android.renderscript.RenderScript);
- method public deprecated android.renderscript.ProgramVertex.Builder addInput(android.renderscript.Element) throws java.lang.IllegalStateException;
- method public deprecated android.renderscript.ProgramVertex create();
+ public static class ProgramVertex.Builder extends android.renderscript.Program.BaseProgramBuilder {
+ ctor public ProgramVertex.Builder(android.renderscript.RenderScript);
+ method public android.renderscript.ProgramVertex.Builder addInput(android.renderscript.Element) throws java.lang.IllegalStateException;
+ method public android.renderscript.ProgramVertex create();
}
public deprecated class ProgramVertexFixedFunction extends android.renderscript.ProgramVertex {
method public deprecated void bindConstants(android.renderscript.ProgramVertexFixedFunction.Constants);
}
- public static class ProgramVertexFixedFunction.Builder {
+ public static deprecated class ProgramVertexFixedFunction.Builder {
ctor public deprecated ProgramVertexFixedFunction.Builder(android.renderscript.RenderScript);
method public deprecated android.renderscript.ProgramVertexFixedFunction create();
method public deprecated android.renderscript.ProgramVertexFixedFunction.Builder setTextureMatrixEnable(boolean);
@@ -19287,79 +19325,79 @@
method public deprecated void setTexture(android.renderscript.Matrix4f);
}
- public deprecated class RSDriverException extends android.renderscript.RSRuntimeException {
+ public class RSDriverException extends android.renderscript.RSRuntimeException {
ctor public RSDriverException(java.lang.String);
}
- public deprecated class RSIllegalArgumentException extends android.renderscript.RSRuntimeException {
- ctor public deprecated RSIllegalArgumentException(java.lang.String);
+ public class RSIllegalArgumentException extends android.renderscript.RSRuntimeException {
+ ctor public RSIllegalArgumentException(java.lang.String);
}
- public deprecated class RSInvalidStateException extends android.renderscript.RSRuntimeException {
- ctor public deprecated RSInvalidStateException(java.lang.String);
+ public class RSInvalidStateException extends android.renderscript.RSRuntimeException {
+ ctor public RSInvalidStateException(java.lang.String);
}
- public deprecated class RSRuntimeException extends java.lang.RuntimeException {
- ctor public deprecated RSRuntimeException(java.lang.String);
+ public class RSRuntimeException extends java.lang.RuntimeException {
+ ctor public RSRuntimeException(java.lang.String);
}
public deprecated class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
ctor public deprecated RSSurfaceView(android.content.Context);
ctor public deprecated RSSurfaceView(android.content.Context, android.util.AttributeSet);
- method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public void destroyRenderScriptGL();
- method public android.renderscript.RenderScriptGL getRenderScriptGL();
+ method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public deprecated void destroyRenderScriptGL();
+ method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
method public deprecated void pause();
method public deprecated void resume();
- method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
+ method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
method public deprecated void surfaceChanged(android.view.SurfaceHolder, int, int, int);
method public deprecated void surfaceCreated(android.view.SurfaceHolder);
method public deprecated void surfaceDestroyed(android.view.SurfaceHolder);
}
- public deprecated class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
- ctor public deprecated RSTextureView(android.content.Context);
- ctor public deprecated RSTextureView(android.content.Context, android.util.AttributeSet);
- method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public deprecated void destroyRenderScriptGL();
- method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
+ public class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
+ ctor public RSTextureView(android.content.Context);
+ ctor public RSTextureView(android.content.Context, android.util.AttributeSet);
+ method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public void destroyRenderScriptGL();
+ method public android.renderscript.RenderScriptGL getRenderScriptGL();
method public void onSurfaceTextureAvailable(android.graphics.SurfaceTexture, int, int);
method public boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture);
method public void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture, int, int);
method public void onSurfaceTextureUpdated(android.graphics.SurfaceTexture);
- method public deprecated void pause();
- method public deprecated void resume();
- method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
+ method public void pause();
+ method public void resume();
+ method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
}
- public deprecated class RenderScript {
- method public deprecated void contextDump();
- method public static deprecated android.renderscript.RenderScript create(android.content.Context);
- method public deprecated void destroy();
- method public deprecated void finish();
- method public final deprecated android.content.Context getApplicationContext();
+ public class RenderScript {
+ method public void contextDump();
+ method public static android.renderscript.RenderScript create(android.content.Context);
+ method public void destroy();
+ method public void finish();
+ method public final android.content.Context getApplicationContext();
method public android.renderscript.RenderScript.RSErrorHandler getErrorHandler();
method public android.renderscript.RenderScript.RSMessageHandler getMessageHandler();
method public void setErrorHandler(android.renderscript.RenderScript.RSErrorHandler);
method public void setMessageHandler(android.renderscript.RenderScript.RSMessageHandler);
- method public deprecated void setPriority(android.renderscript.RenderScript.Priority);
+ method public void setPriority(android.renderscript.RenderScript.Priority);
}
- public static final deprecated class RenderScript.Priority extends java.lang.Enum {
+ public static final class RenderScript.Priority extends java.lang.Enum {
method public static android.renderscript.RenderScript.Priority valueOf(java.lang.String);
method public static final android.renderscript.RenderScript.Priority[] values();
enum_constant public static final android.renderscript.RenderScript.Priority LOW;
enum_constant public static final android.renderscript.RenderScript.Priority NORMAL;
}
- public static deprecated class RenderScript.RSErrorHandler implements java.lang.Runnable {
+ public static class RenderScript.RSErrorHandler implements java.lang.Runnable {
ctor public RenderScript.RSErrorHandler();
method public void run();
field protected java.lang.String mErrorMessage;
field protected int mErrorNum;
}
- public static deprecated class RenderScript.RSMessageHandler implements java.lang.Runnable {
+ public static class RenderScript.RSMessageHandler implements java.lang.Runnable {
ctor public RenderScript.RSMessageHandler();
method public void run();
field protected int[] mData;
@@ -19367,40 +19405,45 @@
field protected int mLength;
}
- public deprecated class RenderScriptGL extends android.renderscript.RenderScript {
- ctor public deprecated RenderScriptGL(android.content.Context, android.renderscript.RenderScriptGL.SurfaceConfig);
- method public deprecated void bindProgramFragment(android.renderscript.ProgramFragment);
- method public deprecated void bindProgramRaster(android.renderscript.ProgramRaster);
- method public deprecated void bindProgramStore(android.renderscript.ProgramStore);
- method public deprecated void bindProgramVertex(android.renderscript.ProgramVertex);
- method public deprecated void bindRootScript(android.renderscript.Script);
- method public deprecated int getHeight();
- method public deprecated int getWidth();
- method public deprecated void pause();
- method public deprecated void resume();
- method public deprecated void setSurface(android.view.SurfaceHolder, int, int);
+ public class RenderScriptGL extends android.renderscript.RenderScript {
+ ctor public RenderScriptGL(android.content.Context, android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public void bindProgramFragment(android.renderscript.ProgramFragment);
+ method public void bindProgramRaster(android.renderscript.ProgramRaster);
+ method public void bindProgramStore(android.renderscript.ProgramStore);
+ method public void bindProgramVertex(android.renderscript.ProgramVertex);
+ method public void bindRootScript(android.renderscript.Script);
+ method public int getHeight();
+ method public int getWidth();
+ method public void pause();
+ method public void resume();
+ method public void setSurface(android.view.SurfaceHolder, int, int);
method public deprecated void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
}
- public static deprecated class RenderScriptGL.SurfaceConfig {
+ public static class RenderScriptGL.SurfaceConfig {
ctor public RenderScriptGL.SurfaceConfig();
ctor public RenderScriptGL.SurfaceConfig(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public deprecated void setAlpha(int, int);
- method public deprecated void setColor(int, int);
- method public deprecated void setDepth(int, int);
- method public deprecated void setSamples(int, int, float);
+ method public void setAlpha(int, int);
+ method public void setColor(int, int);
+ method public void setDepth(int, int);
+ method public void setSamples(int, int, float);
}
- public deprecated class Sampler extends android.renderscript.BaseObj {
- method public static deprecated android.renderscript.Sampler CLAMP_LINEAR(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Sampler CLAMP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Sampler CLAMP_NEAREST(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Sampler WRAP_LINEAR(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Sampler WRAP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
- method public static deprecated android.renderscript.Sampler WRAP_NEAREST(android.renderscript.RenderScript);
+ public class Sampler extends android.renderscript.BaseObj {
+ method public static android.renderscript.Sampler CLAMP_LINEAR(android.renderscript.RenderScript);
+ method public static android.renderscript.Sampler CLAMP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
+ method public static android.renderscript.Sampler CLAMP_NEAREST(android.renderscript.RenderScript);
+ method public static android.renderscript.Sampler WRAP_LINEAR(android.renderscript.RenderScript);
+ method public static android.renderscript.Sampler WRAP_LINEAR_MIP_LINEAR(android.renderscript.RenderScript);
+ method public static android.renderscript.Sampler WRAP_NEAREST(android.renderscript.RenderScript);
+ method public float getAnisotropy();
+ method public android.renderscript.Sampler.Value getMagnification();
+ method public android.renderscript.Sampler.Value getMinification();
+ method public android.renderscript.Sampler.Value getWrapS();
+ method public android.renderscript.Sampler.Value getWrapT();
}
- public static deprecated class Sampler.Builder {
+ public static class Sampler.Builder {
ctor public Sampler.Builder(android.renderscript.RenderScript);
method public android.renderscript.Sampler create();
method public void setAnisotropy(float);
@@ -19410,31 +19453,31 @@
method public void setWrapT(android.renderscript.Sampler.Value);
}
- public static final deprecated class Sampler.Value extends java.lang.Enum {
+ public static final class Sampler.Value extends java.lang.Enum {
method public static android.renderscript.Sampler.Value valueOf(java.lang.String);
method public static final android.renderscript.Sampler.Value[] values();
- enum_constant public static final deprecated android.renderscript.Sampler.Value CLAMP;
- enum_constant public static final deprecated android.renderscript.Sampler.Value LINEAR;
- enum_constant public static final deprecated android.renderscript.Sampler.Value LINEAR_MIP_LINEAR;
- enum_constant public static final deprecated android.renderscript.Sampler.Value LINEAR_MIP_NEAREST;
- enum_constant public static final deprecated android.renderscript.Sampler.Value NEAREST;
- enum_constant public static final deprecated android.renderscript.Sampler.Value WRAP;
+ enum_constant public static final android.renderscript.Sampler.Value CLAMP;
+ enum_constant public static final android.renderscript.Sampler.Value LINEAR;
+ enum_constant public static final android.renderscript.Sampler.Value LINEAR_MIP_LINEAR;
+ enum_constant public static final android.renderscript.Sampler.Value LINEAR_MIP_NEAREST;
+ enum_constant public static final android.renderscript.Sampler.Value NEAREST;
+ enum_constant public static final android.renderscript.Sampler.Value WRAP;
}
- public deprecated class Script extends android.renderscript.BaseObj {
- method public deprecated void bindAllocation(android.renderscript.Allocation, int);
- method protected deprecated void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
- method protected deprecated void invoke(int);
- method protected deprecated void invoke(int, android.renderscript.FieldPacker);
- method public deprecated void setTimeZone(java.lang.String);
- method public deprecated void setVar(int, float);
- method public deprecated void setVar(int, double);
- method public deprecated void setVar(int, int);
- method public deprecated void setVar(int, long);
- method public deprecated void setVar(int, boolean);
- method public deprecated void setVar(int, android.renderscript.BaseObj);
- method public deprecated void setVar(int, android.renderscript.FieldPacker);
- method public deprecated void setVar(int, android.renderscript.FieldPacker, android.renderscript.Element, int[]);
+ public class Script extends android.renderscript.BaseObj {
+ method public void bindAllocation(android.renderscript.Allocation, int);
+ method protected void forEach(int, android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.FieldPacker);
+ method protected void invoke(int);
+ method protected void invoke(int, android.renderscript.FieldPacker);
+ method public void setTimeZone(java.lang.String);
+ method public void setVar(int, float);
+ method public void setVar(int, double);
+ method public void setVar(int, int);
+ method public void setVar(int, long);
+ method public void setVar(int, boolean);
+ method public void setVar(int, android.renderscript.BaseObj);
+ method public void setVar(int, android.renderscript.FieldPacker);
+ method public void setVar(int, android.renderscript.FieldPacker, android.renderscript.Element, int[]);
}
public static class Script.Builder {
@@ -19452,19 +19495,19 @@
field protected android.renderscript.Element mElement;
}
- public deprecated class ScriptC extends android.renderscript.Script {
- ctor protected deprecated ScriptC(int, android.renderscript.RenderScript);
- ctor protected deprecated ScriptC(android.renderscript.RenderScript, android.content.res.Resources, int);
+ public class ScriptC extends android.renderscript.Script {
+ ctor protected ScriptC(int, android.renderscript.RenderScript);
+ ctor protected ScriptC(android.renderscript.RenderScript, android.content.res.Resources, int);
}
- public deprecated class Short2 {
+ public class Short2 {
ctor public Short2();
ctor public Short2(short, short);
field public short x;
field public short y;
}
- public deprecated class Short3 {
+ public class Short3 {
ctor public Short3();
ctor public Short3(short, short, short);
field public short x;
@@ -19472,7 +19515,7 @@
field public short z;
}
- public deprecated class Short4 {
+ public class Short4 {
ctor public Short4();
ctor public Short4(short, short, short, short);
field public short w;
@@ -19481,22 +19524,22 @@
field public short z;
}
- public deprecated class Type extends android.renderscript.BaseObj {
- method public deprecated int getCount();
- method public deprecated android.renderscript.Element getElement();
- method public deprecated int getX();
- method public deprecated int getY();
- method public deprecated int getZ();
- method public deprecated boolean hasFaces();
- method public deprecated boolean hasMipmaps();
+ public class Type extends android.renderscript.BaseObj {
+ method public int getCount();
+ method public android.renderscript.Element getElement();
+ method public int getX();
+ method public int getY();
+ method public int getZ();
+ method public boolean hasFaces();
+ method public boolean hasMipmaps();
}
- public static deprecated class Type.Builder {
- ctor public deprecated Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
- method public deprecated android.renderscript.Type create();
+ public static class Type.Builder {
+ ctor public Type.Builder(android.renderscript.RenderScript, android.renderscript.Element);
+ method public android.renderscript.Type create();
method public android.renderscript.Type.Builder setFaces(boolean);
method public android.renderscript.Type.Builder setMipmaps(boolean);
- method public deprecated android.renderscript.Type.Builder setX(int);
+ method public android.renderscript.Type.Builder setX(int);
method public android.renderscript.Type.Builder setY(int);
}
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java
index b644dd1..c559e54 100644
--- a/core/java/android/accessibilityservice/AccessibilityService.java
+++ b/core/java/android/accessibilityservice/AccessibilityService.java
@@ -284,14 +284,14 @@
public static final int GESTURE_SWIPE_DOWN_AND_RIGHT = 16;
/**
- * The user has performed a two finger tap gesture on the touch screen.
+ * The user has performed a double tap gesture on the touch screen.
*/
- public static final int GESTURE_TWO_FINGER_TAP = 17;
+ public static final int GESTURE_DOUBLE_TAP = 17;
/**
- * The user has performed a two finger long press gesture on the touch screen.
+ * The user has performed a tap and hold gesture on the touch screen.
*/
- public static final int GESTURE_TWO_FINGER_LONG_PRESS = 18;
+ public static final int GESTURE_TAP_AND_HOLD = 18;
/**
* The {@link Intent} that must be declared as handled by the service.
@@ -408,8 +408,8 @@
* @see #GESTURE_SWIPE_RIGHT_AND_DOWN
* @see #GESTURE_CLOCKWISE_CIRCLE
* @see #GESTURE_COUNTER_CLOCKWISE_CIRCLE
- * @see #GESTURE_TWO_FINGER_TAP
- * @see #GESTURE_TWO_FINGER_LONG_PRESS
+ * @see #GESTURE_DOUBLE_TAP
+ * @see #GESTURE_TAP_AND_HOLD
*/
protected boolean onGesture(int gestureId) {
// TODO: Describe the default gesture processing in the javaDoc once it is finalized.
diff --git a/core/java/android/accessibilityservice/UiTestAutomationBridge.java b/core/java/android/accessibilityservice/UiTestAutomationBridge.java
index 4d4bfeb..69195c1 100644
--- a/core/java/android/accessibilityservice/UiTestAutomationBridge.java
+++ b/core/java/android/accessibilityservice/UiTestAutomationBridge.java
@@ -189,6 +189,7 @@
final AccessibilityServiceInfo info = new AccessibilityServiceInfo();
info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;
info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
+ info.flags |= AccessibilityNodeInfo.INCLUDE_NOT_IMPORTANT_VIEWS;
try {
manager.registerUiTestAutomationService(mListener, info);
diff --git a/core/java/android/app/TaskStackBuilder.java b/core/java/android/app/TaskStackBuilder.java
index e546f6c..14c5736 100644
--- a/core/java/android/app/TaskStackBuilder.java
+++ b/core/java/android/app/TaskStackBuilder.java
@@ -196,18 +196,12 @@
try {
ActivityInfo info = pm.getActivityInfo(sourceActivityName, 0);
String parentActivity = info.parentActivityName;
- Intent parent = new Intent().setComponent(
- new ComponentName(info.packageName, parentActivity));
- while (parent != null) {
+ while (parentActivity != null) {
+ Intent parent = new Intent().setComponent(
+ new ComponentName(info.packageName, parentActivity));
mIntents.add(insertAt, parent);
info = pm.getActivityInfo(parent.getComponent(), 0);
parentActivity = info.parentActivityName;
- if (parentActivity != null) {
- parent = new Intent().setComponent(
- new ComponentName(info.packageName, parentActivity));
- } else {
- parent = null;
- }
}
} catch (NameNotFoundException e) {
Log.e(TAG, "Bad ComponentName while traversing activity parent metadata");
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index 6c7e940..226e107 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -197,6 +197,29 @@
long delayUntil;
final ArrayList<Pair<Bundle, Long>> periodicSyncs;
+ /**
+ * Copy constructor for making deep-ish copies. Only the bundles stored
+ * in periodic syncs can make unexpected changes.
+ *
+ * @param toCopy AuthorityInfo to be copied.
+ */
+ AuthorityInfo(AuthorityInfo toCopy) {
+ account = toCopy.account;
+ userId = toCopy.userId;
+ authority = toCopy.authority;
+ ident = toCopy.ident;
+ enabled = toCopy.enabled;
+ syncable = toCopy.syncable;
+ backoffTime = toCopy.backoffTime;
+ backoffDelay = toCopy.backoffDelay;
+ delayUntil = toCopy.delayUntil;
+ periodicSyncs = new ArrayList<Pair<Bundle, Long>>();
+ for (Pair<Bundle, Long> sync : toCopy.periodicSyncs) {
+ // Still not a perfect copy, because we are just copying the mappings.
+ periodicSyncs.add(Pair.create(new Bundle(sync.first), sync.second));
+ }
+ }
+
AuthorityInfo(Account account, int userId, String authority, int ident) {
this.account = account;
this.userId = userId;
@@ -1212,7 +1235,8 @@
final int N = mAuthorities.size();
ArrayList<AuthorityInfo> infos = new ArrayList<AuthorityInfo>(N);
for (int i=0; i<N; i++) {
- infos.add(mAuthorities.valueAt(i));
+ // Make deep copy because AuthorityInfo syncs are liable to change.
+ infos.add(new AuthorityInfo(mAuthorities.valueAt(i)));
}
return infos;
}
diff --git a/core/java/android/content/res/AssetFileDescriptor.java b/core/java/android/content/res/AssetFileDescriptor.java
index 9893133..7d46710 100644
--- a/core/java/android/content/res/AssetFileDescriptor.java
+++ b/core/java/android/content/res/AssetFileDescriptor.java
@@ -52,6 +52,9 @@
*/
public AssetFileDescriptor(ParcelFileDescriptor fd, long startOffset,
long length) {
+ if (fd == null) {
+ throw new IllegalArgumentException("fd must not be null");
+ }
if (length < 0 && startOffset != 0) {
throw new IllegalArgumentException(
"startOffset must be 0 when using UNKNOWN_LENGTH");
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 332f40a..33dea6c 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -402,7 +402,7 @@
mShowInputFlags = 0;
mShowInputRequested = false;
mShowInputForced = false;
- hideWindow();
+ doHideWindow();
if (resultReceiver != null) {
resultReceiver.send(wasVis != isInputViewShown()
? InputMethodManager.RESULT_HIDDEN
@@ -737,7 +737,7 @@
onDisplayCompletions(completions);
}
} else {
- hideWindow();
+ doHideWindow();
}
} else if (mCandidatesVisibility == View.VISIBLE) {
// If the candidates are currently visible, make sure the
@@ -745,7 +745,7 @@
showWindow(false);
} else {
// Otherwise hide the window.
- hideWindow();
+ doHideWindow();
}
// If user uses hard keyboard, IME button should always be shown.
boolean showing = onEvaluateInputViewShown();
@@ -1096,7 +1096,7 @@
if (shown) {
showWindow(false);
} else {
- hideWindow();
+ doHideWindow();
}
}
}
@@ -1449,9 +1449,13 @@
mCandidatesViewStarted = false;
}
+ private void doHideWindow() {
+ mImm.setImeWindowStatus(mToken, 0, mBackDisposition);
+ hideWindow();
+ }
+
public void hideWindow() {
finishViews();
- mImm.setImeWindowStatus(mToken, 0, mBackDisposition);
if (mWindowVisible) {
mWindow.hide();
mWindowVisible = false;
@@ -1703,7 +1707,7 @@
// If we have the window visible for some other reason --
// most likely to show candidates -- then just get rid
// of it. This really shouldn't happen, but just in case...
- if (doIt) hideWindow();
+ if (doIt) doHideWindow();
}
return true;
}
diff --git a/core/java/android/os/Trace.java b/core/java/android/os/Trace.java
index ac9ee26..7b6fd64 100644
--- a/core/java/android/os/Trace.java
+++ b/core/java/android/os/Trace.java
@@ -39,6 +39,14 @@
public static final long TRACE_TAG_SYNC_MANAGER = 1L << 7;
public static final long TRACE_TAG_AUDIO = 1L << 8;
+ public static final int TRACE_FLAGS_START_BIT = 1;
+ public static final String[] TRACE_TAGS = {
+ "Graphics", "Input", "View", "WebView", "Window Manager",
+ "Activity Manager", "Sync Manager", "Audio"
+ };
+
+ public static final String PROPERTY_TRACE_TAG_ENABLEFLAGS = "debug.atrace.tags.enableflags";
+
private static final long sEnabledTags = nativeGetEnabledTags();
private static native long nativeGetEnabledTags();
diff --git a/core/java/android/preference/MultiCheckPreference.java b/core/java/android/preference/MultiCheckPreference.java
index 735f66ae..6953075 100644
--- a/core/java/android/preference/MultiCheckPreference.java
+++ b/core/java/android/preference/MultiCheckPreference.java
@@ -136,11 +136,25 @@
*
* @return The array of values.
*/
- public CharSequence[] getEntryValues() {
+ public String[] getEntryValues() {
return mEntryValues;
}
/**
+ * Get the boolean state of a given value.
+ */
+ public boolean getValue(int index) {
+ return mSetValues[index];
+ }
+
+ /**
+ * Set the boolean state of a given value.
+ */
+ public void setValue(int index, boolean state) {
+ mSetValues[index] = state;
+ }
+
+ /**
* Sets the current values.
*/
public void setValues(boolean[] values) {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 2c49bd2..ba8c4c9 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1557,6 +1557,9 @@
* will likely be removed in a future release with support for
* audio/vibe feedback profiles.
*
+ * Not used anymore. On devices with vibrator, the user explicitly selects
+ * silent or vibrate mode.
+ * Kept for use by legacy database upgrade code in DatabaseHelper.
* @hide
*/
public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
@@ -1746,6 +1749,20 @@
public static final String USER_ROTATION = "user_rotation";
/**
+ * Whether the phone vibrates when it is ringing due to an incoming call. This will
+ * be used by Phone and Setting apps; it shouldn't affect other apps.
+ * The value is boolean (1 or 0).
+ *
+ * Note: this is not same as "vibrate on ring", which had been available until ICS.
+ * It was about AudioManager's setting and thus affected all the applications which
+ * relied on the setting, while this is purely about the vibration setting for incoming
+ * calls.
+ *
+ * @hide
+ */
+ public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
+
+ /**
* Whether the audible DTMF tones are played by the dialer when dialing. The value is
* boolean (1 or 0).
*/
@@ -1983,7 +2000,6 @@
SCREEN_BRIGHTNESS,
SCREEN_BRIGHTNESS_MODE,
SCREEN_AUTO_BRIGHTNESS_ADJ,
- VIBRATE_ON,
VIBRATE_INPUT_DEVICES,
MODE_RINGER,
MODE_RINGER_STREAMS_AFFECTED,
@@ -2002,7 +2018,6 @@
VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE,
VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE,
- VIBRATE_IN_SILENT,
TEXT_AUTO_REPLACE,
TEXT_AUTO_CAPS,
TEXT_AUTO_PUNCTUATE,
@@ -2029,6 +2044,7 @@
SIP_CALL_OPTIONS,
SIP_RECEIVE_CALLS,
POINTER_SPEED,
+ VIBRATE_WHEN_RINGING
};
// Settings moved to Settings.Secure
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5032fe0..9fa67ac 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4676,13 +4676,13 @@
}
RectF position = mAttachInfo.mTmpTransformRect;
- position.setEmpty();
+ position.set(0, 0, mRight - mLeft, mBottom - mTop);
if (!hasIdentityMatrix()) {
getMatrix().mapRect(position);
}
- position.offset(mLeft, mRight);
+ position.offset(mLeft, mTop);
ViewParent parent = mParent;
while (parent instanceof View) {
@@ -11096,22 +11096,30 @@
if ((mPrivateFlags & REQUEST_TRANSPARENT_REGIONS) != 0) {
mParent.requestTransparentRegion(this);
}
+
if ((mPrivateFlags & AWAKEN_SCROLL_BARS_ON_ATTACH) != 0) {
initialAwakenScrollBars();
mPrivateFlags &= ~AWAKEN_SCROLL_BARS_ON_ATTACH;
}
+
jumpDrawablesToCurrentState();
+
// Order is important here: LayoutDirection MUST be resolved before Padding
// and TextDirection
resolveLayoutDirection();
resolvePadding();
resolveTextDirection();
resolveTextAlignment();
+
clearAccessibilityFocus();
if (isFocused()) {
InputMethodManager imm = InputMethodManager.peekInstance();
imm.focusIn(this);
}
+
+ if (mAttachInfo != null && mDisplayList != null) {
+ mAttachInfo.mViewRootImpl.dequeueDisplayList(mDisplayList);
+ }
}
/**
@@ -11332,7 +11340,7 @@
if (mAttachInfo != null) {
if (mDisplayList != null) {
- mAttachInfo.mViewRootImpl.invalidateDisplayList(mDisplayList);
+ mAttachInfo.mViewRootImpl.enqueueDisplayList(mDisplayList);
}
mAttachInfo.mViewRootImpl.cancelInvalidate(this);
} else {
@@ -12026,7 +12034,6 @@
boolean caching = false;
final HardwareCanvas canvas = displayList.start();
- int restoreCount = 0;
int width = mRight - mLeft;
int height = mBottom - mTop;
@@ -12659,10 +12666,6 @@
return more;
}
- void setDisplayListProperties() {
- setDisplayListProperties(mDisplayList);
- }
-
/**
* This method is called by getDisplayList() when a display list is created or re-rendered.
* It sets or resets the current value of all properties on that display list (resetting is
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index ec6bd81..5f295cb 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -4412,14 +4412,23 @@
mInvalidateOnAnimationRunnable.addViewRect(info);
}
- public void invalidateDisplayList(DisplayList displayList) {
+ public void enqueueDisplayList(DisplayList displayList) {
mDisplayLists.add(displayList);
mHandler.removeMessages(MSG_INVALIDATE_DISPLAY_LIST);
Message msg = mHandler.obtainMessage(MSG_INVALIDATE_DISPLAY_LIST);
mHandler.sendMessage(msg);
}
-
+
+ public void dequeueDisplayList(DisplayList displayList) {
+ if (mDisplayLists.remove(displayList)) {
+ displayList.invalidate();
+ if (mDisplayLists.size() == 0) {
+ mHandler.removeMessages(MSG_INVALIDATE_DISPLAY_LIST);
+ }
+ }
+ }
+
public void cancelInvalidate(View view) {
mHandler.removeMessages(MSG_INVALIDATE, view);
// fixme: might leak the AttachInfo.InvalidateInfo objects instead of returning
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index e725e75..388cfb3 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -1017,7 +1017,7 @@
/**
* Called when we have finished booting and can now display the home
- * screen to the user. This wilWl happen after systemReady(), and at
+ * screen to the user. This will happen after systemReady(), and at
* this point the display is active.
*/
public void enableScreenAfterBoot();
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java
index 17e4efb..057c3d1 100644
--- a/core/java/android/webkit/WebViewClassic.java
+++ b/core/java/android/webkit/WebViewClassic.java
@@ -609,6 +609,10 @@
// The presumed scroll rate for the first scroll of edit text
static private final long TEXT_SCROLL_FIRST_SCROLL_MS = 16;
+ // Buffer pixels of the caret rectangle when moving edit text into view
+ // after resize.
+ static private final int EDIT_RECT_BUFFER = 10;
+
// true means redraw the screen all-the-time. Only with AUTO_REDRAW_HACK
private boolean mAutoRedraw;
@@ -3294,7 +3298,8 @@
}
public int getPageBackgroundColor() {
- return nativeGetBackgroundColor();
+ if (mNativeClass == 0) return Color.WHITE;
+ return nativeGetBackgroundColor(mNativeClass);
}
/**
@@ -4451,7 +4456,7 @@
if (mNativeClass == 0) {
return 0;
}
- return nativeGetBaseLayer();
+ return nativeGetBaseLayer(mNativeClass);
}
private void onZoomAnimationStart() {
@@ -5574,9 +5579,76 @@
// However, do not update the base layer as that hasn't changed
setNewPicture(mLoadedPicture, false);
}
+ if (mIsEditingText) {
+ scrollEditIntoView();
+ }
relocateAutoCompletePopup();
}
+ /**
+ * Scrolls the edit field into view using the minimum scrolling necessary.
+ * If the edit field is too large to fit in the visible window, the caret
+ * dimensions are used so that at least the caret is visible.
+ * A buffer of EDIT_RECT_BUFFER in view pixels is used to offset the
+ * edit rectangle to ensure a margin with the edge of the screen.
+ */
+ private void scrollEditIntoView() {
+ Rect visibleRect = new Rect(viewToContentX(getScrollX()),
+ viewToContentY(getScrollY()),
+ viewToContentX(getScrollX() + getWidth()),
+ viewToContentY(getScrollY() + getViewHeightWithTitle()));
+ if (visibleRect.contains(mEditTextContentBounds)) {
+ return; // no need to scroll
+ }
+ syncSelectionCursors();
+ final int buffer = Math.max(1, viewToContentDimension(EDIT_RECT_BUFFER));
+ Rect showRect = new Rect(
+ Math.max(0, mEditTextContentBounds.left - buffer),
+ Math.max(0, mEditTextContentBounds.top - buffer),
+ mEditTextContentBounds.right + buffer,
+ mEditTextContentBounds.bottom + buffer);
+ Point caretTop = calculateCaretTop();
+ if (visibleRect.width() < mEditTextContentBounds.width()) {
+ // The whole edit won't fit in the width, so use the caret rect
+ if (mSelectCursorBase.x < caretTop.x) {
+ showRect.left = Math.max(0, mSelectCursorBase.x - buffer);
+ showRect.right = caretTop.x + buffer;
+ } else {
+ showRect.left = Math.max(0, caretTop.x - buffer);
+ showRect.right = mSelectCursorBase.x + buffer;
+ }
+ }
+ if (visibleRect.height() < mEditTextContentBounds.height()) {
+ // The whole edit won't fit in the height, so use the caret rect
+ if (mSelectCursorBase.y > caretTop.y) {
+ showRect.top = Math.max(0, caretTop.y - buffer);
+ showRect.bottom = mSelectCursorBase.y + buffer;
+ } else {
+ showRect.top = Math.max(0, mSelectCursorBase.y - buffer);
+ showRect.bottom = caretTop.y + buffer;
+ }
+ }
+
+ if (visibleRect.contains(showRect)) {
+ return; // no need to scroll
+ }
+
+ int scrollX = visibleRect.left;
+ if (visibleRect.left > showRect.left) {
+ scrollX = showRect.left;
+ } else if (visibleRect.right < showRect.right) {
+ scrollX = Math.max(0, showRect.right - visibleRect.width());
+ }
+ int scrollY = visibleRect.top;
+ if (visibleRect.top > showRect.top) {
+ scrollY = showRect.top;
+ } else if (visibleRect.bottom < showRect.bottom) {
+ scrollY = Math.max(0, showRect.bottom - visibleRect.height());
+ }
+
+ contentScrollTo(scrollX, scrollY, false);
+ }
+
@Override
public void onScrollChanged(int l, int t, int oldl, int oldt) {
if (!mInOverScrollMode) {
@@ -8586,7 +8658,7 @@
private native void nativeSetHeightCanMeasure(boolean measure);
private native boolean nativeSetBaseLayer(int nativeInstance,
int layer, boolean showVisualIndicator, boolean isPictureAfterFirstLayout);
- private native int nativeGetBaseLayer();
+ private native int nativeGetBaseLayer(int nativeInstance);
private native void nativeCopyBaseContentToPicture(Picture pict);
private native boolean nativeHasContent();
private native void nativeStopGL();
@@ -8614,7 +8686,7 @@
*/
private native boolean nativeScrollLayer(int nativeInstance, int layer, int newX, int newY);
private native void nativeSetIsScrolling(boolean isScrolling);
- private native int nativeGetBackgroundColor();
+ private native int nativeGetBackgroundColor(int nativeInstance);
native boolean nativeSetProperty(String key, String value);
native String nativeGetProperty(String key);
/**
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index a3b613b..6f33b1e 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -4009,17 +4009,19 @@
void start(final int position) {
stop();
+ if (mDataChanged) {
+ // Wait until we're back in a stable state to try this.
+ post(new Runnable() {
+ @Override public void run() {
+ start(position);
+ }
+ });
+ return;
+ }
+
final int childCount = getChildCount();
if (childCount == 0) {
// Can't scroll without children.
- if (mDataChanged) {
- // But we might have something in a minute.
- post(new Runnable() {
- @Override public void run() {
- start(position);
- }
- });
- }
return;
}
@@ -4058,17 +4060,19 @@
return;
}
+ if (mDataChanged) {
+ // Wait until we're back in a stable state to try this.
+ post(new Runnable() {
+ @Override public void run() {
+ start(position, boundPosition);
+ }
+ });
+ return;
+ }
+
final int childCount = getChildCount();
if (childCount == 0) {
// Can't scroll without children.
- if (mDataChanged) {
- // But we might have something in a minute.
- post(new Runnable() {
- @Override public void run() {
- start(position, boundPosition);
- }
- });
- }
return;
}
@@ -4129,9 +4133,26 @@
startWithOffset(position, offset, SCROLL_DURATION);
}
- void startWithOffset(int position, int offset, int duration) {
+ void startWithOffset(final int position, int offset, final int duration) {
stop();
+ if (mDataChanged) {
+ // Wait until we're back in a stable state to try this.
+ final int postOffset = offset;
+ post(new Runnable() {
+ @Override public void run() {
+ startWithOffset(position, postOffset, duration);
+ }
+ });
+ return;
+ }
+
+ final int childCount = getChildCount();
+ if (childCount == 0) {
+ // Can't scroll without children.
+ return;
+ }
+
offset += getPaddingTop();
mTargetPos = position;
@@ -4141,7 +4162,6 @@
mMode = MOVE_OFFSET;
final int firstPos = mFirstPosition;
- final int childCount = getChildCount();
final int lastPos = firstPos + childCount - 1;
int viewTravelCount;
@@ -4514,7 +4534,7 @@
if (distance == 0 || mItemCount == 0 || childCount == 0 ||
(firstPos == 0 && getChildAt(0).getTop() == topLimit && distance < 0) ||
- (lastPos == mItemCount - 1 &&
+ (lastPos == mItemCount &&
getChildAt(childCount - 1).getBottom() == bottomLimit && distance > 0)) {
mFlingRunnable.endFling();
if (mPositionScroller != null) {
diff --git a/core/java/android/widget/SpellChecker.java b/core/java/android/widget/SpellChecker.java
index e1103dd..11e15df 100644
--- a/core/java/android/widget/SpellChecker.java
+++ b/core/java/android/widget/SpellChecker.java
@@ -611,6 +611,9 @@
if (spellCheckEnd < start) {
break;
}
+ if (spellCheckEnd <= spellCheckStart) {
+ break;
+ }
if (createSpellCheckSpan) {
addSpellCheckSpan(editable, spellCheckStart, spellCheckEnd);
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index f2334ae..555c974 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -397,7 +397,7 @@
/**
* EditText specific data, created on demand when one of the Editor fields is used.
- * See {@link #createEditorIfNeeded(String)}.
+ * See {@link #createEditorIfNeeded()}.
*/
private Editor mEditor;
@@ -798,20 +798,20 @@
break;
case com.android.internal.R.styleable.TextView_imeOptions:
- createEditorIfNeeded("IME options specified in constructor");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.imeOptions = a.getInt(attr,
mEditor.mInputContentType.imeOptions);
break;
case com.android.internal.R.styleable.TextView_imeActionLabel:
- createEditorIfNeeded("IME action label specified in constructor");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.imeActionLabel = a.getText(attr);
break;
case com.android.internal.R.styleable.TextView_imeActionId:
- createEditorIfNeeded("IME action id specified in constructor");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.imeActionId = a.getInt(attr,
mEditor.mInputContentType.imeActionId);
@@ -883,7 +883,7 @@
}
try {
- createEditorIfNeeded("inputMethod in ctor");
+ createEditorIfNeeded();
mEditor.mKeyListener = (KeyListener) c.newInstance();
} catch (InstantiationException ex) {
throw new RuntimeException(ex);
@@ -898,7 +898,7 @@
mEditor.mInputType = EditorInfo.TYPE_CLASS_TEXT;
}
} else if (digits != null) {
- createEditorIfNeeded("digits in ctor");
+ createEditorIfNeeded();
mEditor.mKeyListener = DigitsKeyListener.getInstance(digits.toString());
// If no input type was specified, we will default to generic
// text, since we can't tell the IME about the set of digits
@@ -910,11 +910,11 @@
// If set, the input type overrides what was set using the deprecated singleLine flag.
singleLine = !isMultilineInputType(inputType);
} else if (phone) {
- createEditorIfNeeded("dialer in ctor");
+ createEditorIfNeeded();
mEditor.mKeyListener = DialerKeyListener.getInstance();
mEditor.mInputType = inputType = EditorInfo.TYPE_CLASS_PHONE;
} else if (numeric != 0) {
- createEditorIfNeeded("numeric in ctor");
+ createEditorIfNeeded();
mEditor.mKeyListener = DigitsKeyListener.getInstance((numeric & SIGNED) != 0,
(numeric & DECIMAL) != 0);
inputType = EditorInfo.TYPE_CLASS_NUMBER;
@@ -951,7 +951,7 @@
break;
}
- createEditorIfNeeded("text input in ctor");
+ createEditorIfNeeded();
mEditor.mKeyListener = TextKeyListener.getInstance(autotext, cap);
mEditor.mInputType = inputType;
} else if (isTextSelectable()) {
@@ -964,7 +964,7 @@
// So that selection can be changed using arrow keys and touch is handled.
setMovementMethod(ArrowKeyMovementMethod.getInstance());
} else if (editable) {
- createEditorIfNeeded("editable input in ctor");
+ createEditorIfNeeded();
mEditor.mKeyListener = TextKeyListener.getInstance();
mEditor.mInputType = EditorInfo.TYPE_CLASS_TEXT;
} else {
@@ -987,7 +987,7 @@
webPasswordInputType, numberPasswordInputType);
if (selectallonfocus) {
- createEditorIfNeeded("selectallonfocus in constructor");
+ createEditorIfNeeded();
mEditor.mSelectAllOnFocus = true;
if (bufferType == BufferType.NORMAL)
@@ -1335,7 +1335,7 @@
fixFocusableAndClickableSettings();
if (input != null) {
- createEditorIfNeeded("input is not null");
+ createEditorIfNeeded();
try {
mEditor.mInputType = mEditor.mKeyListener.getInputType();
} catch (IncompatibleClassChangeError e) {
@@ -1355,7 +1355,7 @@
private void setKeyListenerOnly(KeyListener input) {
if (mEditor == null && input == null) return; // null is the default value
- createEditorIfNeeded("setKeyListenerOnly");
+ createEditorIfNeeded();
if (mEditor.mKeyListener != input) {
mEditor.mKeyListener = input;
if (input != null && !(mText instanceof Editable)) {
@@ -2383,7 +2383,7 @@
*/
@android.view.RemotableViewMethod
public final void setShowSoftInputOnFocus(boolean show) {
- createEditorIfNeeded("setShowSoftInputOnFocus");
+ createEditorIfNeeded();
mEditor.mShowSoftInputOnFocus = show;
}
@@ -3263,7 +3263,7 @@
Selection.setSelection((Spannable) mText, ss.selStart, ss.selEnd);
if (ss.frozenWithFocus) {
- createEditorIfNeeded("restore instance with focus");
+ createEditorIfNeeded();
mEditor.mFrozenWithFocus = true;
}
}
@@ -3424,7 +3424,7 @@
if (type == BufferType.EDITABLE || getKeyListener() != null ||
needEditableForNotification) {
- createEditorIfNeeded("setText with BufferType.EDITABLE or non null mInput");
+ createEditorIfNeeded();
Editable t = mEditableFactory.newEditable(text);
text = t;
setFilters(t, mFilters);
@@ -3768,7 +3768,7 @@
*/
public void setRawInputType(int type) {
if (type == InputType.TYPE_NULL && mEditor == null) return; //TYPE_NULL is the default value
- createEditorIfNeeded("non null input type");
+ createEditorIfNeeded();
mEditor.mInputType = type;
}
@@ -3811,7 +3811,7 @@
}
setRawInputType(type);
if (direct) {
- createEditorIfNeeded("setInputType");
+ createEditorIfNeeded();
mEditor.mKeyListener = input;
} else {
setKeyListenerOnly(input);
@@ -3837,7 +3837,7 @@
* @attr ref android.R.styleable#TextView_imeOptions
*/
public void setImeOptions(int imeOptions) {
- createEditorIfNeeded("IME options specified");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.imeOptions = imeOptions;
}
@@ -3864,7 +3864,7 @@
* @attr ref android.R.styleable#TextView_imeActionId
*/
public void setImeActionLabel(CharSequence label, int actionId) {
- createEditorIfNeeded("IME action label specified");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.imeActionLabel = label;
mEditor.mInputContentType.imeActionId = actionId;
@@ -3901,7 +3901,7 @@
* modifier will, however, allow the user to insert a newline character.
*/
public void setOnEditorActionListener(OnEditorActionListener l) {
- createEditorIfNeeded("Editor action listener set");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.onEditorActionListener = l;
}
@@ -3998,7 +3998,7 @@
* @attr ref android.R.styleable#TextView_privateImeOptions
*/
public void setPrivateImeOptions(String type) {
- createEditorIfNeeded("Private IME option set");
+ createEditorIfNeeded();
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.privateImeOptions = type;
}
@@ -4026,7 +4026,7 @@
* @attr ref android.R.styleable#TextView_editorExtras
*/
public void setInputExtras(int xmlResId) throws XmlPullParserException, IOException {
- createEditorIfNeeded("Input extra set");
+ createEditorIfNeeded();
XmlResourceParser parser = getResources().getXml(xmlResId);
mEditor.createInputContentTypeIfNeeded();
mEditor.mInputContentType.extras = new Bundle();
@@ -4045,7 +4045,7 @@
*/
public Bundle getInputExtras(boolean create) {
if (mEditor == null && !create) return null;
- createEditorIfNeeded("get Input extra");
+ createEditorIfNeeded();
if (mEditor.mInputContentType == null) {
if (!create) return null;
mEditor.createInputContentTypeIfNeeded();
@@ -4097,7 +4097,7 @@
* be cleared (and you should provide a <code>null</code> icon as well).
*/
public void setError(CharSequence error, Drawable icon) {
- createEditorIfNeeded("setError");
+ createEditorIfNeeded();
mEditor.setError(error, icon);
}
@@ -4609,7 +4609,7 @@
public void setTextIsSelectable(boolean selectable) {
if (!selectable && mEditor == null) return; // false is default value with no edit data
- createEditorIfNeeded("setTextIsSelectable");
+ createEditorIfNeeded();
if (mEditor.mTextIsSelectable == selectable) return;
mEditor.mTextIsSelectable = selectable;
@@ -5422,7 +5422,7 @@
* @return Returns true if the text was successfully extracted, else false.
*/
public boolean extractText(ExtractedTextRequest request, ExtractedText outText) {
- createEditorIfNeeded("extractText");
+ createEditorIfNeeded();
return mEditor.extractText(request, outText);
}
@@ -6836,7 +6836,7 @@
*/
@android.view.RemotableViewMethod
public void setSelectAllOnFocus(boolean selectAllOnFocus) {
- createEditorIfNeeded("setSelectAllOnFocus");
+ createEditorIfNeeded();
mEditor.mSelectAllOnFocus = selectAllOnFocus;
if (selectAllOnFocus && !(mText instanceof Spannable)) {
@@ -6855,7 +6855,7 @@
@android.view.RemotableViewMethod
public void setCursorVisible(boolean visible) {
if (visible && mEditor == null) return; // visible is the default value with no edit data
- createEditorIfNeeded("setCursorVisible");
+ createEditorIfNeeded();
if (mEditor.mCursorVisible != visible) {
mEditor.mCursorVisible = visible;
invalidate();
@@ -7914,7 +7914,7 @@
* that case, to allow for quick replacement.
*/
public void setCustomSelectionActionModeCallback(ActionMode.Callback actionModeCallback) {
- createEditorIfNeeded("custom selection action mode set");
+ createEditorIfNeeded();
mEditor.mCustomSelectionActionModeCallback = actionModeCallback;
}
@@ -8285,16 +8285,9 @@
* Also note that for performance reasons, the mEditor is created when needed, but not
* reset when no more edit-specific fields are needed.
*/
- private void createEditorIfNeeded(String reason) {
+ private void createEditorIfNeeded() {
if (mEditor == null) {
- if (!(this instanceof EditText)) {
- Log.e(LOG_TAG + " EDITOR", "Creating an Editor on a regular TextView. " + reason);
- }
mEditor = new Editor(this);
- } else {
- if (!(this instanceof EditText)) {
- Log.d(LOG_TAG + " EDITOR", "Redundant Editor creation. " + reason);
- }
}
}
diff --git a/core/java/com/android/internal/view/menu/ListMenuPresenter.java b/core/java/com/android/internal/view/menu/ListMenuPresenter.java
index a331bec..b3e2d27 100644
--- a/core/java/com/android/internal/view/menu/ListMenuPresenter.java
+++ b/core/java/com/android/internal/view/menu/ListMenuPresenter.java
@@ -220,7 +220,6 @@
private int mExpandedIndex = -1;
public MenuAdapter() {
- registerDataSetObserver(new ExpandedIndexObserver());
findExpandedIndex();
}
@@ -273,12 +272,11 @@
}
mExpandedIndex = -1;
}
- }
- private class ExpandedIndexObserver extends DataSetObserver {
@Override
- public void onChanged() {
- mAdapter.findExpandedIndex();
+ public void notifyDataSetChanged() {
+ findExpandedIndex();
+ super.notifyDataSetChanged();
}
}
}
diff --git a/core/java/com/android/internal/view/menu/MenuPopupHelper.java b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
index 329b457..cacc86b 100644
--- a/core/java/com/android/internal/view/menu/MenuPopupHelper.java
+++ b/core/java/com/android/internal/view/menu/MenuPopupHelper.java
@@ -307,7 +307,6 @@
public MenuAdapter(MenuBuilder menu) {
mAdapterMenu = menu;
- registerDataSetObserver(new ExpandedIndexObserver());
findExpandedIndex();
}
@@ -363,12 +362,11 @@
}
mExpandedIndex = -1;
}
- }
- private class ExpandedIndexObserver extends DataSetObserver {
@Override
- public void onChanged() {
- mAdapter.findExpandedIndex();
+ public void notifyDataSetChanged() {
+ findExpandedIndex();
+ super.notifyDataSetChanged();
}
}
}
diff --git a/core/jni/android_os_SystemProperties.cpp b/core/jni/android_os_SystemProperties.cpp
index 66af965..add616e 100644
--- a/core/jni/android_os_SystemProperties.cpp
+++ b/core/jni/android_os_SystemProperties.cpp
@@ -65,6 +65,7 @@
int len;
const char* key;
char buf[PROPERTY_VALUE_MAX];
+ char* end;
jint result = defJ;
if (keyJ == NULL) {
@@ -76,9 +77,10 @@
len = property_get(key, buf, "");
if (len > 0) {
- jint temp;
- if (sscanf(buf, "%d", &temp) == 1)
- result = temp;
+ result = strtol(buf, &end, 0);
+ if (end == buf) {
+ result = defJ;
+ }
}
env->ReleaseStringUTFChars(keyJ, key);
@@ -93,6 +95,7 @@
int len;
const char* key;
char buf[PROPERTY_VALUE_MAX];
+ char* end;
jlong result = defJ;
if (keyJ == NULL) {
@@ -104,9 +107,10 @@
len = property_get(key, buf, "");
if (len > 0) {
- jlong temp;
- if (sscanf(buf, "%lld", &temp) == 1)
- result = temp;
+ result = strtoll(buf, &end, 0);
+ if (end == buf) {
+ result = defJ;
+ }
}
env->ReleaseStringUTFChars(keyJ, key);
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
index 19aa77b..f7b0cd0 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
@@ -246,9 +246,7 @@
initializeNetworkStates();
- mWifiManager.setWifiEnabled(true);
log("Clear Wifi before we start the test.");
- sleep(SHORT_TIMEOUT);
removeConfiguredNetworksAndDisableWifi();
mWifiRegexs = mCM.getTetherableWifiRegexs();
}
@@ -645,6 +643,11 @@
*/
public boolean disconnectAP() {
// remove saved networks
+ if (!mWifiManager.isWifiEnabled()) {
+ log("Enabled wifi before remove configured networks");
+ mWifiManager.setWifiEnabled(true);
+ sleep(SHORT_TIMEOUT);
+ }
List<WifiConfiguration> wifiConfigList = mWifiManager.getConfiguredNetworks();
log("size of wifiConfigList: " + wifiConfigList.size());
for (WifiConfiguration wifiConfig: wifiConfigList) {
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index 6b1d66f..10ccb87 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -27,7 +27,7 @@
import android.util.Log;
import android.util.TypedValue;
-/** @deprecated renderscript is deprecated in J
+/**
* <p>
* Memory allocation class for renderscript. An allocation combines a
* {@link android.renderscript.Type} with the memory to provide storage for user data and objects.
@@ -93,7 +93,7 @@
int mCurrentCount;
- /** @deprecated renderscript is deprecated in J
+ /**
* The usage of the allocation. These signal to renderscript
* where to place the allocation in memory.
*
@@ -102,14 +102,14 @@
*/
public static final int USAGE_SCRIPT = 0x0001;
- /** @deprecated renderscript is deprecated in J
+ /**
* GRAPHICS_TEXTURE The allocation will be used as a texture
* source by one or more graphics programs.
*
*/
public static final int USAGE_GRAPHICS_TEXTURE = 0x0002;
- /** @deprecated renderscript is deprecated in J
+ /**
* GRAPHICS_VERTEX The allocation will be used as a graphics
* mesh.
*
@@ -117,21 +117,21 @@
public static final int USAGE_GRAPHICS_VERTEX = 0x0004;
- /** @deprecated renderscript is deprecated in J
+ /**
* GRAPHICS_CONSTANTS The allocation will be used as the source
* of shader constants by one or more programs.
*
*/
public static final int USAGE_GRAPHICS_CONSTANTS = 0x0008;
- /** @deprecated renderscript is deprecated in J
+ /**
* USAGE_GRAPHICS_RENDER_TARGET The allocation will be used as a
* target for offscreen rendering
*
*/
public static final int USAGE_GRAPHICS_RENDER_TARGET = 0x0010;
- /** @hide renderscript is deprecated in J
+ /**
* USAGE_IO_INPUT The allocation will be used as SurfaceTexture
* consumer. This usage will cause the allocation to be created
* read only.
@@ -139,7 +139,7 @@
*/
public static final int USAGE_IO_INPUT = 0x0020;
- /** @hide renderscript is deprecated in J
+ /**
* USAGE_IO_OUTPUT The allocation will be used as a
* SurfaceTexture producer. The dimensions and format of the
* SurfaceTexture will be forced to those of the allocation.
@@ -147,25 +147,25 @@
*/
public static final int USAGE_IO_OUTPUT = 0x0040;
- /** @deprecated renderscript is deprecated in J
+ /**
* Controls mipmap behavior when using the bitmap creation and
* update functions.
*/
public enum MipmapControl {
- /** @deprecated renderscript is deprecated in J
+ /**
* No mipmaps will be generated and the type generated from the
* incoming bitmap will not contain additional LODs.
*/
MIPMAP_NONE(0),
- /** @deprecated renderscript is deprecated in J
+ /**
* A Full mipmap chain will be created in script memory. The
* type of the allocation will contain a full mipmap chain. On
* upload to graphics the full chain will be transfered.
*/
MIPMAP_FULL(1),
- /** @deprecated renderscript is deprecated in J
+ /**
* The type of the allocation will be the same as MIPMAP_NONE.
* It will not contain mipmaps. On upload to graphics the
* graphics copy of the allocation data will contain a full
@@ -188,7 +188,7 @@
}
- /** @hide renderscript is deprecated in J
+ /**
* Get the element of the type of the Allocation.
*
* @return Element that describes the structure of data in the
@@ -199,7 +199,7 @@
return mType.getElement();
}
- /** @hide renderscript is deprecated in J
+ /**
* Get the usage flags of the Allocation.
*
* @return usage flags associated with the allocation. e.g.
@@ -210,7 +210,7 @@
return mUsage;
}
- /** @hide renderscript is deprecated in J
+ /**
* Get the size of the Allocation in bytes.
*
* @return size of the Allocation in bytes.
@@ -326,7 +326,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Get the type of the Allocation.
*
* @return Type
@@ -336,7 +336,7 @@
return mType;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Propagate changes from one usage of the allocation to the
* remaining usages of the allocation.
*
@@ -355,7 +355,7 @@
mRS.nAllocationSyncAll(getIDSafe(), srcLocation);
}
- /** @hide renderscript is deprecated in J
+ /**
* Send a buffer to the output stream. The contents of the
* Allocation will be undefined after this operation.
*
@@ -369,7 +369,7 @@
mRS.nAllocationIoSend(getID(mRS));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Delete once code is updated.
* @hide
*/
@@ -377,7 +377,7 @@
ioSend();
}
- /** @hide renderscript is deprecated in J
+ /**
* Receive the latest input into the Allocation.
*
*/
@@ -390,7 +390,7 @@
mRS.nAllocationIoReceive(getID(mRS));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an array of RS objects to the allocation.
*
* @param d Source array.
@@ -461,7 +461,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
@@ -472,7 +472,7 @@
mRS.validate();
copy1DRangeFromUnchecked(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
@@ -483,7 +483,7 @@
mRS.validate();
copy1DRangeFromUnchecked(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
@@ -494,7 +494,7 @@
mRS.validate();
copy1DRangeFromUnchecked(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
@@ -506,7 +506,7 @@
copy1DRangeFromUnchecked(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 32 bit integer type.
@@ -518,7 +518,7 @@
copy1DRangeFrom(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 16 bit integer type.
@@ -530,7 +530,7 @@
copy1DRangeFrom(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 8 bit integer type.
@@ -542,7 +542,7 @@
copy1DRangeFrom(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 32 bit float type.
@@ -554,7 +554,7 @@
copy1DRangeFrom(0, mCurrentCount, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy an allocation from a bitmap. The height, width, and
* format of the bitmap must match the existing allocation.
*
@@ -567,7 +567,7 @@
mRS.nAllocationCopyFromBitmap(getID(mRS), b);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* This is only intended to be used by auto-generate code reflected from the
* renderscript script files.
*
@@ -587,7 +587,7 @@
copy1DRangeFromUnchecked(xoff, count, data);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* This is only intended to be used by auto-generate code reflected from the
* renderscript script files.
*
@@ -634,7 +634,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Generate a mipmap chain. Requires the type of the allocation
* include mipmaps.
*
@@ -648,7 +648,7 @@
mRS.nAllocationGenerateMipmaps(getID(mRS));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
@@ -662,7 +662,7 @@
data1DChecks(off, count, d.length * 4, dataSize);
mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
@@ -676,7 +676,7 @@
data1DChecks(off, count, d.length * 2, dataSize);
mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
@@ -690,7 +690,7 @@
data1DChecks(off, count, d.length, dataSize);
mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
@@ -705,7 +705,7 @@
mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 32 bit integer type.
@@ -719,7 +719,7 @@
copy1DRangeFromUnchecked(off, count, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 16 bit integer type.
@@ -733,7 +733,7 @@
copy1DRangeFromUnchecked(off, count, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 8 bit integer type.
@@ -747,7 +747,7 @@
copy1DRangeFromUnchecked(off, count, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 32 bit float type.
@@ -761,7 +761,7 @@
copy1DRangeFromUnchecked(off, count, d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy part of an allocation from another allocation.
*
* @param off The offset of the first element to be copied.
@@ -794,7 +794,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy a rectangular region from the array into the allocation.
* The incoming array is assumed to be tightly packed.
*
@@ -811,8 +811,6 @@
w, h, data, data.length);
}
- /** @deprecated renderscript is deprecated in J
- */
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, short[] data) {
mRS.validate();
validate2DRange(xoff, yoff, w, h);
@@ -820,8 +818,6 @@
w, h, data, data.length * 2);
}
- /** @deprecated renderscript is deprecated in J
- */
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, int[] data) {
mRS.validate();
validate2DRange(xoff, yoff, w, h);
@@ -829,8 +825,6 @@
w, h, data, data.length * 4);
}
- /** @deprecated renderscript is deprecated in J
- */
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, float[] data) {
mRS.validate();
validate2DRange(xoff, yoff, w, h);
@@ -838,7 +832,7 @@
w, h, data, data.length * 4);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy a rectangular region into the allocation from another
* allocation.
*
@@ -860,7 +854,7 @@
data.mSelectedLOD, data.mSelectedFace.mID);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy a bitmap into an allocation. The height and width of
* the update will use the height and width of the incoming
* bitmap.
@@ -877,7 +871,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy from the Allocation into a Bitmap. The bitmap must
* match the dimensions of the Allocation.
*
@@ -890,7 +884,7 @@
mRS.nAllocationCopyToBitmap(getID(mRS), b);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy from the Allocation into a byte array. The array must
* be at least as large as the Allocation. The allocation must
* be of an 8 bit elemental type.
@@ -903,7 +897,7 @@
mRS.nAllocationRead(getID(mRS), d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy from the Allocation into a short array. The array must
* be at least as large as the Allocation. The allocation must
* be of an 16 bit elemental type.
@@ -916,7 +910,7 @@
mRS.nAllocationRead(getID(mRS), d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy from the Allocation into a int array. The array must be
* at least as large as the Allocation. The allocation must be
* of an 32 bit elemental type.
@@ -929,7 +923,7 @@
mRS.nAllocationRead(getID(mRS), d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Copy from the Allocation into a float array. The array must
* be at least as large as the Allocation. The allocation must
* be of an 32 bit float elemental type.
@@ -942,7 +936,7 @@
mRS.nAllocationRead(getID(mRS), d);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Resize a 1D allocation. The contents of the allocation are
* preserved. If new elements are allocated objects are created
* with null contents and the new region is otherwise undefined.
@@ -967,7 +961,7 @@
updateCacheInfo(mType);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Resize a 2D allocation. The contents of the allocation are
* preserved. If new elements are allocated objects are created
* with null contents and the new region is otherwise undefined.
@@ -1008,7 +1002,7 @@
mBitmapOptions.inScaled = false;
}
- /** @deprecated renderscript is deprecated in J
+ /**
*
* @param type renderscript type describing data layout
* @param mips specifies desired mipmap behaviour for the
@@ -1028,7 +1022,7 @@
return new Allocation(id, rs, type, usage);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation with the size specified by
* the type and no mipmaps generated by default
*
@@ -1043,7 +1037,7 @@
return createTyped(rs, type, MipmapControl.MIPMAP_NONE, usage);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation for use by the script with
* the size specified by the type and no mipmaps generated by
* default
@@ -1057,7 +1051,7 @@
return createTyped(rs, type, MipmapControl.MIPMAP_NONE, USAGE_SCRIPT);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation with a specified number of
* given elements
*
@@ -1083,7 +1077,7 @@
return new Allocation(id, rs, t, usage);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation with a specified number of
* given elements
*
@@ -1124,7 +1118,7 @@
return tb.create();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation from a bitmap
*
* @param rs Context to which the allocation will belong.
@@ -1150,7 +1144,7 @@
return new Allocation(id, rs, t, usage);
}
- /** @deprecated renderscript is deprecated in J
+ /**
*
*
* @hide
@@ -1168,7 +1162,7 @@
return st;
}
- /** @hide renderscript is deprecated in J
+ /**
* For allocations used with io operations, returns the handle
* onto a raw buffer that is being managed by the screen
* compositor.
@@ -1180,7 +1174,7 @@
return new Surface(getSurfaceTexture());
}
- /** @hide renderscript is deprecated in J
+ /**
* Associate a surface for io output with this allocation
*
* @param sur Surface to associate with allocation
@@ -1194,7 +1188,7 @@
mRS.nAllocationSetSurface(getID(mRS), sur);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @hide
*/
public void setSurfaceTexture(SurfaceTexture st) {
@@ -1207,7 +1201,7 @@
mRS.nAllocationSetSurface(getID(mRS), s);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a non-mipmapped renderscript allocation to use as a
* graphics texture
*
@@ -1222,7 +1216,7 @@
USAGE_GRAPHICS_TEXTURE);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a cubemap allocation from a bitmap containing the
* horizontal list of cube faces. Each individual face must be
* the same size and power of 2
@@ -1270,7 +1264,7 @@
return new Allocation(id, rs, t, usage);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a non-mipmapped cubemap allocation for use as a
* graphics texture from a bitmap containing the horizontal list
* of cube faces. Each individual face must be the same size and
@@ -1289,7 +1283,7 @@
USAGE_GRAPHICS_TEXTURE);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a cubemap allocation from 6 bitmaps containing
* the cube faces. All the faces must be the same size and
* power of 2
@@ -1356,7 +1350,7 @@
return cubemap;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a non-mipmapped cubemap allocation for use as a
* graphics texture from 6 bitmaps containing
* the cube faces. All the faces must be the same size and
@@ -1385,7 +1379,7 @@
USAGE_GRAPHICS_TEXTURE);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation from the bitmap referenced
* by resource id
*
@@ -1413,7 +1407,7 @@
return alloc;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a non-mipmapped renderscript allocation to use as a
* graphics texture from the bitmap referenced by resource id
*
@@ -1432,7 +1426,7 @@
USAGE_GRAPHICS_TEXTURE);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a renderscript allocation containing string data
* encoded in UTF-8 format
*
diff --git a/graphics/java/android/renderscript/AllocationAdapter.java b/graphics/java/android/renderscript/AllocationAdapter.java
index 3b5993a..85d86e5 100644
--- a/graphics/java/android/renderscript/AllocationAdapter.java
+++ b/graphics/java/android/renderscript/AllocationAdapter.java
@@ -21,7 +21,7 @@
import android.graphics.BitmapFactory;
import android.util.TypedValue;
-/** @deprecated renderscript is deprecated in J
+/**
*
**/
public class AllocationAdapter extends Allocation {
@@ -129,7 +129,7 @@
mSelectedZ = 0;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the active LOD. The LOD must be within the range for the
* type being adapted. The base allocation must have mipmaps.
*
@@ -149,7 +149,7 @@
initLOD(lod);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the active Face. The base allocation must be of a type
* that includes faces.
*
@@ -169,7 +169,7 @@
mSelectedFace = cf;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the active Y. The y value must be within the range for
* the allocation being adapted. The base allocation must
* contain the Y dimension.
@@ -190,7 +190,7 @@
mSelectedY = y;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the active Z. The z value must be within the range for
* the allocation being adapted. The base allocation must
* contain the Z dimension.
@@ -211,8 +211,6 @@
mSelectedZ = z;
}
- /** @deprecated renderscript is deprecated in J
- */
static public AllocationAdapter create1D(RenderScript rs, Allocation a) {
rs.validate();
AllocationAdapter aa = new AllocationAdapter(0, rs, a);
@@ -224,8 +222,6 @@
return aa;
}
- /** @deprecated renderscript is deprecated in J
- */
static public AllocationAdapter create2D(RenderScript rs, Allocation a) {
android.util.Log.e("rs", "create2d " + a);
rs.validate();
@@ -239,7 +235,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Override the Allocation resize. Resizing adapters is not
* allowed and will throw a RSInvalidStateException.
*
diff --git a/graphics/java/android/renderscript/BaseObj.java b/graphics/java/android/renderscript/BaseObj.java
index 0d74212..f464f9b 100644
--- a/graphics/java/android/renderscript/BaseObj.java
+++ b/graphics/java/android/renderscript/BaseObj.java
@@ -18,7 +18,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* BaseObj is the base class for interfacing with native renderscript objects.
* It primarly contains code for tracking the native object ID and forcably
* disconecting the object from the native allocation for early cleanup.
@@ -39,7 +39,7 @@
mID = id;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Lookup the native object ID for this object. Primarily used by the
* generated reflected code.
*
@@ -73,7 +73,7 @@
private String mName;
RenderScript mRS;
- /** @deprecated renderscript is deprecated in J
+ /**
* setName assigns a name to an object. This object can later be looked up
* by this name. This name will also be retained if the object is written
* to an A3D file.
@@ -103,7 +103,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @return name of the renderscript object
*/
public String getName() {
@@ -124,7 +124,7 @@
super.finalize();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* destroy disconnects the object from the native object effectively
* rendering this java object dead. The primary use is to force immediate
* cleanup of resources when it is believed the GC will not respond quickly
@@ -138,7 +138,7 @@
mRS.nObjDestroy(mID);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* If an object came from an a3d file, java fields need to be
* created with objects from the native layer
*/
@@ -147,7 +147,7 @@
mName = mRS.nGetName(getID(mRS));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Calculates the hash code value for a BaseObj.
*
* @return int
@@ -157,7 +157,7 @@
return mID;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Compare the current BaseObj with another BaseObj for equality.
*
* @param obj The object to check equality with.
diff --git a/graphics/java/android/renderscript/Byte2.java b/graphics/java/android/renderscript/Byte2.java
index 163b8bd..7df5f2e 100644
--- a/graphics/java/android/renderscript/Byte2.java
+++ b/graphics/java/android/renderscript/Byte2.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript byte2 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Byte3.java b/graphics/java/android/renderscript/Byte3.java
index eaa1d5f..02a01c1 100644
--- a/graphics/java/android/renderscript/Byte3.java
+++ b/graphics/java/android/renderscript/Byte3.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript byte3 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Byte4.java b/graphics/java/android/renderscript/Byte4.java
index e162f9d..a55a696 100644
--- a/graphics/java/android/renderscript/Byte4.java
+++ b/graphics/java/android/renderscript/Byte4.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript byte4 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Double2.java b/graphics/java/android/renderscript/Double2.java
index 0ef2f2b..9f4f328 100644
--- a/graphics/java/android/renderscript/Double2.java
+++ b/graphics/java/android/renderscript/Double2.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript double2 type back
* to the Android system.
*
diff --git a/graphics/java/android/renderscript/Double3.java b/graphics/java/android/renderscript/Double3.java
index 09aba18..eb55142 100644
--- a/graphics/java/android/renderscript/Double3.java
+++ b/graphics/java/android/renderscript/Double3.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript double3 type back
* to the Android system.
*
diff --git a/graphics/java/android/renderscript/Double4.java b/graphics/java/android/renderscript/Double4.java
index c5211be..4755a76 100644
--- a/graphics/java/android/renderscript/Double4.java
+++ b/graphics/java/android/renderscript/Double4.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript double4 type back
* to the Android system.
*
diff --git a/graphics/java/android/renderscript/Element.java b/graphics/java/android/renderscript/Element.java
index 6872310..060f526 100644
--- a/graphics/java/android/renderscript/Element.java
+++ b/graphics/java/android/renderscript/Element.java
@@ -19,7 +19,7 @@
import java.lang.reflect.Field;
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* <p>The most basic data type. An element represents one cell of a memory allocation.
* Element is the basic data type of Renderscript. An element can be of two forms: Basic elements or Complex forms.
* Examples of basic elements are:</p>
@@ -84,12 +84,12 @@
}
}
- /** @hide renderscript is deprecated in J
+ /**
* @return element size in bytes
*/
public int getBytesSize() {return mSize;}
- /** @hide renderscript is deprecated in J
+ /**
* Returns the number of vector components. 2 for float2, 4 for
* float4, etc.
* @return element vector size
@@ -97,7 +97,7 @@
public int getVectorSize() {return mVectorSize;}
- /** @deprecated renderscript is deprecated in J
+ /**
* DataType represents the basic type information for a basic element. The
* naming convention follows. For numeric types it is FLOAT,
* SIGNED, or UNSIGNED followed by the _BITS where BITS is the
@@ -114,8 +114,6 @@
* RS_* objects. 32 bit opaque handles.
*/
public enum DataType {
- /** @hide
- */
NONE (0, 0),
//FLOAT_16 (1, 2),
FLOAT_32 (2, 4),
@@ -159,7 +157,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* The special interpretation of the data if required. This is primarly
* useful for graphical data. USER indicates no special interpretation is
* expected. PIXEL is used in conjunction with the standard data types for
@@ -181,7 +179,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return if a element is too complex for use as a data source for a Mesh or
* a Program.
*
@@ -199,7 +197,7 @@
return false;
}
- /** @hide renderscript is deprecated in J
+ /**
* Elements could be simple, such as an int or a float, or a
* structure with multiple sub elements, such as a collection of
* floats, float2, float4. This function returns zero for simple
@@ -213,7 +211,7 @@
return mVisibleElementMap.length;
}
- /** @hide renderscript is deprecated in J
+ /**
* For complex elements, this function will return the
* sub-element at index
* @param index index of the sub-element to return
@@ -229,7 +227,7 @@
return mElements[mVisibleElementMap[index]];
}
- /** @hide renderscript is deprecated in J
+ /**
* For complex elements, this function will return the
* sub-element name at index
* @param index index of the sub-element
@@ -245,7 +243,7 @@
return mElementNames[mVisibleElementMap[index]];
}
- /** @hide renderscript is deprecated in J
+ /**
* For complex elements, some sub-elements could be statically
* sized arrays. This function will return the array size for
* sub-element at index
@@ -262,7 +260,7 @@
return mArraySizes[mVisibleElementMap[index]];
}
- /** @hide renderscript is deprecated in J
+ /**
* This function specifies the location of a sub-element within
* the element
* @param index index of the sub-element
@@ -278,21 +276,21 @@
return mOffsetInBytes[mVisibleElementMap[index]];
}
- /** @hide renderscript is deprecated in J
+ /**
* @return element data type
*/
public DataType getDataType() {
return mType;
}
- /** @hide renderscript is deprecated in J
+ /**
* @return element data kind
*/
public DataKind getDataKind() {
return mKind;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Utility function for returning an Element containing a single Boolean.
*
* @param rs Context to which the element will belong.
@@ -306,7 +304,7 @@
return rs.mElement_BOOLEAN;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Utility function for returning an Element containing a single UNSIGNED_8.
*
* @param rs Context to which the element will belong.
@@ -320,7 +318,7 @@
return rs.mElement_U8;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Utility function for returning an Element containing a single SIGNED_8.
*
* @param rs Context to which the element will belong.
@@ -334,8 +332,6 @@
return rs.mElement_I8;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U16(RenderScript rs) {
if(rs.mElement_U16 == null) {
rs.mElement_U16 = createUser(rs, DataType.UNSIGNED_16);
@@ -343,8 +339,6 @@
return rs.mElement_U16;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I16(RenderScript rs) {
if(rs.mElement_I16 == null) {
rs.mElement_I16 = createUser(rs, DataType.SIGNED_16);
@@ -352,8 +346,6 @@
return rs.mElement_I16;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U32(RenderScript rs) {
if(rs.mElement_U32 == null) {
rs.mElement_U32 = createUser(rs, DataType.UNSIGNED_32);
@@ -361,8 +353,6 @@
return rs.mElement_U32;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I32(RenderScript rs) {
if(rs.mElement_I32 == null) {
rs.mElement_I32 = createUser(rs, DataType.SIGNED_32);
@@ -370,8 +360,6 @@
return rs.mElement_I32;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U64(RenderScript rs) {
if(rs.mElement_U64 == null) {
rs.mElement_U64 = createUser(rs, DataType.UNSIGNED_64);
@@ -379,8 +367,6 @@
return rs.mElement_U64;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I64(RenderScript rs) {
if(rs.mElement_I64 == null) {
rs.mElement_I64 = createUser(rs, DataType.SIGNED_64);
@@ -388,8 +374,6 @@
return rs.mElement_I64;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F32(RenderScript rs) {
if(rs.mElement_F32 == null) {
rs.mElement_F32 = createUser(rs, DataType.FLOAT_32);
@@ -397,8 +381,6 @@
return rs.mElement_F32;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F64(RenderScript rs) {
if(rs.mElement_F64 == null) {
rs.mElement_F64 = createUser(rs, DataType.FLOAT_64);
@@ -406,8 +388,6 @@
return rs.mElement_F64;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element ELEMENT(RenderScript rs) {
if(rs.mElement_ELEMENT == null) {
rs.mElement_ELEMENT = createUser(rs, DataType.RS_ELEMENT);
@@ -415,8 +395,6 @@
return rs.mElement_ELEMENT;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element TYPE(RenderScript rs) {
if(rs.mElement_TYPE == null) {
rs.mElement_TYPE = createUser(rs, DataType.RS_TYPE);
@@ -424,8 +402,6 @@
return rs.mElement_TYPE;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element ALLOCATION(RenderScript rs) {
if(rs.mElement_ALLOCATION == null) {
rs.mElement_ALLOCATION = createUser(rs, DataType.RS_ALLOCATION);
@@ -433,8 +409,6 @@
return rs.mElement_ALLOCATION;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element SAMPLER(RenderScript rs) {
if(rs.mElement_SAMPLER == null) {
rs.mElement_SAMPLER = createUser(rs, DataType.RS_SAMPLER);
@@ -442,8 +416,6 @@
return rs.mElement_SAMPLER;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element SCRIPT(RenderScript rs) {
if(rs.mElement_SCRIPT == null) {
rs.mElement_SCRIPT = createUser(rs, DataType.RS_SCRIPT);
@@ -451,8 +423,6 @@
return rs.mElement_SCRIPT;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element MESH(RenderScript rs) {
if(rs.mElement_MESH == null) {
rs.mElement_MESH = createUser(rs, DataType.RS_MESH);
@@ -460,8 +430,6 @@
return rs.mElement_MESH;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element PROGRAM_FRAGMENT(RenderScript rs) {
if(rs.mElement_PROGRAM_FRAGMENT == null) {
rs.mElement_PROGRAM_FRAGMENT = createUser(rs, DataType.RS_PROGRAM_FRAGMENT);
@@ -469,8 +437,6 @@
return rs.mElement_PROGRAM_FRAGMENT;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element PROGRAM_VERTEX(RenderScript rs) {
if(rs.mElement_PROGRAM_VERTEX == null) {
rs.mElement_PROGRAM_VERTEX = createUser(rs, DataType.RS_PROGRAM_VERTEX);
@@ -478,8 +444,6 @@
return rs.mElement_PROGRAM_VERTEX;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element PROGRAM_RASTER(RenderScript rs) {
if(rs.mElement_PROGRAM_RASTER == null) {
rs.mElement_PROGRAM_RASTER = createUser(rs, DataType.RS_PROGRAM_RASTER);
@@ -487,8 +451,6 @@
return rs.mElement_PROGRAM_RASTER;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element PROGRAM_STORE(RenderScript rs) {
if(rs.mElement_PROGRAM_STORE == null) {
rs.mElement_PROGRAM_STORE = createUser(rs, DataType.RS_PROGRAM_STORE);
@@ -496,8 +458,6 @@
return rs.mElement_PROGRAM_STORE;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element FONT(RenderScript rs) {
if(rs.mElement_FONT == null) {
rs.mElement_FONT = createUser(rs, DataType.RS_FONT);
@@ -505,8 +465,7 @@
return rs.mElement_FONT;
}
- /** @deprecated renderscript is deprecated in J
- */
+
public static Element A_8(RenderScript rs) {
if(rs.mElement_A_8 == null) {
rs.mElement_A_8 = createPixel(rs, DataType.UNSIGNED_8, DataKind.PIXEL_A);
@@ -514,8 +473,6 @@
return rs.mElement_A_8;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element RGB_565(RenderScript rs) {
if(rs.mElement_RGB_565 == null) {
rs.mElement_RGB_565 = createPixel(rs, DataType.UNSIGNED_5_6_5, DataKind.PIXEL_RGB);
@@ -523,8 +480,6 @@
return rs.mElement_RGB_565;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element RGB_888(RenderScript rs) {
if(rs.mElement_RGB_888 == null) {
rs.mElement_RGB_888 = createPixel(rs, DataType.UNSIGNED_8, DataKind.PIXEL_RGB);
@@ -532,8 +487,6 @@
return rs.mElement_RGB_888;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element RGBA_5551(RenderScript rs) {
if(rs.mElement_RGBA_5551 == null) {
rs.mElement_RGBA_5551 = createPixel(rs, DataType.UNSIGNED_5_5_5_1, DataKind.PIXEL_RGBA);
@@ -541,8 +494,6 @@
return rs.mElement_RGBA_5551;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element RGBA_4444(RenderScript rs) {
if(rs.mElement_RGBA_4444 == null) {
rs.mElement_RGBA_4444 = createPixel(rs, DataType.UNSIGNED_4_4_4_4, DataKind.PIXEL_RGBA);
@@ -550,8 +501,6 @@
return rs.mElement_RGBA_4444;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element RGBA_8888(RenderScript rs) {
if(rs.mElement_RGBA_8888 == null) {
rs.mElement_RGBA_8888 = createPixel(rs, DataType.UNSIGNED_8, DataKind.PIXEL_RGBA);
@@ -559,8 +508,6 @@
return rs.mElement_RGBA_8888;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F32_2(RenderScript rs) {
if(rs.mElement_FLOAT_2 == null) {
rs.mElement_FLOAT_2 = createVector(rs, DataType.FLOAT_32, 2);
@@ -568,8 +515,6 @@
return rs.mElement_FLOAT_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F32_3(RenderScript rs) {
if(rs.mElement_FLOAT_3 == null) {
rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_32, 3);
@@ -577,8 +522,6 @@
return rs.mElement_FLOAT_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F32_4(RenderScript rs) {
if(rs.mElement_FLOAT_4 == null) {
rs.mElement_FLOAT_4 = createVector(rs, DataType.FLOAT_32, 4);
@@ -586,8 +529,6 @@
return rs.mElement_FLOAT_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F64_2(RenderScript rs) {
if(rs.mElement_DOUBLE_2 == null) {
rs.mElement_DOUBLE_2 = createVector(rs, DataType.FLOAT_64, 2);
@@ -595,8 +536,6 @@
return rs.mElement_DOUBLE_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F64_3(RenderScript rs) {
if(rs.mElement_DOUBLE_3 == null) {
rs.mElement_DOUBLE_3 = createVector(rs, DataType.FLOAT_64, 3);
@@ -604,8 +543,6 @@
return rs.mElement_DOUBLE_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element F64_4(RenderScript rs) {
if(rs.mElement_DOUBLE_4 == null) {
rs.mElement_DOUBLE_4 = createVector(rs, DataType.FLOAT_64, 4);
@@ -613,8 +550,6 @@
return rs.mElement_DOUBLE_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U8_2(RenderScript rs) {
if(rs.mElement_UCHAR_2 == null) {
rs.mElement_UCHAR_2 = createVector(rs, DataType.UNSIGNED_8, 2);
@@ -622,8 +557,6 @@
return rs.mElement_UCHAR_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U8_3(RenderScript rs) {
if(rs.mElement_UCHAR_3 == null) {
rs.mElement_UCHAR_3 = createVector(rs, DataType.UNSIGNED_8, 3);
@@ -631,8 +564,6 @@
return rs.mElement_UCHAR_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U8_4(RenderScript rs) {
if(rs.mElement_UCHAR_4 == null) {
rs.mElement_UCHAR_4 = createVector(rs, DataType.UNSIGNED_8, 4);
@@ -640,8 +571,6 @@
return rs.mElement_UCHAR_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I8_2(RenderScript rs) {
if(rs.mElement_CHAR_2 == null) {
rs.mElement_CHAR_2 = createVector(rs, DataType.SIGNED_8, 2);
@@ -649,8 +578,6 @@
return rs.mElement_CHAR_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I8_3(RenderScript rs) {
if(rs.mElement_CHAR_3 == null) {
rs.mElement_CHAR_3 = createVector(rs, DataType.SIGNED_8, 3);
@@ -658,8 +585,6 @@
return rs.mElement_CHAR_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I8_4(RenderScript rs) {
if(rs.mElement_CHAR_4 == null) {
rs.mElement_CHAR_4 = createVector(rs, DataType.SIGNED_8, 4);
@@ -667,8 +592,6 @@
return rs.mElement_CHAR_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U16_2(RenderScript rs) {
if(rs.mElement_USHORT_2 == null) {
rs.mElement_USHORT_2 = createVector(rs, DataType.UNSIGNED_16, 2);
@@ -676,8 +599,6 @@
return rs.mElement_USHORT_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U16_3(RenderScript rs) {
if(rs.mElement_USHORT_3 == null) {
rs.mElement_USHORT_3 = createVector(rs, DataType.UNSIGNED_16, 3);
@@ -685,8 +606,6 @@
return rs.mElement_USHORT_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U16_4(RenderScript rs) {
if(rs.mElement_USHORT_4 == null) {
rs.mElement_USHORT_4 = createVector(rs, DataType.UNSIGNED_16, 4);
@@ -694,8 +613,6 @@
return rs.mElement_USHORT_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I16_2(RenderScript rs) {
if(rs.mElement_SHORT_2 == null) {
rs.mElement_SHORT_2 = createVector(rs, DataType.SIGNED_16, 2);
@@ -703,8 +620,6 @@
return rs.mElement_SHORT_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I16_3(RenderScript rs) {
if(rs.mElement_SHORT_3 == null) {
rs.mElement_SHORT_3 = createVector(rs, DataType.SIGNED_16, 3);
@@ -712,8 +627,6 @@
return rs.mElement_SHORT_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I16_4(RenderScript rs) {
if(rs.mElement_SHORT_4 == null) {
rs.mElement_SHORT_4 = createVector(rs, DataType.SIGNED_16, 4);
@@ -721,8 +634,6 @@
return rs.mElement_SHORT_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U32_2(RenderScript rs) {
if(rs.mElement_UINT_2 == null) {
rs.mElement_UINT_2 = createVector(rs, DataType.UNSIGNED_32, 2);
@@ -730,8 +641,6 @@
return rs.mElement_UINT_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U32_3(RenderScript rs) {
if(rs.mElement_UINT_3 == null) {
rs.mElement_UINT_3 = createVector(rs, DataType.UNSIGNED_32, 3);
@@ -739,8 +648,6 @@
return rs.mElement_UINT_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U32_4(RenderScript rs) {
if(rs.mElement_UINT_4 == null) {
rs.mElement_UINT_4 = createVector(rs, DataType.UNSIGNED_32, 4);
@@ -748,8 +655,6 @@
return rs.mElement_UINT_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I32_2(RenderScript rs) {
if(rs.mElement_INT_2 == null) {
rs.mElement_INT_2 = createVector(rs, DataType.SIGNED_32, 2);
@@ -757,8 +662,6 @@
return rs.mElement_INT_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I32_3(RenderScript rs) {
if(rs.mElement_INT_3 == null) {
rs.mElement_INT_3 = createVector(rs, DataType.SIGNED_32, 3);
@@ -766,8 +669,6 @@
return rs.mElement_INT_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I32_4(RenderScript rs) {
if(rs.mElement_INT_4 == null) {
rs.mElement_INT_4 = createVector(rs, DataType.SIGNED_32, 4);
@@ -775,8 +676,6 @@
return rs.mElement_INT_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U64_2(RenderScript rs) {
if(rs.mElement_ULONG_2 == null) {
rs.mElement_ULONG_2 = createVector(rs, DataType.UNSIGNED_64, 2);
@@ -784,8 +683,6 @@
return rs.mElement_ULONG_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U64_3(RenderScript rs) {
if(rs.mElement_ULONG_3 == null) {
rs.mElement_ULONG_3 = createVector(rs, DataType.UNSIGNED_64, 3);
@@ -793,8 +690,6 @@
return rs.mElement_ULONG_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element U64_4(RenderScript rs) {
if(rs.mElement_ULONG_4 == null) {
rs.mElement_ULONG_4 = createVector(rs, DataType.UNSIGNED_64, 4);
@@ -802,8 +697,6 @@
return rs.mElement_ULONG_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I64_2(RenderScript rs) {
if(rs.mElement_LONG_2 == null) {
rs.mElement_LONG_2 = createVector(rs, DataType.SIGNED_64, 2);
@@ -811,8 +704,6 @@
return rs.mElement_LONG_2;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I64_3(RenderScript rs) {
if(rs.mElement_LONG_3 == null) {
rs.mElement_LONG_3 = createVector(rs, DataType.SIGNED_64, 3);
@@ -820,8 +711,6 @@
return rs.mElement_LONG_3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element I64_4(RenderScript rs) {
if(rs.mElement_LONG_4 == null) {
rs.mElement_LONG_4 = createVector(rs, DataType.SIGNED_64, 4);
@@ -829,22 +718,19 @@
return rs.mElement_LONG_4;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element MATRIX_4X4(RenderScript rs) {
if(rs.mElement_MATRIX_4X4 == null) {
rs.mElement_MATRIX_4X4 = createUser(rs, DataType.MATRIX_4X4);
}
return rs.mElement_MATRIX_4X4;
}
- /** @deprecated renderscript is deprecated in J
- */
+
+ /** @deprecated use MATRIX_4X4
+ */
public static Element MATRIX4X4(RenderScript rs) {
return MATRIX_4X4(rs);
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element MATRIX_3X3(RenderScript rs) {
if(rs.mElement_MATRIX_3X3 == null) {
rs.mElement_MATRIX_3X3 = createUser(rs, DataType.MATRIX_3X3);
@@ -852,8 +738,6 @@
return rs.mElement_MATRIX_3X3;
}
- /** @deprecated renderscript is deprecated in J
- */
public static Element MATRIX_2X2(RenderScript rs) {
if(rs.mElement_MATRIX_2X2 == null) {
rs.mElement_MATRIX_2X2 = createUser(rs, DataType.MATRIX_2X2);
@@ -943,7 +827,7 @@
updateVisibleSubElements();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a custom Element of the specified DataType. The DataKind will be
* set to USER and the vector size to 1 indicating non-vector.
*
@@ -959,7 +843,7 @@
return new Element(id, rs, dt, dk, norm, vecSize);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a custom vector element of the specified DataType and vector size.
* DataKind will be set to USER. Only primitive types (FLOAT_32, FLOAT_64,
* SIGNED_8, SIGNED_16, SIGNED_32, SIGNED_64, UNSIGNED_8, UNSIGNED_16,
@@ -1003,7 +887,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a new pixel Element type. A matching DataType and DataKind must
* be provided. The DataType and DataKind must contain the same number of
* components. Vector size will be set to 1.
@@ -1066,7 +950,7 @@
return new Element(id, rs, dt, dk, norm, size);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Check if the current Element is compatible with another Element.
* Primitive Elements are compatible if they share the same underlying
* size and type (i.e. U8 is compatible with A_8). User-defined Elements
@@ -1093,7 +977,7 @@
(mVectorSize == e.mVectorSize));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Builder class for producing complex elements with matching field and name
* pairs. The builder starts empty. The order in which elements are added
* is retained for the layout in memory.
@@ -1107,7 +991,7 @@
int mCount;
int mSkipPadding;
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a builder object.
*
* @param rs
@@ -1120,7 +1004,7 @@
mArraySizes = new int[8];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Add an array of elements to this element.
*
* @param element
@@ -1164,7 +1048,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Add a single element to this Element.
*
* @param element
@@ -1174,7 +1058,7 @@
return add(element, name, 1);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create the element from this builder.
*
*
diff --git a/graphics/java/android/renderscript/FieldPacker.java b/graphics/java/android/renderscript/FieldPacker.java
index 9d36e33..a215a57 100644
--- a/graphics/java/android/renderscript/FieldPacker.java
+++ b/graphics/java/android/renderscript/FieldPacker.java
@@ -17,7 +17,7 @@
package android.renderscript;
-/** @deprecated renderscript is deprecated in J
+/**
* Utility class for packing arguments and structures from Android system objects to
* Renderscript objects.
*
diff --git a/graphics/java/android/renderscript/FileA3D.java b/graphics/java/android/renderscript/FileA3D.java
index 1158061..42b508b 100644
--- a/graphics/java/android/renderscript/FileA3D.java
+++ b/graphics/java/android/renderscript/FileA3D.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-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.
@@ -27,7 +27,8 @@
import android.util.Log;
import android.util.TypedValue;
-/** @deprecated renderscript is deprecated in J
+/**
+ * @deprecated in API 16
* FileA3D allows users to load Renderscript objects from files
* or resources stored on disk. It could be used to load items
* such as 3D geometry data converted to a Renderscript format from
@@ -40,17 +41,20 @@
**/
public class FileA3D extends BaseObj {
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Specifies what renderscript object type is contained within
* the FileA3D IndexEntry
**/
public enum EntryType {
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Unknown or or invalid object, nothing will be loaded
**/
UNKNOWN (0),
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Renderscript Mesh object
**/
MESH (1);
@@ -65,7 +69,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* IndexEntry contains information about one of the Renderscript
* objects inside the file's index. It could be used to query the
* object's type and also name and load the object itself if
@@ -79,7 +84,8 @@
EntryType mEntryType;
BaseObj mLoadedObj;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Returns the name of a renderscript object the index entry
* describes
*
@@ -91,7 +97,8 @@
return mName;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Returns the type of a renderscript object the index entry
* describes
* @return type of a renderscript object the index entry
@@ -101,7 +108,8 @@
return mEntryType;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Used to load the object described by the index entry
* @return base renderscript object described by the entry
*/
@@ -111,7 +119,8 @@
return obj;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Used to load the mesh described by the index entry, object
* described by the index entry must be a renderscript mesh
*
@@ -181,7 +190,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Returns the number of objects stored inside the a3d file
*
* @return the number of objects stored inside the a3d file
@@ -193,7 +203,8 @@
return mFileEntries.length;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Returns an index entry from the list of all objects inside
* FileA3D
*
@@ -208,7 +219,8 @@
return mFileEntries[index];
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates a FileA3D object from an asset stored on disk
*
* @param rs Context to which the object will belong.
@@ -229,7 +241,8 @@
return fa3d;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates a FileA3D object from a file stored on disk
*
* @param rs Context to which the object will belong.
@@ -248,7 +261,8 @@
return fa3d;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates a FileA3D object from a file stored on disk
*
* @param rs Context to which the object will belong.
@@ -260,7 +274,8 @@
return createFromFile(rs, path.getAbsolutePath());
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates a FileA3D object from an application resource
*
* @param rs Context to which the object will belong.
diff --git a/graphics/java/android/renderscript/Float2.java b/graphics/java/android/renderscript/Float2.java
index a89a5df..1d4ce36 100644
--- a/graphics/java/android/renderscript/Float2.java
+++ b/graphics/java/android/renderscript/Float2.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript float2 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Float3.java b/graphics/java/android/renderscript/Float3.java
index 909a897..ffd1135 100644
--- a/graphics/java/android/renderscript/Float3.java
+++ b/graphics/java/android/renderscript/Float3.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript float2 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Float4.java b/graphics/java/android/renderscript/Float4.java
index 3be6dbc..c7cc3ae 100644
--- a/graphics/java/android/renderscript/Float4.java
+++ b/graphics/java/android/renderscript/Float4.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript float2 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Font.java b/graphics/java/android/renderscript/Font.java
index cd1010c..8a49abb 100644
--- a/graphics/java/android/renderscript/Font.java
+++ b/graphics/java/android/renderscript/Font.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-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,8 +29,9 @@
import android.util.Log;
import android.util.TypedValue;
-/** @deprecated renderscript is deprecated in J
- * <p>This class gives users a simple way to draw hardware accelerated text.
+/**
+ * @deprecated in API 16
+ * <p>This class gives users a simple way to draw hardware accelerated text.
* Internally, the glyphs are rendered using the Freetype library and an internal cache of
* rendered glyph bitmaps is maintained. Each font object represents a combination of a typeface,
* and point size. You can create multiple font objects to represent styles such as bold or italic text,
@@ -42,7 +43,7 @@
* render large batches of text in sequence. It is also more efficient to render multiple
* characters at once instead of one by one to improve draw call batching.</p>
* <p>Font color and transparency are not part of the font object and you can freely modify
- * them in the script to suit the user's rendering needs. Font colors work as a state machine.
+ * them in the script to suit the user's rendering needs. Font colors work as a state machine.
* Every new call to draw text uses the last color set in the script.</p>
**/
public class Font extends BaseObj {
@@ -71,20 +72,25 @@
private static Map<String, FontFamily> sFontFamilyMap;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
*/
public enum Style {
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ */
NORMAL,
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ */
BOLD,
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ */
ITALIC,
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ */
BOLD_ITALIC;
}
@@ -148,7 +154,8 @@
super(id, rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Takes a specific file name as an argument
*/
static public Font createFromFile(RenderScript rs, Resources res, String path, float pointSize) {
@@ -164,13 +171,15 @@
return rsFont;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
*/
static public Font createFromFile(RenderScript rs, Resources res, File path, float pointSize) {
return createFromFile(rs, res, path.getAbsolutePath(), pointSize);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
*/
static public Font createFromAsset(RenderScript rs, Resources res, String path, float pointSize) {
rs.validate();
@@ -185,7 +194,8 @@
return rsFont;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
*/
static public Font createFromResource(RenderScript rs, Resources res, int id, float pointSize) {
String name = "R." + Integer.toString(id);
@@ -215,7 +225,8 @@
return rsFont;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Accepts one of the following family names as an argument
* and will attempt to produce the best match with a system font:
*
diff --git a/graphics/java/android/renderscript/Int2.java b/graphics/java/android/renderscript/Int2.java
index 4e2d344..434af21 100644
--- a/graphics/java/android/renderscript/Int2.java
+++ b/graphics/java/android/renderscript/Int2.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript int2 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Int3.java b/graphics/java/android/renderscript/Int3.java
index 1ffc129..333ccf8 100644
--- a/graphics/java/android/renderscript/Int3.java
+++ b/graphics/java/android/renderscript/Int3.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript int3 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Int4.java b/graphics/java/android/renderscript/Int4.java
index 555d431..8734c95 100644
--- a/graphics/java/android/renderscript/Int4.java
+++ b/graphics/java/android/renderscript/Int4.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript int4 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Long2.java b/graphics/java/android/renderscript/Long2.java
index aad6bd6..95ea18c 100644
--- a/graphics/java/android/renderscript/Long2.java
+++ b/graphics/java/android/renderscript/Long2.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript long2 type back to the Android system.
**/
public class Long2 {
diff --git a/graphics/java/android/renderscript/Long3.java b/graphics/java/android/renderscript/Long3.java
index 9c03d5c..96ee885 100644
--- a/graphics/java/android/renderscript/Long3.java
+++ b/graphics/java/android/renderscript/Long3.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript long3 type back to the Android system.
**/
public class Long3 {
diff --git a/graphics/java/android/renderscript/Long4.java b/graphics/java/android/renderscript/Long4.java
index 6611cdf..50e664c 100644
--- a/graphics/java/android/renderscript/Long4.java
+++ b/graphics/java/android/renderscript/Long4.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript long4 type back to the Android system.
**/
public class Long4 {
diff --git a/graphics/java/android/renderscript/Matrix2f.java b/graphics/java/android/renderscript/Matrix2f.java
index 38b5316..acc5bd8 100644
--- a/graphics/java/android/renderscript/Matrix2f.java
+++ b/graphics/java/android/renderscript/Matrix2f.java
@@ -20,13 +20,13 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript rs_matrix2x2 type back to the Android system.
*
**/
public class Matrix2f {
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a new identity 2x2 matrix
*/
public Matrix2f() {
@@ -34,7 +34,7 @@
loadIdentity();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a new matrix and sets its values from the given
* parameter
*
@@ -46,7 +46,7 @@
System.arraycopy(dataArray, 0, mMat, 0, mMat.length);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return a reference to the internal array representing matrix
* values. Modifying this array will also change the matrix
*
@@ -56,7 +56,7 @@
return mMat;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns the value for a given row and column
*
* @param i row of the value to return
@@ -68,7 +68,7 @@
return mMat[i*2 + j];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the value for a given row and column
*
* @param i row of the value to set
@@ -78,7 +78,7 @@
mMat[i*2 + j] = v;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the matrix values to identity
*/
public void loadIdentity() {
@@ -89,7 +89,7 @@
mMat[3] = 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the values of the matrix to those of the parameter
*
* @param src matrix to load the values from
@@ -98,7 +98,7 @@
System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a rotation matrix of given angle
*
* @param rot rotation angle
@@ -114,7 +114,7 @@
mMat[3] = c;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a scale matrix of given dimensions
*
* @param x scale component x
@@ -126,7 +126,7 @@
mMat[3] = y;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be the result of multiplying two given
* matrices
*
@@ -147,7 +147,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Post-multiplies the current matrix by a given parameter
*
* @param rhs right hand side to multiply by
@@ -157,7 +157,7 @@
tmp.loadMultiply(this, rhs);
load(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* rotation matrix of given angle
*
@@ -168,7 +168,7 @@
tmp.loadRotate(rot);
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* scale matrix of given dimensions
*
@@ -180,7 +180,7 @@
tmp.loadScale(x, y);
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the current matrix to its transpose
*/
public void transpose() {
diff --git a/graphics/java/android/renderscript/Matrix3f.java b/graphics/java/android/renderscript/Matrix3f.java
index b821742..253506d 100644
--- a/graphics/java/android/renderscript/Matrix3f.java
+++ b/graphics/java/android/renderscript/Matrix3f.java
@@ -20,13 +20,13 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript rs_matrix3x3 type back to the Android system.
*
**/
public class Matrix3f {
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a new identity 3x3 matrix
*/
public Matrix3f() {
@@ -34,7 +34,7 @@
loadIdentity();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a new matrix and sets its values from the given
* parameter
*
@@ -46,7 +46,7 @@
System.arraycopy(dataArray, 0, mMat, 0, mMat.length);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return a reference to the internal array representing matrix
* values. Modifying this array will also change the matrix
*
@@ -56,7 +56,7 @@
return mMat;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns the value for a given row and column
*
* @param i row of the value to return
@@ -68,7 +68,7 @@
return mMat[i*3 + j];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the value for a given row and column
*
* @param i row of the value to set
@@ -78,7 +78,7 @@
mMat[i*3 + j] = v;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the matrix values to identity
*/
public void loadIdentity() {
@@ -95,7 +95,7 @@
mMat[8] = 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the values of the matrix to those of the parameter
*
* @param src matrix to load the values from
@@ -104,7 +104,7 @@
System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a rotation matrix of certain angle
* about a given axis
*
@@ -144,7 +144,7 @@
mMat[8] = z*z*nc + c;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Makes the upper 2x2 a rotation matrix of the given angle
*
* @param rot rotation angle
@@ -161,7 +161,7 @@
mMat[4] = c;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Makes the upper 2x2 a scale matrix of given dimensions
*
* @param x scale component x
@@ -173,7 +173,7 @@
mMat[4] = y;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a scale matrix of given dimensions
*
* @param x scale component x
@@ -187,7 +187,7 @@
mMat[8] = z;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a translation matrix of given
* dimensions
*
@@ -200,7 +200,7 @@
mMat[7] = y;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be the result of multiplying two given
* matrices
*
@@ -224,7 +224,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Post-multiplies the current matrix by a given parameter
*
* @param rhs right hand side to multiply by
@@ -235,7 +235,7 @@
load(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* rotation matrix of certain angle about a given axis
*
@@ -250,7 +250,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the upper 2x2 of the current matrix by
* post-multiplying it with a rotation matrix of given angle
*
@@ -262,7 +262,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the upper 2x2 of the current matrix by
* post-multiplying it with a scale matrix of given dimensions
*
@@ -275,7 +275,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* scale matrix of given dimensions
*
@@ -289,7 +289,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* translation matrix of given dimensions
*
@@ -302,7 +302,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the current matrix to its transpose
*/
public void transpose() {
diff --git a/graphics/java/android/renderscript/Matrix4f.java b/graphics/java/android/renderscript/Matrix4f.java
index 8b7a0df..adc1806 100644
--- a/graphics/java/android/renderscript/Matrix4f.java
+++ b/graphics/java/android/renderscript/Matrix4f.java
@@ -20,13 +20,13 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript rs_matrix4x4 type back to the Android system.
*
**/
public class Matrix4f {
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a new identity 4x4 matrix
*/
public Matrix4f() {
@@ -34,7 +34,7 @@
loadIdentity();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a new matrix and sets its values from the given
* parameter
*
@@ -46,7 +46,7 @@
System.arraycopy(dataArray, 0, mMat, 0, mMat.length);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return a reference to the internal array representing matrix
* values. Modifying this array will also change the matrix
*
@@ -56,7 +56,7 @@
return mMat;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns the value for a given row and column
*
* @param i row of the value to return
@@ -68,7 +68,7 @@
return mMat[i*4 + j];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the value for a given row and column
*
* @param i row of the value to set
@@ -78,7 +78,7 @@
mMat[i*4 + j] = v;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the matrix values to identity
*/
public void loadIdentity() {
@@ -103,7 +103,7 @@
mMat[15] = 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the values of the matrix to those of the parameter
*
* @param src matrix to load the values from
@@ -112,7 +112,7 @@
System.arraycopy(src.getArray(), 0, mMat, 0, mMat.length);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a rotation matrix of certain angle
* about a given axis
*
@@ -159,7 +159,7 @@
mMat[10] = z*z*nc + c;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a scale matrix of given dimensions
*
* @param x scale component x
@@ -173,7 +173,7 @@
mMat[10] = z;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a translation matrix of given
* dimensions
*
@@ -188,7 +188,7 @@
mMat[14] = z;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be the result of multiplying two given
* matrices
*
@@ -215,7 +215,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set current values to be an orthographic projection matrix
*
* @param l location of the left vertical clipping plane
@@ -235,7 +235,7 @@
mMat[14]= -(f + n) / (f - n);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set current values to be an orthographic projection matrix
* with the right and bottom clipping planes set to the given
* values. Left and top clipping planes are set to 0. Near and
@@ -249,7 +249,7 @@
loadOrtho(0,w, h,0, -1,1);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a perspective projection matrix
*
* @param l location of the left vertical clipping plane
@@ -272,7 +272,7 @@
mMat[15]= 0;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets current values to be a perspective projection matrix
*
* @param fovy vertical field of view angle in degrees
@@ -288,7 +288,7 @@
loadFrustum(left, right, bottom, top, near, far);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Helper function to set the current values to a perspective
* projection matrix with aspect ratio defined by the parameters
* and (near, far), (bottom, top) mapping to (-1, 1) at z = 0
@@ -321,7 +321,7 @@
load(m1);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Post-multiplies the current matrix by a given parameter
*
* @param rhs right hand side to multiply by
@@ -331,7 +331,7 @@
tmp.loadMultiply(this, rhs);
load(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* rotation matrix of certain angle about a given axis
*
@@ -346,7 +346,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* scale matrix of given dimensions
*
@@ -360,7 +360,7 @@
multiply(tmp);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Modifies the current matrix by post-multiplying it with a
* translation matrix of given dimensions
*
@@ -392,7 +392,7 @@
return cofactor;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the current matrix to its inverse
*/
public boolean inverse() {
@@ -421,7 +421,7 @@
return true;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the current matrix to its inverse transpose
*/
public boolean inverseTranspose() {
@@ -449,7 +449,7 @@
return true;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the current matrix to its transpose
*/
public void transpose() {
diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java
index bc32038..f49a24e 100644
--- a/graphics/java/android/renderscript/Mesh.java
+++ b/graphics/java/android/renderscript/Mesh.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-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.
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* <p>This class is a container for geometric data displayed with
* Renderscript. Internally, a mesh is a collection of allocations that
* represent vertex data (positions, normals, texture
@@ -39,34 +39,34 @@
**/
public class Mesh extends BaseObj {
- /** @deprecated renderscript is deprecated in J
+ /**
* Describes the way mesh vertex data is interpreted when rendering
*
**/
public enum Primitive {
- /** @deprecated renderscript is deprecated in J
+ /**
* Vertex data will be rendered as a series of points
*/
POINT (0),
- /** @deprecated renderscript is deprecated in J
+ /**
* Vertex pairs will be rendered as lines
*/
LINE (1),
- /** @deprecated renderscript is deprecated in J
+ /**
* Vertex data will be rendered as a connected line strip
*/
LINE_STRIP (2),
- /** @deprecated renderscript is deprecated in J
+ /**
* Vertices will be rendered as individual triangles
*/
TRIANGLE (3),
- /** @deprecated renderscript is deprecated in J
+ /**
* Vertices will be rendered as a connected triangle strip
* defined by the first three vertices with each additional
* triangle defined by a new vertex
*/
TRIANGLE_STRIP (4),
- /** @deprecated renderscript is deprecated in J
+ /**
* Vertices will be rendered as a sequence of triangles that all
* share first vertex as the origin
*/
@@ -86,7 +86,7 @@
super(id, rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @return number of allocations containing vertex data
*
**/
@@ -96,7 +96,7 @@
}
return mVertexBuffers.length;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @param slot index in the list of allocations to return
* @return vertex data allocation at the given index
*
@@ -105,7 +105,7 @@
return mVertexBuffers[slot];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @return number of primitives or index sets in the mesh
*
**/
@@ -116,7 +116,7 @@
return mIndexBuffers.length;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @param slot locaton within the list of index set allocation
* @return allocation containing primtive index data or null if
* the index data is not specified explicitly
@@ -125,7 +125,7 @@
public Allocation getIndexSetAllocation(int slot) {
return mIndexBuffers[slot];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @param slot locaiton within the list of index set primitives
* @return index set primitive type
*
@@ -167,7 +167,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Mesh builder object. It starts empty and requires you to
* add the types necessary to create vertex and index
* allocations.
@@ -189,7 +189,7 @@
Entry[] mVertexTypes;
Vector mIndexTypes;
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates builder object
* @param rs Context to which the mesh will belong.
* @param usage specifies how the mesh allocations are to be
@@ -204,7 +204,7 @@
mIndexTypes = new Vector();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @return internal index of the last vertex buffer type added to
* builder
**/
@@ -212,7 +212,7 @@
return mVertexTypeCount - 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* @return internal index of the last index set added to the
* builder
**/
@@ -220,7 +220,7 @@
return mIndexTypes.size() - 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds a vertex data type to the builder object
*
* @param t type of the vertex data allocation to be created
@@ -239,7 +239,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds a vertex data type to the builder object
*
* @param e element describing the vertex data layout
@@ -260,7 +260,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds an index set data type to the builder object
*
* @param t type of the index set data, could be null
@@ -278,7 +278,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds an index set primitive type to the builder object
*
* @param p primitive type
@@ -295,7 +295,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds an index set data type to the builder object
*
* @param e element describing the index set data layout
@@ -320,7 +320,7 @@
return tb.create();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a Mesh object from the current state of the builder
*
**/
@@ -372,7 +372,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Mesh builder object. It starts empty and requires the user to
* add all the vertex and index allocations that comprise the
* mesh
@@ -391,8 +392,9 @@
Vector mIndexTypes;
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
public AllocationBuilder(RenderScript rs) {
mRS = rs;
mVertexTypeCount = 0;
@@ -400,7 +402,8 @@
mIndexTypes = new Vector();
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* @return internal index of the last vertex buffer type added to
* builder
**/
@@ -408,7 +411,8 @@
return mVertexTypeCount - 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* @return internal index of the last index set added to the
* builder
**/
@@ -416,7 +420,8 @@
return mIndexTypes.size() - 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds an allocation containing vertex buffer data to the
* builder
*
@@ -435,7 +440,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds an allocation containing index buffer data and index type
* to the builder
*
@@ -452,7 +458,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds an index set type to the builder
*
* @param p index set primitive type
@@ -467,7 +474,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Create a Mesh object from the current state of the builder
*
**/
@@ -508,7 +516,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Builder that allows creation of a mesh object point by point
* and triangle by triangle
*
@@ -535,17 +544,21 @@
int mVtxSize;
int mFlags;
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
public static final int COLOR = 0x0001;
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
public static final int NORMAL = 0x0002;
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
public static final int TEXTURE_0 = 0x0100;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* @param rs Context to which the mesh will belong.
* @param vtxSize specifies whether the vertex is a float2 or
* float3
@@ -600,7 +613,8 @@
mMaxIndex ++;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds a float2 vertex to the mesh
*
* @param x position x
@@ -620,7 +634,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds a float3 vertex to the mesh
*
* @param x position x
@@ -643,7 +658,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Sets the texture coordinate for the vertices that are added after this method call.
*
* @param s texture coordinate s
@@ -660,7 +676,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Sets the normal vector for the vertices that are added after this method call.
*
* @param x normal vector x
@@ -679,7 +696,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Sets the color for the vertices that are added after this method call.
*
* @param r red component
@@ -700,7 +718,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds a new triangle to the mesh builder
*
* @param idx1 index of the first vertex in the triangle
@@ -726,7 +745,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates the mesh object from the current state of the builder
*
* @param uploadToBufferObject specifies whether the vertex data
diff --git a/graphics/java/android/renderscript/Path.java b/graphics/java/android/renderscript/Path.java
index ec34d7c..9c4d41b 100644
--- a/graphics/java/android/renderscript/Path.java
+++ b/graphics/java/android/renderscript/Path.java
@@ -19,7 +19,7 @@
import java.util.Vector;
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* @hide
*
*/
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index 16186fa..d9f64c6 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -25,7 +25,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
*
* Program is a base class for all the objects that modify
* various stages of the graphics pipeline
@@ -37,18 +37,14 @@
static final int MAX_CONSTANT = 8;
static final int MAX_TEXTURE = 8;
- /** @deprecated renderscript is deprecated in J
+ /**
*
* TextureType specifies what textures are attached to Program
* objects
*
**/
public enum TextureType {
- /** @deprecated renderscript is deprecated in J
- */
TEXTURE_2D (0),
- /** @deprecated renderscript is deprecated in J
- */
TEXTURE_CUBE (1);
int mID;
@@ -81,7 +77,7 @@
super(id, rs);
}
- /** @hide renderscript is deprecated in J
+ /**
* Program object can have zero or more constant allocations
* associated with it. This method returns the total count.
* @return number of constant input types
@@ -90,7 +86,7 @@
return mConstants != null ? mConstants.length : 0;
}
- /** @hide renderscript is deprecated in J
+ /**
* Returns the type of the constant buffer used in the program
* object. It could be used to query internal elements or create
* an allocation to store constant data.
@@ -104,7 +100,7 @@
return mConstants[slot];
}
- /** @hide renderscript is deprecated in J
+ /**
* Returns the number of textures used in this program object
* @return number of texture inputs
*/
@@ -112,7 +108,7 @@
return mTextureCount;
}
- /** @hide renderscript is deprecated in J
+ /**
* Returns the type of texture at a given slot. e.g. 2D or Cube
* @param slot index of the texture input
* @return texture input type
@@ -124,7 +120,7 @@
return mTextures[slot];
}
- /** @hide renderscript is deprecated in J
+ /**
* Returns the name of the texture input at a given slot. e.g.
* tex0, diffuse, spec
* @param slot index of the texture input
@@ -137,7 +133,7 @@
return mTextureNames[slot];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Binds a constant buffer to be used as uniform inputs to the
* program
*
@@ -157,7 +153,7 @@
mRS.nProgramBindConstants(getID(mRS), slot, id);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Binds a texture to be used in the program
*
* @param va allocation containing texture data
@@ -179,7 +175,7 @@
mRS.nProgramBindTexture(getID(mRS), slot, id);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Binds an object that describes how a texture at the
* corresponding location is sampled
*
@@ -214,8 +210,7 @@
int mTextureCount;
String mShader;
- /** @deprecated renderscript is deprecated in J
- */
+
protected BaseProgramBuilder(RenderScript rs) {
mRS = rs;
mInputs = new Element[MAX_INPUT];
@@ -229,7 +224,7 @@
mTextureNames = new String[MAX_TEXTURE];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the GLSL shader code to be used in the program
*
* @param s GLSL shader string
@@ -240,7 +235,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Sets the GLSL shader code to be used in the program
*
* @param resources application resources
@@ -286,7 +281,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Queries the index of the last added constant buffer type
*
*/
@@ -294,7 +289,7 @@
return mConstantCount - 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Queries the index of the last added texture type
*
*/
@@ -302,7 +297,7 @@
return mTextureCount - 1;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds constant (uniform) inputs to the program
*
* @param t Type that describes the layout of the Allocation
@@ -322,7 +317,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Adds a texture input to the Program
*
* @param texType describes that the texture to append it (2D,
@@ -334,7 +329,7 @@
return this;
}
- /** @hide renderscript is deprecated in J
+ /**
* Adds a texture input to the Program
*
* @param texType describes that the texture to append it (2D,
@@ -354,8 +349,6 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
- */
protected void initProgram(Program p) {
p.mInputs = new Element[mInputCount];
System.arraycopy(mInputs, 0, p.mInputs, 0, mInputCount);
diff --git a/graphics/java/android/renderscript/ProgramFragment.java b/graphics/java/android/renderscript/ProgramFragment.java
index 0427c19..fa6e2d4 100644
--- a/graphics/java/android/renderscript/ProgramFragment.java
+++ b/graphics/java/android/renderscript/ProgramFragment.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* <p>The Renderscript fragment program, also known as fragment shader is responsible
* for manipulating pixel data in a user defined way. It's constructed from a GLSL
* shader string containing the program body, textures inputs, and a Type object
@@ -42,7 +42,7 @@
}
public static class Builder extends BaseProgramBuilder {
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a builder object.
*
* @param rs Context to which the program will belong.
@@ -51,7 +51,7 @@
super(rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates ProgramFragment from the current state of the builder
*
* @return ProgramFragment
diff --git a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
index 19fca58..848c5a3 100644
--- a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-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.
@@ -20,7 +20,8 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
+ * @deprecated in API 16
* <p>ProgramFragmentFixedFunction is a helper class that provides
* a way to make a simple fragment shader without writing any
* GLSL code. This class allows for display of constant color, interpolated
@@ -34,11 +35,15 @@
}
static class InternalBuilder extends BaseProgramBuilder {
+ /**
+ * @deprecated in API 16
+ */
public InternalBuilder(RenderScript rs) {
super(rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates ProgramFragmentFixedFunction from the current state
* of the builder
*
@@ -75,9 +80,13 @@
}
}
+ /**
+ * @deprecated in API 16
+ */
public static class Builder {
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ */
public static final int MAX_TEXTURE = 2;
int mNumTextures;
boolean mPointSpriteEnable;
@@ -85,20 +94,24 @@
String mShader;
RenderScript mRS;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* EnvMode describes how textures are combined with the existing
* color in the fixed function fragment shader
*
**/
public enum EnvMode {
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
REPLACE (1),
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
MODULATE (2),
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
DECAL (3);
int mID;
@@ -107,23 +120,28 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Format describes the pixel format of textures in the fixed
* function fragment shader and how they are sampled
*
**/
public enum Format {
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
ALPHA (1),
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
LUMINANCE_ALPHA (2),
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
RGB (3),
- /** @deprecated renderscript is deprecated in J
- */
+ /**
+ * @deprecated in API 16
+ **/
RGBA (4);
int mID;
@@ -206,7 +224,8 @@
mShader += "}\n";
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated
* Creates a builder for fixed function fragment program
*
* @param rs Context to which the program will belong.
@@ -217,7 +236,8 @@
mPointSpriteEnable = false;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Adds a texture to be fetched as part of the fixed function
* fragment program
*
@@ -239,7 +259,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Specifies whether the texture coordinate passed from the
* vertex program is replaced with an openGL internal point
* sprite texture coordinate
@@ -250,7 +271,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Specifies whether the varying color passed from the vertex
* program or the constant color set on the fragment program is
* used in the final color calculation in the fixed function
@@ -262,7 +284,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates the fixed function fragment program from the current
* state of the builder.
*
diff --git a/graphics/java/android/renderscript/ProgramRaster.java b/graphics/java/android/renderscript/ProgramRaster.java
index 26fcafe..e40751f 100644
--- a/graphics/java/android/renderscript/ProgramRaster.java
+++ b/graphics/java/android/renderscript/ProgramRaster.java
@@ -20,23 +20,15 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Program raster is primarily used to specify whether point sprites are enabled and to control
* the culling mode. By default, back faces are culled.
**/
public class ProgramRaster extends BaseObj {
- /** @deprecated renderscript is deprecated in J
- */
public enum CullMode {
- /** @deprecated renderscript is deprecated in J
- */
BACK (0),
- /** @deprecated renderscript is deprecated in J
- */
FRONT (1),
- /** @deprecated renderscript is deprecated in J
- */
NONE (2);
int mID;
@@ -55,7 +47,7 @@
mCullMode = CullMode.BACK;
}
- /** @hide renderscript is deprecated in J
+ /**
* Specifies whether vertices are rendered as screen aligned
* elements of a specified size
* @return whether point sprites are enabled
@@ -64,7 +56,7 @@
return mPointSprite;
}
- /** @hide renderscript is deprecated in J
+ /**
* Specifies how triangles are culled based on their orientation
* @return cull mode
*/
@@ -72,8 +64,6 @@
return mCullMode;
}
- /** @deprecated renderscript is deprecated in J
- */
public static ProgramRaster CULL_BACK(RenderScript rs) {
if(rs.mProgramRaster_CULL_BACK == null) {
ProgramRaster.Builder builder = new ProgramRaster.Builder(rs);
@@ -83,8 +73,6 @@
return rs.mProgramRaster_CULL_BACK;
}
- /** @deprecated renderscript is deprecated in J
- */
public static ProgramRaster CULL_FRONT(RenderScript rs) {
if(rs.mProgramRaster_CULL_FRONT == null) {
ProgramRaster.Builder builder = new ProgramRaster.Builder(rs);
@@ -94,8 +82,6 @@
return rs.mProgramRaster_CULL_FRONT;
}
- /** @deprecated renderscript is deprecated in J
- */
public static ProgramRaster CULL_NONE(RenderScript rs) {
if(rs.mProgramRaster_CULL_NONE == null) {
ProgramRaster.Builder builder = new ProgramRaster.Builder(rs);
@@ -105,37 +91,27 @@
return rs.mProgramRaster_CULL_NONE;
}
- /** @deprecated renderscript is deprecated in J
- */
public static class Builder {
RenderScript mRS;
boolean mPointSprite;
CullMode mCullMode;
- /** @deprecated renderscript is deprecated in J
- */
public Builder(RenderScript rs) {
mRS = rs;
mPointSprite = false;
mCullMode = CullMode.BACK;
}
- /** @deprecated renderscript is deprecated in J
- */
public Builder setPointSpriteEnabled(boolean enable) {
mPointSprite = enable;
return this;
}
- /** @deprecated renderscript is deprecated in J
- */
public Builder setCullMode(CullMode m) {
mCullMode = m;
return this;
}
- /** @deprecated renderscript is deprecated in J
- */
public ProgramRaster create() {
mRS.validate();
int id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID);
diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java
index 20043f2..d0fd6e5 100644
--- a/graphics/java/android/renderscript/ProgramStore.java
+++ b/graphics/java/android/renderscript/ProgramStore.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* <p>ProgramStore contains a set of parameters that control how
* the graphics hardware handles writes to the framebuffer.
* It could be used to:</p>
@@ -35,7 +35,7 @@
*
**/
public class ProgramStore extends BaseObj {
- /** @deprecated renderscript is deprecated in J
+ /**
* Specifies the function used to determine whether a fragment
* will be drawn during the depth testing stage in the rendering
* pipeline by comparing its value with that already in the depth
@@ -44,36 +44,36 @@
*/
public enum DepthFunc {
- /** @deprecated renderscript is deprecated in J
+ /**
* Always drawn
*/
ALWAYS (0),
- /** @deprecated renderscript is deprecated in J
+ /**
* Drawn if the incoming depth value is less than that in the
* depth buffer
*/
LESS (1),
- /** @deprecated renderscript is deprecated in J
+ /**
* Drawn if the incoming depth value is less or equal to that in
* the depth buffer
*/
LESS_OR_EQUAL (2),
- /** @deprecated renderscript is deprecated in J
+ /**
* Drawn if the incoming depth value is greater than that in the
* depth buffer
*/
GREATER (3),
- /** @deprecated renderscript is deprecated in J
+ /**
* Drawn if the incoming depth value is greater or equal to that
* in the depth buffer
*/
GREATER_OR_EQUAL (4),
- /** @deprecated renderscript is deprecated in J
+ /**
* Drawn if the incoming depth value is equal to that in the
* depth buffer
*/
EQUAL (5),
- /** @deprecated renderscript is deprecated in J
+ /**
* Drawn if the incoming depth value is not equal to that in the
* depth buffer
*/
@@ -85,7 +85,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Specifies the functions used to combine incoming pixels with
* those already in the frame buffer.
*
@@ -94,32 +94,14 @@
*
*/
public enum BlendSrcFunc {
- /** @deprecated renderscript is deprecated in J
- */
ZERO (0),
- /** @deprecated renderscript is deprecated in J
- */
ONE (1),
- /** @deprecated renderscript is deprecated in J
- */
DST_COLOR (2),
- /** @deprecated renderscript is deprecated in J
- */
ONE_MINUS_DST_COLOR (3),
- /** @deprecated renderscript is deprecated in J
- */
SRC_ALPHA (4),
- /** @deprecated renderscript is deprecated in J
- */
ONE_MINUS_SRC_ALPHA (5),
- /** @deprecated renderscript is deprecated in J
- */
DST_ALPHA (6),
- /** @deprecated renderscript is deprecated in J
- */
ONE_MINUS_DST_ALPHA (7),
- /** @deprecated renderscript is deprecated in J
- */
SRC_ALPHA_SATURATE (8);
int mID;
@@ -128,7 +110,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Specifies the functions used to combine incoming pixels with
* those already in the frame buffer.
*
@@ -138,29 +120,13 @@
*
*/
public enum BlendDstFunc {
- /** @deprecated renderscript is deprecated in J
- */
ZERO (0),
- /** @deprecated renderscript is deprecated in J
- */
ONE (1),
- /** @deprecated renderscript is deprecated in J
- */
SRC_COLOR (2),
- /** @deprecated renderscript is deprecated in J
- */
ONE_MINUS_SRC_COLOR (3),
- /** @deprecated renderscript is deprecated in J
- */
SRC_ALPHA (4),
- /** @deprecated renderscript is deprecated in J
- */
ONE_MINUS_SRC_ALPHA (5),
- /** @deprecated renderscript is deprecated in J
- */
DST_ALPHA (6),
- /** @deprecated renderscript is deprecated in J
- */
ONE_MINUS_DST_ALPHA (7);
int mID;
@@ -183,7 +149,7 @@
super(id, rs);
}
- /** @hide renderscript is deprecated in J
+ /**
* Returns the function used to test writing into the depth
* buffer
* @return depth function
@@ -192,7 +158,7 @@
return mDepthFunc;
}
- /** @hide renderscript is deprecated in J
+ /**
* Queries whether writes are enabled into the depth buffer
* @return depth mask
*/
@@ -200,7 +166,7 @@
return mDepthMask;
}
- /** @hide renderscript is deprecated in J
+ /**
* Queries whether red channel is written
* @return red color channel mask
*/
@@ -208,7 +174,7 @@
return mColorMaskR;
}
- /** @hide renderscript is deprecated in J
+ /**
* Queries whether green channel is written
* @return green color channel mask
*/
@@ -216,7 +182,7 @@
return mColorMaskG;
}
- /** @hide renderscript is deprecated in J
+ /**
* Queries whether blue channel is written
* @return blue color channel mask
*/
@@ -224,7 +190,7 @@
return mColorMaskB;
}
- /** @hide renderscript is deprecated in J
+ /**
* Queries whether alpha channel is written
* @return alpha channel mask
*/
@@ -232,7 +198,7 @@
return mColorMaskA;
}
- /** @hide renderscript is deprecated in J
+ /**
* Specifies how the source blending factor is computed
* @return source blend function
*/
@@ -240,7 +206,7 @@
return mBlendSrc;
}
- /** @hide renderscript is deprecated in J
+ /**
* Specifies how the destination blending factor is computed
* @return destination blend function
*/
@@ -248,7 +214,7 @@
return mBlendDst;
}
- /** @hide renderscript is deprecated in J
+ /**
* Specifies whether colors are dithered before writing into the
* framebuffer
* @return whether dither is enabled
@@ -257,7 +223,7 @@
return mDither;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns a pre-defined program store object with the following
* characteristics:
* - incoming pixels are drawn if their depth value is less than
@@ -279,7 +245,7 @@
}
return rs.mProgramStore_BLEND_NONE_DEPTH_TEST;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns a pre-defined program store object with the following
* characteristics:
* - incoming pixels always pass the depth test and their value
@@ -300,7 +266,7 @@
}
return rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns a pre-defined program store object with the following
* characteristics:
* - incoming pixels are drawn if their depth value is less than
@@ -324,7 +290,7 @@
}
return rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns a pre-defined program store object with the following
* characteristics:
* - incoming pixels always pass the depth test and their value
@@ -347,7 +313,7 @@
return rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Builder class for ProgramStore object. If the builder is left
* empty, the equivalent of BLEND_NONE_DEPTH_NONE would be
* returned
@@ -376,7 +342,7 @@
mBlendDst = BlendDstFunc.ZERO;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Specifies the depth testing behavior
*
* @param func function used for depth testing
@@ -388,7 +354,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Enables writes into the depth buffer
*
* @param enable specifies whether depth writes are
@@ -401,7 +367,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Enables writes into the color buffer
*
* @param r specifies whether red channel is written
@@ -419,7 +385,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Specifies how incoming pixels are combined with the pixels
* stored in the framebuffer
*
@@ -436,7 +402,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Enables dithering
*
* @param enable specifies whether dithering is enabled or
@@ -449,7 +415,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates a program store from the current state of the builder
*/
public ProgramStore create() {
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java
index c13b9b0..74d666b 100644
--- a/graphics/java/android/renderscript/ProgramVertex.java
+++ b/graphics/java/android/renderscript/ProgramVertex.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
- /** @deprecated renderscript is deprecated in J
+ /**
* <p>The Renderscript vertex program, also known as a vertex shader, describes a stage in
* the graphics pipeline responsible for manipulating geometric data in a user-defined way.
* The object is constructed by providing the Renderscript system with the following data:</p>
@@ -42,7 +42,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* ProgramVertex, also know as a vertex shader, describes a
* stage in the graphics pipeline responsible for manipulating
* geometric data in a user-defined way.
@@ -54,14 +54,14 @@
super(id, rs);
}
- /** @hide renderscript is deprecated in J
+ /**
* @return number of input attribute elements
*/
public int getInputCount() {
return mInputs != null ? mInputs.length : 0;
}
- /** @hide renderscript is deprecated in J
+ /**
* @param slot location of the input to return
* @return input attribute element
*/
@@ -72,7 +72,7 @@
return mInputs[slot];
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Builder class for creating ProgramVertex objects.
* The builder starts empty and the user must minimally provide
* the GLSL shader code, and the varying inputs. Constant, or
@@ -81,7 +81,7 @@
*
**/
public static class Builder extends BaseProgramBuilder {
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a builder object.
*
* @param rs Context to which the program will belong.
@@ -90,7 +90,7 @@
super(rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Add varying inputs to the program
*
* @param e element describing the layout of the varying input
@@ -109,7 +109,7 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Creates ProgramVertex from the current state of the builder
*
* @return ProgramVertex
diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
index 97444db..88cade4 100644
--- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-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.
@@ -21,7 +21,8 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
+ * @deprecated in API 16
* ProgramVertexFixedFunction is a helper class that provides a
* simple way to create a fixed function emulation vertex shader
* without writing any GLSL code.
@@ -33,7 +34,8 @@
super(id, rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Binds the constant buffer containing fixed function emulation
* matrices
*
@@ -45,10 +47,16 @@
}
static class InternalBuilder extends BaseProgramBuilder {
+ /**
+ * @deprecated in API 16
+ */
public InternalBuilder(RenderScript rs) {
super(rs);
}
+ /**
+ * @deprecated in API 16
+ */
public InternalBuilder addInput(Element e) throws IllegalStateException {
// Should check for consistant and non-conflicting names...
if(mInputCount >= MAX_INPUT) {
@@ -61,7 +69,8 @@
return this;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates ProgramVertexFixedFunction from the current state of
* the builder
*
@@ -98,12 +107,16 @@
}
}
+ /**
+ * @deprecated in API 16
+ */
public static class Builder {
boolean mTextureMatrixEnable;
String mShader;
RenderScript mRS;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates a builder for fixed function vertex program
*
* @param rs Context to which the program will belong.
@@ -112,7 +125,8 @@
mRS = rs;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Specifies whether texture matrix calculations are to be added
* to the shader
*
@@ -152,7 +166,8 @@
mShader += "}\n";
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates ProgramVertexFixedFunction from the current state of
* the builder
*
@@ -176,7 +191,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Helper class to store modelview, projection and texture
* matrices for ProgramVertexFixedFunction
*
@@ -196,7 +212,8 @@
}
private FieldPacker mIOBuffer;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Creates a buffer to store fixed function emulation matrices
*
* @param rs Context to which the allocation will belong.
@@ -215,7 +232,8 @@
setTexture(new Matrix4f());
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Forces deallocation of memory backing the contant matrices.
* Normally, this is unnecessary and will be garbage collected
*
@@ -233,7 +251,8 @@
mAlloc.setFromFieldPacker(0, mIOBuffer);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Sets the modelview matrix in the fixed function matrix buffer
*
* @param m modelview matrix
@@ -243,7 +262,8 @@
addToBuffer(MODELVIEW_OFFSET*4, m);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Sets the projection matrix in the fixed function matrix buffer
*
* @param m projection matrix
@@ -253,7 +273,8 @@
addToBuffer(PROJECTION_OFFSET*4, m);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Sets the texture matrix in the fixed function matrix buffer.
* Texture matrix must be enabled in the
* ProgramVertexFixedFunction builder for the shader to utilize
diff --git a/graphics/java/android/renderscript/RSDriverException.java b/graphics/java/android/renderscript/RSDriverException.java
index 1784087..ce85b53 100644
--- a/graphics/java/android/renderscript/RSDriverException.java
+++ b/graphics/java/android/renderscript/RSDriverException.java
@@ -17,7 +17,7 @@
package android.renderscript;
-/** @deprecated renderscript is deprecated in J
+/**
* Base class for all exceptions thrown by the Android
* Renderscript
*/
diff --git a/graphics/java/android/renderscript/RSIllegalArgumentException.java b/graphics/java/android/renderscript/RSIllegalArgumentException.java
index 039d8f5..954c0e8 100644
--- a/graphics/java/android/renderscript/RSIllegalArgumentException.java
+++ b/graphics/java/android/renderscript/RSIllegalArgumentException.java
@@ -17,13 +17,11 @@
package android.renderscript;
-/** @deprecated renderscript is deprecated in J
+/**
* Base class for all exceptions thrown by the Android
* Renderscript
*/
public class RSIllegalArgumentException extends RSRuntimeException {
- /** @deprecated renderscript is deprecated in J
- */
public RSIllegalArgumentException(String string) {
super(string);
}
diff --git a/graphics/java/android/renderscript/RSInvalidStateException.java b/graphics/java/android/renderscript/RSInvalidStateException.java
index ccbaea1..691aeba 100644
--- a/graphics/java/android/renderscript/RSInvalidStateException.java
+++ b/graphics/java/android/renderscript/RSInvalidStateException.java
@@ -17,13 +17,11 @@
package android.renderscript;
-/** @deprecated renderscript is deprecated in J
+/**
* Base class for all exceptions thrown by the Android
* Renderscript
*/
public class RSInvalidStateException extends RSRuntimeException {
- /** @deprecated renderscript is deprecated in J
- */
public RSInvalidStateException(String string) {
super(string);
}
diff --git a/graphics/java/android/renderscript/RSRuntimeException.java b/graphics/java/android/renderscript/RSRuntimeException.java
index 3fb1ea9..5a16478 100644
--- a/graphics/java/android/renderscript/RSRuntimeException.java
+++ b/graphics/java/android/renderscript/RSRuntimeException.java
@@ -17,14 +17,12 @@
package android.renderscript;
-/** @deprecated renderscript is deprecated in J
+/**
* Base class for all exceptions thrown by the Android
* Renderscript
*/
public class RSRuntimeException
extends java.lang.RuntimeException {
- /** @deprecated renderscript is deprecated in J
- */
public RSRuntimeException(String string) {
super(string);
}
diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java
index 997b7d0..506f1af 100644
--- a/graphics/java/android/renderscript/RSSurfaceView.java
+++ b/graphics/java/android/renderscript/RSSurfaceView.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-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,7 +29,8 @@
import android.view.SurfaceHolder;
import android.view.SurfaceView;
-/** @deprecated renderscript is deprecated in J
+/**
+ * @deprecated in API 16
* The Surface View for a graphics renderscript (RenderScriptGL) to draw on.
*
* <div class="special reference">
@@ -42,7 +43,8 @@
private SurfaceHolder mSurfaceHolder;
private RenderScriptGL mRS;
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Standard View constructor. In order to render something, you
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
@@ -53,7 +55,8 @@
//Log.v(RenderScript.LOG_TAG, "RSSurfaceView");
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Standard View constructor. In order to render something, you
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
@@ -71,7 +74,8 @@
holder.addCallback(this);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
@@ -79,7 +83,8 @@
mSurfaceHolder = holder;
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
@@ -92,7 +97,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
@@ -104,7 +110,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Inform the view that the activity is paused. The owner of this view must
* call this method when the activity is paused. Calling this method will
* pause the rendering thread.
@@ -116,7 +123,8 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Inform the view that the activity is resumed. The owner of this view must
* call this method when the activity is resumed. Calling this method will
* recreate the OpenGL display and resume the rendering
@@ -129,12 +137,18 @@
}
}
+ /**
+ * @deprecated in API 16
+ **/
public RenderScriptGL createRenderScriptGL(RenderScriptGL.SurfaceConfig sc) {
RenderScriptGL rs = new RenderScriptGL(this.getContext(), sc);
setRenderScriptGL(rs);
return rs;
}
+ /**
+ * @deprecated in API 16
+ **/
public void destroyRenderScriptGL() {
synchronized (this) {
mRS.destroy();
@@ -142,10 +156,16 @@
}
}
+ /**
+ * @deprecated in API 16
+ **/
public void setRenderScriptGL(RenderScriptGL rs) {
mRS = rs;
}
+ /**
+ * @deprecated in API 16
+ **/
public RenderScriptGL getRenderScriptGL() {
return mRS;
}
diff --git a/graphics/java/android/renderscript/RSTextureView.java b/graphics/java/android/renderscript/RSTextureView.java
index b40f73c..30b2f99 100644
--- a/graphics/java/android/renderscript/RSTextureView.java
+++ b/graphics/java/android/renderscript/RSTextureView.java
@@ -28,7 +28,7 @@
import android.util.Log;
import android.view.TextureView;
-/** @deprecated renderscript is deprecated in J
+/**
* The Texture View for a graphics renderscript (RenderScriptGL)
* to draw on.
*
@@ -37,7 +37,7 @@
private RenderScriptGL mRS;
private SurfaceTexture mSurfaceTexture;
- /** @deprecated renderscript is deprecated in J
+ /**
* Standard View constructor. In order to render something, you
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
@@ -48,7 +48,7 @@
//Log.v(RenderScript.LOG_TAG, "RSSurfaceView");
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Standard View constructor. In order to render something, you
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
@@ -102,7 +102,7 @@
mSurfaceTexture = surface;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Inform the view that the activity is paused. The owner of this view must
* call this method when the activity is paused. Calling this method will
* pause the rendering thread.
@@ -114,7 +114,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Inform the view that the activity is resumed. The owner of this view must
* call this method when the activity is resumed. Calling this method will
* recreate the OpenGL display and resume the rendering
@@ -127,7 +127,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a new RenderScriptGL object and attach it to the
* TextureView if present.
*
@@ -145,7 +145,7 @@
return rs;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Destroy the RenderScriptGL object associated with this
* TextureView.
*/
@@ -154,7 +154,7 @@
mRS = null;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set a new RenderScriptGL object. This also will attach the
* new object to the TextureView if present.
*
@@ -167,7 +167,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Returns the previously set RenderScriptGL object.
*
* @return RenderScriptGL
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 46ad495..2032f67 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -32,7 +32,7 @@
-/** @deprecated renderscript is deprecated in J
+/**
* Renderscript base master class. An instance of this class creates native
* worker threads for processing commands from this object. This base class
* does not provide any extended capabilities beyond simple data processing.
@@ -743,7 +743,7 @@
///////////////////////////////////////////////////////////////////////////////////
//
- /** @deprecated renderscript is deprecated in J
+ /**
* Base class application should derive from for handling RS messages
* coming from their scripts. When a script calls sendToClient the data
* fields will be filled in and then the run method called by a message
@@ -758,7 +758,7 @@
public void run() {
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* If an application is expecting messages it should set this field to an
* instance of RSMessage. This instance will receive all the user messages
* sent from sendToClient by scripts from this context.
@@ -773,7 +773,7 @@
return mMessageCallback;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Runtime error base class. An application should derive from this class
* if it wishes to install an error handler. When errors occur at runtime
* the fields in this class will be filled and the run method called.
@@ -786,7 +786,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Application Error handler. All runtime errors will be dispatched to the
* instance of RSAsyncError set here. If this field is null a
* RSRuntimeException will instead be thrown with details about the error.
@@ -802,7 +802,7 @@
return mErrorCallback;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* RenderScript worker threads priority enumeration. The default value is
* NORMAL. Applications wishing to do background processing such as
* wallpapers should set their priority to LOW to avoid starving forground
@@ -825,7 +825,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Change the priority of the worker threads for this context.
*
* @param p New priority to be set.
@@ -922,7 +922,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Gets the application context associated with the RenderScript context.
*
* @return The application context.
@@ -931,7 +931,7 @@
return mApplicationContext;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a basic RenderScript context.
*
* @hide
@@ -951,7 +951,7 @@
return rs;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a basic RenderScript context.
*
* @param ctx The context.
@@ -962,7 +962,7 @@
return create(ctx, v);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Print the currently available debugging information about the state of
* the RS context to the log.
*
@@ -972,7 +972,7 @@
nContextDump(0);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Wait for any commands in the fifo between the java bindings and native to
* be processed.
*
@@ -981,7 +981,7 @@
nContextFinish();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Destroy this renderscript context. Once this function is called its no
* longer legal to use this or any objects created by this context.
*
diff --git a/graphics/java/android/renderscript/RenderScriptGL.java b/graphics/java/android/renderscript/RenderScriptGL.java
index ac1a392..dbdbe3d 100644
--- a/graphics/java/android/renderscript/RenderScriptGL.java
+++ b/graphics/java/android/renderscript/RenderScriptGL.java
@@ -28,7 +28,7 @@
import android.view.SurfaceHolder;
import android.view.SurfaceView;
-/** @deprecated renderscript is deprecated in J
+/**
* The Graphics derivitive of Renderscript. Extends the basic context to add a
* root script which is the display window for graphical output. When the
* system needs to update the display the currently bound root script will be
@@ -45,7 +45,7 @@
int mWidth;
int mHeight;
- /** @deprecated renderscript is deprecated in J
+ /**
* Class which is used to describe a pixel format for a graphical buffer.
* This is used to describe the intended format of the display surface.
*
@@ -92,7 +92,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the per-component bit depth for color (red, green, blue). This
* configures the surface for an unsigned integer buffer type.
*
@@ -105,7 +105,7 @@
mColorPref = preferred;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the bit depth for alpha. This configures the surface for
* an unsigned integer buffer type.
*
@@ -118,7 +118,7 @@
mAlphaPref = preferred;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the bit depth for the depth buffer. This configures the
* surface for an unsigned integer buffer type. If a minimum of 0
* is specified then its possible no depth buffer will be
@@ -133,7 +133,7 @@
mDepthPref = preferred;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Configure the multisample rendering.
*
* @param minimum The required number of samples, must be at least 1.
@@ -156,7 +156,7 @@
SurfaceConfig mSurfaceConfig;
- /** @deprecated renderscript is deprecated in J
+ /**
* Construct a new RenderScriptGL context.
*
* @param ctx The context.
@@ -186,7 +186,7 @@
mMessageThread.start();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Bind an os surface
*
*
@@ -205,7 +205,8 @@
nContextSetSurface(w, h, s);
}
- /** @deprecated renderscript is deprecated in J
+ /**
+ * @deprecated in API 16
* Bind an os surface
*
* @param w
@@ -221,7 +222,7 @@
nContextSetSurfaceTexture(w, h, sur);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* return the height of the last set surface.
*
* @return int
@@ -230,7 +231,7 @@
return mHeight;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* return the width of the last set surface.
*
* @return int
@@ -239,7 +240,7 @@
return mWidth;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Temporarly halt calls to the root rendering script.
*
*/
@@ -248,7 +249,7 @@
nContextPause();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Resume calls to the root rendering script.
*
*/
@@ -258,7 +259,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the script to handle calls to render the primary surface.
*
* @param s Graphics script to process rendering requests.
@@ -268,7 +269,7 @@
nContextBindRootScript(safeID(s));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the default ProgramStore object seen as the parent state by the root
* rendering script.
*
@@ -279,7 +280,7 @@
nContextBindProgramStore(safeID(p));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the default ProgramFragment object seen as the parent state by the
* root rendering script.
*
@@ -290,7 +291,7 @@
nContextBindProgramFragment(safeID(p));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the default ProgramRaster object seen as the parent state by the
* root rendering script.
*
@@ -301,7 +302,7 @@
nContextBindProgramRaster(safeID(p));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Set the default ProgramVertex object seen as the parent state by the
* root rendering script.
*
diff --git a/graphics/java/android/renderscript/Sampler.java b/graphics/java/android/renderscript/Sampler.java
index 6b258ab..0df1012 100644
--- a/graphics/java/android/renderscript/Sampler.java
+++ b/graphics/java/android/renderscript/Sampler.java
@@ -27,32 +27,18 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-/** @deprecated renderscript is deprecated in J
+/**
* Sampler object which defines how data is extracted from textures. Samplers
* are attached to Program objects (currently only ProgramFragment) when those objects
* need to access texture data.
**/
public class Sampler extends BaseObj {
- /** @deprecated renderscript is deprecated in J
- */
public enum Value {
- /** @deprecated renderscript is deprecated in J
- */
NEAREST (0),
- /** @deprecated renderscript is deprecated in J
- */
LINEAR (1),
- /** @deprecated renderscript is deprecated in J
- */
LINEAR_MIP_LINEAR (2),
- /** @deprecated renderscript is deprecated in J
- */
LINEAR_MIP_NEAREST (5),
- /** @deprecated renderscript is deprecated in J
- */
WRAP (3),
- /** @deprecated renderscript is deprecated in J
- */
CLAMP (4);
int mID;
@@ -72,42 +58,42 @@
super(id, rs);
}
- /** @hide renderscript is deprecated in J
+ /**
* @return minification setting for the sampler
*/
public Value getMinification() {
return mMin;
}
- /** @hide renderscript is deprecated in J
+ /**
* @return magnification setting for the sampler
*/
public Value getMagnification() {
return mMag;
}
- /** @hide renderscript is deprecated in J
+ /**
* @return S wrapping mode for the sampler
*/
public Value getWrapS() {
return mWrapS;
}
- /** @hide renderscript is deprecated in J
+ /**
* @return T wrapping mode for the sampler
*/
public Value getWrapT() {
return mWrapT;
}
- /** @hide renderscript is deprecated in J
+ /**
* @return anisotropy setting for the sampler
*/
public float getAnisotropy() {
return mAniso;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Retrieve a sampler with min and mag set to nearest and wrap modes set to
* clamp.
*
@@ -127,7 +113,7 @@
return rs.mSampler_CLAMP_NEAREST;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Retrieve a sampler with min and mag set to linear and wrap modes set to
* clamp.
*
@@ -147,7 +133,7 @@
return rs.mSampler_CLAMP_LINEAR;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Retrieve a sampler with ag set to linear, min linear mipmap linear, and
* to and wrap modes set to clamp.
*
@@ -167,7 +153,7 @@
return rs.mSampler_CLAMP_LINEAR_MIP_LINEAR;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Retrieve a sampler with min and mag set to nearest and wrap modes set to
* wrap.
*
@@ -187,7 +173,7 @@
return rs.mSampler_WRAP_NEAREST;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Retrieve a sampler with min and mag set to nearest and wrap modes set to
* wrap.
*
@@ -207,7 +193,7 @@
return rs.mSampler_WRAP_LINEAR;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Retrieve a sampler with ag set to linear, min linear mipmap linear, and
* to and wrap modes set to wrap.
*
@@ -228,7 +214,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Builder for creating non-standard samplers. Usefull if mix and match of
* wrap modes is necesary or if anisotropic filtering is desired.
*
diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java
index 56893ac..bbf5e7e 100644
--- a/graphics/java/android/renderscript/Script.java
+++ b/graphics/java/android/renderscript/Script.java
@@ -16,11 +16,11 @@
package android.renderscript;
-/** @deprecated renderscript is deprecated in J
+/**
*
**/
public class Script extends BaseObj {
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param slot
@@ -29,7 +29,7 @@
mRS.nScriptInvoke(getID(mRS), slot);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param slot
@@ -43,7 +43,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param slot
@@ -77,7 +77,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param va
@@ -92,7 +92,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -102,7 +102,7 @@
mRS.nScriptSetVarF(getID(mRS), index, v);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -112,7 +112,7 @@
mRS.nScriptSetVarD(getID(mRS), index, v);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -122,7 +122,7 @@
mRS.nScriptSetVarI(getID(mRS), index, v);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -132,7 +132,7 @@
mRS.nScriptSetVarJ(getID(mRS), index, v);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -142,7 +142,7 @@
mRS.nScriptSetVarI(getID(mRS), index, v ? 1 : 0);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -152,7 +152,7 @@
mRS.nScriptSetVarObj(getID(mRS), index, (o == null) ? 0 : o.getID(mRS));
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -162,7 +162,7 @@
mRS.nScriptSetVarV(getID(mRS), index, v.getData());
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by generated reflected code.
*
* @param index
@@ -174,8 +174,6 @@
mRS.nScriptSetVarVE(getID(mRS), index, v.getData(), e.getID(mRS), dims);
}
- /** @deprecated renderscript is deprecated in J
- */
public void setTimeZone(String timeZone) {
mRS.validate();
try {
diff --git a/graphics/java/android/renderscript/ScriptC.java b/graphics/java/android/renderscript/ScriptC.java
index b1d1fa5..108b230 100644
--- a/graphics/java/android/renderscript/ScriptC.java
+++ b/graphics/java/android/renderscript/ScriptC.java
@@ -29,13 +29,13 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
-/** @deprecated renderscript is deprecated in J
+/**
*
**/
public class ScriptC extends Script {
private static final String TAG = "ScriptC";
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by the generated derived classes.
*
* @param id
@@ -45,7 +45,7 @@
super(id, rs);
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Only intended for use by the generated derived classes.
*
*
diff --git a/graphics/java/android/renderscript/Short2.java b/graphics/java/android/renderscript/Short2.java
index 21c5f05..617f1f5 100644
--- a/graphics/java/android/renderscript/Short2.java
+++ b/graphics/java/android/renderscript/Short2.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript Short2 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Short3.java b/graphics/java/android/renderscript/Short3.java
index 81a2954..b9ca49b 100644
--- a/graphics/java/android/renderscript/Short3.java
+++ b/graphics/java/android/renderscript/Short3.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript short3 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Short4.java b/graphics/java/android/renderscript/Short4.java
index 861c3d7..d5f2db5 100644
--- a/graphics/java/android/renderscript/Short4.java
+++ b/graphics/java/android/renderscript/Short4.java
@@ -20,7 +20,7 @@
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* Class for exposing the native Renderscript short4 type back to the Android system.
*
**/
diff --git a/graphics/java/android/renderscript/Type.java b/graphics/java/android/renderscript/Type.java
index 9f630e7..a707df2 100644
--- a/graphics/java/android/renderscript/Type.java
+++ b/graphics/java/android/renderscript/Type.java
@@ -20,7 +20,7 @@
import java.lang.reflect.Field;
import android.util.Log;
-/** @deprecated renderscript is deprecated in J
+/**
* <p>Type is an allocation template. It consists of an Element and one or more
* dimensions. It describes only the layout of memory but does not allocate any
* storage for the data that is described.</p>
@@ -70,7 +70,7 @@
}
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return the element associated with this Type.
*
* @return Element
@@ -79,7 +79,7 @@
return mElement;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return the value of the X dimension.
*
* @return int
@@ -88,7 +88,7 @@
return mDimX;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return the value of the Y dimension or 0 for a 1D allocation.
*
* @return int
@@ -97,7 +97,7 @@
return mDimY;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return the value of the Z dimension or 0 for a 1D or 2D allocation.
*
* @return int
@@ -106,7 +106,7 @@
return mDimZ;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return if the Type has a mipmap chain.
*
* @return boolean
@@ -115,7 +115,7 @@
return mDimMipmaps;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return if the Type is a cube map.
*
* @return boolean
@@ -124,7 +124,7 @@
return mDimFaces;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Return the total number of accessable cells in the Type.
*
* @return int
@@ -196,7 +196,7 @@
calcElementCount();
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Builder class for Type.
*
*/
@@ -210,7 +210,7 @@
Element mElement;
- /** @deprecated renderscript is deprecated in J
+ /**
* Create a new builder object.
*
* @param rs
@@ -222,7 +222,7 @@
mElement = e;
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Add a dimension to the Type.
*
*
@@ -255,7 +255,7 @@
}
- /** @deprecated renderscript is deprecated in J
+ /**
* Validate structure and create a new type.
*
* @return Type
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 2174d06..1892fce 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -55,6 +55,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
+import android.os.Vibrator;
import android.provider.Settings;
import android.provider.Settings.System;
import android.telephony.PhoneStateListener;
@@ -119,19 +120,18 @@
private static final int MSG_PERSIST_VOLUME = 1;
private static final int MSG_PERSIST_MASTER_VOLUME = 2;
private static final int MSG_PERSIST_RINGER_MODE = 3;
- private static final int MSG_PERSIST_VIBRATE_SETTING = 4;
- private static final int MSG_MEDIA_SERVER_DIED = 5;
- private static final int MSG_MEDIA_SERVER_STARTED = 6;
- private static final int MSG_PLAY_SOUND_EFFECT = 7;
- private static final int MSG_BTA2DP_DOCK_TIMEOUT = 8;
- private static final int MSG_LOAD_SOUND_EFFECTS = 9;
- private static final int MSG_SET_FORCE_USE = 10;
- private static final int MSG_PERSIST_MEDIABUTTONRECEIVER = 11;
- private static final int MSG_BT_HEADSET_CNCT_FAILED = 12;
- private static final int MSG_RCDISPLAY_CLEAR = 13;
- private static final int MSG_RCDISPLAY_UPDATE = 14;
- private static final int MSG_SET_ALL_VOLUMES = 15;
- private static final int MSG_PERSIST_MASTER_VOLUME_MUTE = 16;
+ private static final int MSG_MEDIA_SERVER_DIED = 4;
+ private static final int MSG_MEDIA_SERVER_STARTED = 5;
+ private static final int MSG_PLAY_SOUND_EFFECT = 6;
+ private static final int MSG_BTA2DP_DOCK_TIMEOUT = 7;
+ private static final int MSG_LOAD_SOUND_EFFECTS = 8;
+ private static final int MSG_SET_FORCE_USE = 9;
+ private static final int MSG_PERSIST_MEDIABUTTONRECEIVER = 10;
+ private static final int MSG_BT_HEADSET_CNCT_FAILED = 11;
+ private static final int MSG_RCDISPLAY_CLEAR = 12;
+ private static final int MSG_RCDISPLAY_UPDATE = 13;
+ private static final int MSG_SET_ALL_VOLUMES = 14;
+ private static final int MSG_PERSIST_MASTER_VOLUME_MUTE = 15;
// flags for MSG_PERSIST_VOLUME indicating if current and/or last audible volume should be
@@ -241,6 +241,20 @@
};
private int[] mStreamVolumeAlias;
+ // stream names used by dumpStreamStates()
+ private final String[] STREAM_NAMES = new String[] {
+ "STREAM_VOICE_CALL",
+ "STREAM_SYSTEM",
+ "STREAM_RING",
+ "STREAM_MUSIC",
+ "STREAM_ALARM",
+ "STREAM_NOTIFICATION",
+ "STREAM_BLUETOOTH_SCO",
+ "STREAM_SYSTEM_ENFORCED",
+ "STREAM_DTMF",
+ "STREAM_TTS"
+ };
+
private final AudioSystem.ErrorCallback mAudioSystemCallback = new AudioSystem.ErrorCallback() {
public void onError(int error) {
switch (error) {
@@ -282,14 +296,15 @@
private int mMuteAffectedStreams;
/**
- * Has multiple bits per vibrate type to indicate the type's vibrate
- * setting. See {@link #setVibrateSetting(int, int)}.
- * <p>
- * NOTE: This is not the final decision of whether vibrate is on/off for the
- * type since it depends on the ringer mode. See {@link #shouldVibrate(int)}.
+ * NOTE: setVibrateSetting(), getVibrateSetting(), shouldVibrate() are deprecated.
+ * mVibrateSetting is just maintained during deprecation period but vibration policy is
+ * now only controlled by mHasVibrator and mRingerMode
*/
private int mVibrateSetting;
+ // Is there a vibrator
+ private final boolean mHasVibrator;
+
// Broadcast receiver for device connections intent broadcasts
private final BroadcastReceiver mReceiver = new AudioServiceBroadcastReceiver();
@@ -388,6 +403,9 @@
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
mMediaEventWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "mediaKeyEvent");
+ Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
+ mHasVibrator = vibrator == null ? false : vibrator.hasVibrator();
+
// Intialized volume
MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = SystemProperties.getInt(
"ro.config.vc_call_vol_steps",
@@ -507,6 +525,16 @@
}
}
+ private void dumpStreamStates(PrintWriter pw) {
+ pw.println("\nStream volumes (device: index)");
+ int numStreamTypes = AudioSystem.getNumStreamTypes();
+ for (int i = 0; i < numStreamTypes; i++) {
+ pw.println("- "+STREAM_NAMES[i]+":");
+ mStreamStates[i].dump(pw);
+ pw.println("");
+ }
+ }
+
private void updateStreamVolumeAlias(boolean updateVolumes) {
int dtmfStreamAlias;
@@ -538,18 +566,34 @@
private void readPersistedSettings() {
final ContentResolver cr = mContentResolver;
- int ringerMode = System.getInt(cr, System.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL);
+ int ringerModeFromSettings =
+ System.getInt(cr, System.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL);
+ int ringerMode = ringerModeFromSettings;
// sanity check in case the settings are restored from a device with incompatible
// ringer modes
if (!AudioManager.isValidRingerMode(ringerMode)) {
ringerMode = AudioManager.RINGER_MODE_NORMAL;
+ }
+ if ((ringerMode == AudioManager.RINGER_MODE_VIBRATE) && !mHasVibrator) {
+ ringerMode = AudioManager.RINGER_MODE_SILENT;
+ }
+ if (ringerMode != ringerModeFromSettings) {
System.putInt(cr, System.MODE_RINGER, ringerMode);
}
synchronized(mSettingsLock) {
mRingerMode = ringerMode;
}
- mVibrateSetting = System.getInt(cr, System.VIBRATE_ON, 0);
+ // System.VIBRATE_ON is not used any more but defaults for mVibrateSetting
+ // are still needed while setVibrateSetting() and getVibrateSetting() are being deprecated.
+ mVibrateSetting = getValueForVibrateSetting(0,
+ AudioManager.VIBRATE_TYPE_NOTIFICATION,
+ mHasVibrator ? AudioManager.VIBRATE_SETTING_ONLY_SILENT
+ : AudioManager.VIBRATE_SETTING_OFF);
+ mVibrateSetting = getValueForVibrateSetting(mVibrateSetting,
+ AudioManager.VIBRATE_TYPE_RINGER,
+ mHasVibrator ? AudioManager.VIBRATE_SETTING_ONLY_SILENT
+ : AudioManager.VIBRATE_SETTING_OFF);
// make sure settings for ringer mode are consistent with device type: non voice capable
// devices (tablets) include media stream in silent mode whereas phones don't.
@@ -639,8 +683,7 @@
// If either the client forces allowing ringer modes for this adjustment,
// or the stream type is one that is affected by ringer modes
if (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) ||
- streamTypeAlias == AudioSystem.STREAM_RING ||
- (!mVoiceCapable && streamTypeAlias == AudioSystem.STREAM_MUSIC)) {
+ (streamTypeAlias == getMasterStreamType())) {
int ringerMode = getRingerMode();
// do not vibrate if already in vibrate mode
if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) {
@@ -648,7 +691,7 @@
}
// Check if the ringer mode changes with this volume adjustment. If
// it does, it will handle adjusting the volume, so we won't below
- adjustVolume = checkForRingerModeChange(oldIndex, direction, streamTypeAlias);
+ adjustVolume = checkForRingerModeChange(oldIndex, direction);
}
// If stream is muted, adjust last audible index only
@@ -724,9 +767,8 @@
(mStreamVolumeAlias[streamType] == getMasterStreamType())) {
int newRingerMode;
if (index == 0) {
- newRingerMode = System.getInt(mContentResolver, System.VIBRATE_IN_SILENT, 1) == 1
- ? AudioManager.RINGER_MODE_VIBRATE
- : AudioManager.RINGER_MODE_SILENT;
+ newRingerMode = mHasVibrator ? AudioManager.RINGER_MODE_VIBRATE
+ : AudioManager.RINGER_MODE_SILENT;
setStreamVolumeInt(mStreamVolumeAlias[streamType],
index,
device,
@@ -1070,7 +1112,6 @@
// on voice capable devices
if (mVoiceCapable &&
mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING) {
-
Set set = mStreamStates[streamType].mLastAudibleIndex.entrySet();
Iterator i = set.iterator();
while (i.hasNext()) {
@@ -1111,6 +1152,7 @@
/** @see AudioManager#shouldVibrate(int) */
public boolean shouldVibrate(int vibrateType) {
+ if (!mHasVibrator) return false;
switch (getVibrateSetting(vibrateType)) {
@@ -1131,21 +1173,20 @@
/** @see AudioManager#getVibrateSetting(int) */
public int getVibrateSetting(int vibrateType) {
+ if (!mHasVibrator) return AudioManager.VIBRATE_SETTING_OFF;
return (mVibrateSetting >> (vibrateType * 2)) & 3;
}
/** @see AudioManager#setVibrateSetting(int, int) */
public void setVibrateSetting(int vibrateType, int vibrateSetting) {
+ if (!mHasVibrator) return;
+
mVibrateSetting = getValueForVibrateSetting(mVibrateSetting, vibrateType, vibrateSetting);
// Broadcast change
broadcastVibrateSetting(vibrateType);
- // Post message to set ringer mode (it in turn will post a message
- // to persist)
- sendMsg(mAudioHandler, MSG_PERSIST_VIBRATE_SETTING, SENDMSG_NOOP, 0, 0,
- null, 0);
}
/**
@@ -1967,48 +2008,56 @@
* adjusting volume. If so, this will set the proper ringer mode and volume
* indices on the stream states.
*/
- private boolean checkForRingerModeChange(int oldIndex, int direction, int streamType) {
+ private boolean checkForRingerModeChange(int oldIndex, int direction) {
boolean adjustVolumeIndex = true;
int ringerMode = getRingerMode();
- int newRingerMode = ringerMode;
int uiIndex = (oldIndex + 5) / 10;
- boolean vibeInSilent = System.getInt(mContentResolver, System.VIBRATE_IN_SILENT, 1) == 1;
- if (ringerMode == RINGER_MODE_NORMAL) {
- if ((direction == AudioManager.ADJUST_LOWER) && (uiIndex <= 1)) {
- // enter silent mode if current index is the last audible one and not repeating a
- // volume key down
- if (vibeInSilent || mPrevVolDirection != AudioManager.ADJUST_LOWER) {
- // "silent mode", but which one?
- newRingerMode = vibeInSilent ? RINGER_MODE_VIBRATE : RINGER_MODE_SILENT;
- }
- if (uiIndex == 0 ||
- (!vibeInSilent &&
- mPrevVolDirection == AudioManager.ADJUST_LOWER &&
- mVoiceCapable && streamType == AudioSystem.STREAM_RING)) {
- adjustVolumeIndex = false;
+ switch (ringerMode) {
+ case RINGER_MODE_NORMAL:
+ if (direction == AudioManager.ADJUST_LOWER) {
+ if (mHasVibrator) {
+ if (uiIndex == 1) {
+ ringerMode = RINGER_MODE_VIBRATE;
+ }
+ } else {
+ if (uiIndex == 0 && mPrevVolDirection != AudioManager.ADJUST_LOWER) {
+ ringerMode = RINGER_MODE_SILENT;
+ }
}
}
- } else if (ringerMode == RINGER_MODE_VIBRATE) {
+ break;
+ case RINGER_MODE_VIBRATE:
+ if (!mHasVibrator) {
+ Log.e(TAG, "checkForRingerModeChange() current ringer mode is vibrate" +
+ "but no vibrator is present");
+ break;
+ }
if ((direction == AudioManager.ADJUST_LOWER)) {
- // Set it to silent, if it wasn't a long-press
if (mPrevVolDirection != AudioManager.ADJUST_LOWER) {
- newRingerMode = RINGER_MODE_SILENT;
+ ringerMode = RINGER_MODE_SILENT;
}
} else if (direction == AudioManager.ADJUST_RAISE) {
- newRingerMode = RINGER_MODE_NORMAL;
+ ringerMode = RINGER_MODE_NORMAL;
}
adjustVolumeIndex = false;
- } else {
+ break;
+ case RINGER_MODE_SILENT:
if (direction == AudioManager.ADJUST_RAISE) {
- // exiting silent mode
- // If VIBRATE_IN_SILENT, then go into vibrate mode
- newRingerMode = vibeInSilent ? RINGER_MODE_VIBRATE : RINGER_MODE_NORMAL;
+ if (mHasVibrator) {
+ ringerMode = RINGER_MODE_VIBRATE;
+ } else {
+ ringerMode = RINGER_MODE_NORMAL;
+ }
}
adjustVolumeIndex = false;
+ break;
+ default:
+ Log.e(TAG, "checkForRingerModeChange() wrong ringer mode: "+ringerMode);
+ break;
}
- setRingerMode(newRingerMode);
+ setRingerMode(ringerMode);
mPrevVolDirection = direction;
@@ -2217,9 +2266,6 @@
}
public void readSettings() {
- boolean checkSilentVolume = (mRingerMode == AudioManager.RINGER_MODE_NORMAL) &&
- isStreamAffectedByRingerMode(mStreamType);
-
int remainingDevices = AudioSystem.DEVICE_OUT_ALL;
for (int i = 0; remainingDevices != 0; i++) {
@@ -2248,12 +2294,13 @@
index : AudioManager.DEFAULT_STREAM_VOLUME[mStreamType];
int lastAudibleIndex = Settings.System.getInt(mContentResolver, name, defaultIndex);
- // a last audible index of 0 is never stored, except on non-voice capable devices
- // (e.g. tablets) for the music stream type, where the music stream volume can reach
- // 0 without the device being in silent mode
+ // a last audible index of 0 should never be stored for ring and notification
+ // streams on phones (voice capable devices).
+ // same for system stream on phones and tablets
if ((lastAudibleIndex == 0) &&
- (mVoiceCapable ||
- (mStreamVolumeAlias[mStreamType] != AudioSystem.STREAM_MUSIC))) {
+ ((mVoiceCapable &&
+ (mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_RING)) ||
+ (mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_SYSTEM))) {
lastAudibleIndex = AudioManager.DEFAULT_STREAM_VOLUME[mStreamType];
// Correct the data base
sendMsg(mAudioHandler,
@@ -2265,12 +2312,13 @@
PERSIST_DELAY);
}
mLastAudibleIndex.put(device, getValidIndex(10 * lastAudibleIndex));
- // the initial index should never be 0 for a stream affected by ringer mode if not
- // in silent or vibrate mode.
- // this is permitted on tablets for music stream type.
- if (checkSilentVolume && (index == 0) &&
- (mVoiceCapable ||
- (mStreamVolumeAlias[mStreamType] != AudioSystem.STREAM_MUSIC))) {
+ // the initial index should never be 0 for ring and notification streams on phones
+ // (voice capable devices) if not in silent or vibrate mode.
+ // same for system stream on phones and tablets
+ if ((index == 0) && (mRingerMode == AudioManager.RINGER_MODE_NORMAL) &&
+ ((mVoiceCapable &&
+ (mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_RING)) ||
+ (mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_SYSTEM))) {
index = lastAudibleIndex;
// Correct the data base
sendMsg(mAudioHandler,
@@ -2328,14 +2376,22 @@
mLastAudibleIndex.put(device, index);
}
// Apply change to all streams using this one as alias
+ // if changing volume of current device, also change volume of current
+ // device on aliased stream
+ boolean currentDevice = (device == getDeviceForStream(mStreamType));
int numStreamTypes = AudioSystem.getNumStreamTypes();
for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
- if (streamType != mStreamType && mStreamVolumeAlias[streamType] == mStreamType) {
- mStreamStates[streamType].setIndex(rescaleIndex(index,
- mStreamType,
- streamType),
- getDeviceForStream(streamType),
+ if (streamType != mStreamType &&
+ mStreamVolumeAlias[streamType] == mStreamType) {
+ int scaledIndex = rescaleIndex(index, mStreamType, streamType);
+ mStreamStates[streamType].setIndex(scaledIndex,
+ device,
lastAudible);
+ if (currentDevice) {
+ mStreamStates[streamType].setIndex(scaledIndex,
+ getDeviceForStream(streamType),
+ lastAudible);
+ }
}
}
return true;
@@ -2544,6 +2600,25 @@
return handler;
}
}
+
+ private void dump(PrintWriter pw) {
+ pw.print(" Current: ");
+ Set set = mIndex.entrySet();
+ Iterator i = set.iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry)i.next();
+ pw.print(Integer.toHexString(((Integer)entry.getKey()).intValue())
+ + ": " + ((((Integer)entry.getValue()).intValue() + 5) / 10)+", ");
+ }
+ pw.print("\n Last audible: ");
+ set = mLastAudibleIndex.entrySet();
+ i = set.iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry)i.next();
+ pw.print(Integer.toHexString(((Integer)entry.getKey()).intValue())
+ + ": " + ((((Integer)entry.getValue()).intValue() + 5) / 10)+", ");
+ }
+ }
}
/** Thread that handles native AudioSystem control. */
@@ -2631,10 +2706,6 @@
System.putInt(mContentResolver, System.MODE_RINGER, ringerMode);
}
- private void persistVibrateSetting() {
- System.putInt(mContentResolver, System.VIBRATE_ON, mVibrateSetting);
- }
-
private void playSoundEffect(int effectType, int volume) {
synchronized (mSoundEffectsLock) {
if (mSoundPool == null) {
@@ -2734,10 +2805,6 @@
persistRingerMode(getRingerMode());
break;
- case MSG_PERSIST_VIBRATE_SETTING:
- persistVibrateSetting();
- break;
-
case MSG_MEDIA_SERVER_DIED:
if (!mMediaServerOk) {
Log.e(TAG, "Media server died.");
@@ -4366,5 +4433,6 @@
// TODO probably a lot more to do here than just the audio focus and remote control stacks
dumpFocusStack(pw);
dumpRCStack(pw);
+ dumpStreamStates(pw);
}
}
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index 9bafa5c..55071ec 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -260,6 +260,8 @@
public static final String DEVICE_OUT_AUX_DIGITAL_NAME = "aux_digital";
public static final String DEVICE_OUT_ANLG_DOCK_HEADSET_NAME = "analog_dock";
public static final String DEVICE_OUT_DGTL_DOCK_HEADSET_NAME = "digital_dock";
+ public static final String DEVICE_OUT_USB_ACCESSORY_NAME = "usb_accessory";
+ public static final String DEVICE_OUT_USB_DEVICE_NAME = "usb_device";
public static String getDeviceName(int device)
{
@@ -290,6 +292,10 @@
return DEVICE_OUT_ANLG_DOCK_HEADSET_NAME;
case DEVICE_OUT_DGTL_DOCK_HEADSET:
return DEVICE_OUT_DGTL_DOCK_HEADSET_NAME;
+ case DEVICE_OUT_USB_ACCESSORY:
+ return DEVICE_OUT_USB_ACCESSORY_NAME;
+ case DEVICE_OUT_USB_DEVICE:
+ return DEVICE_OUT_USB_DEVICE_NAME;
case DEVICE_IN_DEFAULT:
default:
return "";
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 7540c6f..9f0fd48 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -743,9 +743,14 @@
}
Parcel request = Parcel.obtain();
Parcel reply = Parcel.obtain();
- request.writeInterfaceToken(IMEDIA_PLAYER);
- request.writeInt(INVOKE_ID_SET_VIDEO_SCALE_MODE);
- invoke(request, reply);
+ try {
+ request.writeInterfaceToken(IMEDIA_PLAYER);
+ request.writeInt(INVOKE_ID_SET_VIDEO_SCALE_MODE);
+ invoke(request, reply);
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
}
/**
@@ -1642,11 +1647,16 @@
public TrackInfo[] getTrackInfo() throws IllegalStateException {
Parcel request = Parcel.obtain();
Parcel reply = Parcel.obtain();
- request.writeInterfaceToken(IMEDIA_PLAYER);
- request.writeInt(INVOKE_ID_GET_TRACK_INFO);
- invoke(request, reply);
- TrackInfo trackInfo[] = reply.createTypedArray(TrackInfo.CREATOR);
- return trackInfo;
+ try {
+ request.writeInterfaceToken(IMEDIA_PLAYER);
+ request.writeInt(INVOKE_ID_GET_TRACK_INFO);
+ invoke(request, reply);
+ TrackInfo trackInfo[] = reply.createTypedArray(TrackInfo.CREATOR);
+ return trackInfo;
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
}
/* Do not change these values without updating their counterparts
@@ -1791,13 +1801,18 @@
Parcel request = Parcel.obtain();
Parcel reply = Parcel.obtain();
- request.writeInterfaceToken(IMEDIA_PLAYER);
- request.writeInt(INVOKE_ID_ADD_EXTERNAL_SOURCE_FD);
- request.writeFileDescriptor(fd);
- request.writeLong(offset);
- request.writeLong(length);
- request.writeString(mimeType);
- invoke(request, reply);
+ try {
+ request.writeInterfaceToken(IMEDIA_PLAYER);
+ request.writeInt(INVOKE_ID_ADD_EXTERNAL_SOURCE_FD);
+ request.writeFileDescriptor(fd);
+ request.writeLong(offset);
+ request.writeLong(length);
+ request.writeString(mimeType);
+ invoke(request, reply);
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
}
/**
@@ -1854,10 +1869,15 @@
throws IllegalStateException {
Parcel request = Parcel.obtain();
Parcel reply = Parcel.obtain();
- request.writeInterfaceToken(IMEDIA_PLAYER);
- request.writeInt(select? INVOKE_ID_SELECT_TRACK: INVOKE_ID_DESELECT_TRACK);
- request.writeInt(index);
- invoke(request, reply);
+ try {
+ request.writeInterfaceToken(IMEDIA_PLAYER);
+ request.writeInt(select? INVOKE_ID_SELECT_TRACK: INVOKE_ID_DESELECT_TRACK);
+ request.writeInt(index);
+ invoke(request, reply);
+ } finally {
+ request.recycle();
+ reply.recycle();
+ }
}
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index acd81e1..e43e66e 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -212,6 +212,25 @@
}
jclass byteBufferClass = env->FindClass("java/nio/ByteBuffer");
+ CHECK(byteBufferClass != NULL);
+
+ jmethodID orderID = env->GetMethodID(
+ byteBufferClass,
+ "order",
+ "(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;");
+
+ CHECK(orderID != NULL);
+
+ jclass byteOrderClass = env->FindClass("java/nio/ByteOrder");
+ CHECK(byteOrderClass != NULL);
+
+ jmethodID nativeOrderID = env->GetStaticMethodID(
+ byteOrderClass, "nativeOrder", "()Ljava/nio/ByteOrder;");
+ CHECK(nativeOrderID != NULL);
+
+ jobject nativeByteOrderObj =
+ env->CallStaticObjectMethod(byteOrderClass, nativeOrderID);
+ CHECK(nativeByteOrderObj != NULL);
*bufArray = (jobjectArray)env->NewObjectArray(
buffers.size(), byteBufferClass, NULL);
@@ -224,6 +243,11 @@
buffer->base(),
buffer->capacity());
+ jobject me = env->CallObjectMethod(
+ byteBuffer, orderID, nativeByteOrderObj);
+ env->DeleteLocalRef(me);
+ me = NULL;
+
env->SetObjectArrayElement(
*bufArray, i, byteBuffer);
@@ -231,6 +255,9 @@
byteBuffer = NULL;
}
+ env->DeleteLocalRef(nativeByteOrderObj);
+ nativeByteOrderObj = NULL;
+
return OK;
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index abf713b..b0939de 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -63,7 +63,7 @@
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
- private static final int DATABASE_VERSION = 76;
+ private static final int DATABASE_VERSION = 78;
private Context mContext;
@@ -657,7 +657,7 @@
upgradeVersion = 53;
}
-
+
if (upgradeVersion == 53) {
/*
* New settings for set install location UI no longer initiated here.
@@ -1031,6 +1031,29 @@
upgradeVersion = 76;
}
+ /************* The following are Jelly Bean changes ************/
+
+ if (upgradeVersion == 76) {
+ // Removed VIBRATE_IN_SILENT setting
+ db.beginTransaction();
+ try {
+ db.execSQL("DELETE FROM system WHERE name='"
+ + Settings.System.VIBRATE_IN_SILENT + "'");
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ }
+
+ upgradeVersion = 77;
+ }
+
+ if (upgradeVersion == 77) {
+ // Introduce "vibrate when ringing" setting
+ loadVibrateWhenRingingSetting(db);
+
+ upgradeVersion = 78;
+ }
+
// *** Remember to update DATABASE_VERSION above!
if (upgradeVersion != currentVersion) {
@@ -1124,7 +1147,7 @@
try {
stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)"
+ " VALUES(?,?);");
-
+
// Set the timeout to 30 minutes in milliseconds
loadSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT,
Integer.toString(30 * 60 * 1000));
@@ -1286,7 +1309,7 @@
try {
stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
+ " VALUES(?,?);");
-
+
loadSetting(stmt, Settings.System.VOLUME_MUSIC,
AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_MUSIC]);
loadSetting(stmt, Settings.System.VOLUME_RING,
@@ -1307,12 +1330,10 @@
stmt,
Settings.System.VOLUME_BLUETOOTH_SCO,
AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]);
-
+
loadSetting(stmt, Settings.System.MODE_RINGER,
AudioManager.RINGER_MODE_NORMAL);
-
- loadVibrateSetting(db, false);
-
+
// By default:
// - ringtones, notification, system and music streams are affected by ringer mode
// on non voice capable devices (tablets)
@@ -1337,6 +1358,8 @@
} finally {
if (stmt != null) stmt.close();
}
+
+ loadVibrateWhenRingingSetting(db);
}
private void loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) {
@@ -1348,7 +1371,7 @@
try {
stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
+ " VALUES(?,?);");
-
+
// Vibrate on by default for ringer, on for notification
int vibrate = 0;
vibrate = AudioService.getValueForVibrateSetting(vibrate,
@@ -1362,6 +1385,24 @@
}
}
+ private void loadVibrateWhenRingingSetting(SQLiteDatabase db) {
+ // The default should be off. VIBRATE_SETTING_ONLY_SILENT should also be ignored here.
+ // Phone app should separately check whether AudioManager#getRingerMode() returns
+ // RINGER_MODE_VIBRATE, with which the device should vibrate anyway.
+ int vibrateSetting = getIntValueFromSystem(db, Settings.System.VIBRATE_ON,
+ AudioManager.VIBRATE_SETTING_OFF);
+ boolean vibrateWhenRinging = ((vibrateSetting & 3) == AudioManager.VIBRATE_SETTING_ON);
+
+ SQLiteStatement stmt = null;
+ try {
+ stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
+ + " VALUES(?,?);");
+ loadSetting(stmt, Settings.System.VIBRATE_WHEN_RINGING, vibrateWhenRinging ? 1 : 0);
+ } finally {
+ if (stmt != null) stmt.close();
+ }
+ }
+
private void loadSettings(SQLiteDatabase db) {
loadSystemSettings(db);
loadSecureSettings(db);
@@ -1372,7 +1413,7 @@
try {
stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
+ " VALUES(?,?);");
-
+
loadBooleanSetting(stmt, Settings.System.DIM_SCREEN,
R.bool.def_dim_screen);
loadSetting(stmt, Settings.System.STAY_ON_WHILE_PLUGGED_IN,
@@ -1381,31 +1422,31 @@
? 1 : 0);
loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT,
R.integer.def_screen_off_timeout);
-
+
// Set default cdma emergency tone
loadSetting(stmt, Settings.System.EMERGENCY_TONE, 0);
-
+
// Set default cdma call auto retry
loadSetting(stmt, Settings.System.CALL_AUTO_RETRY, 0);
-
+
// Set default cdma DTMF type
loadSetting(stmt, Settings.System.DTMF_TONE_TYPE_WHEN_DIALING, 0);
-
+
// Set default hearing aid
loadSetting(stmt, Settings.System.HEARING_AID, 0);
-
+
// Set default tty mode
loadSetting(stmt, Settings.System.TTY_MODE, 0);
-
+
loadBooleanSetting(stmt, Settings.System.AIRPLANE_MODE_ON,
R.bool.def_airplane_mode_on);
-
+
loadStringSetting(stmt, Settings.System.AIRPLANE_MODE_RADIOS,
R.string.def_airplane_mode_radios);
-
+
loadStringSetting(stmt, Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS,
R.string.airplane_mode_toggleable_radios);
-
+
loadBooleanSetting(stmt, Settings.System.AUTO_TIME,
R.bool.def_auto_time); // Sync time to NITZ
@@ -1414,17 +1455,17 @@
loadIntegerSetting(stmt, Settings.System.SCREEN_BRIGHTNESS,
R.integer.def_screen_brightness);
-
+
loadBooleanSetting(stmt, Settings.System.SCREEN_BRIGHTNESS_MODE,
R.bool.def_screen_brightness_automatic_mode);
-
+
loadDefaultAnimationSettings(stmt);
-
+
loadBooleanSetting(stmt, Settings.System.ACCELEROMETER_ROTATION,
R.bool.def_accelerometer_rotation);
-
+
loadDefaultHapticSettings(stmt);
-
+
loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE,
R.bool.def_notification_pulse);
loadSetting(stmt, Settings.Secure.SET_INSTALL_LOCATION, 0);
@@ -1433,9 +1474,6 @@
loadUISoundEffectsSettings(stmt);
- loadBooleanSetting(stmt, Settings.System.VIBRATE_IN_SILENT,
- R.bool.def_vibrate_in_silent);
-
loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
R.integer.def_pointer_speed);
@@ -1492,41 +1530,41 @@
try {
stmt = db.compileStatement("INSERT OR IGNORE INTO secure(name,value)"
+ " VALUES(?,?);");
-
+
loadBooleanSetting(stmt, Settings.Secure.BLUETOOTH_ON,
R.bool.def_bluetooth_on);
-
+
// Data roaming default, based on build
loadSetting(stmt, Settings.Secure.DATA_ROAMING,
"true".equalsIgnoreCase(
SystemProperties.get("ro.com.android.dataroaming",
"false")) ? 1 : 0);
-
+
loadBooleanSetting(stmt, Settings.Secure.INSTALL_NON_MARKET_APPS,
R.bool.def_install_non_market_apps);
-
+
loadStringSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
R.string.def_location_providers_allowed);
-
+
loadBooleanSetting(stmt, Settings.Secure.ASSISTED_GPS_ENABLED,
R.bool.assisted_gps_enabled);
-
+
loadIntegerSetting(stmt, Settings.Secure.NETWORK_PREFERENCE,
R.integer.def_network_preference);
-
+
loadBooleanSetting(stmt, Settings.Secure.USB_MASS_STORAGE_ENABLED,
R.bool.def_usb_mass_storage_enabled);
-
+
loadBooleanSetting(stmt, Settings.Secure.WIFI_ON,
R.bool.def_wifi_on);
loadBooleanSetting(stmt, Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
R.bool.def_networks_available_notification_on);
-
+
String wifiWatchList = SystemProperties.get("ro.com.android.wifi-watchlist");
if (!TextUtils.isEmpty(wifiWatchList)) {
loadSetting(stmt, Settings.Secure.WIFI_WATCHDOG_WATCH_LIST, wifiWatchList);
}
-
+
// Set the preferred network mode to 0 = Global, CDMA default
int type;
if (BaseCommands.getLteOnCdmaModeStatic() == Phone.LTE_ON_CDMA_TRUE) {
@@ -1536,30 +1574,30 @@
RILConstants.PREFERRED_NETWORK_MODE);
}
loadSetting(stmt, Settings.Secure.PREFERRED_NETWORK_MODE, type);
-
+
// Enable or disable Cell Broadcast SMS
loadSetting(stmt, Settings.Secure.CDMA_CELL_BROADCAST_SMS,
RILConstants.CDMA_CELL_BROADCAST_SMS_DISABLED);
-
+
// Don't do this. The SystemServer will initialize ADB_ENABLED from a
// persistent system property instead.
//loadSetting(stmt, Settings.Secure.ADB_ENABLED, 0);
-
+
// Allow mock locations default, based on build
loadSetting(stmt, Settings.Secure.ALLOW_MOCK_LOCATION,
"1".equals(SystemProperties.get("ro.allow.mock.location")) ? 1 : 0);
-
+
loadSecure35Settings(stmt);
-
+
loadBooleanSetting(stmt, Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND,
R.bool.def_mount_play_notification_snd);
-
+
loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_AUTOSTART,
R.bool.def_mount_ums_autostart);
-
+
loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_PROMPT,
R.bool.def_mount_ums_prompt);
-
+
loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED,
R.bool.def_mount_ums_notify_enabled);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
index 3e7d86a..18e7faa 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
@@ -43,9 +43,6 @@
private IContentService mContentService;
private IPowerManager mPowerManager;
- private boolean mSilent;
- private boolean mVibrate;
-
public SettingsHelper(Context context) {
mContext = context;
mAudioManager = (AudioManager) context
@@ -119,18 +116,6 @@
}
}
- private void setRingerMode() {
- if (mSilent) {
- mAudioManager.setRingerMode(mVibrate ? AudioManager.RINGER_MODE_VIBRATE :
- AudioManager.RINGER_MODE_SILENT);
- } else {
- mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
- mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER,
- mVibrate ? AudioManager.VIBRATE_SETTING_ON
- : AudioManager.VIBRATE_SETTING_OFF);
- }
- }
-
byte[] getLocaleData() {
Configuration conf = mContext.getResources().getConfiguration();
final Locale loc = conf.locale;
diff --git a/packages/SystemUI/res/drawable-hdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-hdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..8a0a30f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_close_off.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_close_off.9.png
new file mode 100644
index 0000000..bc6462b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_close_off.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png
index 69f3543..f4e28ae 100644
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-mdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..25f15e6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_close_off.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_close_off.9.png
new file mode 100644
index 0000000..4f5bba5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_close_off.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png
index fb30982..ef7afb8 100644
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..2ff93d3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..430f913
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-xhdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-sw600dp-xhdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..807241a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-xhdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw720dp-hdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-sw720dp-hdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..2ff93d3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw720dp-hdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw720dp-mdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-sw720dp-mdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..430f913
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw720dp-mdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw720dp-xhdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-sw720dp-xhdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..807241a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw720dp-xhdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/notification_panel_bg.9.png b/packages/SystemUI/res/drawable-xhdpi/notification_panel_bg.9.png
new file mode 100644
index 0000000..60e7418
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/notification_panel_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/status_bar_close_off.9.png b/packages/SystemUI/res/drawable-xhdpi/status_bar_close_off.9.png
new file mode 100644
index 0000000..e243e50
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/status_bar_close_off.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/status_bar_close_on.9.png b/packages/SystemUI/res/drawable-xhdpi/status_bar_close_on.9.png
index fe2c642..cdad949 100644
--- a/packages/SystemUI/res/drawable-xhdpi/status_bar_close_on.9.png
+++ b/packages/SystemUI/res/drawable-xhdpi/status_bar_close_on.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_notify_rotation.xml b/packages/SystemUI/res/drawable/ic_notify_rotation.xml
index 213af80..11bc22c 100644
--- a/packages/SystemUI/res/drawable/ic_notify_rotation.xml
+++ b/packages/SystemUI/res/drawable/ic_notify_rotation.xml
@@ -14,14 +14,23 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_checked="true"
- android:drawable="@drawable/ic_notify_rotation_on_normal" />
- <item android:state_checked="true" android:state_pressed="true"
- android:drawable="@drawable/ic_notify_rotation_on_pressed" />
- <item android:state_pressed="true"
- android:drawable="@drawable/ic_notify_rotation_off_pressed" />
- <item
- android:drawable="@drawable/ic_notify_rotation_off_normal" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:constantSize="true">
+ <item android:state_checked="true" android:state_pressed="true">
+ <bitmap android:src="@drawable/ic_notify_rotation_on_pressed"
+ android:gravity="center" />
+ </item>
+ <item android:state_checked="true">
+ <bitmap android:src="@drawable/ic_notify_rotation_on_normal"
+ android:gravity="center" />
+ </item>
+ <item android:state_pressed="true">
+ <bitmap android:src="@drawable/ic_notify_rotation_off_pressed"
+ android:gravity="center" />
+ </item>
+ <item>
+ <bitmap android:src="@drawable/ic_notify_rotation_off_normal"
+ android:gravity="center" />
+ </item>
</selector>
diff --git a/packages/SystemUI/res/drawable/status_bar_close.xml b/packages/SystemUI/res/drawable/status_bar_close.xml
new file mode 100644
index 0000000..2efc3c3a
--- /dev/null
+++ b/packages/SystemUI/res/drawable/status_bar_close.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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/status_bar_close_on" />
+ <item
+ android:drawable="@drawable/status_bar_close_off" />
+</selector>
+
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 8715a99..f69aac8 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -25,25 +25,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:background="@drawable/notification_tracking_bg"
- android:paddingTop="@*android:dimen/status_bar_height"
+ android:background="@drawable/notification_panel_bg"
+ android:paddingTop="@dimen/notification_panel_padding_top"
android:layout_marginLeft="@dimen/notification_panel_margin_left"
>
- <RelativeLayout
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="52dp"
- android:paddingTop="3dp"
- android:paddingBottom="5dp"
- android:paddingRight="3dp"
+ android:layout_height="wrap_content"
+ android:paddingTop="@dimen/notification_panel_header_padding_top"
android:background="@drawable/notification_header_bg"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:baselineAligned="false"
>
<com.android.systemui.statusbar.policy.Clock
android:id="@+id/clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
@@ -52,64 +51,41 @@
<com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_toRightOf="@id/clock"
android:layout_marginLeft="8dp"
- android:paddingLeft="8dp"
+ android:layout_marginRight="8dp"
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
/>
- <!--
- <com.android.systemui.statusbar.phone.CarrierLabel
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginTop="1dp"
- android:layout_marginLeft="5dp"
- android:layout_gravity="center_vertical"
- android:paddingBottom="1dp"
- android:paddingLeft="4dp"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="?android:attr/textColorSecondary"
- />
- -->
<com.android.systemui.statusbar.RotationToggle android:id="@+id/rotation_lock_button"
android:layout_width="32dp"
android:layout_height="32dp"
- android:layout_centerVertical="true"
- android:layout_toRightOf="@id/date"
- android:layout_marginLeft="12dp"
+ android:layout_margin="8dp"
android:button="@drawable/ic_notify_rotation"
android:contentDescription="@string/accessibility_rotation_lock_off"
/>
<ImageView android:id="@+id/settings_button"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_marginLeft="8dp"
- android:layout_centerVertical="true"
- android:layout_toRightOf="@id/rotation_lock_button"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:scaleType="center"
android:src="@drawable/ic_notify_quicksettings"
android:contentDescription="@string/accessibility_settings_button"
/>
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ />
+
<ImageView android:id="@+id/clear_all_button"
- android:layout_width="32dp"
- android:layout_height="32dp"
- android:layout_marginLeft="8dp"
- android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:scaleType="center"
android:src="@drawable/ic_notify_clear"
android:contentDescription="@string/accessibility_clear_all"
/>
- </RelativeLayout>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dp"
- android:layout_marginTop="52dp"
- android:background="@drawable/status_bar_hr"
- />
+ </LinearLayout>
<ScrollView
android:id="@+id/scroll"
@@ -117,8 +93,8 @@
android:layout_height="match_parent"
android:fadingEdge="none"
android:overScrollMode="ifContentScrolls"
- android:layout_marginTop="54dp"
- android:layout_marginBottom="34dp"
+ android:layout_marginTop="@dimen/notification_panel_header_height"
+ android:layout_marginBottom="@dimen/close_handle_underlap"
>
<com.android.systemui.statusbar.policy.NotificationRowLayout
android:id="@+id/latestItems"
@@ -128,14 +104,6 @@
/>
</ScrollView>
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:src="@drawable/title_bar_shadow"
- android:layout_marginTop="54dp"
- android:scaleType="fitXY"
- />
-
<com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close"
android:layout_width="match_parent"
android:layout_height="@dimen/close_handle_height"
@@ -144,10 +112,10 @@
>
<ImageView
android:layout_width="match_parent"
- android:layout_height="34dp"
+ android:layout_height="@dimen/close_handle_height"
android:layout_gravity="bottom"
android:scaleType="fitXY"
- android:src="@drawable/status_bar_close_on"
+ android:src="@drawable/status_bar_close"
/>
</com.android.systemui.statusbar.phone.CloseDragHandle>
diff --git a/packages/SystemUI/res/layout/status_bar_tracking.xml b/packages/SystemUI/res/layout/status_bar_tracking.xml
deleted file mode 100644
index c1b0066..0000000
--- a/packages/SystemUI/res/layout/status_bar_tracking.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2008 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.
--->
-
-<com.android.systemui.statusbar.phone.TrackingView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:visibility="gone"
- android:focusable="true"
- android:descendantFocusability="afterDescendants"
- android:paddingBottom="0px"
- android:paddingLeft="0px"
- android:paddingRight="0px"
- >
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="@drawable/notification_tracking_bg"
- >
- <com.android.systemui.statusbar.phone.CarrierLabel
- android:textAppearance="@style/TextAppearance.StatusBar.Clock"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:layout_gravity="bottom"
- android:gravity="center"
- android:paddingBottom="20dp"
- />
- </FrameLayout>
-
- <com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- >
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:scaleType="fitXY"
- android:src="@drawable/status_bar_close_on"
- />
-
- </com.android.systemui.statusbar.phone.CloseDragHandle>
-
-</com.android.systemui.statusbar.phone.TrackingView>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 50a61b1..2ff62a5 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -16,8 +16,8 @@
*/
-->
<resources>
- <!-- The width of the notification panel window -->
- <dimen name="notification_panel_width">446dp</dimen>
+ <!-- The width of the notification panel window: 446 + 16 + 16 (padding in the bg drawable) -->
+ <dimen name="notification_panel_width">478dp</dimen>
<!-- Layout parameters for the notification panel -->
<dimen name="notification_panel_margin_bottom">192dp</dimen>
@@ -36,4 +36,7 @@
<!-- Height of search panel including navigation bar height -->
<dimen name="navbar_search_panel_height">300dip</dimen>
+ <!-- Extra space above the clock in the panel; on this device, zero -->
+ <dimen name="notification_panel_header_padding_top">0dp</dimen>
+
</resources>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 9257195..ac2779f 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -20,11 +20,11 @@
<drawable name="notification_number_text_color">#ffffffff</drawable>
<drawable name="ticker_background_color">#ff1d1d1d</drawable>
<drawable name="status_bar_background">#ff000000</drawable>
+ <color name="notification_panel_solid_background">#ff000000</color>
<drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
<color name="status_bar_recents_app_label_color">#ffffffff</color>
<drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
<drawable name="notification_header_bg">#FF000000</drawable>
- <drawable name="notification_tracking_bg">#66000000</drawable>
<color name="notification_list_shadow_top">#80000000</color>
<drawable name="recents_callout_line">#99ffffff</drawable>
<drawable name="notification_item_background_legacy_color">#ffaaaaaa</drawable>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 276d74b..b908188 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -125,7 +125,19 @@
<dimen name="navbar_search_panel_height">230dip</dimen>
<!-- Height of the draggable handle at the bottom of the phone notification panel -->
- <dimen name="close_handle_height">34dp</dimen>
+ <dimen name="close_handle_height">32dp</dimen>
+
+ <!-- Amount of close_handle that will not overlap the notification list -->
+ <dimen name="close_handle_underlap">18dp</dimen>
+
+ <!-- Height of the notification panel header bar -->
+ <dimen name="notification_panel_header_height">48dp</dimen>
+
+ <!-- Height of the notification panel header bar -->
+ <dimen name="notification_panel_padding_top">@*android:dimen/status_bar_height</dimen>
+
+ <!-- Extra space above the clock in the panel; half of (notification_panel_header_height - 32) -->
+ <dimen name="notification_panel_header_padding_top">0dp</dimen>
<!-- Layout parameters for the notification panel -->
<dimen name="notification_panel_margin_bottom">0dp</dimen>
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 f6f41b8..f53a282 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -106,6 +106,7 @@
= "com.android.internal.policy.statusbar.START";
private static final boolean ENABLE_INTRUDERS = false;
+ private static final boolean DIM_BEHIND_EXPANDED_PANEL = false;
static final int EXPANDED_LEAVE_ALONE = -10000;
static final int EXPANDED_FULL_OPEN = -10001;
@@ -212,6 +213,7 @@
Choreographer mChoreographer;
boolean mAnimating;
+ boolean mClosing; // only valid when mAnimating; indicates the initial acceleration
float mAnimY;
float mAnimVel;
float mAnimAccel;
@@ -311,6 +313,12 @@
}
});
+ if (!ActivityManager.isHighEndGfx(mDisplay)) {
+ mStatusBarWindow.setBackground(null);
+ mNotificationPanel.setBackgroundColor(context.getResources().getColor(
+ R.color.notification_panel_solid_background));
+ }
+
if (ENABLE_INTRUDERS) {
mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
mIntruderAlertView.setVisibility(View.GONE);
@@ -1270,14 +1278,26 @@
}
}
+ void resetLastAnimTime() {
+ mAnimLastTimeNanos = System.nanoTime();
+ if (SPEW) {
+ Throwable t = new Throwable();
+ t.fillInStackTrace();
+ Slog.d(TAG, "resetting last anim time=" + mAnimLastTimeNanos, t);
+ }
+ }
+
void doAnimation(long frameTimeNanos) {
if (mAnimating) {
- if (SPEW) Slog.d(TAG, "doAnimation");
+ if (SPEW) Slog.d(TAG, "doAnimation dt=" + (frameTimeNanos - mAnimLastTimeNanos));
if (SPEW) Slog.d(TAG, "doAnimation before mAnimY=" + mAnimY);
incrementAnim(frameTimeNanos);
- if (SPEW) Slog.d(TAG, "doAnimation after mAnimY=" + mAnimY);
+ if (SPEW) {
+ Slog.d(TAG, "doAnimation after mAnimY=" + mAnimY);
+ Slog.d(TAG, "doAnimation expandedViewMax=" + getExpandedViewMaxHeight());
+ }
- if (mAnimY >= getExpandedViewMaxHeight()-1) {
+ if (mAnimY >= getExpandedViewMaxHeight()-1 && !mClosing) {
if (SPEW) Slog.d(TAG, "Animation completed to expanded state.");
mAnimating = false;
updateExpandedViewPos(EXPANDED_FULL_OPEN);
@@ -1285,14 +1305,14 @@
return;
}
- if (mAnimY == 0 && mAnimAccel == 0 && mAnimVel == 0) {
+ if (mAnimY == 0 && mAnimAccel == 0 && mClosing) {
if (SPEW) Slog.d(TAG, "Animation completed to collapsed state.");
mAnimating = false;
performCollapse();
return;
}
- if (mAnimY < getStatusBarHeight()) {
+ if (mAnimY < getStatusBarHeight() && mClosing) {
// Draw one more frame with the bar positioned at the top of the screen
// before ending the animation so that the user sees the bar in
// its final position. The call to performCollapse() causes a window
@@ -1314,6 +1334,7 @@
mPile.setLayerType(View.LAYER_TYPE_NONE, null);
mVelocityTracker.recycle();
mVelocityTracker = null;
+ mCloseView.setPressed(false);
}
void incrementAnim(long frameTimeNanos) {
@@ -1330,6 +1351,9 @@
}
void doRevealAnimation(long frameTimeNanos) {
+ if (SPEW) {
+ Slog.d(TAG, "doRevealAnimation: dt=" + (frameTimeNanos - mAnimLastTimeNanos));
+ }
final int h = getCloseViewHeight() + getStatusBarHeight();
if (mAnimatingReveal && mAnimating && mAnimY < h) {
incrementAnim(frameTimeNanos);
@@ -1349,6 +1373,8 @@
Slog.d(TAG, "panel: beginning to track the user's touch, y=" + y + " opening=" + opening);
}
+ mCloseView.setPressed(true);
+
mTracking = true;
mPile.setLayerType(View.LAYER_TYPE_HARDWARE, null);
mVelocityTracker = VelocityTracker.obtain();
@@ -1359,7 +1385,7 @@
updateExpandedViewPos((int)mAnimY);
mAnimating = true;
mAnimatingReveal = true;
- mAnimLastTimeNanos = System.nanoTime();
+ resetLastAnimTime();
mChoreographer.removeCallbacks(Choreographer.CALLBACK_ANIMATION,
mAnimationCallback, null);
mChoreographer.removeCallbacks(Choreographer.CALLBACK_ANIMATION,
@@ -1433,8 +1459,9 @@
//Slog.d(TAG, "mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel
// + " mAnimAccel=" + mAnimAccel);
- mAnimLastTimeNanos = System.nanoTime();
+ resetLastAnimTime();
mAnimating = true;
+ mClosing = mAnimAccel < 0;
mChoreographer.removeCallbacks(Choreographer.CALLBACK_ANIMATION,
mAnimationCallback, null);
@@ -1474,8 +1501,8 @@
if (!mExpanded) {
mViewDelta = statusBarSize - y;
} else {
-// mCloseView.getLocationOnScreen(mAbsPos)...?
-// mViewDelta = mAbsPos[1] + mTrackingView.getHeight() - y;
+ mCloseView.getLocationOnScreen(mAbsPos);
+ mViewDelta = mAbsPos[1] + statusBarSize + getCloseViewHeight() - y; // XXX: not closeViewHeight, but paddingBottom from the 9patch
}
if ((!mExpanded && y < hitSize) ||
// @@ add taps outside the panel if it's not full-screen
@@ -1987,11 +2014,14 @@
Slog.v(TAG, "updated cropView height=" + panelh + " grav=" + lp.gravity);
}
mNotificationPanel.setLayoutParams(lp);
- // woo, special effects
- final int barh = getCloseViewHeight() + getStatusBarHeight();
- final float frac = saturate((float)(panelh - barh) / (disph - barh));
- final int color = ((int)(0xB0 * Math.sin(frac * 1.57f))) << 24;
- mStatusBarWindow.setBackgroundColor(color);
+
+ if (DIM_BEHIND_EXPANDED_PANEL && ActivityManager.isHighEndGfx(mDisplay)) {
+ // woo, special effects
+ final int barh = getCloseViewHeight() + getStatusBarHeight();
+ final float frac = saturate((float)(panelh - barh) / (disph - barh));
+ final int color = ((int)(0xB0 * Math.sin(frac * 1.57f))) << 24;
+ mStatusBarWindow.setBackgroundColor(color);
+ }
}
void updateDisplaySize() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 5f18b5d..374226d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -122,8 +122,7 @@
action.equals(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED)) {
updateBluetooth(intent);
}
- else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION) ||
- action.equals(AudioManager.VIBRATE_SETTING_CHANGED_ACTION)) {
+ else if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION)) {
updateVolume();
}
else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
@@ -144,7 +143,6 @@
filter.addAction(Intent.ACTION_ALARM_CHANGED);
filter.addAction(Intent.ACTION_SYNC_STATE_CHANGED);
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
- filter.addAction(AudioManager.VIBRATE_SETTING_CHANGED_ACTION);
filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
@@ -238,7 +236,7 @@
final int iconId;
String contentDescription = null;
- if (audioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)) {
+ if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) {
iconId = R.drawable.stat_sys_ringer_vibrate;
contentDescription = mContext.getString(R.string.accessibility_ringer_vibrate);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java
index c9da01a..43cb85e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java
@@ -20,6 +20,7 @@
import android.content.Context;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.Vibrator;
import android.media.AudioManager;
import android.provider.Settings;
import android.util.Slog;
@@ -36,10 +37,16 @@
private boolean mMute;
private int mVolume;
+ // Is there a vibrator
+ private final boolean mHasVibrator;
public VolumeController(Context context, ToggleSlider control) {
mContext = context;
mControl = control;
+
+ Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
+ mHasVibrator = vibrator == null ? false : vibrator.hasVibrator();
+
mAudioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
mMute = mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL;
@@ -54,10 +61,8 @@
public void onChanged(ToggleSlider view, boolean tracking, boolean mute, int level) {
if (!tracking) {
if (mute) {
- boolean vibeInSilent = (1 == Settings.System.getInt(mContext.getContentResolver(),
- Settings.System.VIBRATE_IN_SILENT, 1));
mAudioManager.setRingerMode(
- vibeInSilent ? AudioManager.RINGER_MODE_VIBRATE
+ mHasVibrator ? AudioManager.RINGER_MODE_VIBRATE
: AudioManager.RINGER_MODE_SILENT);
} else {
mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
diff --git a/policy/src/com/android/internal/policy/impl/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/FaceUnlock.java
index 6e09b7f..6590fb3 100644
--- a/policy/src/com/android/internal/policy/impl/FaceUnlock.java
+++ b/policy/src/com/android/internal/policy/impl/FaceUnlock.java
@@ -28,6 +28,7 @@
import android.content.ServiceConnection;
import android.os.Handler;
import android.os.IBinder;
+import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
import android.telephony.TelephonyManager;
@@ -112,10 +113,14 @@
/**
* Sets the Face Unlock view to visible, hiding it after the specified amount of time. If
- * timeoutMillis is 0, no hide is performed.
+ * timeoutMillis is 0, no hide is performed. Called on the UI thread.
*/
public void show(long timeoutMillis) {
if (DEBUG) Log.d(TAG, "show()");
+ if (mHandler.getLooper() != Looper.myLooper()) {
+ Log.e(TAG, "show() called off of the UI thread");
+ }
+
removeDisplayMessages();
if (mFaceUnlockView != null) {
mFaceUnlockView.setVisibility(View.VISIBLE);
@@ -138,9 +143,14 @@
/**
* Binds to the Face Unlock service. Face Unlock will be started when the bind completes. The
* Face Unlock view is displayed to hide the backup lock while the service is starting up.
+ * Called on the UI thread.
*/
public boolean start() {
if (DEBUG) Log.d(TAG, "start()");
+ if (mHandler.getLooper() != Looper.myLooper()) {
+ Log.e(TAG, "start() called off of the UI thread");
+ }
+
if (mIsRunning) {
Log.w(TAG, "start() called when already running");
}
@@ -170,10 +180,14 @@
}
/**
- * Stops Face Unlock and unbinds from the service.
+ * Stops Face Unlock and unbinds from the service. Called on the UI thread.
*/
public boolean stop() {
if (DEBUG) Log.d(TAG, "stop()");
+ if (mHandler.getLooper() != Looper.myLooper()) {
+ Log.e(TAG, "stop() called off of the UI thread");
+ }
+
boolean mWasRunning = mIsRunning;
stopUi();
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 8b0d858..c7a30e2 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -34,6 +34,7 @@
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.os.Vibrator;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@@ -82,6 +83,8 @@
private boolean mCameraDisabled;
private boolean mSearchDisabled;
private SearchManager mSearchManager;
+ // Is there a vibrator
+ private final boolean mHasVibrator;
InfoCallbackImpl mInfoCallback = new InfoCallbackImpl() {
@@ -385,11 +388,7 @@
// toggle silent mode
mSilentMode = !mSilentMode;
if (mSilentMode) {
- final boolean vibe = (Settings.System.getInt(
- mContext.getContentResolver(),
- Settings.System.VIBRATE_IN_SILENT, 1) == 1);
-
- mAudioManager.setRingerMode(vibe
+ mAudioManager.setRingerMode(mHasVibrator
? AudioManager.RINGER_MODE_VIBRATE
: AudioManager.RINGER_MODE_SILENT);
} else {
@@ -451,6 +450,8 @@
setFocusableInTouchMode(true);
setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
+ Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
+ mHasVibrator = vibrator == null ? false : vibrator.hasVibrator();
mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
mSilentMode = isSilentMode();
mUnlockWidget = findViewById(R.id.unlock_widget);
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 4b91422..cc7050a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -2098,7 +2098,6 @@
if (widthMode == AT_MOST) {
final TypedValue tvw = isPortrait ? mFixedWidthMinor : mFixedWidthMajor;
if (tvw != null && tvw.type != TypedValue.TYPE_NULL) {
- fixedWidth = true;
final int w;
if (tvw.type == TypedValue.TYPE_DIMENSION) {
w = (int) tvw.getDimension(metrics);
@@ -2112,6 +2111,7 @@
final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
widthMeasureSpec = MeasureSpec.makeMeasureSpec(
Math.min(w, widthSize), EXACTLY);
+ fixedWidth = true;
}
}
}
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index f80ac18..50bfee6 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -16,7 +16,7 @@
#define LOG_TAG "EventHub"
-// #define LOG_NDEBUG 0
+#define LOG_NDEBUG 0
#include "EventHub.h"
@@ -767,11 +767,7 @@
size_t count = size_t(readSize) / sizeof(struct input_event);
for (size_t i = 0; i < count; i++) {
const struct input_event& iev = readBuffer[i];
- ALOGV("%s got: t0=%d, t1=%d, type=%d, code=%d, value=%d",
- device->path.string(),
- (int) iev.time.tv_sec, (int) iev.time.tv_usec,
- iev.type, iev.code, iev.value);
-
+ nsecs_t delta = 0;
#ifdef HAVE_POSIX_CLOCKS
// Use the time specified in the event instead of the current time
// so that downstream code can get more accurate estimates of
@@ -786,10 +782,23 @@
// system call that also queries ktime_get_ts().
event->when = nsecs_t(iev.time.tv_sec) * 1000000000LL
+ nsecs_t(iev.time.tv_usec) * 1000LL;
- ALOGV("event time %lld, now %lld", event->when, now);
+ delta = now - event->when;
+
+ // Only log verbose if events are older that 1ms
+ if (delta > 1 * 1000000LL) {
+ ALOGV("event time %lld, now %lld, delta %lldus", event->when, now, delta / 1000LL);
+ }
#else
event->when = now;
#endif
+ if (delta > 1 * 1000000LL) {
+ ALOGV("%s got: t0=%d, t1=%d, type=%d, code=%d, value=%d",
+ device->path.string(),
+ (int) iev.time.tv_sec, (int) iev.time.tv_usec,
+ iev.type, iev.code, iev.value);
+ }
+
+
event->deviceId = deviceId;
event->type = iev.type;
event->code = iev.code;
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index dad4ef4..ada9d9e 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -185,7 +185,7 @@
mPolicy(policy),
mPendingEvent(NULL), mAppSwitchSawKeyDown(false), mAppSwitchDueTime(LONG_LONG_MAX),
mNextUnblockedEvent(NULL),
- mDispatchEnabled(true), mDispatchFrozen(false), mInputFilterEnabled(false),
+ mDispatchEnabled(false), mDispatchFrozen(false), mInputFilterEnabled(false),
mInputTargetWaitCause(INPUT_TARGET_WAIT_CAUSE_NONE) {
mLooper = new Looper(false);
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 8e3b825..a49ccf7 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1142,6 +1142,10 @@
if (mCurToken != null) {
try {
if (DEBUG) Slog.v(TAG, "Removing window token: " + mCurToken);
+ if ((mImeWindowVis & InputMethodService.IME_ACTIVE) != 0) {
+ // The current IME is shown. Hence an IME switch (transition) is happening.
+ mWindowManagerService.saveLastInputMethodWindowForTransition();
+ }
mIWindowManager.removeWindowToken(mCurToken);
} catch (RemoteException e) {
}
@@ -2410,17 +2414,63 @@
}
}
- private static class ImeSubtypeListItem {
+ private static class ImeSubtypeListItem implements Comparable<ImeSubtypeListItem> {
public final CharSequence mImeName;
public final CharSequence mSubtypeName;
public final InputMethodInfo mImi;
public final int mSubtypeId;
+ private final boolean mIsSystemLocale;
+ private final boolean mIsSystemLanguage;
+
public ImeSubtypeListItem(CharSequence imeName, CharSequence subtypeName,
- InputMethodInfo imi, int subtypeId) {
+ InputMethodInfo imi, int subtypeId, String subtypeLocale, String systemLocale) {
mImeName = imeName;
mSubtypeName = subtypeName;
mImi = imi;
mSubtypeId = subtypeId;
+ if (TextUtils.isEmpty(subtypeLocale)) {
+ mIsSystemLocale = false;
+ mIsSystemLanguage = false;
+ } else {
+ mIsSystemLocale = subtypeLocale.equals(systemLocale);
+ mIsSystemLanguage = mIsSystemLocale
+ || subtypeLocale.startsWith(systemLocale.substring(0, 2));
+ }
+ }
+
+ @Override
+ public int compareTo(ImeSubtypeListItem other) {
+ if (TextUtils.isEmpty(mImeName)) {
+ return 1;
+ }
+ if (TextUtils.isEmpty(other.mImeName)) {
+ return -1;
+ }
+ if (!TextUtils.equals(mImeName, other.mImeName)) {
+ return mImeName.toString().compareTo(other.mImeName.toString());
+ }
+ if (TextUtils.equals(mSubtypeName, other.mSubtypeName)) {
+ return 0;
+ }
+ if (mIsSystemLocale) {
+ return -1;
+ }
+ if (other.mIsSystemLocale) {
+ return 1;
+ }
+ if (mIsSystemLanguage) {
+ return -1;
+ }
+ if (other.mIsSystemLanguage) {
+ return 1;
+ }
+ if (TextUtils.isEmpty(mSubtypeName)) {
+ return 1;
+ }
+ if (TextUtils.isEmpty(other.mSubtypeName)) {
+ return -1;
+ }
+ return mSubtypeName.toString().compareTo(other.mSubtypeName.toString());
}
}
@@ -2619,7 +2669,11 @@
return getSubtypeIdFromHashCode(imi, subtypeId);
}
- private int getSubtypeIdFromHashCode(InputMethodInfo imi, int subtypeHashCode) {
+ private static boolean isValidSubtypeId(InputMethodInfo imi, int subtypeHashCode) {
+ return getSubtypeIdFromHashCode(imi, subtypeHashCode) != NOT_A_SUBTYPE_ID;
+ }
+
+ private static int getSubtypeIdFromHashCode(InputMethodInfo imi, int subtypeHashCode) {
if (imi != null) {
final int subtypeCount = imi.getSubtypeCount();
for (int i = 0; i < subtypeCount; ++i) {
@@ -2844,6 +2898,9 @@
*/
@Override
public InputMethodSubtype getCurrentInputMethodSubtype() {
+ if (mCurMethodId == null) {
+ return null;
+ }
boolean subtypeIsSelected = false;
try {
subtypeIsSelected = Settings.Secure.getInt(mContext.getContentResolver(),
@@ -2851,36 +2908,35 @@
} catch (SettingNotFoundException e) {
}
synchronized (mMethodMap) {
- if (!subtypeIsSelected || mCurrentSubtype == null) {
- String lastInputMethodId = Settings.Secure.getString(
- mContext.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
- int subtypeId = getSelectedInputMethodSubtypeId(lastInputMethodId);
+ final InputMethodInfo imi = mMethodMap.get(mCurMethodId);
+ if (imi == null || imi.getSubtypeCount() == 0) {
+ return null;
+ }
+ if (!subtypeIsSelected || mCurrentSubtype == null
+ || !isValidSubtypeId(imi, mCurrentSubtype.hashCode())) {
+ int subtypeId = getSelectedInputMethodSubtypeId(mCurMethodId);
if (subtypeId == NOT_A_SUBTYPE_ID) {
- InputMethodInfo imi = mMethodMap.get(lastInputMethodId);
- if (imi != null) {
- // If there are no selected subtypes, the framework will try to find
- // the most applicable subtype from explicitly or implicitly enabled
- // subtypes.
- List<InputMethodSubtype> explicitlyOrImplicitlyEnabledSubtypes =
- getEnabledInputMethodSubtypeList(imi, true);
- // If there is only one explicitly or implicitly enabled subtype,
- // just returns it.
- if (explicitlyOrImplicitlyEnabledSubtypes.size() == 1) {
- mCurrentSubtype = explicitlyOrImplicitlyEnabledSubtypes.get(0);
- } else if (explicitlyOrImplicitlyEnabledSubtypes.size() > 1) {
+ // If there are no selected subtypes, the framework will try to find
+ // the most applicable subtype from explicitly or implicitly enabled
+ // subtypes.
+ List<InputMethodSubtype> explicitlyOrImplicitlyEnabledSubtypes =
+ getEnabledInputMethodSubtypeList(imi, true);
+ // If there is only one explicitly or implicitly enabled subtype,
+ // just returns it.
+ if (explicitlyOrImplicitlyEnabledSubtypes.size() == 1) {
+ mCurrentSubtype = explicitlyOrImplicitlyEnabledSubtypes.get(0);
+ } else if (explicitlyOrImplicitlyEnabledSubtypes.size() > 1) {
+ mCurrentSubtype = findLastResortApplicableSubtypeLocked(
+ mRes, explicitlyOrImplicitlyEnabledSubtypes,
+ SUBTYPE_MODE_KEYBOARD, null, true);
+ if (mCurrentSubtype == null) {
mCurrentSubtype = findLastResortApplicableSubtypeLocked(
- mRes, explicitlyOrImplicitlyEnabledSubtypes,
- SUBTYPE_MODE_KEYBOARD, null, true);
- if (mCurrentSubtype == null) {
- mCurrentSubtype = findLastResortApplicableSubtypeLocked(
- mRes, explicitlyOrImplicitlyEnabledSubtypes, null, null,
- true);
- }
+ mRes, explicitlyOrImplicitlyEnabledSubtypes, null, null,
+ true);
}
}
} else {
- mCurrentSubtype =
- getSubtypes(mMethodMap.get(lastInputMethodId)).get(subtypeId);
+ mCurrentSubtype = getSubtypes(imi).get(subtypeId);
}
}
return mCurrentSubtype;
@@ -2946,10 +3002,13 @@
private final Context mContext;
private final PackageManager mPm;
private final InputMethodManagerService mImms;
+ private final String mSystemLocaleStr;
public InputMethodAndSubtypeListManager(Context context, InputMethodManagerService imms) {
mContext = context;
mPm = context.getPackageManager();
mImms = imms;
+ mSystemLocaleStr =
+ imms.mLastSystemLocale != null ? imms.mLastSystemLocale.toString() : "";
}
private final TreeMap<InputMethodInfo, List<InputMethodSubtype>> mSortedImmis =
@@ -2979,7 +3038,7 @@
}
final int N = imList.size();
final int currentSubtypeId = subtype != null
- ? mImms.getSubtypeIdFromHashCode(imi, subtype.hashCode())
+ ? getSubtypeIdFromHashCode(imi, subtype.hashCode())
: NOT_A_SUBTYPE_ID;
for (int i = 0; i < N; ++i) {
final ImeSubtypeListItem isli = imList.get(i);
@@ -3037,7 +3096,8 @@
subtype.overridesImplicitlyEnabledSubtype() ? null
: subtype.getDisplayName(mContext, imi.getPackageName(),
imi.getServiceInfo().applicationInfo);
- imList.add(new ImeSubtypeListItem(imeLabel, subtypeLabel, imi, j));
+ imList.add(new ImeSubtypeListItem(imeLabel, subtypeLabel, imi, j,
+ subtype.getLocale(), mSystemLocaleStr));
// Removing this subtype from enabledSubtypeSet because we no longer
// need to add an entry of this subtype to imList to avoid duplicated
@@ -3046,9 +3106,11 @@
}
}
} else {
- imList.add(new ImeSubtypeListItem(imeLabel, null, imi, NOT_A_SUBTYPE_ID));
+ imList.add(new ImeSubtypeListItem(imeLabel, null, imi, NOT_A_SUBTYPE_ID,
+ null, mSystemLocaleStr));
}
}
+ Collections.sort(imList);
return imList;
}
}
@@ -3356,10 +3418,10 @@
for (Pair<String, ArrayList<String>> enabledIme: enabledImes) {
if (enabledIme.first.equals(imeId)) {
final ArrayList<String> explicitlyEnabledSubtypes = enabledIme.second;
+ final InputMethodInfo imi = mMethodMap.get(imeId);
if (explicitlyEnabledSubtypes.size() == 0) {
// If there are no explicitly enabled subtypes, applicable subtypes are
// enabled implicitly.
- InputMethodInfo imi = mMethodMap.get(imeId);
// If IME is enabled and no subtypes are enabled, applicable subtypes
// are enabled implicitly, so needs to treat them to be enabled.
if (imi != null && imi.getSubtypeCount() > 0) {
@@ -3379,7 +3441,17 @@
for (String s: explicitlyEnabledSubtypes) {
if (s.equals(subtypeHashCode)) {
// If both imeId and subtypeId are enabled, return subtypeId.
- return s;
+ try {
+ final int hashCode = Integer.valueOf(subtypeHashCode);
+ // Check whether the subtype id is valid or not
+ if (isValidSubtypeId(imi, hashCode)) {
+ return s;
+ } else {
+ return NOT_A_SUBTYPE_ID_STR;
+ }
+ } catch (NumberFormatException e) {
+ return NOT_A_SUBTYPE_ID_STR;
+ }
}
}
}
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 663a031..52ba665 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -1046,7 +1046,7 @@
final boolean useDefaultVibrate =
(notification.defaults & Notification.DEFAULT_VIBRATE) != 0;
if ((useDefaultVibrate || notification.vibrate != null)
- && audioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_NOTIFICATION)) {
+ && !(audioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT)) {
mVibrateNotification = r;
mVibrator.vibrate(useDefaultVibrate ? DEFAULT_VIBRATE_PATTERN
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index fbe4a83..e447218 100644
--- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -1251,7 +1251,6 @@
mContext, 0, new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS), 0));
} else {
mCanRetrieveScreenContent = true;
- mIncludeNotImportantViews = true;
mCanHandleGestures = true;
}
setDynamicallyConfigurableProperties(accessibilityServiceInfo);
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 0f8d151..40f64bf 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4098,6 +4098,10 @@
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_ENABLE_SCREEN,
SystemClock.uptimeMillis());
mWindowManager.enableScreenAfterBoot();
+
+ synchronized (this) {
+ updateEventDispatchingLocked();
+ }
}
public void showBootMessage(final CharSequence msg, final boolean always) {
@@ -6686,7 +6690,7 @@
synchronized(this) {
mWentToSleep = true;
- mWindowManager.setEventDispatching(false);
+ updateEventDispatchingLocked();
if (!mSleeping) {
mSleeping = true;
@@ -6712,7 +6716,7 @@
synchronized(this) {
mShuttingDown = true;
- mWindowManager.setEventDispatching(false);
+ updateEventDispatchingLocked();
if (mMainStack.mResumedActivity != null) {
mMainStack.stopIfSleepingLocked();
@@ -6776,11 +6780,15 @@
synchronized(this) {
mWentToSleep = false;
- mWindowManager.setEventDispatching(true);
+ updateEventDispatchingLocked();
comeOutOfSleepIfNeededLocked();
}
}
+ private void updateEventDispatchingLocked() {
+ mWindowManager.setEventDispatching(mBooted && !mWentToSleep && !mShuttingDown);
+ }
+
public void setLockScreenShown(boolean shown) {
if (checkCallingPermission(android.Manifest.permission.DEVICE_POWER)
!= PackageManager.PERMISSION_GRANTED) {
@@ -11049,7 +11057,7 @@
updateOomAdjLocked(r.app);
}
int flags = 0;
- if (si.deliveryCount > 0) {
+ if (si.deliveryCount > 1) {
flags |= Service.START_FLAG_RETRY;
}
if (si.doneExecutingCount > 0) {
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 4ae3c57..7c14d49 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -1050,7 +1050,7 @@
mSystemInstallObserver.startWatching();
scanDirLI(mSystemAppDir, PackageParser.PARSE_IS_SYSTEM
| PackageParser.PARSE_IS_SYSTEM_DIR, scanMode, 0);
-
+
// Collect all vendor packages.
mVendorAppDir = new File("/vendor/app");
mVendorInstallObserver = new AppDirObserver(
@@ -1068,8 +1068,30 @@
Iterator<PackageSetting> psit = mSettings.mPackages.values().iterator();
while (psit.hasNext()) {
PackageSetting ps = psit.next();
- if ((ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0
- || mPackages.containsKey(ps.name)) {
+
+ /*
+ * If this is not a system app, it can't be a
+ * disable system app.
+ */
+ if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0) {
+ continue;
+ }
+
+ /*
+ * If the package is scanned, it's not erased.
+ */
+ if (mPackages.containsKey(ps.name)) {
+ /*
+ * If the system app is both scanned and in the
+ * disabled packages list, then it must have been
+ * added via OTA. Remove it from the currently
+ * scanned package so the previously user-installed
+ * application can be scanned.
+ */
+ if (mSettings.isDisabledSystemPackageLPr(ps.name)) {
+ mPackages.remove(ps.name);
+ }
+
continue;
}
@@ -3096,15 +3118,21 @@
+ "reverting from " + ps.codePathString
+ ": new version " + pkg.mVersionCode
+ " better than installed " + ps.versionCode);
- InstallArgs args = new FileInstallArgs(ps.codePathString,
+ InstallArgs args = createInstallArgs(ps.pkgFlags, ps.codePathString,
ps.resourcePathString, ps.nativeLibraryPathString);
- args.cleanUpResourcesLI();
- mSettings.enableSystemPackageLPw(ps.name);
+ synchronized (mInstaller) {
+ args.cleanUpResourcesLI();
+ }
+ synchronized (mPackages) {
+ mSettings.enableSystemPackageLPw(ps.name);
+ }
}
}
}
+
if (updatedPkg != null) {
- // An updated system app will not have the PARSE_IS_SYSTEM flag set initially
+ // An updated system app will not have the PARSE_IS_SYSTEM flag set
+ // initially
parseFlags |= PackageParser.PARSE_IS_SYSTEM;
}
// Verify certificates against what was last scanned
@@ -3112,6 +3140,49 @@
Slog.w(TAG, "Failed verifying certificates for package:" + pkg.packageName);
return null;
}
+
+ /*
+ * A new system app appeared, but we already had a non-system one of the
+ * same name installed earlier.
+ */
+ boolean shouldHideSystemApp = false;
+ if (updatedPkg == null && ps != null
+ && (parseFlags & PackageParser.PARSE_IS_SYSTEM_DIR) != 0 && !isSystemApp(ps)) {
+ /*
+ * Check to make sure the signatures match first. If they don't,
+ * wipe the installed application and its data.
+ */
+ if (compareSignatures(ps.signatures.mSignatures, pkg.mSignatures)
+ != PackageManager.SIGNATURE_MATCH) {
+ deletePackageLI(pkg.packageName, true, 0, null, false);
+ ps = null;
+ } else {
+ /*
+ * If the newly-added system app is an older version than the
+ * already installed version, hide it. It will be scanned later
+ * and re-added like an update.
+ */
+ if (pkg.mVersionCode < ps.versionCode) {
+ shouldHideSystemApp = true;
+ } else {
+ /*
+ * The newly found system app is a newer version that the
+ * one previously installed. Simply remove the
+ * already-installed application and replace it with our own
+ * while keeping the application data.
+ */
+ Slog.w(TAG, "Package " + ps.name + " at " + scanFile + "reverting from "
+ + ps.codePathString + ": new version " + pkg.mVersionCode
+ + " better than installed " + ps.versionCode);
+ InstallArgs args = createInstallArgs(ps.pkgFlags, ps.codePathString,
+ ps.resourcePathString, ps.nativeLibraryPathString);
+ synchronized (mInstaller) {
+ args.cleanUpResourcesLI();
+ }
+ }
+ }
+ }
+
// The apk is forward locked (not public) if its code and resources
// are kept in different files.
// TODO grab this value from PackageSettings
@@ -3135,7 +3206,27 @@
// Set application objects path explicitly.
setApplicationInfoPaths(pkg, codePath, resPath);
// Note that we invoke the following method only if we are about to unpack an application
- return scanPackageLI(pkg, parseFlags, scanMode | SCAN_UPDATE_SIGNATURE, currentTime);
+ PackageParser.Package scannedPkg = scanPackageLI(pkg, parseFlags, scanMode
+ | SCAN_UPDATE_SIGNATURE, currentTime);
+
+ /*
+ * If the system app should be overridden by a previously installed
+ * data, hide the system app now and let the /data/app scan pick it up
+ * again.
+ */
+ if (shouldHideSystemApp) {
+ synchronized (mPackages) {
+ /*
+ * We have to grant systems permissions before we hide, because
+ * grantPermissions will assume the package update is trying to
+ * expand its permissions.
+ */
+ grantPermissionsLPw(pkg, true);
+ mSettings.disableSystemPackageLPw(pkg.packageName);
+ }
+ }
+
+ return scannedPkg;
}
private static void setApplicationInfoPaths(PackageParser.Package pkg, String destCodePath,
@@ -7177,6 +7268,10 @@
return (info.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
}
+ private static boolean isSystemApp(PackageSetting ps) {
+ return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0;
+ }
+
private static boolean isUpdatedSystemApp(PackageParser.Package pkg) {
return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
}
diff --git a/services/java/com/android/server/wm/InputMonitor.java b/services/java/com/android/server/wm/InputMonitor.java
index c28cfa2..c4bb519 100644
--- a/services/java/com/android/server/wm/InputMonitor.java
+++ b/services/java/com/android/server/wm/InputMonitor.java
@@ -41,7 +41,9 @@
private boolean mInputDispatchFrozen;
// When true, input dispatch proceeds normally. Otherwise all events are dropped.
- private boolean mInputDispatchEnabled = true;
+ // Initially false, so that input does not get dispatched until boot is finished at
+ // which point the ActivityManager will enable dispatching.
+ private boolean mInputDispatchEnabled;
// When true, need to call updateInputWindowsLw().
private boolean mUpdateInputWindowsNeeded = true;
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java
index 2e817ca..5536559 100644
--- a/services/java/com/android/server/wm/WindowAnimator.java
+++ b/services/java/com/android/server/wm/WindowAnimator.java
@@ -85,6 +85,15 @@
mPolicy = policy;
}
+ void hideWallpapersLocked() {
+ for (final WindowToken token : mService.mWallpaperTokens) {
+ for (final WindowState wallpaper : token.windows) {
+ wallpaper.mWinAnimator.hide();
+ }
+ token.hidden = true;
+ }
+ }
+
private void testWallpaperAndBackgroundLocked() {
if (mWindowDetachedWallpaper != mDetachedWallpaper) {
if (WindowManagerService.DEBUG_WALLPAPER) Slog.v(TAG,
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 8eda9ca..8957edf 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -3430,9 +3430,6 @@
synchronized(mWindowMap) {
WindowToken wtoken = mTokenMap.remove(token);
if (wtoken != null) {
- if (wtoken.windowType == TYPE_INPUT_METHOD && mInputMethodWindow != null) {
- mPolicy.setLastInputMethodWindowLw(mInputMethodWindow, mInputMethodTarget);
- }
boolean delayed = false;
if (!wtoken.hidden) {
wtoken.hidden = true;
@@ -3825,7 +3822,8 @@
synchronized(mWindowMap) {
if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Prepare app transition: transit=" + transit
- + " mNextAppTransition=" + mNextAppTransition);
+ + " mNextAppTransition=" + mNextAppTransition
+ + "\nCallers=" + Debug.getCallers(3));
if (okToDisplay()) {
if (mNextAppTransition == WindowManagerPolicy.TRANSIT_UNSET
|| mNextAppTransition == WindowManagerPolicy.TRANSIT_NONE) {
@@ -4237,7 +4235,7 @@
e = new RuntimeException();
e.fillInStackTrace();
}
- Slog.v(TAG, "setAppVisibility(" + token + ", " + visible
+ Slog.v(TAG, "setAppVisibility(" + token + ", visible=" + visible
+ "): mNextAppTransition=" + mNextAppTransition
+ " hidden=" + wtoken.hidden
+ " hiddenRequested=" + wtoken.hiddenRequested, e);
@@ -5149,7 +5147,7 @@
//Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
Parcel data = Parcel.obtain();
data.writeInterfaceToken("android.ui.ISurfaceComposer");
- surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION,
+ surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
data, null, 0);
data.recycle();
}
@@ -6673,8 +6671,7 @@
public static final int SET_TRANSPARENT_REGION = ANIMATOR_WHAT_OFFSET + 1;
public static final int SET_WALLPAPER_OFFSET = ANIMATOR_WHAT_OFFSET + 2;
public static final int SET_DIM_PARAMETERS = ANIMATOR_WHAT_OFFSET + 3;
- public static final int SET_MOVE_ANIMATION = ANIMATOR_WHAT_OFFSET + 4;
- public static final int CLEAR_PENDING_ACTIONS = ANIMATOR_WHAT_OFFSET + 5;
+ public static final int CLEAR_PENDING_ACTIONS = ANIMATOR_WHAT_OFFSET + 4;
private Session mLastReportedHold;
@@ -7158,18 +7155,6 @@
break;
}
- case SET_MOVE_ANIMATION: {
- WindowAnimator.SetAnimationParams params =
- (WindowAnimator.SetAnimationParams) msg.obj;
- WindowStateAnimator winAnimator = params.mWinAnimator;
- winAnimator.setAnimation(params.mAnimation);
- winAnimator.mAnimDw = params.mAnimDw;
- winAnimator.mAnimDh = params.mAnimDh;
-
- scheduleAnimationLocked();
- break;
- }
-
case CLEAR_PENDING_ACTIONS: {
mAnimator.clearPendingActions();
break;
@@ -7866,8 +7851,10 @@
mToTopApps.clear();
}
+ // if wallpaper is animating in or out set oldWallpaper to null else to wallpaper
WindowState oldWallpaper =
mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating()
+ && !mWallpaperTarget.mWinAnimator.isDummyAnimation()
? null : mWallpaperTarget;
adjustWallpaperWindowsLocked();
@@ -8415,9 +8402,6 @@
winAnimator.setAnimation(a);
winAnimator.mAnimDw = w.mLastFrame.left - w.mFrame.left;
winAnimator.mAnimDh = w.mLastFrame.top - w.mFrame.top;
- } else {
- winAnimator.mAnimDw = innerDw;
- winAnimator.mAnimDh = innerDh;
}
//Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
@@ -9266,6 +9250,15 @@
}
}
+ // It is assumed that this method is called only by InputMethodManagerService.
+ public void saveLastInputMethodWindowForTransition() {
+ synchronized (mWindowMap) {
+ if (mInputMethodWindow != null) {
+ mPolicy.setLastInputMethodWindowLw(mInputMethodWindow, mInputMethodTarget);
+ }
+ }
+ }
+
@Override
public boolean hasNavigationBar() {
return mPolicy.hasNavigationBar();
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index 4f08d92..642de73 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -177,6 +177,13 @@
|| atoken.inPendingTransaction));
}
+ /** Is the window animating the DummyAnimation? */
+ boolean isDummyAnimation() {
+ final AppWindowToken atoken = mWin.mAppToken;
+ return atoken != null
+ && atoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation;
+ }
+
/** Is this window currently animating? */
boolean isWindowAnimating() {
return mAnimation != null;
@@ -363,19 +370,33 @@
mWin.mDestroying = true;
if (WindowState.SHOW_TRANSACTIONS) WindowManagerService.logSurface(
mWin, "HIDE (finishExit)", null);
- mSurfaceShown = false;
- try {
- mSurface.hide();
- } catch (RuntimeException e) {
- Slog.w(TAG, "Error hiding surface in " + this, e);
- }
- mLastHidden = true;
+ hide();
}
mWin.mExiting = false;
if (mWin.mRemoveOnExit) {
mService.mPendingRemove.add(mWin);
mWin.mRemoveOnExit = false;
}
+ if (mService.mWallpaperTarget == mWin) {
+ mAnimator.hideWallpapersLocked();
+ }
+ }
+
+ void hide() {
+ if (!mLastHidden) {
+ //dump();
+ mLastHidden = true;
+ if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(mWin,
+ "HIDE (performLayout)", null);
+ if (mSurface != null) {
+ mSurfaceShown = false;
+ try {
+ mSurface.hide();
+ } catch (RuntimeException e) {
+ Slog.w(TAG, "Exception hiding surface in " + mWin);
+ }
+ }
+ }
}
boolean finishDrawingLocked() {
@@ -987,20 +1008,7 @@
setSurfaceBoundaries(recoveringMemory);
if (w.mAttachedHidden || !w.isReadyForDisplay()) {
- if (!mLastHidden) {
- //dump();
- mLastHidden = true;
- if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(w,
- "HIDE (performLayout)", null);
- if (mSurface != null) {
- mSurfaceShown = false;
- try {
- mSurface.hide();
- } catch (RuntimeException e) {
- Slog.w(TAG, "Exception hiding surface in " + w);
- }
- }
- }
+ hide();
// If we are waiting for this window to handle an
// orientation change, well, it is hidden, so
// doesn't really matter. Note that this does
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index 16f1575..9aed8c8 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -307,6 +307,11 @@
}
@LayoutlibDelegate
+ /*package*/ static void freeTextLayoutCaches() {
+ // nothing to be done here yet.
+ }
+
+ @LayoutlibDelegate
/*package*/ static int initRaster(int nativeBitmapOrZero) {
if (nativeBitmapOrZero > 0) {
// get the Bitmap from the int