Sense校准移动到设置中

来源:互联网 发布:剑灵n卡优化设置 编辑:程序博客网 时间:2024/05/16 01:29
客户要求:

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

工程模式:*#*#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
原创粉丝点击