Modern Apps git

← Modern-Apps.git

weather,web,watch: disable the starting window where apps bypass it

Commit
69549219aad9ad403ec11c419b3e3ac39918ef48
Author
Vayun Mathur <[email protected]>
When
2026-12-05 18:20 UTC (18 hours ago)
Parents
fe8334b
Apply android:windowDisablePreview=true to the launcher themes
that do not simply use the shared Theme.General from :library:

- weather: Theme.Weather already re-points the splash at its
  own window_background; it now also disables the preview
  explicitly (it inherits the flag from Theme.General too, but
  the explicit item keeps the merged theme self-evident).
- web: Theme.Web (day and night) does the same, for the same
  reason.
- watch-wear: the watch conduit app does not depend on
  :library and cannot inherit Theme.General, so
  Theme.WatchWear gains the flag directly; its empty-icon,
  duration-0, window-background splash attrs stay as the
  fallback where the system ignores the flag.

Theme.Launcher, Theme.CastPair and Theme.SharePopup need no
change: they parent Theme.General and inherit the flag.

Verified: :notes:lint, :notes:lintVitalRelease,
:notes:assembleRelease, :weather:lint,
:weather:lintVitalRelease, :weather:assembleRelease,
:web:lint, :web:lintVitalRelease, :web:assembleRelease,
:launcher:lint, :launcher:lintVitalRelease,
:launcher:assembleRelease, :watch:wear:lint and
:watch:wear:assembleRelease pass; aapt2 dump of the release
APKs shows 0x01010222 (windowDisablePreview)=true on
Theme.Weather, Theme.Web (day and night) and Theme.WatchWear,
and on the Theme.General parent of Theme.Launcher.

Diff

watch-wear/src/main/res/values/themes.xml
diff --git a/watch-wear/src/main/res/values/themes.xml b/watch-wear/src/main/res/values/themes.xmlindex 1c1c3ce069..fa3d3150ab 100644--- a/watch-wear/src/main/res/values/themes.xml+++ b/watch-wear/src/main/res/values/themes.xml@@ -1,10 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <resources>-    <!-- Watch app theme: same parent as before, plus the shared no-splash recipe (this-         module cannot inherit :library's Theme.General). No icon, no animation, splash-         background is the (dark) window background, so cold start is just that colour-         until Wear Compose draws its first frame. -->+    <!-- Watch app theme: same parent as before, plus the shared no-visible-splash+         recipe (this module cannot inherit :library's Theme.General).+         windowDisablePreview stops any starting window; the splash attrs are the+         fallback where the system ignores it: no icon, no animation, splash+         background is the (dark) window background. -->     <style name="Theme.WatchWear" parent="android:Theme.Material.NoActionBar">+        <item name="android:windowDisablePreview">true</item>         <item name="android:windowSplashScreenBackground">?android:attr/colorBackground</item>         <item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_splash_empty</item>         <item name="android:windowSplashScreenIconBackgroundColor">@android:color/transparent</item>
weather/src/main/res/values/themes.xml
diff --git a/weather/src/main/res/values/themes.xml b/weather/src/main/res/values/themes.xmlindex 3a66f21534..46d5006914 100644--- a/weather/src/main/res/values/themes.xml+++ b/weather/src/main/res/values/themes.xml@@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources>     <style name="Theme.Weather" parent="Theme.General">+        <item name="android:windowDisablePreview">true</item>         <item name="android:windowBackground">@color/window_background</item>         <!-- The splash must match this app's own window background, not the shared              Theme.General colour, or cold start flashes between the two. -->
web/src/main/res/values-night/themes.xml
diff --git a/web/src/main/res/values-night/themes.xml b/web/src/main/res/values-night/themes.xmlindex 3cf86ac98b..051d390a11 100644--- a/web/src/main/res/values-night/themes.xml+++ b/web/src/main/res/values-night/themes.xml@@ -4,6 +4,7 @@     <!-- Parent is Theme.General (its night twin is the same dark Material parent) so Web          inherits the shared no-splash attrs instead of the platform default icon splash. -->     <style name="Theme.Web" parent="Theme.General">+        <item name="android:windowDisablePreview">true</item>         <item name="android:isLightTheme">false</item>     </style> 
web/src/main/res/values/themes.xml
diff --git a/web/src/main/res/values/themes.xml b/web/src/main/res/values/themes.xmlindex 3d958773b9..e6416ccb9d 100644--- a/web/src/main/res/values/themes.xml+++ b/web/src/main/res/values/themes.xml@@ -2,6 +2,7 @@ <resources>      <style name="Theme.Web" parent="Theme.General">+        <item name="android:windowDisablePreview">true</item>         <item name="android:isLightTheme">true</item>     </style>