Fix NPE in PanelFragment
When updating the panel after getting a second intent to the activity, there is a small window of opportunity for the user to close the activity before the animation ends, causing an NPE when onFinish is called as the activity already closed down. This change will check that there is an activity before trying to finish it. Bug: 150322041 Test: For an easy way to reproduce this, turn the screen on and run the following in a terminal: while true; do adb shell am start -a \ android.settings.panel.action.INTERNET_CONNECTIVITY; \ sleep 0.1; done Then press the back button while the screen is attempting to display the fragment. There should be no Settings crash. Change-Id: I4ca831d71a7221a7a4a62bb29e802f507ce5213c
Loading
Please register or sign in to comment