Fixed
Status Update
Comments
sj...@google.com <sj...@google.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.
sj...@google.com <sj...@google.com> #3
Turns out, we already had a tracking bug for this issue, will follow up on that other one.
bu...@google.com <bu...@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.
vs...@gmail.com <vs...@gmail.com> #5
Oops, nevermind! I found out that this is fixed for alpha-02
by now in
Description
Artifact used:
androidx.core:core-splashscreen:1.0.0-alpha01
Devices/Android versions reproduced on: Nexus 5X, Android 8.1.0
Recently I detected a couple of crashes (via Crashlytics) on production build using
androidx.core:core-splashscreen:1.0.0-alpha01
. I have no repros for these, just a stacktrace:There is no such class in library bundle indeed but it is present in
AndroidManifest.xml
in library aar. I cannot imagine in which reasonable scenario this could reproduce, but I think it's clear enough that this entry is redundant in manifest.