Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 1 addition & 33 deletions .github/workflows/test-suite-brownfield-isolated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,39 +179,7 @@ jobs:
bundler-cache: true
ruby-version: 3.2.2
- name: 🔄 Setup ccache
run: |
brew install ccache

# In order to use ccache with Xcode, unlike on Android, we can't just change env variables - we need to change PATH.
MKDIR_PATH=$HOME/.ccache_bin
mkdir -p $MKDIR_PATH
ln -sf $(which ccache) $MKDIR_PATH/clang
ln -sf $(which ccache) $MKDIR_PATH/clang++
ln -sf $(which ccache) $MKDIR_PATH/cc
ln -sf $(which ccache) $MKDIR_PATH/c++
echo "$MKDIR_PATH" >> $GITHUB_PATH
echo "CC=$MKDIR_PATH/clang" >> $GITHUB_ENV
echo "CXX=$MKDIR_PATH/clang++" >> $GITHUB_ENV
echo "LD=$MKDIR_PATH/clang++" >> $GITHUB_ENV
echo "LDPLUSPLUS=$MKDIR_PATH/clang++" >> $GITHUB_ENV

# By default ccache includes mtime of a compiler in hashes, for each CI run mtime varies.
echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV

# It must be the same as in .github/actions/expo-caches/action.yml
echo "CCACHE_DIR=${{ runner.temp }}/.ccache" >> $GITHUB_ENV

# Sloppiness options disable some of the ccache checks to increase hit rate.
# We exclude ctime and mtime so the cache is hit based on file content.
# time_macros might help if in included modules there are macros like __TIME__ which would trigger a cache miss.
# modules, clang_index_store, system_headers, and ivfsoverlay are Xcode-specific options.
echo "CCACHE_SLOPPINESS=include_file_mtime,include_file_ctime,time_macros,modules,clang_index_store,system_headers,ivfsoverlay" >> $GITHUB_ENV

# Speeds up the process on cache misses by skipping the preprocessing step.
echo "CCACHE_DEPEND=true" >> $GITHUB_ENV

# Speeds up copying files on cache hits; natively supported by macOS APFS.
echo "CCACHE_FILECLONE=true" >> $GITHUB_ENV
uses: ./.github/actions/setup-ccache
- name: ♻️ Restore ccache
id: ccache-restore
uses: actions/cache/restore@v4
Expand Down
1 change: 0 additions & 1 deletion apps/bare-expo/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<resources>
<string name="app_name">BareExpo</string>
<string name="expo_splash_screen_resize_mode" translatable="false">cover</string>
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>
<string name="expo_runtime_version">1.0.0</string>
<string name="expo_system_ui_user_interface_style" translatable="false">automatic</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ open class ExperienceActivity : BaseExperienceActivity(), StartReactInstanceDele
ReactSurfaceView::class.java,
splashScreenView
)
SplashScreen.show(this, managedAppSplashScreenViewController!!, true)
SplashScreen.show(this, managedAppSplashScreenViewController!!)
} else {
managedAppSplashScreenViewProvider!!.updateSplashScreenViewWithManifest(
manifest!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class SplashScreenReactActivityLifecycleListener : ReactActivityLifecycleListene
SplashScreen.ensureShown(
activity,
getResizeMode(activity),
ReactRootView::class.java,
getStatusBarTranslucent(activity)
ReactRootView::class.java
)
}
}
Expand All @@ -30,8 +29,7 @@ class SplashScreenReactActivityHandler : ReactActivityHandler {
SplashScreen.ensureShown(
it,
getResizeMode(it),
ReactRootView::class.java,
getStatusBarTranslucent(it)
ReactRootView::class.java
)
}
return null
Expand All @@ -43,6 +41,3 @@ private fun getResizeMode(context: Context): SplashScreenImageResizeMode =
context.getString(R.string.expo_splash_screen_resize_mode).lowercase()
)
?: SplashScreenImageResizeMode.CONTAIN

