Loading core/java/android/database/BulkCursorNative.java +13 −7 Original line number Diff line number Diff line Loading @@ -212,9 +212,16 @@ final class BulkCursorProxy implements IBulkCursor { Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(CLOSE_TRANSACTION, data, reply, 0); // If close() is being called from the finalizer thread, do not wait for a reply from // the remote side. final boolean fromFinalizer = android.database.sqlite.Flags.onewayFinalizerClose() && "FinalizerDaemon".equals(Thread.currentThread().getName()); mRemote.transact(CLOSE_TRANSACTION, data, reply, fromFinalizer ? IBinder.FLAG_ONEWAY: 0); if (!fromFinalizer) { DatabaseUtils.readExceptionFromParcel(reply); } } finally { data.recycle(); reply.recycle(); Loading Loading @@ -282,4 +289,3 @@ final class BulkCursorProxy implements IBulkCursor { } } } core/java/android/database/sqlite/flags.aconfig +7 −0 Original line number Diff line number Diff line package: "android.database.sqlite" container: "system" flag { name: "oneway_finalizer_close" namespace: "system_performance" description: "Make BuildCursorNative.close oneway if in the the finalizer" bug: "368221351" } flag { name: "sqlite_apis_35" is_exported: true Loading Loading
core/java/android/database/BulkCursorNative.java +13 −7 Original line number Diff line number Diff line Loading @@ -212,9 +212,16 @@ final class BulkCursorProxy implements IBulkCursor { Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(CLOSE_TRANSACTION, data, reply, 0); // If close() is being called from the finalizer thread, do not wait for a reply from // the remote side. final boolean fromFinalizer = android.database.sqlite.Flags.onewayFinalizerClose() && "FinalizerDaemon".equals(Thread.currentThread().getName()); mRemote.transact(CLOSE_TRANSACTION, data, reply, fromFinalizer ? IBinder.FLAG_ONEWAY: 0); if (!fromFinalizer) { DatabaseUtils.readExceptionFromParcel(reply); } } finally { data.recycle(); reply.recycle(); Loading Loading @@ -282,4 +289,3 @@ final class BulkCursorProxy implements IBulkCursor { } } }
core/java/android/database/sqlite/flags.aconfig +7 −0 Original line number Diff line number Diff line package: "android.database.sqlite" container: "system" flag { name: "oneway_finalizer_close" namespace: "system_performance" description: "Make BuildCursorNative.close oneway if in the the finalizer" bug: "368221351" } flag { name: "sqlite_apis_35" is_exported: true Loading