Skip to content

Commit 2272a55

Browse files
Capacitor+ Botriderx
andcommitted
chore: sync upstream PR ionic-team#8533 (upstream-preferred conflicts)
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
2 parents 8687b31 + 8bc3963 commit 2272a55

19 files changed

Lines changed: 80 additions & 286 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
jobs:
2222
setup:
2323
runs-on: ubuntu-latest
24-
timeout-minutes: 10
24+
timeout-minutes: 30
2525
steps:
2626
- name: Get Latest
2727
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
@@ -38,7 +38,7 @@ jobs:
3838
key: ${{ runner.OS }}-bun-dependencies-cache-${{ hashFiles('bun.lock') }}
3939
lint:
4040
runs-on: macos-15
41-
timeout-minutes: 10
41+
timeout-minutes: 30
4242
steps:
4343
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
4444
with:
@@ -57,7 +57,7 @@ jobs:
5757
- run: bun run lint
5858
test-cli:
5959
runs-on: macos-15
60-
timeout-minutes: 10
60+
timeout-minutes: 30
6161
needs:
6262
- setup
6363
- lint
@@ -81,7 +81,7 @@ jobs:
8181
working-directory: ./cli
8282
test-core:
8383
runs-on: ubuntu-latest
84-
timeout-minutes: 10
84+
timeout-minutes: 30
8585
needs:
8686
- setup
8787
- lint
@@ -105,7 +105,7 @@ jobs:
105105
working-directory: ./core
106106
test-ios:
107107
runs-on: macos-15
108-
timeout-minutes: 10
108+
timeout-minutes: 30
109109
needs:
110110
- setup
111111
- lint
@@ -136,7 +136,7 @@ jobs:
136136
run: sh ./scripts/native-podspec.sh lint
137137
test-android:
138138
runs-on: ubuntu-latest
139-
timeout-minutes: 10
139+
timeout-minutes: 30
140140
needs:
141141
- setup
142142
- lint

