Transparent Runtime Change Handling for Android Apps
Zizhan Chen, Zili Shao
Abstract
Mobile devices often face runtime configuration changes, such as screen orientation changes, screen resizing, and language switching. The current Android design adopts a restarting-based solution to load the corresponding resources according to the new configuration. Therefore, application developers must explicitly deal with state preservation and restoration brought about by the activity restarting. Otherwise, the runtime change will cause state loss and even app crash issues. To solve the runtime change handling issues, we propose RCHDroid, a transparent runtime change handling approach for apps at the Android system level. When a configuration change occurs, we do not restart the activity, but instead, create a new activity according to the new configuration and migrate states from the old one to the new one, while putting the old activity into an inactive mode. We propose a lazy-migration scheme to handle asynchronous tasks that remain working on the old activity, which migrates the result events when the asynchronous tasks return. We have implemented a prototype of RCHDroid with real hardware and released the source code for public access. Overall, using RCHDroid, existing apps can handle runtime configuration changes without any modifications and save the runtime change handling time by 25.46%.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Related papers
- LiveDroid: identifying and preserving mobile app state in volatile runtime environmentsUmar Farooq, Zhijia Zhao, Manu Sridharan, Iulian NeamtiuOOPSLA 2020 · 15 citations
- DDLDroid: Efficiently Detecting Data Loss Issues in Android AppsYuhao Zhou, Wei SongISSTA 2023 · 1 citation
- Characterizing and Detecting Configuration Compatibility Issues in Android AppsHuaxun Huang, Ming Wen, Lili Wei, Yepang Liu et al.ASE 2021 · 15 citations
- Cross-device record and replay for Android appsCong Li, Yanyan Jiang, Chang XuFSE 2022 · 13 citations
- PermDroid: automatically testing permission-related behaviour of Android applicationsShuaihao Yang, Zigang Zeng, Wei SongISSTA 2022 · 10 citations
