Revert "Revert "Finalizing Q resources""

This reverts commit bca7d2eaef56bb0b6b8a97dc8d10d3aa23b5b433.

Reason for revert: Rolling forward for Q-Finalization

Bug: 129975435
Change-Id: I8468cc92ffa77e58b32f82b7d8eb749da66cf281
(cherry picked from commit 11d40545d132b4d569abe80d04559c53f2abc7d7)
diff --git a/api/current.txt b/api/current.txt
index bffc526..3ec7f44 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -220,12 +220,6 @@
 
   public static final class R.attr {
     ctor public R.attr();
-    field public static final int __removed1 = 16844185; // 0x1010599
-    field public static final int __removed2 = 16844186; // 0x101059a
-    field public static final int __removed3 = 16844187; // 0x101059b
-    field public static final int __removed4 = 16844188; // 0x101059c
-    field public static final int __removed5 = 16844189; // 0x101059d
-    field public static final int __removed6 = 16844182; // 0x1010596
     field public static final int absListViewStyle = 16842858; // 0x101006a
     field public static final int accessibilityEventTypes = 16843648; // 0x1010380
     field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
@@ -284,7 +278,7 @@
     field public static final int alertDialogTheme = 16843529; // 0x1010309
     field public static final int alignmentMode = 16843642; // 0x101037a
     field public static final int allContactsName = 16843468; // 0x10102cc
-    field public static final int allowAudioPlaybackCapture = 16844199; // 0x10105a7
+    field public static final int allowAudioPlaybackCapture = 16844289; // 0x1010601
     field public static final int allowBackup = 16843392; // 0x1010280
     field public static final int allowClearUserData = 16842757; // 0x1010005
     field public static final int allowEmbedded = 16843765; // 0x10103f5
@@ -572,8 +566,8 @@
     field public static final int endX = 16844050; // 0x1010512
     field public static final int endY = 16844051; // 0x1010513
     field @Deprecated public static final int endYear = 16843133; // 0x101017d
-    field public static final int enforceNavigationBarContrast = 16844203; // 0x10105ab
-    field public static final int enforceStatusBarContrast = 16844202; // 0x10105aa
+    field public static final int enforceNavigationBarContrast = 16844293; // 0x1010605
+    field public static final int enforceStatusBarContrast = 16844292; // 0x1010604
     field public static final int enterFadeDuration = 16843532; // 0x101030c
     field public static final int entries = 16842930; // 0x10100b2
     field public static final int entryValues = 16843256; // 0x10101f8
@@ -646,10 +640,10 @@
     field public static final int footerDividersEnabled = 16843311; // 0x101022f
     field public static final int forceDarkAllowed = 16844172; // 0x101058c
     field public static final int forceHasOverlappingRendering = 16844065; // 0x1010521
-    field public static final int forceUriPermissions = 16844197; // 0x10105a5
+    field public static final int forceUriPermissions = 16844191; // 0x101059f
     field public static final int foreground = 16843017; // 0x1010109
     field public static final int foregroundGravity = 16843264; // 0x1010200
-    field public static final int foregroundServiceType = 16844191; // 0x101059f
+    field public static final int foregroundServiceType = 16844185; // 0x1010599
     field public static final int foregroundTint = 16843885; // 0x101046d
     field public static final int foregroundTintMode = 16843886; // 0x101046e
     field public static final int format = 16843013; // 0x1010105
@@ -707,7 +701,7 @@
     field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
     field public static final int hardwareAccelerated = 16843475; // 0x10102d3
     field public static final int hasCode = 16842764; // 0x101000c
-    field public static final int hasFragileUserData = 16844192; // 0x10105a0
+    field public static final int hasFragileUserData = 16844186; // 0x101059a
     field @Deprecated public static final int headerAmPmTextAppearance = 16843936; // 0x10104a0
     field public static final int headerBackground = 16843055; // 0x101012f
     field @Deprecated public static final int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
@@ -735,7 +729,7 @@
     field public static final int iconTintMode = 16844127; // 0x101055f
     field public static final int iconifiedByDefault = 16843514; // 0x10102fa
     field public static final int id = 16842960; // 0x10100d0
-    field public static final int identifier = 16844204; // 0x10105ac
+    field public static final int identifier = 16844294; // 0x1010606
     field public static final int ignoreGravity = 16843263; // 0x10101ff
     field public static final int imageButtonStyle = 16842866; // 0x1010072
     field public static final int imageWellStyle = 16842867; // 0x1010073
@@ -767,7 +761,7 @@
     field public static final int indicatorRight = 16843022; // 0x101010e
     field public static final int indicatorStart = 16843729; // 0x10103d1
     field public static final int inflatedId = 16842995; // 0x10100f3
-    field public static final int inheritShowWhenLocked = 16844194; // 0x10105a2
+    field public static final int inheritShowWhenLocked = 16844188; // 0x101059c
     field public static final int initOrder = 16842778; // 0x101001a
     field public static final int initialKeyguardLayout = 16843714; // 0x10103c2
     field public static final int initialLayout = 16843345; // 0x1010251
@@ -944,7 +938,7 @@
     field public static final int menuCategory = 16843230; // 0x10101de
     field public static final int mimeType = 16842790; // 0x1010026
     field public static final int min = 16844089; // 0x1010539
-    field public static final int minAspectRatio = 16844193; // 0x10105a1
+    field public static final int minAspectRatio = 16844187; // 0x101059b
     field public static final int minDate = 16843583; // 0x101033f
     field public static final int minEms = 16843098; // 0x101015a
     field public static final int minHeight = 16843072; // 0x1010140
@@ -1125,7 +1119,7 @@
     field public static final int reqKeyboardType = 16843304; // 0x1010228
     field public static final int reqNavigation = 16843306; // 0x101022a
     field public static final int reqTouchScreen = 16843303; // 0x1010227
-    field public static final int requestLegacyExternalStorage = 16844201; // 0x10105a9
+    field public static final int requestLegacyExternalStorage = 16844291; // 0x1010603
     field public static final int requireDeviceUnlock = 16843756; // 0x10103ec
     field public static final int required = 16843406; // 0x101028e
     field public static final int requiredAccountType = 16843734; // 0x10103d6
@@ -1204,7 +1198,7 @@
     field public static final int secondaryProgress = 16843064; // 0x1010138
     field public static final int secondaryProgressTint = 16843879; // 0x1010467
     field public static final int secondaryProgressTintMode = 16843880; // 0x1010468
-    field public static final int secureElementName = 16844200; // 0x10105a8
+    field public static final int secureElementName = 16844290; // 0x1010602
     field public static final int seekBarStyle = 16842875; // 0x101007b
     field public static final int segmentedButtonStyle = 16843568; // 0x1010330
     field public static final int selectAllOnFocus = 16843102; // 0x101015e
@@ -1213,7 +1207,7 @@
     field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c
     field @Deprecated public static final int selectedDateVerticalBar = 16843591; // 0x1010347
     field @Deprecated public static final int selectedWeekBackgroundColor = 16843586; // 0x1010342
-    field public static final int selectionDividerHeight = 16844190; // 0x101059e
+    field public static final int selectionDividerHeight = 16844184; // 0x1010598
     field public static final int sessionService = 16843837; // 0x101043d
     field public static final int settingsActivity = 16843301; // 0x1010225
     field public static final int settingsSliceUri = 16844179; // 0x1010593
@@ -1332,7 +1326,7 @@
     field public static final int supportsAssist = 16844016; // 0x10104f0
     field public static final int supportsLaunchVoiceAssistFromKeyguard = 16844017; // 0x10104f1
     field public static final int supportsLocalInteraction = 16844047; // 0x101050f
-    field public static final int supportsMultipleDisplays = 16844183; // 0x1010597
+    field public static final int supportsMultipleDisplays = 16844182; // 0x1010596
     field public static final int supportsPictureInPicture = 16844023; // 0x10104f7
     field public static final int supportsRtl = 16843695; // 0x10103af
     field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb
@@ -1513,9 +1507,9 @@
     field public static final int unselectedAlpha = 16843278; // 0x101020e
     field public static final int updatePeriodMillis = 16843344; // 0x1010250
     field public static final int use32bitAbi = 16844053; // 0x1010515
-    field public static final int useAppZygote = 16844184; // 0x1010598
+    field public static final int useAppZygote = 16844183; // 0x1010597
     field public static final int useDefaultMargins = 16843641; // 0x1010379
-    field public static final int useEmbeddedDex = 16844196; // 0x10105a4
+    field public static final int useEmbeddedDex = 16844190; // 0x101059e
     field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
     field public static final int useLevel = 16843167; // 0x101019f
     field public static final int userVisible = 16843409; // 0x1010291
@@ -1627,7 +1621,7 @@
     field @Deprecated public static final int yearListSelectorColor = 16843930; // 0x101049a
     field public static final int yesNoPreferenceStyle = 16842896; // 0x1010090
     field public static final int zAdjustment = 16843201; // 0x10101c1
-    field public static final int zygotePreloadName = 16844195; // 0x10105a3
+    field public static final int zygotePreloadName = 16844189; // 0x101059d
   }
 
   public static final class R.bool {
diff --git a/api/system-current.txt b/api/system-current.txt
index 7c66af5..b2fa697 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -218,7 +218,7 @@
   }
 
   public static final class R.attr {
-    field public static final int allowClearUserDataOnFailedRestore = 16844198; // 0x10105a6
+    field public static final int allowClearUserDataOnFailedRestore = 16844288; // 0x1010600
     field public static final int isVrOnly = 16844152; // 0x1010578
     field public static final int requiredSystemPropertyName = 16844133; // 0x1010565
     field public static final int requiredSystemPropertyValue = 16844134; // 0x1010566
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 33bc341..fb54566 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2889,6 +2889,99 @@
 
   <!-- ===============================================================
        Resources added in version Q of the platform
+       =============================================================== -->
+    <eat-comment />
+
+    <public type="attr" name="packageType" id="0x01010587" />
+    <public type="attr" name="opticalInsetLeft" id="0x01010588" />
+    <public type="attr" name="opticalInsetTop" id="0x01010589" />
+    <public type="attr" name="opticalInsetRight" id="0x0101058a" />
+    <public type="attr" name="opticalInsetBottom" id="0x0101058b" />
+    <public type="attr" name="forceDarkAllowed" id="0x0101058c" />
+    <!-- @hide @SystemApi -->
+    <public type="attr" name="supportsAmbientMode" id="0x0101058d" />
+    <!-- @hide For use by platform and tools only. Developers should not specify this value. -->
+    <public type="attr" name="usesNonSdkApi" id="0x0101058e" />
+    <public type="attr" name="nonInteractiveUiTimeout" id="0x0101058f" />
+    <public type="attr" name="isLightTheme" id="0x01010590" />
+    <public type="attr" name="isSplitRequired" id="0x01010591" />
+    <public type="attr" name="textLocale" id="0x01010592" />
+    <public type="attr" name="settingsSliceUri" id="0x01010593" />
+    <public type="attr" name="shell" id="0x01010594" />
+    <public type="attr" name="interactiveUiTimeout" id="0x01010595" />
+    <public type="attr" name="supportsMultipleDisplays" id="0x01010596" />
+    <public type="attr" name="useAppZygote" id="0x01010597" />
+    <public type="attr" name="selectionDividerHeight" id="0x01010598" />
+    <public type="attr" name="foregroundServiceType" id="0x01010599" />
+    <public type="attr" name="hasFragileUserData" id="0x0101059a" />
+    <public type="attr" name="minAspectRatio" id="0x0101059b" />
+    <public type="attr" name="inheritShowWhenLocked" id="0x0101059c" />
+    <public type="attr" name="zygotePreloadName" id="0x0101059d" />
+    <public type="attr" name="useEmbeddedDex" id="0x0101059e" />
+    <public type="attr" name="forceUriPermissions" id="0x0101059f" />
+    <!-- @hide @SystemApi -->
+    <public type="attr" name="allowClearUserDataOnFailedRestore" id="0x01010600" />
+    <public type="attr" name="allowAudioPlaybackCapture" id="0x01010601" />
+    <public type="attr" name="secureElementName" id="0x01010602" />
+    <public type="attr" name="requestLegacyExternalStorage" id="0x01010603" />
+    <public type="attr" name="enforceStatusBarContrast" id="0x01010604" />
+    <public type="attr" name="enforceNavigationBarContrast" id="0x01010605" />
+    <public type="attr" name="identifier" id="0x01010606" />
+
+    <!-- @hide @SystemApi -->
+    <public type="drawable" name="ic_info" id="0x010800b4" />
+
+    <!-- @hide @SystemApi -->
+    <public type="style" name="Theme.DeviceDefault.DocumentsUI" id="0x010302e2" />
+    <public type="style" name="Theme.DeviceDefault.DayNight" id="0x010302e3" />
+    <public type="style" name="ThemeOverlay.DeviceDefault.Accent.DayNight" id="0x010302e4" />
+
+    <public type="id" name="accessibilityActionPageUp" id="0x01020046" />
+    <public type="id" name="accessibilityActionPageDown" id="0x01020047" />
+    <public type="id" name="accessibilityActionPageLeft" id="0x01020048" />
+    <public type="id" name="accessibilityActionPageRight" id="0x01020049" />
+
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_helpPackageNameKey" id="0x0104001b" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_helpPackageNameValue" id="0x0104001c" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_helpIntentExtraKey" id="0x0104001d" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_helpIntentNameKey" id="0x0104001e" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_feedbackIntentExtraKey" id="0x0104001f" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_feedbackIntentNameKey" id="0x01040020" />
+    <!-- @hide @SystemApi @TestApi -->
+    <public type="string" name="config_defaultAssistant" id="0x01040021" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_defaultBrowser" id="0x01040022" />
+    <!-- @hide @SystemApi @TestApi -->
+    <public type="string" name="config_defaultDialer" id="0x01040023" />
+    <!-- @hide @SystemApi -->
+    <public type="string" name="config_defaultSms" id="0x01040024" />
+
+    <!-- @hide @SystemApi -->
+    <public type="bool" name="config_sendPackageName" id="0x01110000" />
+    <!-- @hide @SystemApi -->
+    <public type="bool" name="config_showDefaultAssistant" id="0x01110001" />
+    <!-- @hide @SystemApi -->
+    <public type="bool" name="config_showDefaultEmergency" id="0x01110002" />
+    <!-- @hide @SystemApi -->
+    <public type="bool" name="config_showDefaultHome" id="0x01110003" />
+    <!-- @hide @TestApi -->
+    <public type="bool" name="config_perDisplayFocusEnabled" id="0x01110004" />
+
+    <!-- @hide @SystemApi -->
+    <public type="dimen" name="config_restrictedIconSize" id="0x01050007" />
+
+    <!-- @hide @SystemApi -->
+    <public type="color" name="system_notification_accent_color" id="0x0106001c" />
+
+
+  <!-- ===============================================================
+       Resources added in version R of the platform
 
        NOTE: add <public> elements within a <public-group> like so:
 
@@ -2904,113 +2997,28 @@
        =============================================================== -->
   <eat-comment />
 
-    <public-group type="attr" first-id="0x01010587">
-        <public name="packageType" />
-        <public name="opticalInsetLeft" />
-        <public name="opticalInsetTop" />
-        <public name="opticalInsetRight" />
-        <public name="opticalInsetBottom" />
-        <public name="forceDarkAllowed" />
-        <!-- @hide @SystemApi -->
-        <public name="supportsAmbientMode" />
-        <!-- @hide For use by platform and tools only. Developers should not specify this value. -->
-        <public name="usesNonSdkApi" />
-        <public name="nonInteractiveUiTimeout" />
-        <public name="isLightTheme" />
-        <public name="isSplitRequired" />
-        <public name="textLocale" />
-        <public name="settingsSliceUri" />
-        <public name="shell" />
-        <public name="interactiveUiTimeout" />
-        <public name="__removed6" />
-        <public name="supportsMultipleDisplays" />
-        <public name="useAppZygote" />
-        <public name="__removed1" />
-        <public name="__removed2" />
-        <public name="__removed3" />
-        <public name="__removed4" />
-        <public name="__removed5" />
-        <public name="selectionDividerHeight" />
-        <public name="foregroundServiceType" />
-        <public name="hasFragileUserData" />
-        <public name="minAspectRatio" />
-        <public name="inheritShowWhenLocked" />
-        <public name="zygotePreloadName" />
-        <public name="useEmbeddedDex" />
-        <public name="forceUriPermissions" />
-        <!-- @hide @SystemApi -->
-        <public name="allowClearUserDataOnFailedRestore"/>
-        <public name="allowAudioPlaybackCapture"/>
-        <public name="secureElementName" />
-        <public name="requestLegacyExternalStorage"/>
-        <public name="enforceStatusBarContrast" />
-        <public name="enforceNavigationBarContrast" />
-        <public name="identifier" />
+    <public-group type="attr" first-id="0x01010607">
     </public-group>
 
-    <public-group type="drawable" first-id="0x010800b4">
-        <!-- @hide @SystemApi -->
-        <public name="ic_info" />
+    <public-group type="drawable" first-id="0x010800b5">
     </public-group>
 
-    <public-group type="style" first-id="0x010302e2">
-        <!-- @hide @SystemApi -->
-        <public name="Theme.DeviceDefault.DocumentsUI" />
-        <public name="Theme.DeviceDefault.DayNight" />
-        <public name="ThemeOverlay.DeviceDefault.Accent.DayNight" />
+    <public-group type="style" first-id="0x010302e5">
     </public-group>
 
-    <public-group type="id" first-id="0x01020046">
-      <public name="accessibilityActionPageUp" />
-      <public name="accessibilityActionPageDown" />
-      <public name="accessibilityActionPageLeft" />
-      <public name="accessibilityActionPageRight" />
+    <public-group type="id" first-id="0x0102004a">
     </public-group>
 
-    <public-group type="string" first-id="0x0104001b">
-        <!-- @hide @SystemApi -->
-        <public name="config_helpPackageNameKey" />
-        <!-- @hide @SystemApi -->
-        <public name="config_helpPackageNameValue" />
-        <!-- @hide @SystemApi -->
-        <public name="config_helpIntentExtraKey" />
-        <!-- @hide @SystemApi -->
-        <public name="config_helpIntentNameKey" />
-        <!-- @hide @SystemApi -->
-        <public name="config_feedbackIntentExtraKey" />
-        <!-- @hide @SystemApi -->
-        <public name="config_feedbackIntentNameKey" />
-      <!-- @hide @SystemApi @TestApi -->
-      <public name="config_defaultAssistant" />
-      <!-- @hide @SystemApi -->
-      <public name="config_defaultBrowser" />
-      <!-- @hide @SystemApi @TestApi -->
-      <public name="config_defaultDialer" />
-      <!-- @hide @SystemApi -->
-      <public name="config_defaultSms" />
+    <public-group type="string" first-id="0x01040025">
     </public-group>
 
-    <public-group type="bool" first-id="0x01110000">
-        <!-- @hide @SystemApi -->
-        <public name="config_sendPackageName" />
-      <!-- @hide @SystemApi -->
-      <public name="config_showDefaultAssistant" />
-      <!-- @hide @SystemApi -->
-      <public name="config_showDefaultEmergency" />
-      <!-- @hide @SystemApi -->
-      <public name="config_showDefaultHome" />
-      <!-- @hide @TestApi -->
-      <public name="config_perDisplayFocusEnabled" />
+    <public-group type="bool" first-id="0x01110005">
     </public-group>
 
-    <public-group type="dimen" first-id="0x01050007">
-        <!-- @hide @SystemApi -->
-        <public name="config_restrictedIconSize" />
+    <public-group type="dimen" first-id="0x01050008">
     </public-group>
 
-    <public-group type="color" first-id="0x0106001c">
-        <!-- @hide @SystemApi -->
-        <public name="system_notification_accent_color" />
+    <public-group type="color" first-id="0x0106001d">
     </public-group>
 
   <!-- ===============================================================