-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Resolves NPE when opening app without location permission and mobile data #6345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolves NPE when opening app without location permission and mobile data #6345
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to handle the case when Permission dialog is active above NearbyParentFragment leading to null values for nearbyParentFragment.mapFocus, nearbyParentFragment.screenBottomLeft and nearbyParentFragment.screenTopRight
Haven't tested yet but the NPE is happening at fetchPlaces() if I understand the logs correctly. Just thinking: can we still have cases where the other two could be null and we end up passing them to this function? Should we handle all of them since these are completely independent values and not calculated using any one of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kamalnathvg did you get a chance to review this comment? We're returning in the beginning itself so it covers the case you mentioned but map centre calculation is a bit different from the corners and even retrieved from the kv store in the later runs. Just wanted to ensure we're not missing any case and then I'll merge this PR :)
✅ Generated APK variants!
Uh oh!
There was an error while loading. Please reload this page.
Fixes NPE when opening app without location permission and mobile data
Fixes #6330
Added Null Check for
NearbyParentFragment.mapFocusto handle the case when Permission dialog is active aboveNearbyParentFragmentleading to null values fornearbyParentFragment.mapFocus,nearbyParentFragment.screenBottomLeftandnearbyParentFragment.screenTopRight.Reproduce Issue by:
ask every time.Before Fix
6330-before.mp4
After Fix
6330-after.mp4
Tested on:
Device : Pixel 8
API Level: 35