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

Commit ab2c291b authored by David Su's avatar David Su
Browse files

CloseGuard: Fix JavaDoc code sample to use correct API

The code sample in the JavaDoc shows
`CloseGuard.get()` to create a new CloseGuard,
which is incorrect.
The correct API is `new CloseGuard()`.

Bug: 148291235
Test: compiles
Change-Id: I1dd24fff150e671007b67c023b20e078557f2966
parent bd9ff621
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import android.annotation.NonNull;
 * A simple example: <pre>   {@code
 *   class Foo {
 *
 *       private final CloseGuard guard = CloseGuard.get();
 *       private final CloseGuard guard = new CloseGuard();
 *
 *       ...
 *
@@ -64,7 +64,7 @@ import android.annotation.NonNull;
 * be deferred. For example: <pre>   {@code
 *   class Bar {
 *
 *       private final CloseGuard guard = CloseGuard.get();
 *       private final CloseGuard guard = new CloseGuard();
 *
 *       ...
 *