Fix Data Saver page crashed when rotate
This is because before fix mLoadAppRunnable is async run. And the getContext() within it will return null when the Fragment in some not ready lifecycle. Use viewLifecycleOwner.lifecycleScope.launch to ensure the async function will only be run when the view is ready, and automatically canceled when out of scope. Since this requires Kotlin Coroutine so migrate DataSaverSummary to Kotlin, other functionality are keep no change. Fix: 279863347 Test: Manual Change-Id: I2e97a071c103e63b3306b801fc38f4704e3be0d2
Loading
Please register or sign in to comment