blob: fee62cbf0908c3fccd87ce5bc48e48ff86b79465 [file] [log] [blame]
<html devsite><head>
<title>迁移指南</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
<body>
<!--
Copyright 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<p>本文档介绍一些有助于迁移到新的 Android 版本的提示。</p>
<h2 id="migrating-to-android-gingerbread-23">迁移到 Android Gingerbread 2.3</h2>
<p>在 Gingerbread 中,我们新增了输入设备配置文件(在此版本中,又称为输入设备校准文件)的概念。</p>
<p>务必为所有触摸屏提供输入设备配置文件。特别是有必要花时间提供触摸尺寸信息的校准参考。</p>
<h2 id="migrating-to-android-honeycomb-30">迁移到 Android Honeycomb 3.0</h2>
<p>在 Honeycomb 中,我们修改了按键字符映射文件格式,并开始更好地利用输入设备配置文件。此外,我们还新增了对 PC 式全键盘的支持,并引入了全新的“通用”按键映射,以取代旧的特定于模拟器的“qwerty”按键映射(从未用作通用型按键映射)。</p>
<p>务必更新您的所有按键字符映射文件,以便使用新的语法。</p>
<p>如果您的外围设备依赖于旧的“qwerty”按键映射,则您可能需要提供特定于设备的新按键映射,以模拟旧行为。您应该为通过 USB 产品 ID/供应商 ID 或设备名称标识的每种设备创建新的按键映射。</p>
<p>为所有特殊功能输入设备提供按键字符映射文件尤为重要。这些文件应该只包含一个将键盘类型设置为 <code>SPECIAL_FUNCTION</code> 的行。</p>
<p>可确保所有内置输入设备均正确配置的一个方法是运行 <a href="dumpsys.html">Dumpsys</a>,然后使用 <code>Generic.kcm</code> 查找配置不正确的设备。</p>
<h2 id="migrating-to-android-honeycomb-32">迁移到 Android Honeycomb 3.2</h2>
<p>在 Honeycomb 3.2 中,我们新增了对操纵杆的支持,并扩展了按键布局文件格式以支持操纵杆轴映射。</p>
<h2 id="migrating-to-android-ice-cream-sandwich-40">迁移到 Android Ice Cream Sandwich 4.0</h2>
<p>在 Ice Cream Sandwich 4.0 中,我们将触摸屏的设备驱动程序要求更改为遵循标准的 Linux 多点触控输入协议,并新增了对“B”协议的支持。我们还支持数字化仪平板电脑和基于触控笔的触屏设备。</p>
<p>您可能需要更新输入设备驱动程序,以按照标准正确实现 Linux 多点触控输入协议。</p>
<p>您还需要更新输入设备配置文件,因为某些更改后的属性更简单、更系统化。</p>
<p>如需了解有关驱动程序要求的更多详细信息,请参阅<a href="touch-devices.html">触屏设备</a></p>
</body></html>