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

Commit f0fcf8c8 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Fix android.util.CloseGuard sample usage" am: 73815250 am: 66b0e7d1 am: 16257918

Change-Id: I23ca1a8ca61e62b20c5b5eff0c7e9ef10c2e6711
parents 06888f4a 16257918
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.
 *       }