CarUxRestrictions 解釋翻譯
CarUxRestrictions類簡介
/* Car UX Restrictions event. This contains information on the set of UX restrictions that is in
* place due to the car's driving state.
* <p>
* The restriction information is organized as follows:
* <ul>
* <li> When there are no restrictions in place, for example when the car is parked,
* <ul>
* <li> {@link #isRequiresDistractionOptimization()} returns false. Apps can display activities
* that are not distraction optimized.
* <li> When {@link #isRequiresDistractionOptimization()} returns false, apps don't have to call
* {@link #getActiveRestrictions()}, since there is no distraction optimization required.
* </ul>
* <li> When the driving state changes, causing the UX restrictions to come in effect,
* <ul>
* <li> {@link #isRequiresDistractionOptimization()} returns true. Apps can only display activities
* that are distraction optimized. Distraction optimized activities must follow the base design
* guidelines to ensure a distraction free driving experience for the user.
* <li> When {@link #isRequiresDistractionOptimization()} returns true, apps must call
* {@link #getActiveRestrictions()}, to get the currently active UX restrictions to adhere to.
* {@link #getActiveRestrictions()} provides additional information on the set of UX
* restrictions that are in place for the current driving state.
* <p>
* The UX restrictions returned by {@link #getActiveRestrictions()}, for the same driving state of
* the vehicle, could vary depending on the OEM and the market. For example, when the car is
* idling, the set of active UX restrictions will depend on the car maker and the safety standards
* of the market that the vehicle is deployed in.
* </ul>
* </ul>
* <p>
* Apps that intend to be run when the car is being driven need to
* <ul>
* <li> Comply with the general distraction optimization guidelines.
* <li> Listen and react to the UX restrictions changes as detailed above. Since the restrictions
* could vary depending on the market, apps are expected to react to the restriction information
* and not to the absolute driving state.
* </ul>
*/
翻譯
汽車用戶體驗限制事件。其中包含汽車在行駛狀態下的用戶體驗限制的信息。這些限制主要體現在如下幾點:
當沒有限制條件時,比如汽車處於停止狀態,isRequiresDistractionOptimization()方法返回false,APPs 所展示經過優化後不受限的界面。
當isRequiresDistractionOptimization返回false,APPs將不會有任何處於getActiveRestrictions()激活的限制狀態。此時不會需要任何限制優化。
當行駛狀態改變時,會導致用戶體驗限制發揮效果。
isRequiresDistractionOptimization()將返回true。APPs 只能展示經過優化後受到限制的界面。優化限制界面將遵循基本的設計指導去確保在受限制條件下用戶充分自由的駕駛體驗。
當isRequiresDistractionOptimization()方法返回true。APPs必須調用
getActiveRestrictions()方法獲取現在被激活的用戶體驗限制條件去添加到相應APP中。
getActiveRestrictions()方法提供額外的信息,這信息包含當前形式狀態下需要的用戶體驗限制。
用戶體驗限制由getActiveRestrictions()方法返回,在相同的駕駛狀態下的交通工具,會因爲第三方供應商和市場產生差異。比如,當交通工具處於未熄火狀態,用戶體驗限制集合將依賴於車廠和汽車所在的市場的安全準則。
APPs在汽車行駛情況下運行需要遵守一般的優化限制準則。
正如上文所說,開發者需要關注和分析用戶體驗限制準側的變化。由於限制可能因市場而異,APPs需要能夠對限制信息做出反應,而不是對絕對根據行駛狀態做出反應。