Fixed
Status Update
Comments
ra...@google.com <ra...@google.com> #2
In Backward Compatibility (pre Android 13), the configuration is modified at the AppComaptActivity's level and hence the application context not getting modified is intended behaviour. Similar behaviour can be seen for nightMode.
ra...@google.com <ra...@google.com> #3
Hope this solves the question, please re-open if more information is required.
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #4
Why is this the intended behavior? Appcompatdelegate that works halfways?
Can someone clarify?
Can someone clarify?
Description
Version used: WorkManager 2.2.0-alpha02, Room 2.2.0 stable
Devices/Android versions reproduced on: seen once in crash reporting on a OnePlus device running Android 10
It seems that PreferenceUtils.setNeedsReschedule() manually calls setTransactionSuccessful(), but where it is called from, ForceStopRunnable.run, doesn't have a transaction running so the app crashes.
Fatal Exception: java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction.
at android.database.sqlite.SQLiteSession.throwIfNoTransaction(SQLiteSession.java:917)
at android.database.sqlite.SQLiteSession.setTransactionSuccessful(SQLiteSession.java:373)
at android.database.sqlite.SQLiteDatabase.setTransactionSuccessful(SQLiteDatabase.java:618)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.setTransactionSuccessful(FrameworkSQLiteDatabase.java:95)
at androidx.room.RoomDatabase.setTransactionSuccessful(RoomDatabase.java:395)
at androidx.work.impl.utils.PreferenceUtils.setNeedsReschedule(PreferenceUtils.java:106)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:89)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)