Status Update
Comments
mm...@commonsware.com <mm...@commonsware.com> #2
This actually has nothing to do with NavHostFragment, but is the behavior of NavController's setGraph().
When you call navController.setGraph(R.navigation.navigation_graph), it stores that ID and will restore that ID automatically.
If you were to instead use:
NavInflater navInflater = new NavInflater(this, navController.getNavigatorProvider());
navController.setGraph(navInflater.inflate(R.navigation.navigation_graph));
Then NavController would not restore the graph itself and the call to restoreState() you point out would only restore the back stack state, etc. but would wait for you to call setGraph again.
You're right that the inconsistency between the two setGraph methods is concerning. We'll take a look.
When you call navController.setGraph(R.navigation.navigation_graph), it stores that ID and will restore that ID automatically.
If you were to instead use:
NavInflater navInflater = new NavInflater(this, navController.getNavigatorProvider());
navController.setGraph(navInflater.inflate(R.navigation.navigation_graph));
Then NavController would not restore the graph itself and the call to restoreState() you point out would only restore the back stack state, etc. but would wait for you to call setGraph again.
You're right that the inconsistency between the two setGraph methods is concerning. We'll take a look.
yb...@google.com <yb...@google.com> #3
Turns out, we already had a tracking bug for this issue, will follow up on that other one.
yb...@google.com <yb...@google.com> #4
Thank you for promptly replying to my report. You are right that the issue you've just mentioned is similar to mine. I shall continue observing the progress over there.
mm...@commonsware.com <mm...@commonsware.com> #5
> Is there another class we are missing like that?
SupportSQLiteDatabase refers to android.database.sqlite.SQLiteTransactionListener in beginTransactionWithListener() and beginTransactionWithListenerNonExclusive().
That, and SQLiteDatabase.CursorFactory, are the only two that I see in my WIP implementation for SQLCipher for Android. Everything else is wrapped or isn't in android.database.sqlite.
SupportSQLiteDatabase refers to android.database.sqlite.SQLiteTransactionListener in beginTransactionWithListener() and beginTransactionWithListenerNonExclusive().
That, and SQLiteDatabase.CursorFactory, are the only two that I see in my WIP implementation for SQLCipher for Android. Everything else is wrapped or isn't in android.database.sqlite.
yb...@google.com <yb...@google.com> #6
SQLiteTransactionListener is a very simple interface, is there a good reason for us to wrap it ? I think whatever wrapper you are writing can use it.
Btw, wrapping things in support is not as simple as it looks, especially when we try to match the framework API (maybe that is the mistake).
e.g. the cursor factory API brings in SQLiteQuery and SQLiteCursorDriver, it is like dominos :/.
lukily we are not API stable so all bets are open.
Btw, wrapping things in support is not as simple as it looks, especially when we try to match the framework API (maybe that is the mistake).
e.g. the cursor factory API brings in SQLiteQuery and SQLiteCursorDriver, it is like dominos :/.
lukily we are not API stable so all bets are open.
mm...@commonsware.com <mm...@commonsware.com> #7
> is there a good reason for us to wrap it ?
Ummm... completeness? Otherwise, not at the moment, until some future version of Android changes the method signatures to pass in something that itself needs to be wrapped.
I was just listing everything that I was seeing in android.database.sqlite.* that was being exposed in the SupportSQLite* classes.
Ummm... completeness? Otherwise, not at the moment, until some future version of Android changes the method signatures to pass in something that itself needs to be wrapped.
I was just listing everything that I was seeing in android.database.sqlite.* that was being exposed in the SupportSQLite* classes.
yb...@google.com <yb...@google.com> #8
FYI, in alpha2 , i've removed the factory methods.
I'm merging this into b/38481640 since they are tightly coupled (and we have more people commenting on there)
I'm merging this into
Description
Version used: 1.0.0-alpha1
Devices/Android versions reproduced on: NA
I need to use a custom build of SQLite (based on
I'm using the following code to create a Room database:
val mainDb = Room.databaseBuilder(context, MainDatabase::class.java, "main")
.openHelperFactory(SqliteOrgSQLiteOpenHelperFactory())
.build()
I tried to implement my own "SupportSQLiteOpenHelper.Factory" and tried implements all of the classes, but there are too many direct dependencies to "android.database.*" and "android.database.sqlite.*". All of these dependencies need to be wrapped in "SupportXXX" classes
Example:
SupportSQLiteOpenHelper.Configuration depends on:
- android.database.DatabaseErrorHandler
- android.database.DefaultDatabaseErrorHandler
- android.database.sqlite.SQLiteDatabase.CursorFactory
SupportSQLiteDatabase depends on:
- android.database.sqlite.SQLiteTransactionListener
- android.database.sqlite.SQLiteDatabase.CursorFactory