Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44ab5750 authored by Robert Carr's avatar Robert Carr
Browse files

SurfaceView: Fix some log spam.

We were throwing relatively harmless NPEs here
and catching them below. The log message when
catching exceptions also needed some updating.
Not assosciated with a particular bug just
noticed in logcat.

Test: Manual
Change-Id: I5f07e6fc8ff3a34318682bf7b6c309fbba4097e4
parent 1f4497c9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -479,6 +479,8 @@ public class SurfaceView extends View {
                            "SurfaceView - " + viewRoot.getTitle().toString(),
                            mSurfaceWidth, mSurfaceHeight, mFormat,
                            mSurfaceFlags);
                } else if (mSurfaceControl == null) {
                    return;
                }

                boolean realSizeChanged = false;
@@ -625,7 +627,7 @@ public class SurfaceView extends View {
                    }
                }
            } catch (Exception ex) {
                Log.e(TAG, "Exception from relayout", ex);
                Log.e(TAG, "Exception configuring surface", ex);
            }
            if (DEBUG) Log.v(
                TAG, "Layout: x=" + mScreenRect.left + " y=" + mScreenRect.top
@@ -662,7 +664,7 @@ public class SurfaceView extends View {
                                mScreenRect.right, mScreenRect.bottom));
                        setParentSpaceRectangle(mScreenRect, -1);
                    } catch (Exception ex) {
                        Log.e(TAG, "Exception from relayout", ex);
                        Log.e(TAG, "Exception configuring surface", ex);
                    }
                }
            }
@@ -762,7 +764,7 @@ public class SurfaceView extends View {
                            mScreenRect.right, mScreenRect.bottom));
                    setParentSpaceRectangle(mScreenRect, frameNumber);
                } catch (Exception ex) {
                    Log.e(TAG, "Exception from relayout", ex);
                    Log.e(TAG, "Exception configuring surface", ex);
                }
            }
            mRTLastReportedPosition.setEmpty();