Add NPE check for battery header update.

Battery header uses AsyncTask to update the label. So if user
press back button before the update completes, the "getContext()"
in AsyncTask callback will return null, which causes the crash.

It seems there is no good way to fix it expect adding a NPE check.

Bug: 35650224
Test: RunSettingsRoboTests
Change-Id: I7bd9fd87caa13614fe1896cf72557a09744691c1
2 files changed