private fun getStatusBarTranslucent(context: Context): Boolean =
context.getString(R.string.expo_splash_screen_status_bar_translucent).toBoolean()
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ object SplashScreen : SingletonModule {
* @param activity Target Activity for SplashScreen to be mounted in.
* @param splashScreenViewProvider Provider that created properly configured SplashScreenView
* @param rootViewClass Class that is looked for in view hierarchy while autohiding is enabled.
* @param statusBarTranslucent Flag determining StatusBar translucency in a way ReactNative see it.
* @param successCallback Callback to be called once SplashScreen is mounted in view hierarchy.
* @param failureCallback Callback to be called once SplashScreen cannot be mounted.
* @throws [expo.modules.splashscreen.exceptions.NoContentViewException] when [SplashScreen.show] is called before [Activity.setContentView] (when no ContentView is present for given activity).
Expand All @@ -38,15 +37,14 @@ object SplashScreen : SingletonModule {
activity: Activity,
splashScreenViewProvider: SplashScreenViewProvider,
rootViewClass: Class<out ViewGroup>,
statusBarTranslucent: Boolean,
successCallback: () -> Unit = {},
failureCallback: (reason: String) -> Unit = { Log.w(TAG, it) }
) {
SplashScreenStatusBar.configureTranslucent(activity, statusBarTranslucent)
SplashScreenStatusBar.setTranslucent(activity)

val splashView = splashScreenViewProvider.createSplashScreenView(activity)
val controller = SplashScreenViewController(activity, rootViewClass, splashView)
show(activity, controller, statusBarTranslucent, successCallback, failureCallback)
show(activity, controller, successCallback, failureCallback)
}

/**
Expand All @@ -57,7 +55,6 @@ object SplashScreen : SingletonModule {
* @param activity Target Activity for SplashScreen to be mounted in.
* @param resizeMode SplashScreen imageView resizeMode.
* @param rootViewClass Class that is looked for in view hierarchy while autohiding is enabled.
* @param statusBarTranslucent Flag determining StatusBar translucency in a way ReactNative see it.
* @param splashScreenViewProvider
* @param successCallback Callback to be called once SplashScreen is mounted in view hierarchy.
* @param failureCallback Callback to be called once SplashScreen cannot be mounted.
Expand All @@ -69,12 +66,11 @@ object SplashScreen : SingletonModule {
activity: Activity,
resizeMode: SplashScreenImageResizeMode,
rootViewClass: Class<out ViewGroup>,
statusBarTranslucent: Boolean,
splashScreenViewProvider: SplashScreenViewProvider = NativeResourcesBasedSplashScreenViewProvider(resizeMode),
successCallback: () -> Unit = {},
failureCallback: (reason: String) -> Unit = { Log.w(TAG, it) }
) {
show(activity, splashScreenViewProvider, rootViewClass, statusBarTranslucent, successCallback, failureCallback)
show(activity, splashScreenViewProvider, rootViewClass, successCallback, failureCallback)
}

/**
Expand All @@ -84,7 +80,6 @@ object SplashScreen : SingletonModule {
*
* @param activity Target Activity for SplashScreen to be mounted in.
* @param SplashScreenViewController SplashScreenViewController to manage the rootView and splashView
* @param statusBarTranslucent Flag determining StatusBar translucency in a way ReactNative see it.
* @param successCallback Callback to be called once SplashScreen is mounted in view hierarchy.
* @param failureCallback Callback to be called once SplashScreen cannot be mounted.
* @throws [expo.modules.splashscreen.exceptions.NoContentViewException] when [SplashScreen.show] is called before [Activity.setContentView] (when no ContentView is present for given activity).
Expand All @@ -94,7 +89,6 @@ object SplashScreen : SingletonModule {
fun show(
activity: Activity,
splashScreenViewController: SplashScreenViewController,
statusBarTranslucent: Boolean,
successCallback: () -> Unit = {},
failureCallback: (reason: String) -> Unit = { Log.w(TAG, it) }
) {
Expand All @@ -103,7 +97,7 @@ object SplashScreen : SingletonModule {
return failureCallback("'SplashScreen.show' has already been called for this activity.")
}

SplashScreenStatusBar.configureTranslucent(activity, statusBarTranslucent)
SplashScreenStatusBar.setTranslucent(activity)

controllers[activity] = splashScreenViewController
splashScreenViewController.showSplashScreen(successCallback)
Expand Down Expand Up @@ -159,12 +153,11 @@ object SplashScreen : SingletonModule {
internal fun ensureShown(
activity: Activity,
resizeMode: SplashScreenImageResizeMode,
rootViewClass: Class<out ViewGroup>,
statusBarTranslucent: Boolean
rootViewClass: Class<out ViewGroup>
) {
val controller = controllers[activity]
if (controller == null) {
show(activity, resizeMode, rootViewClass, statusBarTranslucent)
show(activity, resizeMode, rootViewClass)
} else {
controller.showSplashScreen { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,21 @@ import android.app.Activity
import androidx.core.view.ViewCompat

object SplashScreenStatusBar {
fun configureTranslucent(activity: Activity, translucent: Boolean?) {
translucent?.let {
activity.runOnUiThread {
// If the status bar is translucent hook into the window insets calculations
// and consume all the top insets so no padding will be added under the status bar.
val decorView = activity.window.decorView
if (it) {
decorView.setOnApplyWindowInsetsListener { v, insets ->
val defaultInsets = v.onApplyWindowInsets(insets)
defaultInsets.replaceSystemWindowInsets(
defaultInsets.systemWindowInsetLeft,
0,
defaultInsets.systemWindowInsetRight,
defaultInsets.systemWindowInsetBottom
)
}
} else {
decorView.setOnApplyWindowInsetsListener(null)
}
ViewCompat.requestApplyInsets(decorView)
fun setTranslucent(activity: Activity) {
activity.runOnUiThread {
// As the status bar is translucent, hook into the window insets calculations
// and consume all the top insets so no padding will be added under the status bar.
val decorView = activity.window.decorView
decorView.setOnApplyWindowInsetsListener { v, insets ->
val defaultInsets = v.onApplyWindowInsets(insets)
defaultInsets.replaceSystemWindowInsets(
defaultInsets.systemWindowInsetLeft,
0,
defaultInsets.systemWindowInsetRight,
defaultInsets.systemWindowInsetBottom
)
}
ViewCompat.requestApplyInsets(decorView)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,14 @@ object ExperienceActivityUtils {
ExponentManifest.MANIFEST_STATUS_BAR_HIDDEN,
false
)
val statusBarTranslucent = statusBarOptions == null || statusBarOptions.optBoolean(
ExponentManifest.MANIFEST_STATUS_BAR_TRANSLUCENT,
true
)

activity.runOnUiThread {
// clear android:windowTranslucentStatus flag from Window as RN achieves translucency using WindowInsets
activity.window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)

setHidden(statusBarHidden, activity)

setTranslucent(statusBarTranslucent, activity)
setTranslucent(activity)

val appliedStatusBarStyle = setStyle(statusBarStyle, activity)

Expand Down Expand Up @@ -162,22 +158,18 @@ object ExperienceActivityUtils {
}

@UiThread
fun setTranslucent(translucent: Boolean, activity: Activity) {
// If the status bar is translucent hook into the window insets calculations
fun setTranslucent(activity: Activity) {
// As the status bar is translucent, hook into the window insets calculations
// and consume all the top insets so no padding will be added under the status bar.
val decorView = activity.window.decorView
if (translucent) {
decorView.setOnApplyWindowInsetsListener { v: View, insets: WindowInsets? ->
val defaultInsets = v.onApplyWindowInsets(insets)
defaultInsets.replaceSystemWindowInsets(
defaultInsets.systemWindowInsetLeft,
0,
defaultInsets.systemWindowInsetRight,
defaultInsets.systemWindowInsetBottom
)
}
} else {
decorView.setOnApplyWindowInsetsListener(null)
decorView.setOnApplyWindowInsetsListener { v: View, insets: WindowInsets? ->
val defaultInsets = v.onApplyWindowInsets(insets)
defaultInsets.replaceSystemWindowInsets(
defaultInsets.systemWindowInsetLeft,
0,
defaultInsets.systemWindowInsetRight,
defaultInsets.systemWindowInsetBottom
)
}
ViewCompat.requestApplyInsets(decorView)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<string name="persistent_notification_channel_name">Experience notifications</string>
<string name="persistent_notification_channel_desc">Persistent notifications that provide debug info about open experiences</string>
<string name="expo_splash_screen_resize_mode" translatable="false">contain</string>
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>
<string name="help_dialog">Make sure you are signed in to the same Expo account on your computer and this app. Also verify that your computer is connected to the internet, and ideally to the same Wi-Fi network as your mobile device. Lastly, ensure that you are using the latest version of Expo CLI. Pull to refresh to update.</string>

<string-array name="currency_array">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<resources>
<string name="app_name">minimal-tester</string>
<string name="expo_splash_screen_resize_mode" translatable="false">contain</string>
<string name="expo_splash_screen_status_bar_translucent" translatable="false">false</string>
</resources>
2 changes: 2 additions & 0 deletions packages/@expo/prebuild-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

### 💡 Others

- Removed unused `withAndroidSplashLegacyMainActivity` file. ([#43516](https://github.com/expo/expo/pull/43516) by [@zoontek](https://github.com/zoontek))

## 55.0.7 — 2026-02-25

### 🛠 Breaking changes
Expand Down

This file was deleted.

Loading
Loading