Merge changes I128ce4b2,I5cbb940c
* changes:
real fix for [2440014] launcher2 crashing in loop during boot
Revert "Revert "RenderScript should not depend on libsurfaceflinger_client.so""
diff --git a/common/java/com/android/common/ui/PointerLocationView.java b/common/java/com/android/common/ui/PointerLocationView.java
new file mode 100644
index 0000000..e83c5ae
--- /dev/null
+++ b/common/java/com/android/common/ui/PointerLocationView.java
@@ -0,0 +1,333 @@
+package com.android.common.ui;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Paint.FontMetricsInt;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.VelocityTracker;
+import android.view.View;
+import android.view.ViewConfiguration;
+
+import java.util.ArrayList;
+
+public class PointerLocationView extends View {
+ public static class PointerState {
+ private final ArrayList<Float> mXs = new ArrayList<Float>();
+ private final ArrayList<Float> mYs = new ArrayList<Float>();
+ private boolean mCurDown;
+ private int mCurX;
+ private int mCurY;
+ private float mCurPressure;
+ private float mCurSize;
+ private int mCurWidth;
+ private VelocityTracker mVelocity;
+ }
+
+ private final ViewConfiguration mVC;
+ private final Paint mTextPaint;
+ private final Paint mTextBackgroundPaint;
+ private final Paint mTextLevelPaint;
+ private final Paint mPaint;
+ private final Paint mTargetPaint;
+ private final Paint mPathPaint;
+ private final FontMetricsInt mTextMetrics = new FontMetricsInt();
+ private int mHeaderBottom;
+ private boolean mCurDown;
+ private int mCurNumPointers;
+ private int mMaxNumPointers;
+ private final ArrayList<PointerState> mPointers
+ = new ArrayList<PointerState>();
+
+ private boolean mPrintCoords = true;
+
+ public PointerLocationView(Context c) {
+ super(c);
+ mVC = ViewConfiguration.get(c);
+ mTextPaint = new Paint();
+ mTextPaint.setAntiAlias(true);
+ mTextPaint.setTextSize(10
+ * getResources().getDisplayMetrics().density);
+ mTextPaint.setARGB(255, 0, 0, 0);
+ mTextBackgroundPaint = new Paint();
+ mTextBackgroundPaint.setAntiAlias(false);
+ mTextBackgroundPaint.setARGB(128, 255, 255, 255);
+ mTextLevelPaint = new Paint();
+ mTextLevelPaint.setAntiAlias(false);
+ mTextLevelPaint.setARGB(192, 255, 0, 0);
+ mPaint = new Paint();
+ mPaint.setAntiAlias(true);
+ mPaint.setARGB(255, 255, 255, 255);
+ mPaint.setStyle(Paint.Style.STROKE);
+ mPaint.setStrokeWidth(2);
+ mTargetPaint = new Paint();
+ mTargetPaint.setAntiAlias(false);
+ mTargetPaint.setARGB(255, 0, 0, 192);
+ mPathPaint = new Paint();
+ mPathPaint.setAntiAlias(false);
+ mPathPaint.setARGB(255, 0, 96, 255);
+ mPaint.setStyle(Paint.Style.STROKE);
+ mPaint.setStrokeWidth(1);
+
+ PointerState ps = new PointerState();
+ ps.mVelocity = VelocityTracker.obtain();
+ mPointers.add(ps);
+ }
+
+ public void setPrintCoords(boolean state) {
+ mPrintCoords = state;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ mTextPaint.getFontMetricsInt(mTextMetrics);
+ mHeaderBottom = -mTextMetrics.ascent+mTextMetrics.descent+2;
+ if (false) {
+ Log.i("foo", "Metrics: ascent=" + mTextMetrics.ascent
+ + " descent=" + mTextMetrics.descent
+ + " leading=" + mTextMetrics.leading
+ + " top=" + mTextMetrics.top
+ + " bottom=" + mTextMetrics.bottom);
+ }
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ synchronized (mPointers) {
+ final int w = getWidth();
+ final int itemW = w/7;
+ final int base = -mTextMetrics.ascent+1;
+ final int bottom = mHeaderBottom;
+
+ final int NP = mPointers.size();
+
+ if (NP > 0) {
+ final PointerState ps = mPointers.get(0);
+ canvas.drawRect(0, 0, itemW-1, bottom,mTextBackgroundPaint);
+ canvas.drawText("P: " + mCurNumPointers + " / " + mMaxNumPointers,
+ 1, base, mTextPaint);
+
+ final int N = ps.mXs.size();
+ if ((mCurDown && ps.mCurDown) || N == 0) {
+ canvas.drawRect(itemW, 0, (itemW * 2) - 1, bottom, mTextBackgroundPaint);
+ canvas.drawText("X: " + ps.mCurX, 1 + itemW, base, mTextPaint);
+ canvas.drawRect(itemW * 2, 0, (itemW * 3) - 1, bottom, mTextBackgroundPaint);
+ canvas.drawText("Y: " + ps.mCurY, 1 + itemW * 2, base, mTextPaint);
+ } else {
+ float dx = ps.mXs.get(N-1) - ps.mXs.get(0);
+ float dy = ps.mYs.get(N-1) - ps.mYs.get(0);
+ canvas.drawRect(itemW, 0, (itemW * 2) - 1, bottom,
+ Math.abs(dx) < mVC.getScaledTouchSlop()
+ ? mTextBackgroundPaint : mTextLevelPaint);
+ canvas.drawText("dX: " + String.format("%.1f", dx), 1 + itemW, base, mTextPaint);
+ canvas.drawRect(itemW * 2, 0, (itemW * 3) - 1, bottom,
+ Math.abs(dy) < mVC.getScaledTouchSlop()
+ ? mTextBackgroundPaint : mTextLevelPaint);
+ canvas.drawText("dY: " + String.format("%.1f", dy), 1 + itemW * 2, base, mTextPaint);
+ }
+
+ canvas.drawRect(itemW * 3, 0, (itemW * 4) - 1, bottom, mTextBackgroundPaint);
+ int velocity = ps.mVelocity == null ? 0 : (int) (ps.mVelocity.getXVelocity() * 1000);
+ canvas.drawText("Xv: " + velocity, 1 + itemW * 3, base, mTextPaint);
+
+ canvas.drawRect(itemW * 4, 0, (itemW * 5) - 1, bottom, mTextBackgroundPaint);
+ velocity = ps.mVelocity == null ? 0 : (int) (ps.mVelocity.getYVelocity() * 1000);
+ canvas.drawText("Yv: " + velocity, 1 + itemW * 4, base, mTextPaint);
+
+ canvas.drawRect(itemW * 5, 0, (itemW * 6) - 1, bottom, mTextBackgroundPaint);
+ canvas.drawRect(itemW * 5, 0, (itemW * 5) + (ps.mCurPressure * itemW) - 1,
+ bottom, mTextLevelPaint);
+ canvas.drawText("Prs: " + String.format("%.2f", ps.mCurPressure), 1 + itemW * 5,
+ base, mTextPaint);
+
+ canvas.drawRect(itemW * 6, 0, w, bottom, mTextBackgroundPaint);
+ canvas.drawRect(itemW * 6, 0, (itemW * 6) + (ps.mCurSize * itemW) - 1,
+ bottom, mTextLevelPaint);
+ canvas.drawText("Size: " + String.format("%.2f", ps.mCurSize), 1 + itemW * 6,
+ base, mTextPaint);
+ }
+
+ for (int p=0; p<NP; p++) {
+ final PointerState ps = mPointers.get(p);
+
+ if (mCurDown && ps.mCurDown) {
+ canvas.drawLine(0, (int)ps.mCurY, getWidth(), (int)ps.mCurY, mTargetPaint);
+ canvas.drawLine((int)ps.mCurX, 0, (int)ps.mCurX, getHeight(), mTargetPaint);
+ int pressureLevel = (int)(ps.mCurPressure*255);
+ mPaint.setARGB(255, pressureLevel, 128, 255-pressureLevel);
+ canvas.drawPoint(ps.mCurX, ps.mCurY, mPaint);
+ canvas.drawCircle(ps.mCurX, ps.mCurY, ps.mCurWidth, mPaint);
+ }
+ }
+
+ for (int p=0; p<NP; p++) {
+ final PointerState ps = mPointers.get(p);
+
+ final int N = ps.mXs.size();
+ float lastX=0, lastY=0;
+ boolean haveLast = false;
+ boolean drawn = false;
+ mPaint.setARGB(255, 128, 255, 255);
+ for (int i=0; i<N; i++) {
+ float x = ps.mXs.get(i);
+ float y = ps.mYs.get(i);
+ if (Float.isNaN(x)) {
+ haveLast = false;
+ continue;
+ }
+ if (haveLast) {
+ canvas.drawLine(lastX, lastY, x, y, mPathPaint);
+ canvas.drawPoint(lastX, lastY, mPaint);
+ drawn = true;
+ }
+ lastX = x;
+ lastY = y;
+ haveLast = true;
+ }
+
+ if (drawn) {
+ if (ps.mVelocity != null) {
+ mPaint.setARGB(255, 255, 64, 128);
+ float xVel = ps.mVelocity.getXVelocity() * (1000/60);
+ float yVel = ps.mVelocity.getYVelocity() * (1000/60);
+ canvas.drawLine(lastX, lastY, lastX+xVel, lastY+yVel, mPaint);
+ } else {
+ canvas.drawPoint(lastX, lastY, mPaint);
+ }
+ }
+ }
+ }
+ }
+
+ public void addTouchEvent(MotionEvent event) {
+ synchronized (mPointers) {
+ int action = event.getAction();
+
+ //Log.i("Pointer", "Motion: action=0x" + Integer.toHexString(action)
+ // + " pointers=" + event.getPointerCount());
+
+ int NP = mPointers.size();
+
+ //mRect.set(0, 0, getWidth(), mHeaderBottom+1);
+ //invalidate(mRect);
+ //if (mCurDown) {
+ // mRect.set(mCurX-mCurWidth-3, mCurY-mCurWidth-3,
+ // mCurX+mCurWidth+3, mCurY+mCurWidth+3);
+ //} else {
+ // mRect.setEmpty();
+ //}
+ if (action == MotionEvent.ACTION_DOWN) {
+ for (int p=0; p<NP; p++) {
+ final PointerState ps = mPointers.get(p);
+ ps.mXs.clear();
+ ps.mYs.clear();
+ ps.mVelocity = VelocityTracker.obtain();
+ ps.mCurDown = false;
+ }
+ mPointers.get(0).mCurDown = true;
+ mMaxNumPointers = 0;
+ if (mPrintCoords) {
+ Log.i("Pointer", "Pointer 1: DOWN");
+ }
+ }
+
+ if ((action&MotionEvent.ACTION_MASK) == MotionEvent.ACTION_POINTER_DOWN) {
+ final int id = (action&MotionEvent.ACTION_POINTER_ID_MASK)
+ >> MotionEvent.ACTION_POINTER_ID_SHIFT;
+ while (NP <= id) {
+ PointerState ps = new PointerState();
+ ps.mVelocity = VelocityTracker.obtain();
+ mPointers.add(ps);
+ NP++;
+ }
+ final PointerState ps = mPointers.get(id);
+ ps.mVelocity = VelocityTracker.obtain();
+ ps.mCurDown = true;
+ if (mPrintCoords) {
+ Log.i("Pointer", "Pointer " + (id+1) + ": DOWN");
+ }
+ }
+
+ final int NI = event.getPointerCount();
+
+ mCurDown = action != MotionEvent.ACTION_UP
+ && action != MotionEvent.ACTION_CANCEL;
+ mCurNumPointers = mCurDown ? NI : 0;
+ if (mMaxNumPointers < mCurNumPointers) {
+ mMaxNumPointers = mCurNumPointers;
+ }
+
+ for (int i=0; i<NI; i++) {
+ final PointerState ps = mPointers.get(event.getPointerId(i));
+ ps.mVelocity.addMovement(event);
+ ps.mVelocity.computeCurrentVelocity(1);
+ final int N = event.getHistorySize();
+ for (int j=0; j<N; j++) {
+ if (mPrintCoords) {
+ Log.i("Pointer", "Pointer " + (i+1) + ": ("
+ + event.getHistoricalX(i, j)
+ + ", " + event.getHistoricalY(i, j) + ")"
+ + " Prs=" + event.getHistoricalPressure(i, j)
+ + " Size=" + event.getHistoricalSize(i, j));
+ }
+ ps.mXs.add(event.getHistoricalX(i, j));
+ ps.mYs.add(event.getHistoricalY(i, j));
+ }
+ if (mPrintCoords) {
+ Log.i("Pointer", "Pointer " + (i+1) + ": ("
+ + event.getX(i) + ", " + event.getY(i) + ")"
+ + " Prs=" + event.getPressure(i)
+ + " Size=" + event.getSize(i));
+ }
+ ps.mXs.add(event.getX(i));
+ ps.mYs.add(event.getY(i));
+ ps.mCurX = (int)event.getX(i);
+ ps.mCurY = (int)event.getY(i);
+ //Log.i("Pointer", "Pointer #" + p + ": (" + ps.mCurX
+ // + "," + ps.mCurY + ")");
+ ps.mCurPressure = event.getPressure(i);
+ ps.mCurSize = event.getSize(i);
+ ps.mCurWidth = (int)(ps.mCurSize*(getWidth()/3));
+ }
+
+ if ((action&MotionEvent.ACTION_MASK) == MotionEvent.ACTION_POINTER_UP) {
+ final int id = (action&MotionEvent.ACTION_POINTER_ID_MASK)
+ >> MotionEvent.ACTION_POINTER_ID_SHIFT;
+ final PointerState ps = mPointers.get(id);
+ ps.mXs.add(Float.NaN);
+ ps.mYs.add(Float.NaN);
+ ps.mCurDown = false;
+ if (mPrintCoords) {
+ Log.i("Pointer", "Pointer " + (id+1) + ": UP");
+ }
+ }
+
+ if (action == MotionEvent.ACTION_UP) {
+ for (int i=0; i<NI; i++) {
+ final PointerState ps = mPointers.get(event.getPointerId(i));
+ if (ps.mCurDown) {
+ ps.mCurDown = false;
+ if (mPrintCoords) {
+ Log.i("Pointer", "Pointer " + (i+1) + ": UP");
+ }
+ }
+ }
+ }
+
+ //if (mCurDown) {
+ // mRect.union(mCurX-mCurWidth-3, mCurY-mCurWidth-3,
+ // mCurX+mCurWidth+3, mCurY+mCurWidth+3);
+ //}
+ //invalidate(mRect);
+ postInvalidate();
+ }
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ addTouchEvent(event);
+ return true;
+ }
+}
diff --git a/include/utils/AndroidUnicode.h b/include/utils/AndroidUnicode.h
index 563fcd0..2b185d3 100644
--- a/include/utils/AndroidUnicode.h
+++ b/include/utils/AndroidUnicode.h
@@ -79,69 +79,6 @@
};
/**
- * Character types as specified in the Unicode standard. These map directly to
- * java.lang.Character.
- */
- enum CharType {
- CHARTYPE_UNASSIGNED = 0,
- CHARTYPE_UPPERCASE_LETTER,
- CHARTYPE_LOWERCASE_LETTER,
- CHARTYPE_TITLECASE_LETTER,
- CHARTYPE_MODIFIER_LETTER,
- CHARTYPE_OTHER_LETTER,
- CHARTYPE_NON_SPACING_MARK,
- CHARTYPE_ENCLOSING_MARK,
- CHARTYPE_COMBINING_SPACING_MARK,
- CHARTYPE_DECIMAL_DIGIT_NUMBER,
- CHARTYPE_LETTER_NUMBER,
- CHARTYPE_OTHER_NUMBER,
- CHARTYPE_SPACE_SEPARATOR,
- CHARTYPE_LINE_SEPARATOR,
- CHARTYPE_PARAGRAPH_SEPARATOR,
- CHARTYPE_CONTROL,
- CHARTYPE_FORMAT,
- CHARTYPE_MISSING_VALUE_FOR_JAVA, /* This is the mysterious missing 17 value from the java constants */
- CHARTYPE_PRIVATE_USE,
- CHARTYPE_SURROGATE,
- CHARTYPE_DASH_PUNCTUATION,
- CHARTYPE_START_PUNCTUATION,
- CHARTYPE_END_PUNCTUATION,
- CHARTYPE_CONNECTOR_PUNCTUATION,
- CHARTYPE_OTHER_PUNCTUATION,
- CHARTYPE_MATH_SYMBOL,
- CHARTYPE_CURRENCY_SYMBOL,
- CHARTYPE_MODIFIER_SYMBOL,
- CHARTYPE_OTHER_SYMBOL,
- CHARTYPE_INITIAL_QUOTE_PUNCTUATION,
- CHARTYPE_FINAL_QUOTE_PUNCTUATION
- };
-
- /**
- * Decomposition types as described by the unicode standard. These values map to
- * the same values in uchar.h in ICU.
- */
- enum DecompositionType {
- DECOMPOSITION_NONE = 0,
- DECOMPOSITION_CANONICAL,
- DECOMPOSITION_COMPAT,
- DECOMPOSITION_CIRCLE,
- DECOMPOSITION_FINAL,
- DECOMPOSITION_FONT,
- DECOMPOSITION_FRACTION,
- DECOMPOSITION_INITIAL,
- DECOMPOSITION_ISOLATED,
- DECOMPOSITION_MEDIAL,
- DECOMPOSITION_NARROW,
- DECOMPOSITION_NOBREAK,
- DECOMPOSITION_SMALL,
- DECOMPOSITION_SQUARE,
- DECOMPOSITION_SUB,
- DECOMPOSITION_SUPER,
- DECOMPOSITION_VERTICAL,
- DECOMPOSITION_WIDE
- };
-
- /**
* Returns the packed data for java calls
* @param c The unicode character.
* @return The packed data for the character.
@@ -162,61 +99,6 @@
static uint32_t getPackedData(UChar32 c);
/**
- * Get the Character type.
- * @param c The unicode character.
- * @return The character's type or CHARTYPE_UNASSIGNED if the character is invalid
- * or has an unassigned class.
- */
- static CharType getType(UChar32 c);
-
- /**
- * Get the Character's decomposition type.
- * @param c The unicode character.
- * @return The character's decomposition type or DECOMPOSITION_NONE is there
- * is no decomposition.
- */
- static DecompositionType getDecompositionType(UChar32 c);
-
- /**
- * Returns the digit value of a character or -1 if the character
- * is not within the specified radix.
- *
- * The digit value is computed for integer characters and letters
- * within the given radix. This function does not handle Roman Numerals,
- * fractions, or any other characters that may represent numbers.
- *
- * @param c The unicode character
- * @param radix The intended radix.
- * @return The digit value or -1 if there is no digit value or if the value is outside the radix.
- */
- static int getDigitValue(UChar32 c, int radix = 10);
-
- /**
- * Return the numeric value of a character
- *
- * @param c The unicode character.
- * @return The numeric value of the character. -1 if the character has no numeric value,
- * -2 if the character has a numeric value that is not representable by an integer.
- */
- static int getNumericValue(UChar32 c);
-
- /**
- * Convert the character to lowercase
- * @param c The unicode character.
- * @return The lowercase character equivalent of c. If c does not have a lowercase equivalent,
- * the original character is returned.
- */
- static UChar32 toLower(UChar32 c);
-
- /**
- * Convert the character to uppercase
- * @param c The unicode character.
- * @return The uppercase character equivalent of c. If c does not have an uppercase equivalent,
- * the original character is returned.
- */
- static UChar32 toUpper(UChar32 c);
-
- /**
* Get the directionality of the character.
* @param c The unicode character.
* @return The direction of the character or DIRECTIONALITY_UNDEFINED.
@@ -239,15 +121,6 @@
* @see isMirrored
*/
static UChar32 toMirror(UChar32 c);
-
- /**
- * Convert the character to title case.
- * @param c The unicode character.
- * @return The titlecase equivalent of c. If c does not have a titlecase equivalent,
- * the original character is returned.
- */
- static UChar32 toTitle(UChar32 c);
-
};
}
diff --git a/libs/utils/CharacterData.h b/libs/utils/CharacterData.h
index e931d99..d9b7c56 100644
--- a/libs/utils/CharacterData.h
+++ b/libs/utils/CharacterData.h
@@ -615,32 +615,6 @@
{0, 0}
};
- // Array of uppercase differences
- static const short UCDIFF[] = {
- 0, -32, 743, 121, -1, -232, -300, 97,
- 163, 130, 56, -2, -79, -210, -206, -205,
- -202, -203, -207, -209, -211, -213, -214, -218,
- -217, -219, -83, 84, -38, -37, -31, -64,
- -63, -62, -57, -47, -54, -86, -80, 7,
- -96, -48, -59, 8, 74, 86, 100, 128,
- 112, 126, 9, -7205, -16, -26, -7264, -40
- };
-
- // Array of lowercase differences
- static const short LCDIFF[] = {
- 0, 32, 1, -199, -121, 210, 206, 205,
- 79, 202, 203, 207, 211, 209, 213, 214,
- 218, 217, 219, 2, -97, -56, -130, -163,
- 83, 38, 37, 64, 63, -60, -7, 80,
- 48, 7264, -8, -74, -9, -86, -100, -112,
- -128, -126, -7517, -8383, -8262, 16, 26, 40
- };
-
- // Array of titlecase differences
- static const short TCDIFF[] = {
- 3, 1, 0, -1
- };
-
// Array of mirrored character differences
static const short MIRROR_DIFF[] = {
0, 1, -1, 2, -2, 16, -16, 3,
@@ -649,21 +623,6 @@
-2108
};
- // Array of all possible numeric values
- static const int NUMERICS[] = {
- -1, 0, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, -2, 100, 1000,
- 40, 50, 60, 70, 80, 90, 10000, 500,
- 5000, 36, 37, 38, 39, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 200, 300,
- 400, 600, 700, 800, 900, 2000, 3000, 4000,
- 6000, 7000, 8000, 9000, 20000, 30000, 40000, 50000,
- 60000, 70000, 80000, 90000
- };
-
// All possible packed data values, no duplicates
static const uint32_t PACKED_DATA[] = {
0x00000000, 0x0000012F, 0x0000016F, 0x0000014F, 0x0000018F, 0x0000018C, 0x000001B8, 0x000000B8,
diff --git a/libs/utils/Unicode.cpp b/libs/utils/Unicode.cpp
index f92703e..65dbb4a 100644
--- a/libs/utils/Unicode.cpp
+++ b/libs/utils/Unicode.cpp
@@ -103,55 +103,6 @@
return CharacterData::PACKED_DATA[findCharacterValue(c) & 0x7FF];
}
-android::Unicode::CharType android::Unicode::getType(UChar32 c)
-{
- if (c < 0 || c >= 0x10FFFF)
- return CHARTYPE_UNASSIGNED;
- return (CharType)((getPackedData(c) >> TYPE_SHIFT) & TYPE_MASK);
-}
-
-android::Unicode::DecompositionType android::Unicode::getDecompositionType(UChar32 c)
-{
- // findCharacterValue returns a 16-bit value with the top 5 bits containing a decomposition type
- // and the remaining bits containing an index.
- return (DecompositionType)((findCharacterValue(c) >> DECOMPOSITION_SHIFT) & DECOMPOSITION_MASK);
-}
-
-int android::Unicode::getDigitValue(UChar32 c, int radix)
-{
- if (radix < MIN_RADIX || radix > MAX_RADIX)
- return -1;
-
- int tempValue = radix;
-
- if (c >= '0' && c <= '9')
- tempValue = c - '0';
- else if (c >= 'a' && c <= 'z')
- tempValue = c - 'a' + 10;
- else if (c >= 'A' && c <= 'Z')
- tempValue = c - 'A' + 10;
-
- return tempValue < radix ? tempValue : -1;
-}
-
-int android::Unicode::getNumericValue(UChar32 c)
-{
- if (isMirrored(c))
- return -1;
-
- return (int) CharacterData::NUMERICS[((getPackedData(c) >> NUMERIC_SHIFT) & NUMERIC_MASK)];
-}
-
-UChar32 android::Unicode::toLower(UChar32 c)
-{
- return c + CharacterData::LCDIFF[(getPackedData(c) >> TOLOWER_SHIFT) & TOLOWER_MASK];
-}
-
-UChar32 android::Unicode::toUpper(UChar32 c)
-{
- return c + CharacterData::UCDIFF[(getPackedData(c) >> TOUPPER_SHIFT) & TOUPPER_MASK];
-}
-
android::Unicode::Direction android::Unicode::getDirectionality(UChar32 c)
{
uint32_t data = getPackedData(c);
@@ -179,15 +130,3 @@
return c + CharacterData::MIRROR_DIFF[(getPackedData(c) >> MIRROR_SHIFT) & MIRROR_MASK];
}
-
-UChar32 android::Unicode::toTitle(UChar32 c)
-{
- int32_t diff = CharacterData::TCDIFF[(getPackedData(c) >> TOTITLE_SHIFT) & TOTITLE_MASK];
-
- if (TOTITLE_MASK == diff)
- return toUpper(c);
-
- return c + diff;
-}
-
-