multiple additions and fixes for the Java APIs

Stuff needed for WhatsApp support
This commit is contained in:
Julian Winkler
2024-06-24 18:44:31 +02:00
committed by Mis012
parent ef77bb287a
commit 3c5a21357d
53 changed files with 357 additions and 43 deletions

View File

@@ -4,4 +4,12 @@ public interface Editable extends CharSequence {
public class Factory {}
public Editable replace(int start, int end, CharSequence source, int destoff, int destlen);
public Editable replace(int start, int end, CharSequence text);
public InputFilter[] getFilters();
public void setFilters(InputFilter[] filters);
}

View File

@@ -3,6 +3,8 @@ package android.text;
import java.util.Locale;
import java.util.regex.Pattern;
import com.android.internal.util.ArrayUtils;
public class TextUtils {
public static int getLayoutDirectionFromLocale(Locale locale) {
return 0 /*LTR*/; // FIXME
@@ -236,8 +238,8 @@ public class TextUtils {
sTemp = null;
}
// if (buf == null || buf.length < len)
// buf = ArrayUtils.newUnpaddedCharArray(len);
if (buf == null || buf.length < len)
buf = ArrayUtils.newUnpaddedCharArray(len);
return buf;
}

View File

@@ -0,0 +1,4 @@
package android.text.style;
public class DynamicDrawableSpan {
}

View File

@@ -0,0 +1,8 @@
package android.text.style;
import android.graphics.drawable.Drawable;
public class ImageSpan extends DynamicDrawableSpan {
public ImageSpan(Drawable d) {}
}

View File

@@ -0,0 +1,8 @@
package android.text.style;
import android.content.Context;
public class TextAppearanceSpan {
public TextAppearanceSpan(Context context, int resId) {}
}

View File

@@ -0,0 +1,4 @@
package android.text.style;
public class UnderlineSpan {
}