Skip to content
Open
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## Unreleased (develop)

- fixed: NYM max swaps from EVM wallets now report the correct limit error instead of an unsupported-route error (edge-exchange-plugins 2.52.1).
- changed: Sign MoonPay buy/sell widget URLs and bind them to the customer's IP via the info server, for MoonPay's on-ramp IP-matching security upgrade.
- fixed: NYM max swaps from EVM wallets now report the correct limit error instead of an unsupported-route error (edge-exchange-plugins 2.52.1).
- fixed: Android phones can no longer be rotated into the unsupported landscape layout. Landscape remains available on tablets.

## 4.50.0 (2026-07-21)

Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:theme="@style/BootTheme">
<intent-filter>
Expand Down
33 changes: 30 additions & 3 deletions android/app/src/main/java/co/edgesecure/app/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package co.edgesecure.app

import android.content.pm.ActivityInfo
import android.content.res.Configuration
import android.os.Build
import android.os.Bundle
import com.facebook.react.ReactActivity
Expand Down Expand Up @@ -41,9 +42,35 @@ class MainActivity : ReactActivity() {
setRecentsScreenshotEnabled(false)
}

// Lock the app to portrait mode:
if (resources.getBoolean(R.bool.portrait_only)) {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
applyOrientationLock()
}

// Edge addition
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)

// We handle orientation and screenSize config changes ourselves, so `onCreate` does not run
// again when the device rotates or changes size. Re-apply the lock here so that a rotation we
// did not ask for is corrected, and so that a device which genuinely changes screen-size class
// (a foldable being unfolded, or the user changing the display-size setting) is re-evaluated.
applyOrientationLock()
}

/**
* Restricts the app to portrait, except on tablets. Landscape is only supported on a large
* screen, so phones stay locked no matter how the device is turned. This mirrors what iOS does
* with its `UISupportedInterfaceOrientations~ipad` keys.
*
* `portrait_only` is `true` by default and overridden to `false` for tablet-sized screens, so
* the manifest declares portrait and this relaxes it only where landscape is actually supported.
*/
private fun applyOrientationLock() {
val orientation =
if (resources.getBoolean(R.bool.portrait_only)) ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
else ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED

if (requestedOrientation != orientation) {
requestedOrientation = orientation
}
}

Expand Down
Loading