Methods Summary |
---|
protected void | finalize()
try {
nativeDestructor(mNativeEmojiFactory);
} finally {
super.finalize();
}
|
public java.lang.String | getAndroidPuaFromVendorSpecificPua(java.lang.String vspString)
if (vspString == null) {
return null;
}
int minVsp = nativeGetMinimumVendorSpecificPua(mNativeEmojiFactory);
int maxVsp = nativeGetMaximumVendorSpecificPua(mNativeEmojiFactory);
int len = vspString.length();
int[] codePoints = new int[vspString.codePointCount(0, len)];
int new_len = 0;
for (int i = 0; i < len; i = vspString.offsetByCodePoints(i, 1), new_len++) {
int codePoint = vspString.codePointAt(i);
if (minVsp <= codePoint && codePoint <= maxVsp) {
int newCodePoint = getAndroidPuaFromVendorSpecificPua(codePoint);
if (newCodePoint > 0) {
codePoints[new_len] = newCodePoint;
continue;
}
}
codePoints[new_len] = codePoint;
}
return new String(codePoints, 0, new_len);
|
public int | getAndroidPuaFromVendorSpecificPua(int vsp)Returns Unicode PUA for Android corresponding to the vendor specific Unicode.
return nativeGetAndroidPuaFromVendorSpecificPua(mNativeEmojiFactory, vsp);
|
public int | getAndroidPuaFromVendorSpecificSjis(char sjis)Returns Unicode PUA for Android corresponding to the vendor specific sjis.
return nativeGetAndroidPuaFromVendorSpecificSjis(mNativeEmojiFactory, sjis);
|
public synchronized android.graphics.Bitmap | getBitmapFromAndroidPua(int pua)Returns Bitmap object corresponding to the AndroidPua.
Note that each Bitmap is cached by this class, which means that, if you modify a
Bitmap object (using setPos() method), all same emoji Bitmap will be modified.
If it is unacceptable, please copy the object before modifying it.
WeakReference<Bitmap> cache = mCache.get(pua);
if (cache == null) {
Bitmap ret = nativeGetBitmapFromAndroidPua(mNativeEmojiFactory, pua);
// There is no need to cache returned null, since in most cases it means there
// is no map from the AndroidPua to a specific image. In other words, it usually does
// not include the cost of creating Bitmap object.
if (ret != null) {
mCache.put(pua, new WeakReference<Bitmap>(ret));
}
return ret;
} else {
Bitmap tmp = cache.get();
if (tmp == null) {
Bitmap ret = nativeGetBitmapFromAndroidPua(mNativeEmojiFactory, pua);
mCache.put(pua, new WeakReference<Bitmap>(ret));
return ret;
} else {
return tmp;
}
}
|
public synchronized android.graphics.Bitmap | getBitmapFromVendorSpecificPua(int vsp)Returns Bitmap object corresponding to the vendor specific Unicode.
See comments in getBitmapFromAndroidPua().
return getBitmapFromAndroidPua(getAndroidPuaFromVendorSpecificPua(vsp));
|
public synchronized android.graphics.Bitmap | getBitmapFromVendorSpecificSjis(char sjis)Returns Bitmap object corresponding to the vendor specified sjis.
See comments in getBitmapFromAndroidPua().
return getBitmapFromAndroidPua(getAndroidPuaFromVendorSpecificSjis(sjis));
|
public int | getMaximumAndroidPua()Returns the highest code point corresponding to an Android
emoji character.
return nativeGetMaximumAndroidPua(mNativeEmojiFactory);
|
public int | getMinimumAndroidPua()Returns the lowest code point corresponding to an Android
emoji character.
return nativeGetMinimumAndroidPua(mNativeEmojiFactory);
|
public int | getVendorSpecificPuaFromAndroidPua(int pua)Returns vendor specific Unicode corresponding to the Unicode AndroidPua.
return nativeGetVendorSpecificPuaFromAndroidPua(mNativeEmojiFactory, pua);
|
public java.lang.String | getVendorSpecificPuaFromAndroidPua(java.lang.String puaString)
if (puaString == null) {
return null;
}
int minVsp = nativeGetMinimumAndroidPua(mNativeEmojiFactory);
int maxVsp = nativeGetMaximumAndroidPua(mNativeEmojiFactory);
int len = puaString.length();
int[] codePoints = new int[puaString.codePointCount(0, len)];
int new_len = 0;
for (int i = 0; i < len; i = puaString.offsetByCodePoints(i, 1), new_len++) {
int codePoint = puaString.codePointAt(i);
if (minVsp <= codePoint && codePoint <= maxVsp) {
int newCodePoint = getVendorSpecificPuaFromAndroidPua(codePoint);
if (newCodePoint > 0) {
codePoints[new_len] = newCodePoint;
continue;
}
}
codePoints[new_len] = codePoint;
}
return new String(codePoints, 0, new_len);
|
public int | getVendorSpecificSjisFromAndroidPua(int pua)Returns vendor specific sjis corresponding to the Unicode AndroidPua.
return nativeGetVendorSpecificSjisFromAndroidPua(mNativeEmojiFactory, pua);
|
public java.lang.String | name()
return mName;
|
private native void | nativeDestructor(long nativeEmojiFactory)
|
private native int | nativeGetAndroidPuaFromVendorSpecificPua(long nativeEmojiFactory, int vsp)
|
private native int | nativeGetAndroidPuaFromVendorSpecificSjis(long nativeEmojiFactory, char sjis)
|
private native android.graphics.Bitmap | nativeGetBitmapFromAndroidPua(long nativeEmojiFactory, int AndroidPua)
|
private native int | nativeGetMaximumAndroidPua(long nativeEmojiFactory)
|
private native int | nativeGetMaximumVendorSpecificPua(long nativeEmojiFactory)
|
private native int | nativeGetMinimumAndroidPua(long nativeEmojiFactory)
|
private native int | nativeGetMinimumVendorSpecificPua(long nativeEmojiFactory)
|
private native int | nativeGetVendorSpecificPuaFromAndroidPua(long nativeEmojiFactory, int pua)
|
private native int | nativeGetVendorSpecificSjisFromAndroidPua(long nativeEmojiFactory, int pua)
|
public static native android.emoji.EmojiFactory | newAvailableInstance()Constructs an instance of available EmojiFactory.
|
public static native android.emoji.EmojiFactory | newInstance(java.lang.String class_name)Constructs an instance of EmojiFactory corresponding to the name.
|