LocaleAwareAppCompatActivity should use a ContextWrapper to update the locale instead
Categories
(Firefox for Android :: General, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox111 | --- | unaffected |
| firefox112 | --- | unaffected |
| firefox113 | --- | fixed |
People
(Reporter: jonalmeida, Assigned: jonalmeida)
References
(Blocks 1 open bug)
Details
(Whiteboard: [android-print][geckoview:m112][geckoview:m113])
Attachments
(1 file)
There are times when we need to use the original Context and not the updated context after a configuration change.
We've seen this recently with the removal of the deprecated APIs in Resources.updateConfiguration() which no longer update the existing Context, but instead provide a new Activity Context via Context.createConfigurationContext.
When looking at how the new window.print GeckoView API will work in our Android Components code, the Context provided to us from the LocaleAwareAppCompatActivity throws an IllegalStateException on the context type.
Other users have also faced this issue as well with the removal of the deprecated API.
What we should do, is use a ContextWrapper that is meant for this purpose, provide some changes and delegate the rest to the default implementation, and also giving us access to the original context that we would need with the PrintManager via ContextWrapper.getBaseContext().
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
This work is done in 112, but we are landing it in 113 since it's late in the release cycle.
| Assignee | ||
Updated•3 years ago
|
Comment 3•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
(In reply to Jonathan Almeida [:jonalmeida] from comment #2)
This work is done in 112, but we are landing it in 113 since it's late in the release cycle.
Jonathan, should we uplift your fix to Beta 112? Will users experience problems in 112 if this fix ships in 113?
| Assignee | ||
Comment 5•3 years ago
|
||
No, this patch is only useful with ohall's window.print changes. So uplifting this will have no value to users as the window.print patch has to ride the trains.
| Assignee | ||
Updated•3 years ago
|
Description
•