From 7d45de1660489ddb24527bcfb194a4a34371c5f4 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Wed, 8 Jul 2026 11:55:21 +0100 Subject: [PATCH] fix: prevent intent flag overwrite in playVideo --- CHANGELOG.md | 6 ++++++ pom.xml | 2 +- .../ionic/libs/ioncameralib/manager/IONCAMRVideoManager.kt | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5a593b..f9cd3bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 The changes documented here do not include those from the original repository. +## [1.0.2] + +### 2026-07-08 + +- Fix: combine `FLAG_ACTIVITY_NO_HISTORY` and `FLAG_GRANT_READ_URI_PERMISSION` with `or` in `playVideo` to prevent the no-history flag from being silently overwritten ([RMET-5241](https://outsystemsrd.atlassian.net/browse/RMET-5241)). + ## [1.0.1] ### 2026-04-27 diff --git a/pom.xml b/pom.xml index e489da6..99f0ccf 100644 --- a/pom.xml +++ b/pom.xml @@ -6,5 +6,5 @@ 4.0.0 io.ionic.libs ioncamera-android - 1.0.1 + 1.0.2 diff --git a/src/main/kotlin/io/ionic/libs/ioncameralib/manager/IONCAMRVideoManager.kt b/src/main/kotlin/io/ionic/libs/ioncameralib/manager/IONCAMRVideoManager.kt index a57dfce..2f734c2 100644 --- a/src/main/kotlin/io/ionic/libs/ioncameralib/manager/IONCAMRVideoManager.kt +++ b/src/main/kotlin/io/ionic/libs/ioncameralib/manager/IONCAMRVideoManager.kt @@ -47,8 +47,7 @@ class IONCAMRVideoManager( val contentUri = fileHelper.getUriForFile(activity, activity.packageName + AUTHORITY, file) val intent = Intent(Intent.ACTION_VIEW) intent.setDataAndType(contentUri, mimeType) - intent.flags = Intent.FLAG_ACTIVITY_NO_HISTORY - intent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION + intent.flags = Intent.FLAG_ACTIVITY_NO_HISTORY or Intent.FLAG_GRANT_READ_URI_PERMISSION activity.startActivity(intent) onSuccess() }