commit | 166d25abb1836f9e218bebd457cc23304764ef7f | [log] [tgz] |
---|---|---|
author | jackqdyulei <jackqdyulei@google.com> | Wed Feb 22 16:42:26 2017 -0800 |
committer | jackqdyulei <jackqdyulei@google.com> | Fri Feb 24 14:17:58 2017 -0800 |
tree | e1498445007dcd44956c3d1544a728166da1a851 | |
parent | 7e0df1e48c6a6555a791d32073062357ac0007d9 [diff] |
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