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

Commit 66b0e7d1 authored by David Su's avatar David Su Committed by android-build-merger
Browse files

Merge "Fix android.util.CloseGuard sample usage"

am: 73815250

Change-Id: I4e69d9638ca69be5896bfeb0c3d950d340294cb5
parents 068a9faf 73815250
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -38,6 +38,11 @@ import android.annotation.NonNull;
 *       public void cleanup() {
 *          guard.close();
 *          ...;
 *          if (Build.VERSION.SDK_INT >= 28) {
 *              Reference.reachabilityFence(this);
 *          }
 *          // For full correctness in the absence of a close() call, other methods may also need
 *          // reachabilityFence() calls.
 *       }
 *
 *       protected void finalize() throws Throwable {
@@ -75,7 +80,9 @@ import android.annotation.NonNull;
 *       public void cleanup() {
 *          guard.close();
 *          ...;
 *          if (Build.VERSION.SDK_INT >= 28) {
 *              Reference.reachabilityFence(this);
 *          }
 *          // For full correctness in the absence of a close() call, other methods may also need
 *          // reachabilityFence() calls.
 *       }