Check that mDrivingStateManager is not null.

bug: 117220307
Test: m and install
Change-Id: I1bcfbe5075dee4ab2fb77c22e98992ce548ed970
(cherry picked from commit 015dd425c2dc626d8806be2bac6e7d927648c126)
This commit is contained in:
Nicholas Sauer
2018-11-28 13:00:02 -08:00
committed by Brad Stenning
parent 33f7f311b3
commit ef8f3945a3

View File

@@ -52,6 +52,9 @@ public class DrivingStateHelper {
* is idling or moving, {@code false} otherwise.
*/
public boolean isCurrentlyDriving() {
if (mDrivingStateManager == null) {
return false;
}
try {
CarDrivingStateEvent currentState = mDrivingStateManager.getCurrentCarDrivingState();
if (currentState != null) {