You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application crashes in multi-window mode when the camera resource is preempted or accessed by another application, causing freezing, crashing, or abnormal behavior.
Steps to reproduce
Run the target application in full-screen mode and activate the camera functionality.
Launch another application that also requires access to the camera resource in floating window mode and enable its camera functionality.
Refocus on the target application by clicking on its interface area to return the operational focus to the application.
Observe the operational state and behavioral performance of the target application.
Expected behaviour
The application should be able to regain access to the camera resource after refocusing, without freezing, crashing, or exiting unexpectedly.
Actual behaviour
After regaining focus, the application interface freezes, the application crashes, and it needs to be restarted to recover.
Additional info
It might be beneficial to consider implementing logic within the onWindowFocusChanged callback method to handle scenarios where the application regains focus. This could include reinitializing or reallocating the camera stream, which may help mitigate resource conflicts and enhance the application's stability. Below is an example of how such logic could be structured in pseudocode:
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
try {
camera = Camera.open();
camera.startPreview();
} catch (Exception e) {
Log.e("CameraHandler", "Error handling camera: " + e.getMessage());
}
}
The text was updated successfully, but these errors were encountered:
Description
The application crashes in multi-window mode when the camera resource is preempted or accessed by another application, causing freezing, crashing, or abnormal behavior.
Steps to reproduce
Expected behaviour
The application should be able to regain access to the camera resource after refocusing, without freezing, crashing, or exiting unexpectedly.
Actual behaviour
After regaining focus, the application interface freezes, the application crashes, and it needs to be restarted to recover.
Additional info
It might be beneficial to consider implementing logic within the onWindowFocusChanged callback method to handle scenarios where the application regains focus. This could include reinitializing or reallocating the camera stream, which may help mitigate resource conflicts and enhance the application's stability. Below is an example of how such logic could be structured in pseudocode:
The text was updated successfully, but these errors were encountered: