1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    Exposing a new resource:
4        To add a new entry, find the corresponding "staging-public-group" with the correct type for
5        your resource, and add a new entry to the BOTTOM of the list. This ensures that indexes
6        don't shift for previously added resources, and the new one will be appended to the end.
7
8        To add R.attr.exampleAttrName:
9            <staging-public-group type="attr" first-id="0x1ff0000">
10                <public name="previouslyAdded1"/>
11                <public name="previouslyAdded2"/>
12                <public name="exampleAttrName"/>
13            </staging-public-group>
14
15    Deleting a resource:
16        If a resource is no longer supported/used, it can be marked removed by renaming the
17        resource with a `removed_` prefix. This preserves the indexes of other resources so as not
18        to break apps that have compiled with their integers previously.
19
20        To remove R.attr.previouslyAdded2:
21            <staging-public-group type="attr" first-id="0x1ff0000">
22                <public name="previouslyAdded1"/>
23                <public name="removed_previouslyAdded2"/>
24                <public name="exampleAttrName"/>
25            </staging-public-group>
26
27        IMPORTANT: Deleting an entry is never allowed, even across branches or reverts. Please take
28        this into account before merging a change which edits this file. Small, isolated changes
29        which only add/remove resources is recommended to avoid reverts due to build/test failures.
30
31    Renaming a resource:
32        This is generally fine and can be done to the entry directly, with no other changes. But
33        note that any apps/tooling that resolve against resource names rather than IDs may break
34        as a result. This is uncommon, but not rare.
35
36    Finalizing a release's resources:
37        1. $ANDROID_BUILD_TOP/frameworks/base/tools/aapt2/tools/finalize_res.py \
38           $ANDROID_BUILD_TOP/frameworks/base/core/res/res/values/public-staging.xml \
39           $ANDROID_BUILD_TOP/frameworks/base/core/res/res/values/public-final.xml
40        2. Rename "NEXT" in the new public-staging.xml resources header to the next platform short
41           version code
42
43    Finalizing a release's resources (manually; only for reference):
44        1. Delete all "staging-public-group" blocks for the release with no entries inside them
45        2. Rename the remaining "staging-public-group" blocks for that release to
46           "staging-public-group-final"
47        3. Cut them out this file and place at the bottom of public-final.xml; also move the
48           "Resources added in version ? of the platform" header
49        4. Copy-paste all of the non-"removed_" resources outside of the staging blocks into being
50           siblings alongside them
51        5. Assign them final public IDs in the form of
52           <public type="attr" name="exampleAttrName" id="0x0101088a" />
53           by finding the last ID for that type and incrementing the last 4 characters by 1 in
54           hexadecimal
55        6. Back in this file, seed the next release's resources by adding "staging-public-group"
56           tags with their "first-id" value shifted by -0x00010000 from the lowest "first-id"
57           in the last used "staging-public-group-final"
58
59        Example:
60            Starting public-staging.xml:
61                <!\- ===============================================================
62                    Resources added in version ? of the platform
63                    =============================================================== -\>
64                <eat-comment />
65
66                <staging-public-group type="attr" first-id="0x01ff0000">
67                    <public name="exampleAttr1"/>
68                    <public name="removed_exampleAttr2"/>
69                    <public name="exampleAttr3"/>
70                </staging-public-group>
71
72                <staging-public-group type="id" first-id="0x01fe0000">
73                </staging-public-group>
74
75            Resulting public-final.xml:
76                <!\- ===============================================================
77                    Resources added in version ? of the platform
78                    =============================================================== -\>
79                <eat-comment />
80
81                <staging-public-group-final type="attr" first-id="0x01ff0000">
82                    <public name="exampleAttr1"/>
83                    <public name="removed_exampleAttr2"/>
84                    <public name="exampleAttr3"/>
85                </staging-public-group-final>
86
87                <public type="id" name="exampleAttr1" id="0x0101088a"/>
88                <public type="id" name="exampleAttr3" id="0x0101088b"/>
89
90            Resulting public-staging.xml:
91                <!\- ===============================================================
92                    Resources added in version (? + 1) of the platform
93                    =============================================================== -\>
94                <eat-comment />
95
96                <staging-public-group type="attr" first-id="0x01fd0000">
97                </staging-public-group>
98
99                <staging-public-group type="id" first-id="0x01fc0000">
100                </staging-public-group>
101-->
102<resources>
103
104  <!-- ===============================================================
105    Resources added in version NEXT of the platform
106
107    NOTE: After this version of the platform is forked, changes cannot be made to the root
108    branch's groups for that release. Only merge changes to the forked platform branch.
109    =============================================================== -->
110  <eat-comment/>
111
112  <staging-public-group type="attr" first-id="0x01b70000">
113      <!-- @FlaggedApi("android.content.pm.sdk_lib_independence") -->
114    <public name="optional"/>
115    <!-- @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") -->
116    <public name="adServiceTypes" />
117    <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") -->
118    <public name="languageSettingsActivity"/>
119    <!-- @FlaggedApi("android.service.controls.flags.Flags.FLAG_HOME_PANEL_DREAM") -->
120    <public name="dreamCategory"/>
121  </staging-public-group>
122
123  <staging-public-group type="id" first-id="0x01b60000">
124  </staging-public-group>
125
126  <staging-public-group type="style" first-id="0x01b50000">
127  </staging-public-group>
128
129  <staging-public-group type="string" first-id="0x01b40000">
130  </staging-public-group>
131
132  <staging-public-group type="dimen" first-id="0x01b30000">
133  </staging-public-group>
134
135  <staging-public-group type="color" first-id="0x01b20000">
136  </staging-public-group>
137
138  <staging-public-group type="array" first-id="0x01b10000">
139  </staging-public-group>
140
141  <staging-public-group type="drawable" first-id="0x01b00000">
142  </staging-public-group>
143
144  <staging-public-group type="layout" first-id="0x01af0000">
145  </staging-public-group>
146
147  <staging-public-group type="anim" first-id="0x01ae0000">
148  </staging-public-group>
149
150  <staging-public-group type="animator" first-id="0x01ad0000">
151  </staging-public-group>
152
153  <staging-public-group type="interpolator" first-id="0x01ac0000">
154  </staging-public-group>
155
156  <staging-public-group type="mipmap" first-id="0x01ab0000">
157  </staging-public-group>
158
159  <staging-public-group type="integer" first-id="0x01aa0000">
160  </staging-public-group>
161
162  <staging-public-group type="transition" first-id="0x01a90000">
163  </staging-public-group>
164
165  <staging-public-group type="raw" first-id="0x01a80000">
166  </staging-public-group>
167
168  <staging-public-group type="bool" first-id="0x01a70000">
169  </staging-public-group>
170
171  <staging-public-group type="fraction" first-id="0x01a60000">
172  </staging-public-group>
173
174</resources>
175