Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2340)

Unified Diff: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
index 6ad410de1e95f4f416795664534e11886ed0e417..0f0a73852bb3636596a372d746ea7658be7605e0 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
@@ -37,8 +37,8 @@ public class AwTestContainerView extends FrameLayout {
private AwContents mAwContents;
private AwContents.InternalAccessDelegate mInternalAccessDelegate;
- private HardwareView mHardwareView = null;
- private boolean mAttachedContents = false;
+ private HardwareView mHardwareView;
+ private boolean mAttachedContents;
private class HardwareView extends GLSurfaceView {
private static final int MODE_DRAW = 0;
@@ -50,24 +50,24 @@ public class AwTestContainerView extends FrameLayout {
// and drawGL on the rendering thread. The variables following
// are protected by it.
private final Object mSyncLock = new Object();
- private boolean mFunctorAttached = false;
- private boolean mNeedsProcessGL = false;
- private boolean mNeedsDrawGL = false;
- private boolean mWaitForCompletion = false;
- private int mLastScrollX = 0;
- private int mLastScrollY = 0;
+ private boolean mFunctorAttached;
+ private boolean mNeedsProcessGL;
+ private boolean mNeedsDrawGL;
+ private boolean mWaitForCompletion;
+ private int mLastScrollX;
+ private int mLastScrollY;
// Only used by drawGL on render thread to store the value of scroll offsets at most recent
// sync for subsequent draws.
- private int mCommittedScrollX = 0;
- private int mCommittedScrollY = 0;
+ private int mCommittedScrollX;
+ private int mCommittedScrollY;
- private boolean mHaveSurface = false;
- private Runnable mReadyToRenderCallback = null;
- private Runnable mReadyToDetachCallback = null;
+ private boolean mHaveSurface;
+ private Runnable mReadyToRenderCallback;
+ private Runnable mReadyToDetachCallback;
- private long mDrawGL = 0;
- private long mViewContext = 0;
+ private long mDrawGL;
+ private long mViewContext;
public HardwareView(Context context) {
super(context);
@@ -75,8 +75,8 @@ public class AwTestContainerView extends FrameLayout {
getHolder().setFormat(PixelFormat.OPAQUE);
setPreserveEGLContextOnPause(true);
setRenderer(new Renderer() {
- private int mWidth = 0;
- private int mHeight = 0;
+ private int mWidth;
+ private int mHeight;
@Override
public void onDrawFrame(GL10 gl) {
@@ -232,7 +232,7 @@ public class AwTestContainerView extends FrameLayout {
}
}
- private static boolean sCreatedOnce = false;
+ private static boolean sCreatedOnce;
private HardwareView createHardwareViewOnlyOnce(Context context) {
if (sCreatedOnce) return null;
sCreatedOnce = true;

Powered by Google App Engine
This is Rietveld 408576698