diff options
| author | 2024-05-17 08:22:37 -0700 | |
|---|---|---|
| committer | 2024-05-17 08:23:56 -0700 | |
| commit | 552c4e8dc75337cf01bfe63dfaf58a515348e66f (patch) | |
| tree | 531f50dc47f3168f018715b6ad384ed010f19123 | |
| parent | 281bd5293840508cbd4550b0ed4cf291fcf07b6a (diff) | |
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
| -rw-r--r-- | core/java/android/database/sqlite/SQLiteDatabase.java | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index d683d72f17be..1eb466cb10a3 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -731,6 +731,7 @@ public final class SQLiteDatabase extends SQLiteClosable {       * commits, or is rolled back, either explicitly or by a call to       * {@link #yieldIfContendedSafely}.       */ +    // TODO(340874899) Provide an Executor overload      public void beginTransactionWithListener(              @Nullable SQLiteTransactionListener transactionListener) {          beginTransaction(transactionListener, true); @@ -760,6 +761,7 @@ public final class SQLiteDatabase extends SQLiteClosable {       *            transaction begins, commits, or is rolled back, either       *            explicitly or by a call to {@link #yieldIfContendedSafely}.       */ +    // TODO(340874899) Provide an Executor overload      public void beginTransactionWithListenerNonExclusive(              @Nullable SQLiteTransactionListener transactionListener) {          beginTransaction(transactionListener, false); @@ -785,6 +787,8 @@ public final class SQLiteDatabase extends SQLiteClosable {       *   }       * </pre>       */ +    // TODO(340874899) Provide an Executor overload +    @SuppressLint("ExecutorRegistration")      @FlaggedApi(Flags.FLAG_SQLITE_APIS_35)      public void beginTransactionWithListenerReadOnly(              @Nullable SQLiteTransactionListener transactionListener) { |