Android car service配置

       配置路径:

       https://cs.android.com/android/platform/superproject/+/master:packages/services/Car/service/res/values/config.xml

  • config_occupant_zones

主要是配置车上的每个zone对应的是什么角色(occupantType),这个zone在车上的位置(seatRow + seatSide共同决定)

下面是配置项说明:

   <!--

        Lists all occupant (= driver + passenger) zones available in the car.

        Some examples are:

        <item>occupantZoneId=0,occupantType=DRIVER,seatRow=1,seatSide=driver</item>

        <item>occupantZoneId=1,occupantType=FRONT_PASSENGER,seatRow=1,seatSide=oppositeDriver</item>

        <item>occupantZoneId=2,occupantType=REAR_PASSENGER,seatRow=2,seatSide=left</item>

        <item>occupantZoneId=3,occupantType=REAR_PASSENGER,seatRow=2,seatSide=right</item>

        occupantZoneId:

含义:全局唯一的ID (Unique unsigned integer id to represent each passenger zone. Each zone

                        should have different id.)

        occupantType:

        含义:乘客类型 (Occupant type for the display. Use * part from

                       CarOccupantZoneManager.OCCUPANT_TYPE_* like DRIVER, FRONT_PASSENGER,

                       REAR_PASSENGER and etc.)

        seatRow: 乘客在那一排 Integer telling which row the seat is located. Row 1 is for front seats.)

        seatSide: 乘客在那边的座位 left/center/right for known side. Or can use driver/center/oppositeDriver to

                  handle both right-hand driving and left-hand driving in one place.

                  If car's RHD / LHD is not specified, LHD will be assumed and driver side becomes

                  left.)

    -->

    <string-arraytranslatable="false"name="config_occupant_zones">

        <item>occupantZoneId=0,occupantType=DRIVER,seatRow=1,seatSide=driver</item>

    </string-array>

 

  • config_occupant_display_mapping

定义物理屏幕displayPort)的作用(displayType),以及属于哪个Zone(occupantZoneId),Zoneid必须和

config_occupant_zones中的id相匹配。

displayType的取值和作用参考CarOccupantZoneManager代码中的注释。

 

   <!--

        Specifies configuration of displays in system telling its usage / type and assigned

        occupant. DEFAULT_DISPLAY, if assigned here, should be always assigned to the DRIVER zone.

        Some examples are:

        <item>displayPort=0,displayType=MAIN,occupantZoneId=0</item>

        <item>displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0</item>

        <item>displayPort=2,displayType=MAIN,occupantZoneId=1</item>

        <item>displayPort=3,displayType=MAIN,occupantZoneId=2</item>

        <item>displayUniqueId=virtual:com.example:MainD,displayType=MAIN,occupantZoneId=3</item>

        NOTE: each item should have displayPort or displayUniqueId, if it has both, displayPort

          will be used.

        displayPort: Unique Port id for the physical display.

        displayUniqueId: Unique Id for the display.

            The unique id of the virtual display will be the form of 'virtual:<PACKAGE>:<ID>'.

        displayType: Display type for the display. Use * part from

                       CarOccupantZoneManager.DISPLAY_TYPE_* like MAIN, INSTRUMENT_CLUSTER and

                       etc.

        occupantZoneId: occupantZoneId specified from config_occupant_zones.

    -->

    <string-arraytranslatable="false"name="config_occupant_display_mapping">

    </string-array>

 

 

 

  • config_occupant_display_mapping
  • config_occupant_zones
  • Android car service相关的配置
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值