Assigned
Status Update
Comments
ei...@salesforce.com <ei...@salesforce.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.
se...@google.com <se...@google.com> #3
Turns out, we already had a tracking bug for this issue, will follow up on that other one.
ei...@salesforce.com <ei...@salesforce.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.
se...@google.com <se...@google.com> #5
That's very unexpected, hmm.
Are you seeing that the same behaves correctly on a physical A11 device?
ei...@salesforce.com <ei...@salesforce.com> #6
Here's a log from a OnePlus with Android 11, looks quite similar:
2022-11-08 12:11:51.370 25201-25262/? I/FontLog: Received query Noto Color Emoji Compat, URI content://com.google.android.gms.fonts [CONTEXT service_id=132 ]
2022-11-08 12:11:51.370 25201-25262/? I/FontLog: Query [emojicompat-emoji-font] resolved to {Noto Color Emoji Compat, wdth 100.0, wght 400, ital 0.0, bestEffort false} [CONTEXT service_id=132 ]
2022-11-08 12:11:51.371 25201-25262/? I/FontLog: Fetch {Noto Color Emoji Compat, wdth 100.0, wght 400, ital 0.0, bestEffort false} end status Status{statusCode=SUCCESS, resolution=null} [CONTEXT service_id=132 ]
2022-11-08 12:11:51.379 25201-25262/? I/FontLog: Pulling font file for id = 82, cache size = 6 [CONTEXT service_id=132 ]
2022-11-08 12:11:51.383 25201-25262/? I/FontLog: Pulling font file for id = 82, cache size = 6 [CONTEXT service_id=132 ]
se...@google.com <se...@google.com> #7
Ack, thanks! And to confirm are you only seeing the misrenders on the emulator?
Gonna have to get more coffee to figure this one out :D.
I'll grab this ticket too (on the backlog). If you can put together a minimal repro that would definitely help here!
Thanks, Sean
ei...@salesforce.com <ei...@salesforce.com> #8
Yes, only misrenders on the emulator. Real devices are working as expected. You can find a repo project here:
Thanks, Sean!!
se...@google.com <se...@google.com> #9
Thank you!
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit a8e2bef704e40630e6c80d7ed1a0b29359210d6b
Author: chelseahao <chelseahao@google.com>
Date: Tue Nov 29 13:28:02 2022
Add emojicompat support when drawing emojis.
Test: this change cannot be tested in emulator due to b/257110117 .
Change-Id: I94436d5e57a356df646df0eb33df5829450beac6
M emoji2/emoji2-emojipicker/src/main/java/androidx/emoji2/emojipicker/EmojiView.kt
https://android-review.googlesource.com/2320350
Branch: androidx-main
commit a8e2bef704e40630e6c80d7ed1a0b29359210d6b
Author: chelseahao <chelseahao@google.com>
Date: Tue Nov 29 13:28:02 2022
Add emojicompat support when drawing emojis.
Test: this change cannot be tested in emulator due to
Change-Id: I94436d5e57a356df646df0eb33df5829450beac6
M emoji2/emoji2-emojipicker/src/main/java/androidx/emoji2/emojipicker/EmojiView.kt
Description
Version used: 1.5.1
Devices/Android versions reproduced on: Emulator, Android 11 + Google Play Services
EmojiCompat does not appear to work on an Android 11 emulator. ZWJ emoji aren't compounding, and :melting_face: is showing as tofu. Works as expected on real devices, only seems to be an issue on an emulator.
I have...
- Signed in to Google Play on the emulator
- Cleared Google Play app cache, and Google Play Services cache
- Ensured we are using AppCompatActivity
- Explicitly enabled EmojiCompat for AppCompatMultiAutoCompleteTextView