OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix CTS TextViewTest
[android-x86/frameworks-base.git]
/
core
/
java
/
android
/
widget
/
TextView.java
diff --git
a/core/java/android/widget/TextView.java
b/core/java/android/widget/TextView.java
index
50e6393
..
b482d47
100644
(file)
--- a/
core/java/android/widget/TextView.java
+++ b/
core/java/android/widget/TextView.java
@@
-2025,7
+2025,7
@@
public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final boolean italic = (style & Typeface.ITALIC) != 0;
setTypeface(Typeface.create(typeface, weight, italic));
} else {
final boolean italic = (style & Typeface.ITALIC) != 0;
setTypeface(Typeface.create(typeface, weight, italic));
} else {
- setTypeface(
Typeface.create(typeface, style)
);
+ setTypeface(
typeface, style
);
}
}
}
}
@@
-2111,7
+2111,7
@@
public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
*/
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
*/
- public void setTypeface(
Typeface tf,
int style) {
+ public void setTypeface(
@Nullable Typeface tf, @Typeface.Style
int style) {
if (style > 0) {
if (tf == null) {
tf = Typeface.defaultFromStyle(style);
if (style > 0) {
if (tf == null) {
tf = Typeface.defaultFromStyle(style);
@@
-3896,7
+3896,7
@@
public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
*/
* @attr ref android.R.styleable#TextView_typeface
* @attr ref android.R.styleable#TextView_textStyle
*/
- public void setTypeface(Typeface tf) {
+ public void setTypeface(
@Nullable
Typeface tf) {
if (mTextPaint.getTypeface() != tf) {
mTextPaint.setTypeface(tf);
if (mTextPaint.getTypeface() != tf) {
mTextPaint.setTypeface(tf);