CHANGELOG.md

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,6 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
## [8.5.2](https://github.com/Cap-go/capacitor-plus/compare/8.5.1...8.5.2) (2026-08-26)
7-
8-
**Note:** Version bump only for package capacitor
9-
10-
11-
12-
13-
14-
## [8.5.1](https://github.com/Cap-go/capacitor-plus/compare/8.3.12...8.5.1) (2026-08-25)
15-
16-
17-
### Bug Fixes
18-
19-
* **ci:** fetch upstream objects so plus branch sync works ([#109](https://github.com/Cap-go/capacitor-plus/issues/109)) ([1fa7eee](https://github.com/Cap-go/capacitor-plus/commit/1fa7eeeff9494e9b32afb20a9850389b79d6bcec))
20-
* **ci:** resolve modify/delete conflicts in sync conflict PRs ([#110](https://github.com/Cap-go/capacitor-plus/issues/110)) ([5c29fb9](https://github.com/Cap-go/capacitor-plus/commit/5c29fb9af001b9aafdcde7b7054585e093f44431))
21-
22-
23-
24-
25-
26-
# [8.5.0](https://github.com/ionic-team/capacitor/compare/8.4.2...8.5.0) (2026-07-31)
27-
28-
## Bug Fixes
29-
30-
- **cli:** support TypeScript 7 when loading capacitor.config.ts ([#8534](https://github.com/ionic-team/capacitor/issues/8534)) ([4c1c870](https://github.com/ionic-team/capacitor/commit/4c1c8709413b9c19b008c99122ca330cc3c90e6f))
31-
32-
## Features
33-
34-
- **cli:** add migrator functionality for adopting UIScene ([#8544](https://github.com/ionic-team/capacitor/issues/8544)) ([984fa85](https://github.com/ionic-team/capacitor/commit/984fa85ba0adab0aacf895aed6323bf4b503dccb))
35-
- **ios:** UIScene Support ([#8536](https://github.com/ionic-team/capacitor/issues/8536)) ([3fa04a3](https://github.com/ionic-team/capacitor/commit/3fa04a357c92af34cd6fccb8124791963804a9dc))
36-
376
## [8.4.2](https://github.com/ionic-team/capacitor/compare/8.4.1...8.4.2) (2026-07-14)
387

398
### Bug Fixes
@@ -49,14 +18,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
4918

5019
# [8.4.0](https://github.com/ionic-team/capacitor/compare/8.3.4...8.4.0) (2026-06-02)
5120

52-
## Bug Fixes
21+
### Bug Fixes
5322

5423
- **android:** show only the requested system bar ([#8480](https://github.com/ionic-team/capacitor/issues/8480)) ([4c6c321](https://github.com/ionic-team/capacitor/commit/4c6c3219afb5223211e857457e46283c37eb9424))
5524
- **cli:** revert live reload config on failure ([#8485](https://github.com/ionic-team/capacitor/issues/8485)) ([1d031a4](https://github.com/ionic-team/capacitor/commit/1d031a4abec2c793079ba8897ad2e40c4cc6c7f9))
5625
- **SystemBars:** make `safe-area-inset-x` available on API <= 34 ([#8424](https://github.com/ionic-team/capacitor/issues/8424)) ([e456de0](https://github.com/ionic-team/capacitor/commit/e456de083e19644f484bec5a5359cb67960ac8bc))
5726
- **SystemBars:** respect `insetsHandling` disable ([#8481](https://github.com/ionic-team/capacitor/issues/8481)) ([d4ad7ff](https://github.com/ionic-team/capacitor/commit/d4ad7ffe39daf66e0cfc63af9028d5c05543bde7))
5827

59-
## Features
28+
### Features
6029

6130
- add method getDouble to plugin config ([#7638](https://github.com/ionic-team/capacitor/issues/7638)) ([93c72de](https://github.com/ionic-team/capacitor/commit/93c72de40a2ec4c78b33659250cb08340083088e))
6231
- **cli:** add experimental packageOptions ([#8471](https://github.com/ionic-team/capacitor/issues/8471)) ([258867b](https://github.com/ionic-team/capacitor/commit/258867b7bf37b1837b99b02ec9638e5a6df08d97))

android/CHANGELOG.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,6 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
## [8.5.2](https://github.com/Cap-go/capacitor-plus/compare/8.5.1...8.5.2) (2026-08-26)
7-
8-
**Note:** Version bump only for package @capacitor-plus/android
9-
10-
11-
12-
13-
14-
## [8.5.1](https://github.com/Cap-go/capacitor-plus/compare/8.3.12...8.5.1) (2026-08-25)
15-
16-
**Note:** Version bump only for package @capacitor-plus/android
17-
18-
19-
20-
21-
22-
# [8.5.0](https://github.com/ionic-team/capacitor/compare/8.4.2...8.5.0) (2026-07-31)
23-
24-
**Note:** Version bump only for package @capacitor/android
25-
266
## [8.4.2](https://github.com/ionic-team/capacitor/compare/8.4.1...8.4.2) (2026-07-14)
277

288
### Bug Fixes

android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
*/
3939
public class BridgeWebChromeClient extends WebChromeClient {
4040

41+
// Cap the console message length before formatting so that a very large JS
42+
// log argument (e.g. a serialized IndexedDB row or an axios error/response)
43+
// cannot OutOfMemoryError the bridge on low-RAM devices. See #8532.
44+
private static final int MAX_CONSOLE_MESSAGE_LENGTH = 8 * 1024;
45+
4146
private interface PermissionListener {
4247
void onPermissionSelect(Boolean isGranted);
4348
}
@@ -412,12 +417,6 @@ private boolean showImageCapturePicker(final ValueCallback<Uri[]> filePathCallba
412417
}
413418
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri);
414419
takePictureIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
415-
416-
// Store in static variables to survive activity recreation
417-
pendingFilePathCallback = filePathCallback;
418-
pendingImageFileUri = imageFileUri;
419-
pendingFileChooserType = FileChooserType.IMAGE_CAPTURE;
420-
421420
activityListener = (activityResult) -> {
422421
Uri[] result = null;
423422
if (activityResult.getResultCode() == Activity.RESULT_OK) {
@@ -519,11 +518,15 @@ private String[] getValidTypes(String[] currentTypes) {
519518
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
520519
String tag = Logger.tags("Console");
521520
if (consoleMessage.message() != null && isValidMsg(consoleMessage.message())) {
521+
String message = consoleMessage.message();
522+
if (message.length() > MAX_CONSOLE_MESSAGE_LENGTH) {
523+
message = message.substring(0, MAX_CONSOLE_MESSAGE_LENGTH) + "… [truncated]";
524+
}
522525
String msg = String.format(
523526
"File: %s - Line %d - Msg: %s",
524527
consoleMessage.sourceId(),
525528
consoleMessage.lineNumber(),
526-
consoleMessage.message()
529+
message
527530
);
528531
String level = consoleMessage.messageLevel().name();
529532
if ("ERROR".equalsIgnoreCase(level)) {

android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -756,48 +756,6 @@ public long skip(long n) throws IOException {
756756
}
757757
}
758758

759-
/**
760-
* An InputStream wrapper that limits the number of bytes that can be read.
761-
*/
762-
static class BoundedInputStream extends InputStream {
763-
764-
private final InputStream in;
765-
private long remaining;
766-
767-
public BoundedInputStream(InputStream in, long limit) {
768-
this.in = in;
769-
this.remaining = limit;
770-
}
771-
772-
@Override
773-
public int available() throws IOException {
774-
int available = in.available();
775-
return (int) Math.min(available, remaining);
776-
}
777-
778-
@Override
779-
public int read() throws IOException {
780-
if (remaining <= 0) return -1;
781-
int result = in.read();
782-
if (result != -1) remaining--;
783-
return result;
784-
}
785-
786-
@Override
787-
public int read(byte[] b, int off, int len) throws IOException {
788-
if (remaining <= 0) return -1;
789-
int toRead = (int) Math.min(len, remaining);
790-
int result = in.read(b, off, toRead);
791-
if (result > 0) remaining -= result;
792-
return result;
793-
}
794-
795-
@Override
796-
public void close() throws IOException {
797-
in.close();
798-
}
799-
}
800-
801759
// For L and above.
802760
private static class LollipopLazyInputStream extends LazyInputStream {
803761

android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,12 @@ public CapacitorEvalBridgeMode(WebView webView, CordovaInterface cordova) {
7070

7171
@Override
7272
public void onNativeToJsMessageAvailable(final NativeToJsMessageQueue queue) {
73-
cordova
74-
.getActivity()
75-
.runOnUiThread(() -> {
76-
String js = queue.popAndEncodeAsJs();
77-
if (js != null) {
78-
webView.evaluateJavascript(js, null);
79-
}
80-
});
73+
cordova.getActivity().runOnUiThread(() -> {
74+
String js = queue.popAndEncodeAsJs();
75+
if (js != null) {
76+
webView.evaluateJavascript(js, null);
77+
}
78+
});
8179
}
8280
}
8381

android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private void initWindowInsetsListener() {
272272
// We need to correct for a possible shown IME
273273
v.setPadding(0, 0, 0, keyboardVisible ? imeInsets.bottom : 0);
274274

275-
Insets safeAreaInsets = calcSafeAreaInsets(safeAreaSource);
275+
Insets safeAreaInsets = calcSafeAreaInsets(insets);
276276
injectSafeAreaCSS(safeAreaInsets.top, safeAreaInsets.right, safeAreaInsets.bottom, safeAreaInsets.left);
277277

278278
return new WindowInsetsCompat.Builder(insets)
@@ -297,7 +297,7 @@ private void initWindowInsetsListener() {
297297
.setInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout(), Insets.of(0, 0, 0, 0))
298298
.build();
299299

300-
Insets safeAreaInsets = calcSafeAreaInsets(safeAreaSource);
300+
Insets safeAreaInsets = calcSafeAreaInsets(newInsets);
301301
injectSafeAreaCSS(safeAreaInsets.top, safeAreaInsets.right, safeAreaInsets.bottom, safeAreaInsets.left);
302302

303303
return newInsets;
@@ -364,7 +364,6 @@ private void setHidden(boolean hide, String bar) {
364364
if (hide) {
365365
if (bar.isEmpty()) {
366366
windowInsetsControllerCompat.hide(WindowInsetsCompat.Type.systemBars());
367-
navBarVisible = false;
368367
} else if (bar.equals(BAR_STATUS_BAR)) {
369368
windowInsetsControllerCompat.hide(WindowInsetsCompat.Type.statusBars());
370369
} else if (bar.equals(BAR_GESTURE_BAR)) {
@@ -376,7 +375,6 @@ private void setHidden(boolean hide, String bar) {
376375

377376
if (bar.isEmpty()) {
378377
windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars());
379-
navBarVisible = true;
380378
} else if (bar.equals(BAR_STATUS_BAR)) {
381379
windowInsetsControllerCompat.show(WindowInsetsCompat.Type.statusBars());
382380
} else if (bar.equals(BAR_GESTURE_BAR)) {

android/capacitor/src/test/java/com/getcapacitor/plugin/SystemBarsTest.java

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.getcapacitor.plugin;
22

3-
import static org.junit.Assert.assertFalse;
4-
import static org.junit.Assert.assertTrue;
53
import static org.mockito.Mockito.mock;
64
import static org.mockito.Mockito.mockStatic;
75
import static org.mockito.Mockito.never;
@@ -15,7 +13,6 @@
1513
import androidx.core.view.WindowInsetsCompat;
1614
import androidx.core.view.WindowInsetsControllerCompat;
1715
import com.getcapacitor.Bridge;
18-
import java.lang.reflect.Field;
1916
import java.lang.reflect.Method;
2017
import org.junit.Test;
2118
import org.mockito.MockedStatic;
@@ -49,66 +46,8 @@ public void showWithNavigationBarShowsOnlyNavigationBars() throws Exception {
4946
verify(controller, never()).show(WindowInsetsCompat.Type.statusBars());
5047
}
5148

52-
@Test
53-
public void hideWithEmptyBarHidesSystemBars() throws Exception {
54-
WindowInsetsControllerCompat controller = invokeSetHidden(new SystemBars(), true, "");
55-
56-
verify(controller).hide(WindowInsetsCompat.Type.systemBars());
57-
verify(controller, never()).hide(WindowInsetsCompat.Type.statusBars());
58-
verify(controller, never()).hide(WindowInsetsCompat.Type.navigationBars());
59-
}
60-
61-
@Test
62-
public void hideWithStatusBarHidesOnlyStatusBars() throws Exception {
63-
WindowInsetsControllerCompat controller = invokeSetHidden(new SystemBars(), true, "StatusBar");
64-
65-
verify(controller).hide(WindowInsetsCompat.Type.statusBars());
66-
verify(controller, never()).hide(WindowInsetsCompat.Type.systemBars());
67-
verify(controller, never()).hide(WindowInsetsCompat.Type.navigationBars());
68-
}
69-
70-
@Test
71-
public void togglingNavigationBarTracksNavBarVisible() throws Exception {
72-
SystemBars plugin = new SystemBars();
73-
74-
invokeSetHidden(plugin, true, "NavigationBar");
75-
assertFalse(navBarVisible(plugin));
76-
77-
invokeSetHidden(plugin, false, "NavigationBar");
78-
assertTrue(navBarVisible(plugin));
79-
}
80-
81-
@Test
82-
public void togglingAllBarsTracksNavBarVisible() throws Exception {
83-
SystemBars plugin = new SystemBars();
84-
85-
invokeSetHidden(plugin, true, "");
86-
assertFalse(navBarVisible(plugin));
87-
88-
invokeSetHidden(plugin, false, "");
89-
assertTrue(navBarVisible(plugin));
90-
}
91-
92-
@Test
93-
public void hidingOnlyStatusBarLeavesNavBarVisible() throws Exception {
94-
SystemBars plugin = new SystemBars();
95-
96-
invokeSetHidden(plugin, true, "StatusBar");
97-
98-
assertTrue(navBarVisible(plugin));
99-
}
100-
101-
private boolean navBarVisible(SystemBars plugin) throws Exception {
102-
Field field = SystemBars.class.getDeclaredField("navBarVisible");
103-
field.setAccessible(true);
104-
return field.getBoolean(plugin);
105-
}
106-
10749
private WindowInsetsControllerCompat invokeSetHidden(String bar) throws Exception {
108-
return invokeSetHidden(new SystemBars(), false, bar);
109-
}
110-
111-
private WindowInsetsControllerCompat invokeSetHidden(SystemBars plugin, boolean hide, String bar) throws Exception {
50+
SystemBars plugin = new SystemBars();
11251
Bridge bridge = mock(Bridge.class);
11352
AppCompatActivity activity = mock(AppCompatActivity.class);
11453
Window window = mock(Window.class);
@@ -126,7 +65,7 @@ private WindowInsetsControllerCompat invokeSetHidden(SystemBars plugin, boolean
12665

12766
Method setHidden = SystemBars.class.getDeclaredMethod("setHidden", boolean.class, String.class);
12867
setHidden.setAccessible(true);
129-
setHidden.invoke(plugin, hide, bar);
68+
setHidden.invoke(plugin, false, bar);
13069
}
13170

13271
return controller;

android/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "@capacitor-plus/android",
3-
"version": "8.5.2",
4-
"description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web",
5-
"homepage": "https://capgo.app/docs/plugins/capacitor-plus/",
6-
"author": "Capgo Team <support@capgo.app> (https://capgo.app)",
2+
"name": "@capacitor/android",
3+
"version": "8.4.2",
4+
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
5+
"homepage": "https://capacitorjs.com",
6+
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
77
"license": "MIT",
88
"repository": {
99
"type": "git",
@@ -23,8 +23,7 @@
2323
"verify": "./gradlew clean lint build test -b capacitor/build.gradle"
2424
},
2525
"peerDependencies": {
26-
"@capacitor-plus/core": "^8.5.0",
27-
"@capacitor/core": "^8.5.0"
26+
"@capacitor/core": "^8.4.0"
2827
},
2928
"publishConfig": {
3029
"access": "public"

0 commit comments

Comments
 (0)