Description
When the user grants the Modify System Settings permission and then presses the back button, the app redirects to the Preferences page. However, in some cases, the app crashes immediately after returning.
Steps to Reproduce
- Open the app.
- Navigate to the Preferences page where "Modify System Settings" permission is requested.
- Tap to open system settings and grant the permission.
- Press the back button to return to the app.
- Observe that the app sometimes crashes.
Expected Behavior
The app should return to the Preferences page without crashing after granting the permission.
Actual Behavior
The app intermittently crashes upon returning from the system settings page.
Environment
- App Name: Netra
- Platform: Android
Possible Cause
The crash might occur due to lifecycle handling or uninitialized state when the activity resumes after the permission intent.
Suggested Fix
Handle permission result in onResume() or through a safe callback that checks the permission state before accessing dependent code.
Description
When the user grants the Modify System Settings permission and then presses the back button, the app redirects to the Preferences page. However, in some cases, the app crashes immediately after returning.
Steps to Reproduce
Expected Behavior
The app should return to the Preferences page without crashing after granting the permission.
Actual Behavior
The app intermittently crashes upon returning from the system settings page.
Environment
Possible Cause
The crash might occur due to lifecycle handling or uninitialized state when the activity resumes after the permission intent.
Suggested Fix
Handle permission result in
onResume()or through a safe callback that checks the permission state before accessing dependent code.