Partially revert "[Settings] Start SettingsDumpService to dump the db log after the db is"
'Start SettingsDumpService after the MobileNetworkRepository is created' sends the intent every single time the NetworkDashboardFragment is instantiated (basically every time user opens the network dashboard in Settings). SettingsDumpService's lifecycle never finishes, since it's context is passed to the MobileNetworkRepository for singleton instance creation which then proceeds to holding a reference to that context thus keeping the entire service alive along with the application process, which prevents the static singleton from being garbage collected creating an indirect retention cycle. All that over time grows into a solid memory leak. SettingsDumpService (as well as MobileNetworkRepository instance, obviously) proceed to dangling until the app process gets eventually killed by the lmkd (which is unlikely to happen but still was observed on several devices running stock ROM) or manually terminated by user, but based on the observation, maximum time of dangling could be perfectly equal to global system uptime. This issue still remains all the way up to latest AOSP tags and betas, although some vendors stock ROMs seem to have sorted it out. Since we don't really care about dumping mobile network info (especially in production builds), do the minimum changes required to remove the dumping feature and avoid future AOSP merge conflicts. This partially reverts commit d6f3ad91. Change-Id: Ifd7ded6cebd5f247cbdeb88035fdeb21cf060412
Loading
Please register or sign in to comment