AOSP-在Android中迁移API函数

问题描述

我正在从8迁移到Android9。还有一个我们希望也要迁移的“边框动画”(自A6开始也包括在内)。与A6-A8相当。

因此,在 frameworks / base / 项目中,我们添加了:

  1. 一个独立文件 core / res / res / anim / bezel_fade_out.xml
    <alpha xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@interpolator/accelerate_quad"
    android:fromAlpha="1.0" android:toAlpha="0.0"
    android:duration="500"
    />
  1. 插入一行: core / res / res / values / public.xml
    <public-group type="style" first-id="0x010302e2">
    <public name="Theme.InputMethod.Horizontal"/>
    <public  name="Theme.Holo.InputMethod.Horizontal"/>
    <public  name="Theme.DeviceDefault.InputMethod.Horizontal"/>
    <public  name="Animation.InputMethod.Horizontal"/>
    <public name="Animation.InputMethodFancy.Horizontal"/>
    <public name="Animation.Bezel"/>                         <-- here
    </public-group>
  1. 插入以下4行: core / res / res / values / styles.xml
    <style name="Animation.Bezel">
        <item name="windowEnteranimation">@null</item>
        <item name="windowExitAnimation">@anim/bezel_fade_out</item>
    </style>

现在,当我运行 make 时,我很快得到以下信息:

******************************
You have tried to change the API from what has been prevIoUsly approved.

To make these errors go away,you have two choices:
   1) You can add "@hide" javadoc comments to the methods,etc. listed in the
      errors above.

   2) You can update current.txt by executing the following command:
         make update-api

      To submit the revised current.txt to the main Android repository,you will need approval.
******************************

好吧,现在运行 make update-api ,我看到 api / current.txt

中发生了变化
      :::
      field public static final int Animation_Bezel = 16974567; // 0x10302e7
      :::

我现在可以进行完整的制作。但这是我的问题...在Android 6〜8中,我们已从A6-> A8迁移了此提交,通常发生的是.txt文件中进行了更多更改,即:

  • api / current.txt 在A6,A7,A8中已更改
  • api / system-current.txt 在A6,A7,A8中已更改
  • api / test-current.txt 在A7,A8中已更改

...而在A9中,只有 current.txt 。为什么只有这种单一的变化?有人可以向我解释一下吗?

我已经花了好几天的时间来尝试寻找一种解释,并且还没有。我显然缺少关于这一方面的一些基础知识。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)