diff options
author | Ram Periathiruvadi | 2018-07-11 18:30:48 -0500 |
---|---|---|
committer | Ram Periathiruvadi | 2018-07-11 18:30:48 -0500 |
commit | 44d57dcc48310e4a3e697e16fc89238ee78370ce (patch) | |
tree | 16f16e43d34b58881debd83bc66b5ccaeda8f915 | |
parent | f26773ed52ce972b3abf0b46b5ff1c7c3e23e29f (diff) | |
download | platform-packages-services-car-44d57dcc48310e4a3e697e16fc89238ee78370ce.tar.gz platform-packages-services-car-44d57dcc48310e4a3e697e16fc89238ee78370ce.tar.xz platform-packages-services-car-44d57dcc48310e4a3e697e16fc89238ee78370ce.zip |
Update default fallback idling state UX restrictions.
Update the fallback restrictions to be in sync with the default
restrictions found in the car_ux_restrictions_map.xml.
Bug: 111367243
Test: Validate idling UX restrictions to not require DO, when no mapping
XML is provided.
Change-Id: Ibcbb9dbafd99dfe0444a04ecd5b3c7dc590ee833
-rw-r--r-- | service/src/com/android/car/CarUxRestrictionsManagerService.java | 2 | ||||
-rw-r--r-- | service/src/com/android/car/CarUxRestrictionsServiceHelper.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/service/src/com/android/car/CarUxRestrictionsManagerService.java b/service/src/com/android/car/CarUxRestrictionsManagerService.java index 23c4d32a..a6807d6a 100644 --- a/service/src/com/android/car/CarUxRestrictionsManagerService.java +++ b/service/src/com/android/car/CarUxRestrictionsManagerService.java | |||
@@ -428,7 +428,7 @@ public class CarUxRestrictionsManagerService extends ICarUxRestrictionsManager.S | |||
428 | break; | 428 | break; |
429 | case CarDrivingStateEvent.DRIVING_STATE_IDLING: | 429 | case CarDrivingStateEvent.DRIVING_STATE_IDLING: |
430 | restrictions = CarUxRestrictions.UX_RESTRICTIONS_BASELINE; | 430 | restrictions = CarUxRestrictions.UX_RESTRICTIONS_BASELINE; |
431 | requiresOpt = true; | 431 | requiresOpt = false; |
432 | break; | 432 | break; |
433 | case CarDrivingStateEvent.DRIVING_STATE_MOVING: | 433 | case CarDrivingStateEvent.DRIVING_STATE_MOVING: |
434 | default: | 434 | default: |
diff --git a/service/src/com/android/car/CarUxRestrictionsServiceHelper.java b/service/src/com/android/car/CarUxRestrictionsServiceHelper.java index 236d9154..348d3be5 100644 --- a/service/src/com/android/car/CarUxRestrictionsServiceHelper.java +++ b/service/src/com/android/car/CarUxRestrictionsServiceHelper.java | |||
@@ -83,6 +83,10 @@ import java.util.Map; | |||
83 | public boolean loadUxRestrictionsFromXml() throws IOException, XmlPullParserException { | 83 | public boolean loadUxRestrictionsFromXml() throws IOException, XmlPullParserException { |
84 | mRestrictionsMap.clear(); | 84 | mRestrictionsMap.clear(); |
85 | XmlResourceParser parser = mContext.getResources().getXml(mXmlResource); | 85 | XmlResourceParser parser = mContext.getResources().getXml(mXmlResource); |
86 | if (parser == null) { | ||
87 | Log.e(TAG, "Invalid Xml resource"); | ||
88 | return false; | ||
89 | } | ||
86 | AttributeSet attrs = Xml.asAttributeSet(parser); | 90 | AttributeSet attrs = Xml.asAttributeSet(parser); |
87 | int type; | 91 | int type; |
88 | // Traverse till we get to the first tag | 92 | // Traverse till we get to the first tag |