diff options
author | 2020-06-17 14:00:34 +0000 | |
---|---|---|
committer | 2020-06-17 14:00:34 +0000 | |
commit | d82080094ee47f1d24bdd4a537228ca0a9aa9f8b (patch) | |
tree | 59941b45a96645f52fcfe0b4c6469aff090d5f5c | |
parent | f21036b4e7bd6cb9a91cba2aca57764b1592d386 (diff) | |
parent | e1f741becf229a1edc1b25d7d6bbe97a08215ad5 (diff) |
Merge "Revert "Add logs that indicate why a surface is invalid"" into rvc-dev
-rw-r--r-- | core/java/android/view/SurfaceControl.java | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 6f73e8985a8a..e455155a319e 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -230,7 +230,6 @@ public final class SurfaceControl implements Parcelable { */ public long mNativeObject; private long mNativeHandle; - private Throwable mReleaseStack = null; // TODO: Move this to native. private final Object mSizeLock = new Object(); @@ -442,13 +441,6 @@ public final class SurfaceControl implements Parcelable { } mNativeObject = nativeObject; mNativeHandle = mNativeObject != 0 ? nativeGetHandle(nativeObject) : 0; - if (mNativeObject == 0) { - if (Build.IS_DEBUGGABLE) { - mReleaseStack = new Throwable("assigned zero nativeObject here"); - } - } else { - mReleaseStack = null; - } } /** @@ -1024,22 +1016,11 @@ public final class SurfaceControl implements Parcelable { nativeRelease(mNativeObject); mNativeObject = 0; mNativeHandle = 0; - if (Build.IS_DEBUGGABLE) { - mReleaseStack = new Throwable("released here"); - } mCloseGuard.close(); } } /** - * Returns the call stack that assigned mNativeObject to zero. - * @hide - */ - public Throwable getReleaseStack() { - return mReleaseStack; - } - - /** * Disconnect any client still connected to the surface. * @hide */ @@ -1050,11 +1031,8 @@ public final class SurfaceControl implements Parcelable { } private void checkNotReleased() { - if (mNativeObject == 0) { - Log.wtf(TAG, "Invalid " + this + " caused by:", mReleaseStack); - throw new NullPointerException( - "mNativeObject of " + this + " is null. Have you called release() already?"); - } + if (mNativeObject == 0) throw new NullPointerException( + "Invalid " + this + ", mNativeObject is null. Have you called release() already?"); } /** |