| Chunk |
|---|
| Conflicting content |
|---|
import org.geometerplus.zlibrary.ui.android.R; import org.geometerplus.zlibrary.ui.android.library.*; <<<<<<< HEAD ======= import org.geometerplus.zlibrary.ui.android.view.AndroidFontUtil; >>>>>>> 2eedebf82058fc562914e8e082cf10c376b1c961 import org.geometerplus.fbreader.fbreader.ActionCode; import org.geometerplus.fbreader.fbreader.FBReaderApp; |
| Solution content |
|---|
import org.geometerplus.zlibrary.ui.android.R; import org.geometerplus.zlibrary.ui.android.library.*; import org.geometerplus.zlibrary.ui.android.view.AndroidFontUtil; import org.geometerplus.fbreader.fbreader.ActionCode; import org.geometerplus.fbreader.fbreader.FBReaderApp; |
| File |
|---|
| FBReader.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import org.geometerplus.fbreader.Paths;
public final class AndroidFontUtil {
<<<<<<< HEAD
=======
private static Method ourFontCreationMethod;
static {
try {
ourFontCreationMethod = Typeface.class.getMethod("createFromFile", File.class);
} catch (NoSuchMethodException e) {
ourFontCreationMethod = null;
}
}
public static boolean areExternalFontsSupported() {
return ourFontCreationMethod != null;
}
private static Typeface createFontFromFile(File file) {
if (ourFontCreationMethod == null) {
return null;
}
try {
return (Typeface)ourFontCreationMethod.invoke(null, file);
} catch (IllegalAccessException e) {
return null;
} catch (InvocationTargetException e) {
return null;
}
}
>>>>>>> 2eedebf82058fc562914e8e082cf10c376b1c961
private static Map |
| Solution content |
|---|
import org.geometerplus.fbreader.Paths;
public final class AndroidFontUtil {
private static Map |
| File |
|---|
| AndroidFontUtil.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method declaration |
| Static initializer |
| Chunk |
|---|
| Conflicting content |
|---|
private static Set |
| Solution content |
|---|
private static Set |
| File |
|---|
| AndroidFontUtil.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Method signature |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
protected void setFontInternal(String family, int size, boolean bold, boolean italic, boolean underline, boolean strikeThrought) {
<<<<<<< HEAD
family = realFontFamilyName(family);
final int style = (bold ? Typeface.BOLD : 0) | (italic ? Typeface.ITALIC : 0);
Typeface[] typefaces = myTypefaces.get(family);
if (typefaces == null) {
typefaces = new Typeface[4];
myTypefaces.put(family, typefaces);
}
Typeface tf = typefaces[style];
if (tf == null) {
File[] files = AndroidFontUtil.getFontMap(false).get(family);
if (files != null) {
try {
if (files[style] != null) {
tf = Typeface.createFromFile(files[style]);
} else {
for (int i = 0; i < 4; ++i) {
if (files[i] != null) {
tf = (typefaces[i] != null) ?
typefaces[i] : Typeface.createFromFile(files[i]);
typefaces[i] = tf;
break;
}
}
}
} catch (Throwable e) {
}
}
if (tf == null) {
tf = Typeface.create(family, style);
}
typefaces[style] = tf;
}
myTextPaint.setTypeface(tf);
=======
myTextPaint.setTypeface(AndroidFontUtil.typeface(family, bold, italic));
>>>>>>> 2eedebf82058fc562914e8e082cf10c376b1c961
myTextPaint.setTextSize(size);
myTextPaint.setUnderlineText(underline);
myTextPaint.setStrikeThruText(strikeThrought); |
| Solution content |
|---|
@Override
protected void setFontInternal(String family, int size, boolean bold, boolean italic, boolean underline, boolean strikeThrought) {
myTextPaint.setTypeface(AndroidFontUtil.typeface(family, bold, italic));
myTextPaint.setTextSize(size);
myTextPaint.setUnderlineText(underline);
myTextPaint.setStrikeThruText(strikeThrought); |
| File |
|---|
| ZLAndroidPaintContext.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Array access |
| If statement |
| Method invocation |
| Variable |