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

Commit 552c4e8d authored by Lee Shombert's avatar Lee Shombert
Browse files

Suppress the missing Executor lint warning

Android API guidelines require an Executor overload for methods that
accept a callback.  The three "beginTransactionWithListener" methods
do not have such an overload (two are from 2009 and one is from
2023). This commit suppresses the lint warning associated with the
2023 API and adds a TODO comment to all three.  The plan is to add the
desired overloads in the next API release.

Test: presubmit (verified that the lint warning is not present)
Flag: DOCS_ONLY
Bug: 340874899
Change-Id: I2361306d9ca68faf339086628bee1aa75127f1bc
parent 281bd529
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -731,6 +731,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
     * commits, or is rolled back, either explicitly or by a call to
     * commits, or is rolled back, either explicitly or by a call to
     * {@link #yieldIfContendedSafely}.
     * {@link #yieldIfContendedSafely}.
     */
     */
    // TODO(340874899) Provide an Executor overload
    public void beginTransactionWithListener(
    public void beginTransactionWithListener(
            @Nullable SQLiteTransactionListener transactionListener) {
            @Nullable SQLiteTransactionListener transactionListener) {
        beginTransaction(transactionListener, true);
        beginTransaction(transactionListener, true);
@@ -760,6 +761,7 @@ public final class SQLiteDatabase extends SQLiteClosable {
     *            transaction begins, commits, or is rolled back, either
     *            transaction begins, commits, or is rolled back, either
     *            explicitly or by a call to {@link #yieldIfContendedSafely}.
     *            explicitly or by a call to {@link #yieldIfContendedSafely}.
     */
     */
    // TODO(340874899) Provide an Executor overload
    public void beginTransactionWithListenerNonExclusive(
    public void beginTransactionWithListenerNonExclusive(
            @Nullable SQLiteTransactionListener transactionListener) {
            @Nullable SQLiteTransactionListener transactionListener) {
        beginTransaction(transactionListener, false);
        beginTransaction(transactionListener, false);
@@ -785,6 +787,8 @@ public final class SQLiteDatabase extends SQLiteClosable {
     *   }
     *   }
     * </pre>
     * </pre>
     */
     */
    // TODO(340874899) Provide an Executor overload
    @SuppressLint("ExecutorRegistration")
    @FlaggedApi(Flags.FLAG_SQLITE_APIS_35)
    @FlaggedApi(Flags.FLAG_SQLITE_APIS_35)
    public void beginTransactionWithListenerReadOnly(
    public void beginTransactionWithListenerReadOnly(
            @Nullable SQLiteTransactionListener transactionListener) {
            @Nullable SQLiteTransactionListener transactionListener) {