Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit c73bd92631a2ff341f89001bc9143c7b998333e8
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Aug 18 18:03:13 2022
Add project dependency constraint between lifecycle-viewmodel and lifecycle-viewmodel-savedstate
Added bi-directional project version constraint between
lifecycle-viewmodel and lifecycle-viewmodel-savedstate.
If both artifacts are in the dependency tree, their
versions should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I3ab2abf9b6b1861038afc0e651da80e4ee75efb8
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
https://android-review.googlesource.com/2189976
Branch: androidx-main
commit c73bd92631a2ff341f89001bc9143c7b998333e8
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Aug 18 18:03:13 2022
Add project dependency constraint between lifecycle-viewmodel and lifecycle-viewmodel-savedstate
Added bi-directional project version constraint between
lifecycle-viewmodel and lifecycle-viewmodel-savedstate.
If both artifacts are in the dependency tree, their
versions should match. This will now be enforced by gradle
automatically bumping up either version to meet constraint.
Test: N/A
Bug: 242871265
Change-Id: I3ab2abf9b6b1861038afc0e651da80e4ee75efb8
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
Description
Version used:1.1.1
Devices/Android versions reproduced on: All
File: FrameworkSQLiteOpenHelper
OpenHelper(Context context, String name, final FrameworkSQLiteDatabase[] dbRef,
final Callback callback) {
super(context, name, null, callback.version,
new DatabaseErrorHandler() {
@Override
public void onCorruption(SQLiteDatabase dbObj) {
FrameworkSQLiteDatabase db = dbRef[0];
if (db != null) {
callback.onCorruption(db);
}
}
});
mCallback = callback;
mDbRef = dbRef;
}
callback.onCorruption(db) will never called when the db is corrupted, cause dbRef[0] always is null.
Maybe this code is better:
OpenHelper(Context context, String name, final FrameworkSQLiteDatabase[] dbRef,
final Callback callback) {
super(context, name, null, callback.version,
new DatabaseErrorHandler() {
@Override
public void onCorruption(SQLiteDatabase dbObj) {
FrameworkSQLiteDatabase db = dbRef[0];
callback.onCorruption(db != null ? db : new FrameworkSQLiteDatabase(dbObj));
}
});
mCallback = callback;
mDbRef = dbRef;
}