-
Notifications
You must be signed in to change notification settings - Fork 1.3k
As a user, I want my browser to remember its state on rotating the screen or memory eviction #1994
Comments
I'm considering two options: ViewModels with the alpha Saved State module to provide save/restore functionality. The second option is to reinvent the wheel by designing a custom solution with retained fragments in order to reduce the amount of required boilerplate I'd need to add to our architecture. Retained fragments is how ViewModels work. |
This is mostly fixed. As of PR#2382, the new Fenix architecture handles preserving state on rotation automatically. This is probably sufficient to have a successful MVP. I'm going to create a new bug to cover the save and restore instance state functionality, which will require careful code design. We don't want save/restore to be fully automatic like our rotation and configuration changes solution is. We want our engineers to think about and specify which state becomes instance state because the OS provides quite limited space for storing state. We wouldn't, for example, want the bookmarks or history screens to store everything into saved instance state if it's likely we might use 1 MB or more of memory. That's because there's a hard limit at 1 MB and we really shouldn't use more than about 100 KB. Instance state is preserved in memory after the Android OS shuts down our app to make space in memory for another app. Here is the new ticket for handling instance state: |
As a user, I want my browser to remember the state of user interface input and state after I rotate the screen between portrait and landscape or when I return to the app after using many other apps so that my browser has has been evicted from memory.
Dependencies (Added by PM and Eng)
Next Steps
Acceptance Criteria (Added by PM)
adb shell am kill org.mozilla.fenix
and then launch the app from the recents screen.┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: