am 59993d9b: Merge "Avoid NPE in WebTextView.lineUpScroll -> Touch.getMaxScrollX" into gingerbread
Merge commit '59993d9bc589089e6be55371c6536a42afe21a64' into gingerbread-plus-aosp * commit '59993d9bc589089e6be55371c6536a42afe21a64': Avoid NPE in WebTextView.lineUpScroll -> Touch.getMaxScrollX
This commit is contained in:
@@ -28,6 +28,7 @@ import android.graphics.Rect;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.InputFilter;
|
import android.text.InputFilter;
|
||||||
|
import android.text.Layout;
|
||||||
import android.text.Selection;
|
import android.text.Selection;
|
||||||
import android.text.Spannable;
|
import android.text.Spannable;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
@@ -292,8 +293,9 @@ import java.util.ArrayList;
|
|||||||
* Ensure that the underlying textfield is lined up with the WebTextView.
|
* Ensure that the underlying textfield is lined up with the WebTextView.
|
||||||
*/
|
*/
|
||||||
private void lineUpScroll() {
|
private void lineUpScroll() {
|
||||||
if (mWebView != null) {
|
Layout layout = getLayout();
|
||||||
float maxScrollX = Touch.getMaxScrollX(this, getLayout(), mScrollY);
|
if (mWebView != null && layout != null) {
|
||||||
|
float maxScrollX = Touch.getMaxScrollX(this, layout, mScrollY);
|
||||||
if (DebugFlags.WEB_TEXT_VIEW) {
|
if (DebugFlags.WEB_TEXT_VIEW) {
|
||||||
Log.v(LOGTAG, "onTouchEvent x=" + mScrollX + " y="
|
Log.v(LOGTAG, "onTouchEvent x=" + mScrollX + " y="
|
||||||
+ mScrollY + " maxX=" + maxScrollX);
|
+ mScrollY + " maxX=" + maxScrollX);
|
||||||
|
|||||||
Reference in New Issue
Block a user