diff options
| author | 2025-01-14 06:56:09 -0800 | |
|---|---|---|
| committer | 2025-01-14 06:56:09 -0800 | |
| commit | b2ffd9ef2ef573b2e1e5def786bb2a0d81d0dc27 (patch) | |
| tree | 540ed13bdc3f4d907775fac05804626c1119ddb6 | |
| parent | ea64be1accb87cb858628612c3759198c4a01b42 (diff) | |
| parent | 7623efdb3653260dd3e6bd51ac5368fc333d9f31 (diff) | |
Merge changes from topic "baklava-eggs" into main
* changes:
Telescope!
Refreshed SystemUI/EasterEgg app icons for Android 16.
14 files changed, 982 insertions, 29 deletions
diff --git a/packages/EasterEgg/AndroidManifest.xml b/packages/EasterEgg/AndroidManifest.xml index 754abb2f76be..96e5892f4d1d 100644 --- a/packages/EasterEgg/AndroidManifest.xml +++ b/packages/EasterEgg/AndroidManifest.xml @@ -33,7 +33,7 @@ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <application - android:icon="@drawable/android15_patch_adaptive" + android:icon="@drawable/android16_patch_adaptive" android:label="@string/app_name"> <!-- Android V easter egg: Daydream version of Landroid @@ -41,7 +41,7 @@ <service android:name=".landroid.DreamUniverse" android:exported="true" - android:icon="@drawable/android15_patch_adaptive" + android:icon="@drawable/android16_patch_adaptive" android:label="@string/v_egg_name" android:description="@string/dream_description" android:enabled="false" @@ -62,7 +62,7 @@ android:name=".landroid.MainActivity" android:exported="true" android:label="@string/u_egg_name" - android:icon="@drawable/android15_patch_adaptive" + android:icon="@drawable/android16_patch_adaptive" android:configChanges="orientation|screenLayout|screenSize|density" android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"> <intent-filter> diff --git a/packages/EasterEgg/res/drawable/android16_patch_adaptive.xml b/packages/EasterEgg/res/drawable/android16_patch_adaptive.xml new file mode 100644 index 000000000000..277df47438e3 --- /dev/null +++ b/packages/EasterEgg/res/drawable/android16_patch_adaptive.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/android16_patch_adaptive_background"/> + <foreground android:drawable="@drawable/android16_patch_adaptive_foreground"/> + <monochrome android:drawable="@drawable/android16_patch_monochrome"/> +</adaptive-icon> diff --git a/packages/EasterEgg/res/drawable/android16_patch_adaptive_background.xml b/packages/EasterEgg/res/drawable/android16_patch_adaptive_background.xml new file mode 100644 index 000000000000..17c2b927f4fd --- /dev/null +++ b/packages/EasterEgg/res/drawable/android16_patch_adaptive_background.xml @@ -0,0 +1,245 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <group> + <clip-path + android:pathData="M0,0h108v108h-108z"/> + <path + android:pathData="M73,54L54,35L35,54L54,73L73,54Z" + android:fillColor="#34A853"/> + <path + android:pathData="M44.5,44.5L54,44.5L44.5,54L44.5,44.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M63.5,63.5L54,63.5L63.5,54L63.5,63.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,54L54,44.5L63.5,54L54,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,44.5L54,35L63.5,44.5L54,44.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,63.5L54,73L44.5,63.5L54,63.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M63.5,54L63.5,44.5L73,54L63.5,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M44.5,54L44.5,63.5L35,54L44.5,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,54L54,63.5L44.5,54L54,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M82.5,25.5L82.5,35L73,25.5L82.5,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,44.5L63.5,35L73,44.5L63.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,35L82.5,35L73,44.5L73,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,35L92,35L82.5,44.5L82.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,35L54,35L63.5,25.5L63.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,44.5L82.5,44.5L73,54L73,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,25.5L63.5,25.5L73,16L73,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,35L63.5,35L73,25.5L73,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,63.5L82.5,73L73,63.5L82.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,82.5L63.5,73L73,82.5L63.5,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,73L82.5,73L73,82.5L73,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,73L92,73L82.5,82.5L82.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,73L54,73L63.5,63.5L63.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,82.5L82.5,82.5L73,92L73,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,63.5L63.5,63.5L73,54L73,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,73L63.5,73L73,63.5L73,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,63.5L44.5,73L35,63.5L44.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,82.5L25.5,73L35,82.5L25.5,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,73L44.5,73L35,82.5L35,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,73L54,73L44.5,82.5L44.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,73L16,73L25.5,63.5L25.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,82.5L44.5,82.5L35,92L35,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,63.5L25.5,63.5L35,54L35,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,73L25.5,73L35,63.5L35,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,25.5L44.5,35L35,25.5L44.5,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,44.5L25.5,35L35,44.5L25.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,35L44.5,35L35,44.5L35,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,35L54,35L44.5,44.5L44.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,35L16,35L25.5,25.5L25.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,44.5L44.5,44.5L35,54L35,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,25.5L25.5,25.5L35,16L35,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,35L25.5,35L35,25.5L35,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,25.5L54,25.5L63.5,16L63.5,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,6.5L54,6.5L44.5,16L44.5,6.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,16L54,25.5L44.5,16L54,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,25.5L54,35L44.5,25.5L54,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,6.5L54,-3L63.5,6.5L54,6.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,16L44.5,25.5L35,16L44.5,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,16L63.5,6.5L73,16L63.5,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,16L54,6.5L63.5,16L54,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M101.5,63.5L92,63.5L101.5,54L101.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,44.5L92,44.5L82.5,54L82.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,54L92,63.5L82.5,54L92,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,63.5L92,73L82.5,63.5L92,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,44.5L92,35L101.5,44.5L92,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,54L82.5,63.5L73,54L82.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M101.5,54L101.5,44.5L111,54L101.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,54L92,44.5L101.5,54L92,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,101.5L54,101.5L63.5,92L63.5,101.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,82.5L54,82.5L44.5,92L44.5,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,92L54,101.5L44.5,92L54,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,101.5L54,111L44.5,101.5L54,101.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,82.5L54,73L63.5,82.5L54,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,92L44.5,101.5L35,92L44.5,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,92L63.5,82.5L73,92L63.5,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,92L54,82.5L63.5,92L54,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,63.5L16,63.5L25.5,54L25.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M6.5,44.5L16,44.5L6.5,54L6.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,54L16,63.5L6.5,54L16,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,63.5L16,73L6.5,63.5L16,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,44.5L16,35L25.5,44.5L16,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M6.5,54L6.5,63.5L-3,54L6.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,54L25.5,44.5L35,54L25.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,54L16,44.5L25.5,54L16,54Z" + android:fillColor="#16161D"/> + </group> +</vector> diff --git a/packages/EasterEgg/res/drawable/android16_patch_adaptive_foreground.xml b/packages/EasterEgg/res/drawable/android16_patch_adaptive_foreground.xml new file mode 100644 index 000000000000..4c2932399c1a --- /dev/null +++ b/packages/EasterEgg/res/drawable/android16_patch_adaptive_foreground.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:pathData="M40.65,63.013C40.722,62.922 40.716,62.789 40.633,62.707V62.707C40.537,62.61 40.377,62.62 40.292,62.727C34.567,69.881 31.569,75.536 33.089,77.056C35.366,79.333 46.923,71.469 58.901,59.491C60.049,58.343 61.159,57.199 62.226,56.066C62.342,55.943 62.339,55.751 62.219,55.632L61.566,54.978C61.441,54.854 61.238,54.857 61.117,54.985C60.057,56.11 58.951,57.25 57.806,58.395C46.882,69.319 36.496,76.646 34.61,74.759C33.417,73.567 35.903,68.982 40.65,63.013Z" + android:fillColor="#C6FF00" + android:fillType="evenOdd"/> + <path + android:pathData="M67.956,52.033C68.205,51.966 68.462,52.115 68.529,52.364C68.596,52.614 68.448,52.871 68.198,52.938L67.956,52.033ZM68.198,52.938L63.926,54.083L63.683,53.178L67.956,52.033L68.198,52.938Z" + android:fillColor="#000000"/> + <path + android:pathData="M64.497,49.237C64.564,48.987 64.821,48.839 65.071,48.906C65.32,48.973 65.469,49.229 65.402,49.479L64.497,49.237ZM65.402,49.479L64.257,53.752L63.352,53.509L64.497,49.237L65.402,49.479Z" + android:fillColor="#000000"/> + <path + android:pathData="M66.145,51.236C64.869,49.961 62.83,49.931 61.591,51.17L58.825,53.937C58.585,54.176 58.585,54.564 58.825,54.803C59.063,55.042 59.452,55.042 59.691,54.803L60.436,54.057C60.915,53.579 61.69,53.579 62.169,54.057L63.324,55.212C63.802,55.691 63.802,56.466 63.324,56.945L62.578,57.69C62.339,57.929 62.339,58.318 62.578,58.557C62.817,58.796 63.205,58.796 63.444,58.557L66.211,55.79C67.45,54.551 67.42,52.512 66.145,51.236Z" + android:fillColor="#000000"/> +</vector> diff --git a/packages/EasterEgg/res/drawable/android16_patch_monochrome.xml b/packages/EasterEgg/res/drawable/android16_patch_monochrome.xml new file mode 100644 index 000000000000..608d5ea6ee48 --- /dev/null +++ b/packages/EasterEgg/res/drawable/android16_patch_monochrome.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:strokeWidth="1" + android:pathData="M54.707,35.707L72.293,53.293A1,1 102.155,0 1,72.293 54.707L54.707,72.293A1,1 0,0 1,53.293 72.293L35.707,54.707A1,1 0,0 1,35.707 53.293L53.293,35.707A1,1 0,0 1,54.707 35.707z" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M55.237,35.177L72.823,52.763A1.75,1.75 67.835,0 1,72.823 55.237L55.237,72.823A1.75,1.75 77.684,0 1,52.763 72.823L35.177,55.237A1.75,1.75 0,0 1,35.177 52.763L52.763,35.177A1.75,1.75 0,0 1,55.237 35.177z" + android:strokeWidth="1.5" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M44.5,44.5h19v19h-19z" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M54,44.5l9.5,9.5l-9.5,9.5l-9.5,-9.5z" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M54,35V73" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M73,54L35,54" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M33.576,31.135l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M31.146,65.966l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M26.718,56l1.718,1.718l-1.718,1.718l-1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M31.146,48l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M41.925,34.374l1.718,1.718l-1.718,1.718l-1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M63.146,71l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M48.567,74.553l1.718,1.718l-1.718,1.718l-1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M51.146,26l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M72.291,32.146l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M76.531,36.417l-1.718,1.718l-1.718,-1.718l1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M58.291,32.146l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M68.419,36.978l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M74.252,64.034l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M71.437,76.718l-1.718,1.718l-1.718,-1.718l1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M42.984,69.38l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M82.437,51.718l-1.718,1.718l-1.718,-1.718l1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M40.65,63.013C40.722,62.922 40.716,62.789 40.633,62.707V62.707C40.537,62.61 40.377,62.62 40.292,62.727C34.567,69.881 31.569,75.536 33.089,77.056C35.366,79.333 46.923,71.469 58.901,59.491C60.049,58.343 61.159,57.199 62.226,56.066C62.342,55.943 62.339,55.751 62.219,55.632L61.566,54.978C61.441,54.854 61.238,54.857 61.117,54.985C60.057,56.11 58.951,57.25 57.806,58.395C46.882,69.319 36.496,76.646 34.61,74.759C33.417,73.567 35.903,68.982 40.65,63.013Z" + android:fillColor="#ffffff" + android:fillType="evenOdd"/> + <path + android:pathData="M67.956,52.033C68.205,51.966 68.462,52.115 68.529,52.364C68.596,52.614 68.448,52.871 68.198,52.938L67.956,52.033ZM68.198,52.938L63.926,54.083L63.683,53.178L67.956,52.033L68.198,52.938Z" + android:fillColor="#ffffff"/> + <path + android:pathData="M64.497,49.237C64.564,48.987 64.821,48.839 65.071,48.906C65.32,48.972 65.469,49.229 65.402,49.479L64.497,49.237ZM65.402,49.479L64.257,53.752L63.352,53.509L64.497,49.237L65.402,49.479Z" + android:fillColor="#ffffff"/> + <path + android:pathData="M66.145,51.236C64.869,49.961 62.83,49.931 61.591,51.17L58.825,53.937C58.585,54.176 58.585,54.564 58.825,54.803C59.063,55.042 59.452,55.042 59.691,54.803L60.436,54.057C60.915,53.579 61.69,53.579 62.169,54.057L63.324,55.212C63.802,55.691 63.802,56.466 63.324,56.945L62.578,57.69C62.339,57.929 62.339,58.318 62.578,58.556C62.817,58.796 63.205,58.796 63.444,58.556L66.211,55.79C67.45,54.551 67.42,52.512 66.145,51.236Z" + android:fillColor="#ffffff"/> +</vector> diff --git a/packages/EasterEgg/src/com/android/egg/landroid/DreamUniverse.kt b/packages/EasterEgg/src/com/android/egg/landroid/DreamUniverse.kt index 8c87c5d4af7b..d56e8b9e8d0e 100644 --- a/packages/EasterEgg/src/com/android/egg/landroid/DreamUniverse.kt +++ b/packages/EasterEgg/src/com/android/egg/landroid/DreamUniverse.kt @@ -59,7 +59,7 @@ class DreamUniverse : DreamService() { override fun onAttachedToWindow() { super.onAttachedToWindow() - val universe = VisibleUniverse(namer = Namer(resources), randomSeed = randomSeed()) + val universe = Universe(namer = Namer(resources), randomSeed = randomSeed()) isInteractive = false diff --git a/packages/EasterEgg/src/com/android/egg/landroid/MainActivity.kt b/packages/EasterEgg/src/com/android/egg/landroid/MainActivity.kt index 16ec1a933d92..4f77b00b7570 100644 --- a/packages/EasterEgg/src/com/android/egg/landroid/MainActivity.kt +++ b/packages/EasterEgg/src/com/android/egg/landroid/MainActivity.kt @@ -26,7 +26,6 @@ import androidx.activity.enableEdgeToEdge import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.withInfiniteAnimationFrameNanos -import androidx.compose.foundation.Canvas import androidx.compose.foundation.border import androidx.compose.foundation.gestures.awaitFirstDown import androidx.compose.foundation.gestures.forEachGesture @@ -45,6 +44,7 @@ import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.MutableState +import androidx.compose.runtime.currentRecomposeScope import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -64,7 +64,6 @@ import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.toUpperCase import androidx.compose.ui.tooling.preview.Devices import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -75,6 +74,9 @@ import androidx.lifecycle.lifecycleScope import androidx.lifecycle.repeatOnLifecycle import androidx.window.layout.FoldingFeature import androidx.window.layout.WindowInfoTracker +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch import java.lang.Float.max import java.lang.Float.min import java.util.Calendar @@ -83,9 +85,6 @@ import kotlin.math.absoluteValue import kotlin.math.floor import kotlin.math.sqrt import kotlin.random.Random -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.delay -import kotlinx.coroutines.launch enum class RandomSeedType { Fixed, @@ -139,7 +138,6 @@ fun getDessertCode(): String = else -> Build.VERSION.RELEASE_OR_CODENAME.replace(Regex("[a-z]*"), "") } - val DEBUG_TEXT = mutableStateOf("Hello Universe") const val SHOW_DEBUG_TEXT = false @@ -158,7 +156,7 @@ fun DebugText(text: MutableState<String>) { } @Composable -fun Telemetry(universe: VisibleUniverse) { +fun Telemetry(universe: Universe) { var topVisible by remember { mutableStateOf(false) } var bottomVisible by remember { mutableStateOf(false) } @@ -180,10 +178,15 @@ fun Telemetry(universe: VisibleUniverse) { topVisible = true } - universe.triggerDraw.value // recompose on every frame - val explored = universe.planets.filter { it.explored } + // TODO: Narrow the scope of invalidation here to the specific data needed; + // the behavior below mimics the previous implementation of a snapshot ticker value + val recomposeScope = currentRecomposeScope + Telescope(universe) { + recomposeScope.invalidate() + } + BoxWithConstraints( modifier = Modifier.fillMaxSize().padding(6.dp).windowInsetsPadding(WindowInsets.safeContent), @@ -299,7 +302,7 @@ class MainActivity : ComponentActivity() { enableEdgeToEdge() - val universe = VisibleUniverse(namer = Namer(resources), randomSeed = randomSeed()) + val universe = Universe(namer = Namer(resources), randomSeed = randomSeed()) if (TEST_UNIVERSE) { universe.initTest() @@ -373,7 +376,7 @@ class MainActivity : ComponentActivity() { @Preview(name = "tablet", device = Devices.TABLET) @Composable fun MainActivityPreview() { - val universe = VisibleUniverse(namer = Namer(Resources.getSystem()), randomSeed = randomSeed()) + val universe = Universe(namer = Namer(Resources.getSystem()), randomSeed = randomSeed()) universe.initTest() @@ -458,12 +461,12 @@ fun FlightStick( @Composable fun Spaaaace( modifier: Modifier, - u: VisibleUniverse, + u: Universe, foldState: MutableState<FoldingFeature?> = mutableStateOf(null) ) { LaunchedEffect(u) { while (true) withInfiniteAnimationFrameNanos { frameTimeNanos -> - u.simulateAndDrawFrame(frameTimeNanos) + u.step(frameTimeNanos) } } @@ -492,7 +495,7 @@ fun Spaaaace( val centerFracY: Float by animateFloatAsState(if (halfFolded && horizontalFold) 0.25f else 0.5f, label = "centerY") - Canvas(modifier = canvasModifier) { + UniverseCanvas(u, canvasModifier) { u -> drawRect(Colors.Eigengrau, Offset.Zero, size) val closest = u.closestPlanet() diff --git a/packages/EasterEgg/src/com/android/egg/landroid/Physics.kt b/packages/EasterEgg/src/com/android/egg/landroid/Physics.kt index d14234ec66d9..b8c68818888a 100644 --- a/packages/EasterEgg/src/com/android/egg/landroid/Physics.kt +++ b/packages/EasterEgg/src/com/android/egg/landroid/Physics.kt @@ -17,6 +17,8 @@ package com.android.egg.landroid import android.util.ArraySet +import androidx.compose.ui.util.fastForEach +import kotlinx.coroutines.DisposableHandle import kotlin.random.Random // artificially speed up or slow down the simulation @@ -127,6 +129,7 @@ open class Simulator(val randomSeed: Long) { val rng = Random(randomSeed) val entities = ArraySet<Entity>(1000) val constraints = ArraySet<Constraint>(100) + private val simStepListeners = mutableListOf<() -> Unit>() fun add(e: Entity) = entities.add(e) fun remove(e: Entity) = entities.remove(e) @@ -169,5 +172,26 @@ open class Simulator(val randomSeed: Long) { // 3. compute new velocities from updated positions and saved positions postUpdateAll(dt, localEntities) + + // 4. notify listeners that step is complete + simStepListeners.fastForEach { it.invoke() } + } + + /** + * Register [listener] to be invoked every time the [Simulator] completes one [step]. + * Use this to enqueue drawing. + * + * Instead of the usual register()/unregister() pattern, we're going to borrow + * [kotlinx.coroutines.DisposableHandle] here. Call [DisposableHandle.dispose] on the return + * value to unregister. + */ + fun addSimulationStepListener(listener: () -> Unit): DisposableHandle { + // add to listener list + simStepListeners += listener + + return DisposableHandle { + // on dispose, remove from listener list + simStepListeners -= listener + } } } diff --git a/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt b/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt index ed3ebc7bf9a5..c476d5cf0b8b 100644 --- a/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt +++ b/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt @@ -16,19 +16,31 @@ package com.android.egg.landroid +import androidx.compose.foundation.layout.Spacer +import androidx.compose.runtime.Composable +import androidx.compose.runtime.RememberObserver +import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Path import androidx.compose.ui.graphics.PathEffect import androidx.compose.ui.graphics.PointMode +import androidx.compose.ui.graphics.drawscope.ContentDrawScope import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.graphics.drawscope.Stroke import androidx.compose.ui.graphics.drawscope.rotateRad import androidx.compose.ui.graphics.drawscope.scale import androidx.compose.ui.graphics.drawscope.translate +import androidx.compose.ui.node.DrawModifierNode +import androidx.compose.ui.node.ModifierNodeElement +import androidx.compose.ui.node.invalidateDraw import androidx.compose.ui.util.lerp import androidx.core.math.MathUtils.clamp import com.android.egg.flags.Flags.flagFlag +import kotlinx.coroutines.DisposableHandle import java.lang.Float.max import kotlin.math.exp import kotlin.math.sqrt @@ -55,22 +67,108 @@ fun DrawScope.zoom(zoom: Float, block: ZoomedDrawScope.() -> Unit) { ds.scale(zoom) { block(ds) } } -class VisibleUniverse(namer: Namer, randomSeed: Long) : Universe(namer, randomSeed) { - // Magic variable. Every time we update it, Compose will notice and redraw the universe. - val triggerDraw = mutableStateOf(0L) +/** + * A device for observing changes to a [Simulator] such as a [Universe]. + * [observer] will be invoked each time a [Simulator.step] has completed. + */ +@Composable +fun <S : Simulator> Telescope( + subject: S, + observer: (S) -> Unit +) { + remember(subject) { + object : RememberObserver { + lateinit var registration: DisposableHandle + var currentObserver by mutableStateOf(observer) + + override fun onRemembered() { + registration = subject.addSimulationStepListener { currentObserver(subject) } + } + + override fun onForgotten() { + registration.dispose() + } + + override fun onAbandoned() {} + } + }.currentObserver = observer +} + +fun Modifier.drawUniverse( + universe: Universe, + draw: DrawScope.(Universe) -> Unit +): Modifier = this then UniverseElement(universe, draw) + +@Composable +fun UniverseCanvas( + universe: Universe, + modifier: Modifier = Modifier, + draw: DrawScope.(Universe) -> Unit +) { + Spacer(modifier.drawUniverse(universe, draw)) +} + +private class UniverseElement( + val universe: Universe, + val draw: DrawScope.(Universe) -> Unit +) : ModifierNodeElement<UniverseModifierNode>() { + override fun create(): UniverseModifierNode = UniverseModifierNode(universe, draw) + + // Called when a modifier is applied to a Layout whose inputs have changed + override fun update(node: UniverseModifierNode) { + node.universe = universe + node.draw = draw + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (javaClass != other?.javaClass) return false - fun simulateAndDrawFrame(nanos: Long) { - // By writing this value, Compose will look for functions that read it (like drawZoomed). - triggerDraw.value = nanos + other as UniverseElement - step(nanos) + if (universe != other.universe) return false + if (draw != other.draw) return false + + return true + } + + override fun hashCode(): Int { + var result = universe.hashCode() + result = 31 * result + draw.hashCode() + return result } } -fun ZoomedDrawScope.drawUniverse(universe: VisibleUniverse) { - with(universe) { - triggerDraw.value // Please recompose when this value changes. +private class UniverseModifierNode( + universe: Universe, + draw: DrawScope.(Universe) -> Unit, +) : Modifier.Node(), DrawModifierNode { + private val universeListener: () -> Unit = { invalidateDraw() } + private var removeUniverseListener: DisposableHandle? = + universe.addSimulationStepListener(universeListener) + + var universe: Universe = universe + set(value) { + if (field === value) return + removeUniverseListener?.dispose() + field = value + removeUniverseListener = value.addSimulationStepListener(universeListener) + } + + var draw: ContentDrawScope.(Universe) -> Unit = draw + set(value) { + if (field === value) return + field = value + invalidateDraw() + } + override fun ContentDrawScope.draw() { + draw(universe) + } +} + +fun ZoomedDrawScope.drawUniverse(universe: Universe) { + with(universe) { constraints.forEach { when (it) { is Landing -> drawLanding(it) diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 0075f85af8ed..b53198d8ae98 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -406,7 +406,7 @@ android:killAfterRestore="false" android:hardwareAccelerated="true" android:label="@string/app_label" - android:icon="@drawable/android15_patch_adaptive" + android:icon="@drawable/android16_patch_adaptive" android:process="com.android.systemui" android:supportsRtl="true" android:theme="@style/Theme.SystemUI" diff --git a/packages/SystemUI/res/drawable/android16_patch_adaptive.xml b/packages/SystemUI/res/drawable/android16_patch_adaptive.xml new file mode 100644 index 000000000000..277df47438e3 --- /dev/null +++ b/packages/SystemUI/res/drawable/android16_patch_adaptive.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/android16_patch_adaptive_background"/> + <foreground android:drawable="@drawable/android16_patch_adaptive_foreground"/> + <monochrome android:drawable="@drawable/android16_patch_monochrome"/> +</adaptive-icon> diff --git a/packages/SystemUI/res/drawable/android16_patch_adaptive_background.xml b/packages/SystemUI/res/drawable/android16_patch_adaptive_background.xml new file mode 100644 index 000000000000..17c2b927f4fd --- /dev/null +++ b/packages/SystemUI/res/drawable/android16_patch_adaptive_background.xml @@ -0,0 +1,245 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <group> + <clip-path + android:pathData="M0,0h108v108h-108z"/> + <path + android:pathData="M73,54L54,35L35,54L54,73L73,54Z" + android:fillColor="#34A853"/> + <path + android:pathData="M44.5,44.5L54,44.5L44.5,54L44.5,44.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M63.5,63.5L54,63.5L63.5,54L63.5,63.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,54L54,44.5L63.5,54L54,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,44.5L54,35L63.5,44.5L54,44.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,63.5L54,73L44.5,63.5L54,63.5Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M63.5,54L63.5,44.5L73,54L63.5,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M44.5,54L44.5,63.5L35,54L44.5,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M54,54L54,63.5L44.5,54L54,54Z" + android:fillColor="#1F8E3D"/> + <path + android:pathData="M82.5,25.5L82.5,35L73,25.5L82.5,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,44.5L63.5,35L73,44.5L63.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,35L82.5,35L73,44.5L73,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,35L92,35L82.5,44.5L82.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,35L54,35L63.5,25.5L63.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,44.5L82.5,44.5L73,54L73,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,25.5L63.5,25.5L73,16L73,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,35L63.5,35L73,25.5L73,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,63.5L82.5,73L73,63.5L82.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,82.5L63.5,73L73,82.5L63.5,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,73L82.5,73L73,82.5L73,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,73L92,73L82.5,82.5L82.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,73L54,73L63.5,63.5L63.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,82.5L82.5,82.5L73,92L73,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,63.5L63.5,63.5L73,54L73,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M73,73L63.5,73L73,63.5L73,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,63.5L44.5,73L35,63.5L44.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,82.5L25.5,73L35,82.5L25.5,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,73L44.5,73L35,82.5L35,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,73L54,73L44.5,82.5L44.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,73L16,73L25.5,63.5L25.5,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,82.5L44.5,82.5L35,92L35,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,63.5L25.5,63.5L35,54L35,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,73L25.5,73L35,63.5L35,73Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,25.5L44.5,35L35,25.5L44.5,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,44.5L25.5,35L35,44.5L25.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,35L44.5,35L35,44.5L35,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,35L54,35L44.5,44.5L44.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,35L16,35L25.5,25.5L25.5,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,44.5L44.5,44.5L35,54L35,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,25.5L25.5,25.5L35,16L35,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M35,35L25.5,35L35,25.5L35,35Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,25.5L54,25.5L63.5,16L63.5,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,6.5L54,6.5L44.5,16L44.5,6.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,16L54,25.5L44.5,16L54,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,25.5L54,35L44.5,25.5L54,25.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,6.5L54,-3L63.5,6.5L54,6.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,16L44.5,25.5L35,16L44.5,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,16L63.5,6.5L73,16L63.5,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,16L54,6.5L63.5,16L54,16Z" + android:fillColor="#16161D"/> + <path + android:pathData="M101.5,63.5L92,63.5L101.5,54L101.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,44.5L92,44.5L82.5,54L82.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,54L92,63.5L82.5,54L92,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,63.5L92,73L82.5,63.5L92,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,44.5L92,35L101.5,44.5L92,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M82.5,54L82.5,63.5L73,54L82.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M101.5,54L101.5,44.5L111,54L101.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M92,54L92,44.5L101.5,54L92,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,101.5L54,101.5L63.5,92L63.5,101.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,82.5L54,82.5L44.5,92L44.5,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,92L54,101.5L44.5,92L54,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,101.5L54,111L44.5,101.5L54,101.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,82.5L54,73L63.5,82.5L54,82.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M44.5,92L44.5,101.5L35,92L44.5,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M63.5,92L63.5,82.5L73,92L63.5,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M54,92L54,82.5L63.5,92L54,92Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,63.5L16,63.5L25.5,54L25.5,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M6.5,44.5L16,44.5L6.5,54L6.5,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,54L16,63.5L6.5,54L16,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,63.5L16,73L6.5,63.5L16,63.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,44.5L16,35L25.5,44.5L16,44.5Z" + android:fillColor="#16161D"/> + <path + android:pathData="M6.5,54L6.5,63.5L-3,54L6.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M25.5,54L25.5,44.5L35,54L25.5,54Z" + android:fillColor="#16161D"/> + <path + android:pathData="M16,54L16,44.5L25.5,54L16,54Z" + android:fillColor="#16161D"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/android16_patch_adaptive_foreground.xml b/packages/SystemUI/res/drawable/android16_patch_adaptive_foreground.xml new file mode 100644 index 000000000000..4c2932399c1a --- /dev/null +++ b/packages/SystemUI/res/drawable/android16_patch_adaptive_foreground.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:pathData="M40.65,63.013C40.722,62.922 40.716,62.789 40.633,62.707V62.707C40.537,62.61 40.377,62.62 40.292,62.727C34.567,69.881 31.569,75.536 33.089,77.056C35.366,79.333 46.923,71.469 58.901,59.491C60.049,58.343 61.159,57.199 62.226,56.066C62.342,55.943 62.339,55.751 62.219,55.632L61.566,54.978C61.441,54.854 61.238,54.857 61.117,54.985C60.057,56.11 58.951,57.25 57.806,58.395C46.882,69.319 36.496,76.646 34.61,74.759C33.417,73.567 35.903,68.982 40.65,63.013Z" + android:fillColor="#C6FF00" + android:fillType="evenOdd"/> + <path + android:pathData="M67.956,52.033C68.205,51.966 68.462,52.115 68.529,52.364C68.596,52.614 68.448,52.871 68.198,52.938L67.956,52.033ZM68.198,52.938L63.926,54.083L63.683,53.178L67.956,52.033L68.198,52.938Z" + android:fillColor="#000000"/> + <path + android:pathData="M64.497,49.237C64.564,48.987 64.821,48.839 65.071,48.906C65.32,48.973 65.469,49.229 65.402,49.479L64.497,49.237ZM65.402,49.479L64.257,53.752L63.352,53.509L64.497,49.237L65.402,49.479Z" + android:fillColor="#000000"/> + <path + android:pathData="M66.145,51.236C64.869,49.961 62.83,49.931 61.591,51.17L58.825,53.937C58.585,54.176 58.585,54.564 58.825,54.803C59.063,55.042 59.452,55.042 59.691,54.803L60.436,54.057C60.915,53.579 61.69,53.579 62.169,54.057L63.324,55.212C63.802,55.691 63.802,56.466 63.324,56.945L62.578,57.69C62.339,57.929 62.339,58.318 62.578,58.557C62.817,58.796 63.205,58.796 63.444,58.557L66.211,55.79C67.45,54.551 67.42,52.512 66.145,51.236Z" + android:fillColor="#000000"/> +</vector> diff --git a/packages/SystemUI/res/drawable/android16_patch_monochrome.xml b/packages/SystemUI/res/drawable/android16_patch_monochrome.xml new file mode 100644 index 000000000000..608d5ea6ee48 --- /dev/null +++ b/packages/SystemUI/res/drawable/android16_patch_monochrome.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2024 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:strokeWidth="1" + android:pathData="M54.707,35.707L72.293,53.293A1,1 102.155,0 1,72.293 54.707L54.707,72.293A1,1 0,0 1,53.293 72.293L35.707,54.707A1,1 0,0 1,35.707 53.293L53.293,35.707A1,1 0,0 1,54.707 35.707z" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M55.237,35.177L72.823,52.763A1.75,1.75 67.835,0 1,72.823 55.237L55.237,72.823A1.75,1.75 77.684,0 1,52.763 72.823L35.177,55.237A1.75,1.75 0,0 1,35.177 52.763L52.763,35.177A1.75,1.75 0,0 1,55.237 35.177z" + android:strokeWidth="1.5" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M44.5,44.5h19v19h-19z" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M54,44.5l9.5,9.5l-9.5,9.5l-9.5,-9.5z" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M54,35V73" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M73,54L35,54" + android:strokeWidth="0.75" + android:fillColor="#00000000" + android:strokeColor="#ffffff"/> + <path + android:pathData="M33.576,31.135l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M31.146,65.966l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M26.718,56l1.718,1.718l-1.718,1.718l-1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M31.146,48l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M41.925,34.374l1.718,1.718l-1.718,1.718l-1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M63.146,71l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M48.567,74.553l1.718,1.718l-1.718,1.718l-1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M51.146,26l1.146,1.146l-1.146,1.146l-1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M72.291,32.146l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M76.531,36.417l-1.718,1.718l-1.718,-1.718l1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M58.291,32.146l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M68.419,36.978l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M74.252,64.034l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M71.437,76.718l-1.718,1.718l-1.718,-1.718l1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M42.984,69.38l-1.146,1.146l-1.146,-1.146l1.146,-1.146z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M82.437,51.718l-1.718,1.718l-1.718,-1.718l1.718,-1.718z" + android:fillColor="#E8F5E9"/> + <path + android:pathData="M40.65,63.013C40.722,62.922 40.716,62.789 40.633,62.707V62.707C40.537,62.61 40.377,62.62 40.292,62.727C34.567,69.881 31.569,75.536 33.089,77.056C35.366,79.333 46.923,71.469 58.901,59.491C60.049,58.343 61.159,57.199 62.226,56.066C62.342,55.943 62.339,55.751 62.219,55.632L61.566,54.978C61.441,54.854 61.238,54.857 61.117,54.985C60.057,56.11 58.951,57.25 57.806,58.395C46.882,69.319 36.496,76.646 34.61,74.759C33.417,73.567 35.903,68.982 40.65,63.013Z" + android:fillColor="#ffffff" + android:fillType="evenOdd"/> + <path + android:pathData="M67.956,52.033C68.205,51.966 68.462,52.115 68.529,52.364C68.596,52.614 68.448,52.871 68.198,52.938L67.956,52.033ZM68.198,52.938L63.926,54.083L63.683,53.178L67.956,52.033L68.198,52.938Z" + android:fillColor="#ffffff"/> + <path + android:pathData="M64.497,49.237C64.564,48.987 64.821,48.839 65.071,48.906C65.32,48.972 65.469,49.229 65.402,49.479L64.497,49.237ZM65.402,49.479L64.257,53.752L63.352,53.509L64.497,49.237L65.402,49.479Z" + android:fillColor="#ffffff"/> + <path + android:pathData="M66.145,51.236C64.869,49.961 62.83,49.931 61.591,51.17L58.825,53.937C58.585,54.176 58.585,54.564 58.825,54.803C59.063,55.042 59.452,55.042 59.691,54.803L60.436,54.057C60.915,53.579 61.69,53.579 62.169,54.057L63.324,55.212C63.802,55.691 63.802,56.466 63.324,56.945L62.578,57.69C62.339,57.929 62.339,58.318 62.578,58.556C62.817,58.796 63.205,58.796 63.444,58.556L66.211,55.79C67.45,54.551 67.42,52.512 66.145,51.236Z" + android:fillColor="#ffffff"/> +</vector> |