Repository: opencv
Issue: in Android 11 & 12, it is showing black screen and no callback is listening or showing any logs for CvCameraViewListener2
Labels: bug,platform: android,incomplete

### System Information

Android Java application user:

OpenCV version: 4.9.0, implemented through maven -> 'org.opencv:opencv:4.9.0'
ndkVersion '26.2.11394342'

android device 11 & 12

### Detailed description

I was trying to implement [sample code](https://github.com/opencv/opencv/tree/4.x/samples/android/tutorial-1-camerapreview)  in my application but it is giving some errors like ```ioctl c0044901 failed with code -1: Invalid argument```. I suppose because of this my camera screen is not working and it is not showing any camera view, just the black screen I am seeing. 

I am also following [opencv docs](https://docs.opencv.org/4.x/d5/df8/tutorial_dev_with_OCV_on_Android.html) for reference as well, but wasn't able to find in there.

I have tested the same on Android 11 & android 12 devices but same issue detected there.

```
2024-03-16 00:33:15.035 14621-14621 FirebaseApp             com.rental.tenantease                I  Device unlocked: initializing all Firebase APIs for app [DEFAULT]
2024-03-16 00:33:15.045 14621-14621 FirebaseInitProvider    com.rental.tenantease                I  FirebaseApp initialization successful
2024-03-16 00:33:15.061 14621-14621 FeatureParser           com.rental.tenantease                I  can't find lancelot.xml in assets/device_features/,it may be in /vendor/etc/device_features
2024-03-16 00:33:15.074 14621-14621 libc                    com.rental.tenantease                E  Access denied finding property "ro.vendor.df.effect.conflict"
2024-03-16 00:33:15.095 14621-14692 DynamiteModule          com.rental.tenantease                I  Considering local module com.google.android.gms.measurement.dynamite:100 and remote module com.google.android.gms.measurement.dynamite:103
2024-03-16 00:33:15.095 14621-14692 DynamiteModule          com.rental.tenantease                I  Selected remote version of com.google.android.gms.measurement.dynamite, version >= 103
2024-03-16 00:33:15.095 14621-14692 DynamiteModule          com.rental.tenantease                V  Dynamite loader version >= 2, using loadModule2NoCrashUtils
2024-03-16 00:33:15.111 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                D  First attempt to load libs
2024-03-16 00:33:15.111 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                D  Trying to load library opencv_java4
2024-03-16 00:33:15.116 14621-14621 linker                  com.rental.tenantease                W  Warning: "/data/app/com.rental.tenantease-kEsMy2z5UioXa5TY6mX9lA==/base.apk!/lib/arm64-v8a/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
2024-03-16 00:33:15.126 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                D  Library opencv_java4 loaded
2024-03-16 00:33:15.126 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                D  First attempt to load libs is OK
2024-03-16 00:33:15.127 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  General configuration for OpenCV 4.9.0 =====================================
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Version control:               4.9.0-dirty
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Platform:
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Timestamp:                   2023-12-28T01:20:04Z
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Host:                        Linux 5.4.0-169-generic x86_64
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Target:                      Android 1 aarch64
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      CMake:                       3.22.1-g37088a8
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      CMake generator:             Ninja
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      CMake build tool:            /opt/android-sdk/cmake/3.22.1/bin/ninja
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Configuration:               Release
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    CPU/HW features:
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Baseline:                    NEON FP16
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Dispatched code generation:  NEON_DOTPROD NEON_FP16 NEON_BF16
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I        requested:                 NEON_FP16 NEON_BF16 NEON_DOTPROD
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I        NEON_DOTPROD (1 files):    + NEON_DOTPROD
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I        NEON_FP16 (2 files):       + NEON_FP16
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I        NEON_BF16 (0 files):       + NEON_BF16
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    C/C++:
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Built as dynamic libs?:      NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C++ standard:                11
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C++ Compiler:                /opt/android-sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  (ver 14.0.7)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C++ flags (Release):         -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security     -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden  -O3 -DNDEBUG   -DNDEBUG
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C++ flags (Debug):           -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security     -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden  -fno-limit-debug-info   -O0 -DDEBUG -D_DEBUG -g
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C Compiler:                  /opt/android-sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C flags (Release):           -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security    -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden  -O3 -DNDEBUG   -DNDEBUG
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      C flags (Debug):             -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security    -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden  -fno-limit-debug-info   -O0 -DDEBUG -D_DEBUG -g
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Linker flags (Release):      -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments   -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Linker flags (Debug):        -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments   -Wl,--as-needed -Wl,--no-undefined  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      ccache:                      YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Precompiled headers:         NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Extra dependencies:          z dl m log
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      3rdparty dependencies:       libcpufeatures libprotobuf ade tbb ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf tegra_hal
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    OpenCV modules:
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java ml objdetect photo stitching video videoio
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Disabled:                    world
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Disabled by dependency:      -
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Unavailable:                 python2 python3 ts
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Applications:                -
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Documentation:               NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Non-free algorithms:         NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Android NDK:                   /opt/android-sdk/ndk/25.2.9519653 (ver 25.2.9519653)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Android ABI:                 arm64-v8a
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      NDK toolchain:               aarch64-linux-android-clang
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      STL type:                    c++_shared
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Native API level:            21
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Android SDK:                   /opt/android-sdk (tools:  build tools: 30.0.3)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    GUI:                           NONE
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Media I/O: 
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      ZLib:                        z (ver 1.2.12)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I        SIMD Support Request:      YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I        SIMD Support:              YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      WEBP:                        build (ver encoder: 0x020f)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      PNG:                         build (ver 1.6.37)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      TIFF:                        build (ver 42 - 4.2.0)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      JPEG 2000:                   build (ver 2.5.0)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      OpenEXR:                     build (ver 2.3.0)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      HDR:                         YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      SUNRASTER:                   YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      PXM:                         YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      PFM:                         YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Video I/O:
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I     MEDIANDK:                     YES
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I     NDK Camera:                   NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Parallel framework:            TBB (ver 2020.2 interface 11102)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Trace:                         YES (with Intel ITT)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Other third-party libraries:
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Custom HAL:                  YES (carotene (ver 0.0.1, Auto detected))
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Protobuf:                    build (3.19.1)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Flatbuffers:                 builtin/3rdparty (23.5.9)
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Python (for build):            /usr/bin/python3
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Java:                          export all functions
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      ant:                         NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Java wrappers:               YES ()
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I      Java tests:                  NO
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I    Install to:                    /home/ci/build/o4a/install
2024-03-16 00:33:15.128 14621-14621 OpenCV/StaticHelper     com.rental.tenantease                I  -----------------------------------------------------------------
2024-03-16 00:33:15.128 14621-14621 CaptureAadharCard       com.rental.tenantease                D  openCvLoader:: Success
2024-03-16 00:33:15.149 14621-14621 ForceDarkHelper         com.rental.tenantease                D  updateByCheckExcludeList: pkg: com.rental.tenantease activity: com.rental.tenantease.activities.CaptureAadharCard@ad4bbf4
2024-03-16 00:33:15.152 14621-14621 ForceDarkHelper         com.rental.tenantease                D  updateByCheckExcludeList: pkg: com.rental.tenantease activity: com.rental.tenantease.activities.CaptureAadharCard@ad4bbf4
2024-03-16 00:33:15.159 14621-14621 ForceDarkHelper         com.rental.tenantease                D  updateByCheckExcludeList: pkg: com.rental.tenantease activity: com.rental.tenantease.activities.CaptureAadharCard@ad4bbf4
2024-03-16 00:33:15.164 14621-14621 ForceDarkHelper         com.rental.tenantease                D  updateByCheckExcludeList: pkg: com.rental.tenantease activity: com.rental.tenantease.activities.CaptureAadharCard@ad4bbf4
2024-03-16 00:33:15.165 14621-14621 SurfaceFactory          com.rental.tenantease                I  [static] sSurfaceFactory = com.mediatek.view.impl.SurfaceFactoryImpl@7ac0019
2024-03-16 00:33:15.166 14621-14621 CameraBridge            com.rental.tenantease                D  Attr count: 6
2024-03-16 00:33:15.168 14621-14621 FpsMeter                com.rental.tenantease                D  FpsMeter.setResolution 0x0
2024-03-16 00:33:15.172 14621-14621 ForceDarkHelper         com.rental.tenantease                D  updateByCheckExcludeList: pkg: com.rental.tenantease activity: com.rental.tenantease.activities.CaptureAadharCard@ad4bbf4
2024-03-16 00:33:15.173 14621-14621 ForceDarkHelper         com.rental.tenantease                D  updateByCheckExcludeList: pkg: com.rental.tenantease activity: com.rental.tenantease.activities.CaptureAadharCard@ad4bbf4
2024-03-16 00:33:15.173 14621-14621 CameraBridge            com.rental.tenantease                D  Attr count: 6
2024-03-16 00:33:15.174 14621-14621 FpsMeter                com.rental.tenantease                D  FpsMeter.setResolution 0x0
2024-03-16 00:33:15.175 14621-14621 com.rental...AadharCard com.rental.tenantease                I  Listeners attached
2024-03-16 00:33:15.196 14621-14621 CameraBridge            com.rental.tenantease                D  call checkCurrentState
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->arrayIndexScale(Ljava/lang/Class;)I (greylist, linking, allowed)
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapInt(Ljava/lang/Object;JII)Z (greylist, linking, allowed)
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapLong(Ljava/lang/Object;JJJ)Z (greylist, linking, allowed)
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->getIntVolatile(Ljava/lang/Object;J)I (greylist, linking, allowed)
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->getObjectVolatile(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
2024-03-16 00:33:15.210 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
2024-03-16 00:33:15.211 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->putObjectVolatile(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
2024-03-16 00:33:15.211 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden field Lsun/misc/Unsafe;->theUnsafe:Lsun/misc/Unsafe; (greylist, reflection, allowed)
2024-03-16 00:33:15.213 14621-14621 PowerHalWrapper         com.rental.tenantease                I  PowerHalWrapper.getInstance 
2024-03-16 00:33:15.224 14621-14621 Looper                  com.rental.tenantease                W  Slow Looper main: Activity com.rental.tenantease/.activities.CaptureAadharCard is 368ms late (wall=0ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] }) because of 3 msg, msg 2 took 219ms (seq=2 running=180ms runnable=20ms late=11ms h=android.app.ActivityThread$H w=110), msg 3 took 148ms (seq=3 running=116ms runnable=3ms late=221ms h=android.app.ActivityThread$H w=159)
2024-03-16 00:33:15.247 14621-14706 GPUD                    com.rental.tenantease                I  @gpudInitialize: successfully initialized with GL, dbg=0 mmdump_dbg=0
2024-03-16 00:33:15.253 14621-14621 SurfaceView             com.rental.tenantease                D  UPDATE null, mIsCastMode = false
2024-03-16 00:33:15.259 14621-14706 Surface                 com.rental.tenantease                D  Surface::connect(this=0x7a9e508000,api=1)
2024-03-16 00:33:15.260 14621-14621 ViewRootImpl            com.rental.tenantease                D  setSurfaceViewCreated, created:true
2024-03-16 00:33:15.260 14621-14621 CameraBridge            com.rental.tenantease                D  call surfaceChanged event
2024-03-16 00:33:15.260 14621-14621 CameraBridge            com.rental.tenantease                D  call checkCurrentState
2024-03-16 00:33:15.260 14621-14706 mali_winsys             com.rental.tenantease                D  EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
2024-03-16 00:33:15.260 14621-14706 Surface                 com.rental.tenantease                D  Surface::setBufferCount(this=0x7a9e508000,bufferCount=3)
2024-03-16 00:33:15.273 14621-14706 Gralloc3                com.rental.tenantease                W  mapper 3.x is not supported
2024-03-16 00:33:15.278 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
2024-03-16 00:33:15.279 14621-14692 ntal.tenanteas          com.rental.tenantease                W  Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
2024-03-16 00:33:15.282 14621-14706 gralloc                 com.rental.tenantease                E  Arm Module v1.0
2024-03-16 00:33:15.283 14621-14706 ion                     com.rental.tenantease                E  ioctl c0044901 failed with code -1: Invalid argument
2024-03-16 00:33:15.288 14621-14714 FA                      com.rental.tenantease                I  App measurement initialized, version: 85007
2024-03-16 00:33:15.288 14621-14714 FA                      com.rental.tenantease                I  To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2024-03-16 00:33:15.288 14621-14714 FA                      com.rental.tenantease                I  To enable faster debug mode event logging run:
                                                                                                      adb shell setprop debug.firebase.analytics.app com.rental.tenantease
2024-03-16 00:33:15.393 14621-14714 FA                      com.rental.tenantease                I  Tag Manager is not found and thus will not be used
2024-03-16 00:33:20.535 14621-15151 ProfileInstaller        com.rental.tenantease                D  Installing profile for com.rental.tenantease
```

### Steps to reproduce

Below is the MainApplication .java class in my android application I am using 

```
public class MainApplication extends CameraActivity implements CameraBridgeViewBase.CvCameraViewListener2 {

    private final String TAG = getClass().getName().toString();

    ActivityMainApplicationBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (OpenCVLoader.initLocal()) {
            Logger.debug("CaptureAadharCard", "openCvLoader:: Success");
        } else {
            Logger.debug("CaptureAadharCard", "openCvLoader:: Failed");
        }
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

        setContentView(R.layout.activity_main_application_card);

        binding = DataBindingUtil.setContentView(this, R.layout.activity_main_application_card);
        binding.mOpenCvCameraView.setCvCameraViewListener(this);
        Logger.info(TAG, "Listeners attached");
    }

    @Override
    public void onCameraViewStarted(int width, int height) {
        Logger.info(TAG,"onCameraViewStarted:: width: "+width+", height: "+height);
    }

    @Override
    public void onCameraViewStopped() {
        Logger.info(TAG,"onCameraViewStopped");
    }

    @Override
    public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
        Logger.info(TAG,"onCameraFrame:: ");
        return inputFrame.rgba();
    }

    @Override
    protected void onPause() {
        super.onPause();
        binding.mOpenCvCameraView.disableView();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        binding.mOpenCvCameraView.disableView();
    }

    @Override
    protected void onResume() {
        super.onResume();
        binding.mOpenCvCameraView.enableView();
    }
}
```

I have verified that I have added required camera permission in the manfest file.
I have checked that I have given correct runtime permissions for camera access.
I have tested in multiple devices.

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)