aboutsummaryrefslogtreecommitdiff
path: root/car-lib/src/android/car/drivingstate
diff options
context:
space:
mode:
authorRam Periathiruvadi <ramperry@google.com>2018-03-07 11:50:49 -0800
committerRam Periathiruvadi <ramperry@google.com>2018-03-12 19:39:17 -0700
commited9e8f87cd2bdc1b2791be8cd25e016c02cb93eb (patch)
tree854e4cf13074ac7a48b831f76658ce9036140c87 /car-lib/src/android/car/drivingstate
parentef7ed130d56c70bcc08da3aeeebc025eca24e791 (diff)
downloadCar-ed9e8f87cd2bdc1b2791be8cd25e016c02cb93eb.tar.gz
Make driving state to UXR mapping configurable.
1. Added a new XML resource that provides a way to map driving state to UX restrictions. This can be modified by the OEMs. 2. Made UxRestrictionService listen to speed when the driving state is moving so we can support different restrictions across different speed ranges. Bug: 69859857 Test: Tested that restriction values from XML are honored by changing driving state and speed. Change-Id: I2b46b3d61ed9a4ca3560323b04d11dfae1e91567
Diffstat (limited to 'car-lib/src/android/car/drivingstate')
-rw-r--r--car-lib/src/android/car/drivingstate/CarUxRestrictions.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/car-lib/src/android/car/drivingstate/CarUxRestrictions.java b/car-lib/src/android/car/drivingstate/CarUxRestrictions.java
index 34ad20c913..ed7778fcee 100644
--- a/car-lib/src/android/car/drivingstate/CarUxRestrictions.java
+++ b/car-lib/src/android/car/drivingstate/CarUxRestrictions.java
@@ -60,7 +60,6 @@ import java.lang.annotation.RetentionPolicy;
*/
public class CarUxRestrictions implements Parcelable {
- // UXRestrictions TODO(b/69859857): make it configurable
/**
* No UX Restrictions. Vehicle Optimized apps are allowed to display non Drive Optimized
* Activities.
@@ -190,7 +189,7 @@ public class CarUxRestrictions implements Parcelable {
}
};
- public CarUxRestrictions(boolean reqOpt, int restrictions, long time) {
+ public CarUxRestrictions(boolean reqOpt, @CarUxRestrictionsInfo int restrictions, long time) {
mRequiresDistractionOptimization = reqOpt;
mActiveRestrictions = restrictions;
mTimeStamp = time;