인터넷을 찾아보면서 어떻게 해야되는지 이해하지 못했다.
하지만 여러번의 삽질 끝에 찾았다.
방법은 다음과 같다.

frameworks/base/core/res/res/vlaues/attrs.xml에 원하는 속성을 추가.
여기선 Theme에 추가를 기준으로 했다.

<declare-styleable name="Theme">
...
<!-- Present the text in ALL CAPS. This may use a small-caps form when available. -->
<attr name="textAllCaps" />

<!-- csjung test. -->
<attr name="csjung" format="string" />
</declare-styleable>
위의 조건은 Public 형식.
만약 Private 처리하고싶다면 생성한 attr위에 hide를 선언.
<!-- @hide csjung test. -->
<attr name="csjung" format="string" />
</declare-styleable>

그리고 다음의 파일을 Open.
frameworks/base/core/res/res/vlaues/Public.xml
테마가 선언된 인덱스에서 가장 마지막 연동 인덱스에 추가.
 <public type="attr" name="publicKey" id="0x010103a6" />
 <public type="attr" name="csjung" id="0x010103a7" />

 <public type="style" name="TextAppearance.SuggestionHighlight" id="0x01030118" />
위에서 확인시 publicKey가 Theme 가 선언된 Index에서의 가장 마지막에 선언된 Index.

그리고 확인을 해봐야 하나 Theme는 Default Theme 를 선언해줘야 하는 것 같음.
이는 확인을 해봐야 함.
아직 확인은 하지 못했지만, 저는 frameworks/base/core/res/res/vlaues/Themes.xml에
다음과 같이 Default값을 선언.
<style name="Theme">
    <item name="csjung">@android:string/candidates_style</item>
    <item name="colorForeground">@android:color/bright_foreground_dark</item>

그리고 나서 Build 창에서 'make update-api' 란 명령어를 실행.

결과
framesorks/base/api/current.txt에 추가한 api가 등록된 것을 확인.

+ Recent posts