| Chunk |
|---|
| Conflicting content |
|---|
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; <<<<<<< HEAD import java.io.IOException; import java.io.InputStreamReader; import java.net.URLDecoder; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; ======= import java.net.URLDecoder; import java.util.ArrayList; import java.util.HashMap; >>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186 import java.util.List; import java.util.Map; import java.util.Set; |
| Solution content |
|---|
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.URLDecoder; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.content.ClipboardManager; import android.content.Context; import android.content.DialogInterface; <<<<<<< HEAD import android.content.IntentFilter; import android.content.DialogInterface.OnCancelListener; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.Intent; ======= import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.content.pm.PackageManager; import android.content.res.Resources; >>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186 import android.database.DataSetObserver; import android.graphics.Bitmap; import android.graphics.Canvas; |
| Solution content |
|---|
import android.content.ClipboardManager; import android.content.Context; import android.content.DialogInterface; import android.content.IntentFilter; import android.content.DialogInterface.OnCancelListener; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.Intent; import android.database.DataSetObserver; import android.graphics.Bitmap; import android.graphics.Canvas; |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.graphics.drawable.Drawable; import android.net.Uri; import android.net.http.SslCertificate; <<<<<<< HEAD import android.os.AsyncTask; ======= >>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186 import android.os.Bundle; import android.os.Handler; import android.os.Message; |
| Solution content |
|---|
import android.graphics.drawable.Drawable; import android.net.Uri; import android.net.http.SslCertificate; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.Message; |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.CheckedTextView; <<<<<<< HEAD ======= import android.widget.EdgeGlow; import android.widget.FrameLayout; >>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186 import android.widget.LinearLayout; import android.widget.ListView; import android.widget.Scroller; |
| Solution content |
|---|
import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.CheckedTextView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.Scroller; |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
import android.widget.ListView; import android.widget.Scroller; import android.widget.Toast; <<<<<<< HEAD import junit.framework.Assert; ======= import android.widget.ZoomButtonsController; import android.widget.ZoomControls; >>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186 import java.io.File; import java.io.FileInputStream; |
| Solution content |
|---|
import android.widget.ListView; import android.widget.Scroller; import android.widget.Toast; import junit.framework.Assert; import java.io.File; import java.io.FileInputStream; |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
private int mHorizontalScrollBarMode = SCROLLBAR_AUTO;
private int mVerticalScrollBarMode = SCROLLBAR_AUTO;
<<<<<<< HEAD
// the alias via which accessibility JavaScript interface is exposed
private static final String ALIAS_ACCESSIBILITY_JS_INTERFACE = "accessibility";
// JavaScript to inject the script chooser which will
// pick the right script for the current URL
private static final String ACCESSIBILITY_SCRIPT_CHOOSER_JAVASCRIPT =
"javascript:(function() {" +
" var chooser = document.createElement('script');" +
" chooser.type = 'text/javascript';" +
" chooser.src = 'https://ssl.gstatic.com/accessibility/javascript/android/AndroidScriptChooser.user.js';" +
" document.getElementsByTagName('head')[0].appendChild(chooser);" +
" })();";
=======
/**
* Max distance to overscroll by in pixels.
* This how far content can be pulled beyond its normal bounds by the user.
*/
private int mOverscrollDistance;
/**
* Max distance to overfling by in pixels.
* This is how far flinged content can move beyond the end of its normal bounds.
*/
private int mOverflingDistance;
/*
* These manage the edge glow effect when flung or pulled beyond the edges.
* If one is not null, all are not null. Checking one for null is as good as checking each.
*/
private EdgeGlow mEdgeGlowTop;
private EdgeGlow mEdgeGlowBottom;
private EdgeGlow mEdgeGlowLeft;
private EdgeGlow mEdgeGlowRight;
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
// Used to match key downs and key ups
private boolean mGotKeyDown; |
| Solution content |
|---|
private int mHorizontalScrollBarMode = SCROLLBAR_AUTO;
private int mVerticalScrollBarMode = SCROLLBAR_AUTO;
// the alias via which accessibility JavaScript interface is exposed
private static final String ALIAS_ACCESSIBILITY_JS_INTERFACE = "accessibility";
// JavaScript to inject the script chooser which will
// pick the right script for the current URL
private static final String ACCESSIBILITY_SCRIPT_CHOOSER_JAVASCRIPT =
"javascript:(function() {" +
" var chooser = document.createElement('script');" +
" chooser.type = 'text/javascript';" +
" chooser.src = 'https://ssl.gstatic.com/accessibility/javascript/android/AndroidScriptChooser.user.js';" +
" document.getElementsByTagName('head')[0].appendChild(chooser);" +
" })();";
// Used to match key downs and key ups
private boolean mGotKeyDown; |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Chunk |
|---|
| Conflicting content |
|---|
}
/**
mNavSlop = (int) (16 * density);
mZoomManager.init(density);
mMaximumFling = configuration.getScaledMaximumFlingVelocity();
<<<<<<< HEAD
// Compute the inverse of the density squared.
DRAG_LAYER_INVERSE_DENSITY_SQUARED = 1 / (density * density);
* Exposes accessibility APIs to JavaScript by appending them to the JavaScript
* interfaces map provided by the WebView client. In case of conflicting
* alias with the one of the accessibility API the user specified one wins.
*
* @param javascriptInterfaces A map with interfaces to be exposed to JavaScript.
*/
private void exposeAccessibilityJavaScriptApi(Map |
| Solution content |
|---|
mNavSlop = (int) (16 * density);
mZoomManager.init(density);
mMaximumFling = configuration.getScaledMaximumFlingVelocity();
// Compute the inverse of the density squared.
DRAG_LAYER_INVERSE_DENSITY_SQUARED = 1 / (density * density);
}
/**
* Exposes accessibility APIs to JavaScript by appending them to the JavaScript
* interfaces map provided by the WebView client. In case of conflicting
* alias with the one of the accessibility API the user specified one wins.
*
* @param javascriptInterfaces A map with interfaces to be exposed to JavaScript.
*/
private void exposeAccessibilityJavaScriptApi(Map |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
scrollBar.draw(canvas);
}
<<<<<<< HEAD
=======
@Override
protected void onOverscrolled(int scrollX, int scrollY, boolean clampedX,
boolean clampedY) {
mInOverScrollMode = false;
int maxX = computeMaxScrollX();
if (maxX == 0) {
// do not over scroll x if the page just fits the screen
scrollX = pinLocX(scrollX);
} else if (scrollX < 0 || scrollX > maxX) {
mInOverScrollMode = true;
}
if (scrollY < 0 || scrollY > computeMaxScrollY()) {
mInOverScrollMode = true;
}
if ((clampedX && maxX > 0) || clampedY) {
// Hitting a scroll barrier breaks velocity; don't fling further.
mVelocityTracker.clear();
mLastVelocity = 0;
}
super.scrollTo(scrollX, scrollY);
}
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
/**
* Get the url for the current page. This is not always the same as the url
* passed to WebViewClient.onPageStarted because although the load for |
| Solution content |
|---|
scrollBar.draw(canvas);
}
/**
* Get the url for the current page. This is not always the same as the url
* passed to WebViewClient.onPageStarted because although the load for |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
}
if (mScroller.computeScrollOffset()) {
int oldX = mScrollX;
int oldY = mScrollY;
<<<<<<< HEAD
mScrollX = mScroller.getCurrX();
mScrollY = mScroller.getCurrY();
postInvalidate(); // So we draw again
if (oldX != mScrollX || oldY != mScrollY) {
onScrollChanged(mScrollX, mScrollY, oldX, oldY);
} else {
abortAnimation();
mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
WebViewCore.resumePriority();
WebViewCore.resumeUpdatePicture(mWebViewCore);
=======
int x = mScroller.getCurrX();
int y = mScroller.getCurrY();
invalidate(); // So we draw again
if (oldX != x || oldY != y) {
final int rangeX = computeMaxScrollX();
final int rangeY = computeMaxScrollY();
overscrollBy(x - oldX, y - oldY, oldX, oldY,
rangeX, rangeY,
mOverflingDistance, mOverflingDistance, false);
if (mEdgeGlowTop != null) {
if (rangeY > 0 || getOverscrollMode() == OVERSCROLL_ALWAYS) {
if (y < 0 && oldY >= 0) {
mEdgeGlowTop.onAbsorb((int) mScroller.getCurrVelocity());
} else if (y > rangeY && oldY <= rangeY) {
mEdgeGlowBottom.onAbsorb((int) mScroller.getCurrVelocity());
}
}
if (rangeX > 0) {
if (x < 0 && oldX >= 0) {
mEdgeGlowLeft.onAbsorb((int) mScroller.getCurrVelocity());
} else if (x > rangeX && oldX <= rangeX) {
mEdgeGlowRight.onAbsorb((int) mScroller.getCurrVelocity());
}
}
}
}
if (mScroller.isFinished()) {
mPrivateHandler.sendEmptyMessage(RESUME_WEBCORE_PRIORITY);
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
} else {
super.computeScroll(); |
| Solution content |
|---|
if (mScroller.computeScrollOffset()) {
int oldX = mScrollX;
int oldY = mScrollY;
mScrollX = mScroller.getCurrX();
mScrollY = mScroller.getCurrY();
postInvalidate(); // So we draw again
if (oldX != mScrollX || oldY != mScrollY) {
onScrollChanged(mScrollX, mScrollY, oldX, oldY);
} else {
abortAnimation();
mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
WebViewCore.resumePriority();
WebViewCore.resumeUpdatePicture(mWebViewCore);
}
} else {
super.computeScroll(); |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
}
int saveCount = canvas.save();
<<<<<<< HEAD
=======
if (mInOverScrollMode && !getSettings()
.getUseWebViewBackgroundForOverscrollBackground()) {
if (mOverScrollBackground == null) {
mOverScrollBackground = new Paint();
Bitmap bm = BitmapFactory.decodeResource(
mContext.getResources(),
com.android.internal.R.drawable.status_bar_background);
mOverScrollBackground.setShader(new BitmapShader(bm,
Shader.TileMode.REPEAT, Shader.TileMode.REPEAT));
mOverScrollBorder = new Paint();
mOverScrollBorder.setStyle(Paint.Style.STROKE);
mOverScrollBorder.setStrokeWidth(0);
mOverScrollBorder.setColor(0xffbbbbbb);
}
int top = 0;
int right = computeRealHorizontalScrollRange();
int bottom = top + computeRealVerticalScrollRange();
// first draw the background and anchor to the top of the view
canvas.save();
canvas.translate(mScrollX, mScrollY);
canvas.clipRect(-mScrollX, top - mScrollY, right - mScrollX, bottom
- mScrollY, Region.Op.DIFFERENCE);
canvas.drawPaint(mOverScrollBackground);
canvas.restore();
// then draw the border
canvas.drawRect(-1, top - 1, right, bottom, mOverScrollBorder);
// next clip the region for the content
canvas.clipRect(0, top, right, bottom);
}
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
if (mTitleBar != null) {
canvas.translate(0, (int) mTitleBar.getHeight());
} |
| Solution content |
|---|
}
int saveCount = canvas.save();
if (mTitleBar != null) {
canvas.translate(0, (int) mTitleBar.getHeight());
} |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
private void doDrag(int deltaX, int deltaY) {
if ((deltaX | deltaY) != 0) {
<<<<<<< HEAD
if (mTouchMode == TOUCH_DRAG_LAYER_MODE) {
deltaX = viewToContentDimension(deltaX);
deltaY = viewToContentDimension(deltaY);
if (nativeScrollLayer(mScrollingLayer, deltaX, deltaY)) {
invalidate();
=======
final int oldX = mScrollX;
final int oldY = mScrollY;
final int rangeX = computeMaxScrollX();
final int rangeY = computeMaxScrollY();
overscrollBy(deltaX, deltaY, oldX, oldY,
rangeX, rangeY,
mOverscrollDistance, mOverscrollDistance, true);
if (mEdgeGlowTop != null) {
// Don't show left/right glows if we fit the whole content.
if (rangeX > 0) {
final int pulledToX = oldX + deltaX;
if (pulledToX < 0) {
mEdgeGlowLeft.onPull((float) deltaX / getWidth());
} else if (pulledToX > rangeX) {
mEdgeGlowRight.onPull((float) deltaX / getWidth());
}
}
if (rangeY > 0 || getOverscrollMode() == OVERSCROLL_ALWAYS) {
final int pulledToY = oldY + deltaY;
if (pulledToY < 0) {
mEdgeGlowTop.onPull((float) deltaY / getHeight());
} else if (pulledToY > rangeY) {
mEdgeGlowBottom.onPull((float) deltaY / getHeight());
}
}
}
}
if (!getSettings().getBuiltInZoomControls()) {
boolean showPlusMinus = mMinZoomScale < mMaxZoomScale;
if (mZoomControls != null && showPlusMinus) {
if (mZoomControls.getVisibility() == View.VISIBLE) {
mPrivateHandler.removeCallbacks(mZoomControlRunnable);
} else {
mZoomControls.show(showPlusMinus, false);
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
}
return;
} |
| Solution content |
|---|
private void doDrag(int deltaX, int deltaY) {
if ((deltaX | deltaY) != 0) {
if (mTouchMode == TOUCH_DRAG_LAYER_MODE) {
deltaX = viewToContentDimension(deltaX);
deltaY = viewToContentDimension(deltaY);
if (nativeScrollLayer(mScrollingLayer, deltaX, deltaY)) {
invalidate();
}
return;
} |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mVelocityTracker.recycle();
mVelocityTracker = null;
}
<<<<<<< HEAD
if (mTouchMode == TOUCH_DRAG_MODE ||
mTouchMode == TOUCH_DRAG_LAYER_MODE) {
=======
// Release any pulled glows
if (mEdgeGlowTop != null) {
mEdgeGlowTop.onRelease();
mEdgeGlowBottom.onRelease();
mEdgeGlowLeft.onRelease();
mEdgeGlowRight.onRelease();
}
if (mTouchMode == TOUCH_DRAG_MODE) {
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
WebViewCore.resumePriority();
WebViewCore.resumeUpdatePicture(mWebViewCore);
} |
| Solution content |
|---|
mVelocityTracker.recycle();
mVelocityTracker = null;
}
if (mTouchMode == TOUCH_DRAG_MODE ||
mTouchMode == TOUCH_DRAG_LAYER_MODE) {
WebViewCore.resumePriority();
WebViewCore.resumeUpdatePicture(mWebViewCore);
} |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Chunk |
|---|
| Conflicting content |
|---|
public void flingScroll(int vx, int vy) {
mScroller.fling(mScrollX, mScrollY, vx, vy, 0, computeMaxScrollX(), 0,
<<<<<<< HEAD
computeMaxScrollY());
=======
computeMaxScrollY(), mOverflingDistance, mOverflingDistance);
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
invalidate();
}
|
| Solution content |
|---|
public void flingScroll(int vx, int vy) {
mScroller.fling(mScrollX, mScrollY, vx, vy, 0, computeMaxScrollX(), 0,
computeMaxScrollY());
invalidate();
}
|
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
}
mLastVelX = vx;
mLastVelY = vy;
<<<<<<< HEAD
mLastVelocity = velocity;
mScroller.fling(mScrollX, mScrollY, -vx, -vy, 0, maxX, 0, maxY);
=======
mLastVelocity = (float) Math.hypot(vx, vy);
// no horizontal overscroll if the content just fits
mScroller.fling(mScrollX, mScrollY, -vx, -vy, 0, maxX, 0, maxY,
maxX == 0 ? 0 : mOverflingDistance, mOverflingDistance);
// Duration is calculated based on velocity. With range boundaries and overscroll
// we may not know how long the final animation will take. (Hence the deprecation
// warning on the call below.) It's not a big deal for scroll bars but if webcore
// resumes during this effect we will take a performance hit. See computeScroll;
// we resume webcore there when the animation is finished.
>>>>>>> 6fb81376b6e062d9b0ce4d91e23c2a88572b8186
final int time = mScroller.getDuration();
awakenScrollBars(time);
invalidate(); |
| Solution content |
|---|
}
mLastVelX = vx;
mLastVelY = vy;
mLastVelocity = velocity;
mScroller.fling(mScrollX, mScrollY, -vx, -vy, 0, maxX, 0, maxY);
final int time = mScroller.getDuration();
mPrivateHandler.sendEmptyMessageDelayed(RESUME_WEBCORE_PRIORITY, time);
awakenScrollBars(time);
invalidate(); |
| File |
|---|
| WebView.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Cast expression |
| Comment |
| Method invocation |
| Variable |