diff options
| author | Issei Suzuki <issei@google.com> | 2019-07-03 20:04:48 +0200 |
|---|---|---|
| committer | Issei Suzuki <issei@google.com> | 2019-07-03 20:04:48 +0200 |
| commit | 60557b5bf5deb51ed9e6b131e504a99b400a16e0 (patch) | |
| tree | 45d60d70494435a1be6f5188967b9acad213fe2f /core/java/android/view/SurfaceView.java | |
| parent | defa4d7c4cff45a2afe595957cb076a2e84b272f (diff) | |
Clean up SurfaceView.
Bug: 136538998
Test: no-op refactoring CL. Existing unit tests still pass.
Change-Id: Idd6c5871ed34880a053f3a43ab4f7aa3a466b548
Diffstat (limited to 'core/java/android/view/SurfaceView.java')
| -rw-r--r-- | core/java/android/view/SurfaceView.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 6563e03853fb..fa9949ccd2d5 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -692,7 +692,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb try { redrawNeeded |= visible && !mDrawFinished; - SurfaceHolder.Callback callbacks[] = null; + SurfaceHolder.Callback[] callbacks = null; final boolean surfaceChanged = creating; if (mSurfaceCreated && (surfaceChanged || (!visible && visibleChanged))) { @@ -819,7 +819,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (!isHardwareAccelerated() || !mRtHandlingPositionUpdates) { try { if (DEBUG) Log.d(TAG, String.format("%d updateSurfacePosition UI, " + - "postion = [%d, %d, %d, %d]", System.identityHashCode(this), + "position = [%d, %d, %d, %d]", System.identityHashCode(this), mScreenRect.left, mScreenRect.top, mScreenRect.right, mScreenRect.bottom)); setParentSpaceRectangle(mScreenRect, -1); @@ -842,9 +842,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb mDeferredDestroySurfaceControl = null; } - runOnUiThread(() -> { - performDrawFinished(); - }); + runOnUiThread(this::performDrawFinished); } /** @@ -918,7 +916,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (DEBUG) { Log.d(TAG, String.format( "%d updateSurfacePosition RenderWorker, frameNr = %d, " - + "postion = [%d, %d, %d, %d]", + + "position = [%d, %d, %d, %d]", System.identityHashCode(this), frameNumber, left, top, right, bottom)); } @@ -954,7 +952,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb }; private SurfaceHolder.Callback[] getSurfaceCallbacks() { - SurfaceHolder.Callback callbacks[]; + SurfaceHolder.Callback[] callbacks; synchronized (mCallbacks) { callbacks = new SurfaceHolder.Callback[mCallbacks.size()]; mCallbacks.toArray(callbacks); |
