Sense校准移动到设置中

客户要求:

在设置菜单中,增加距离传感器、重力传感器测试菜单。(放在设置--显示--最下边)

工程模式:*#*#3646633#*#*

AndroidManifest.xml (...\mediatek\packages\apps\engineermode)


...

    <activity
            android:name=".sensor.SensorCalibration"
            android:label="@string/sensor_calibration_gsensor"
            android:screenOrientation="portrait">
<!-- ==============SensorCalibration =============================-->
    <intent-filter>
        <action android:name="com.mediatek.engineermode.SensorCalibration" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
<!-- ==============SensorCalibration =============================-->
    </activity>

....

    <activity
        android:name=".sensor.PSensorCalibration"
        android:label="@string/psensor_calibration"
        android:screenOrientation="portrait">
<!-- ==============SensorCalibration =============================-->
    <intent-filter>
        <action android:name="com.mediatek.engineermode.PSensorCalibration" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
<!-- ==============SensorCalibration =============================-->
    </activity>




Display_settings.xml (...\settings\res\xml)


...

<!-- ==============SensorCalibration =============================-->
        <Preference
            android:key="gs_calibration"
            android:persistent="false"
            android:title="@string/sensor_calibration_gsensor" >            

            <intent
                android:action="com.mediatek.engineermode.SensorCalibration"
                android:targetPackage="com.mediatek.engineermode" />
        </Preference>

        <Preference
            android:key="ps_calibration"
            android:persistent="false"
            android:title="@string/sensor_calibration_psensor" >            

            <intent
                android:action="com.mediatek.engineermode.PSensorCalibration"
                android:targetPackage="com.mediatek.engineermode" />
        </Preference>
<!-- ==============SensorCalibration =============================-->





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值