commit | a4d5b5c29e190a3cb043908ec05c478c13b08ec9 | [log] [tgz] |
---|---|---|
author | Keun-young Park <keunyoung@google.com> | Sat May 04 02:47:53 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Sat May 04 02:47:53 2019 -0700 |
tree | c04443b2ef4542066c639ec5198981e709cae5ce | |
parent | b52c24d20c2a77cb50edb4ac5e01ae22046113e5 [diff] | |
parent | f30cf9a853ddfbb2275fc3a45558e5cb951a4987 [diff] |
Merge "UxRestrictinManager: Do not crash on non-existing port config" into qt-dev am: ed45f3be3a am: f30cf9a853 Change-Id: Ic082450a9fb242f043e6cbba139b59932c040dc4
diff --git a/service/src/com/android/car/CarUxRestrictionsManagerService.java b/service/src/com/android/car/CarUxRestrictionsManagerService.java index 38ac562..9a0896f 100644 --- a/service/src/com/android/car/CarUxRestrictionsManagerService.java +++ b/service/src/com/android/car/CarUxRestrictionsManagerService.java
@@ -705,6 +705,9 @@ Map<Byte, CarUxRestrictions> newUxRestrictions = new HashMap<>(); for (byte port : mPhysicalPorts) { CarUxRestrictionsConfiguration config = mCarUxRestrictionsConfigurations.get(port); + if (config == null) { + continue; + } CarUxRestrictions uxRestrictions = config.getUxRestrictions( currentDrivingState, speed, mRestrictionMode);