Skip to content

Conversation

harshshinde07
Copy link
Member

Fixes #526

Changes:

Added try catch block to prevent the crash.

Checklist: [Please tick following check boxes with [x] if the respective task is completed]

  • I have used resources from strings.xml, dimens.xml and colors.xml without hard-coding them
  • No modifications done at the end of resource files strings.xml, dimens.xml or colors.xml
  • I have reformatted code in every file included in this PR [CTRL+ALT+L]
  • My code does not contain any extra lines or extra spaces
  • I have requested reviews from other members

APK for testing:

feature.zip

@auto-label auto-label bot added the fix Solution to a bug or an issue label Nov 10, 2019
@harshshinde07
Copy link
Member Author

@adityastic @jddeep Please review.

@adityastic
Copy link
Contributor

broadcast receivers should be registered and unregistered in onPause and onResume. Whatever did here is not the correct practice, please make the required changes. Thanks

@harshshinde07
Copy link
Member Author

@adityastic I added onPause() to unregister the broadcastReceiver as suggested. Please review the changes.

@adityastic
Copy link
Contributor

@harshshinde07 registration should be done in onResume. So that the receivers only work when you are inside the app and stops as soon as you keep it in the background. We don't want to keep the receiver up when there is no app usage 👍

@adityastic
Copy link
Contributor

Registration should not have been done in onCreate in the first place, It's not your fault. It will be great if you can fix it :)

@harshshinde07
Copy link
Member Author

@adityastic Done :)

@jddeep jddeep requested a review from adityastic November 12, 2019 02:51
@adityastic
Copy link
Contributor

@jddeep lets merge this

@CloudyPadmal CloudyPadmal merged commit 7d753d0 into fossasia:development Nov 15, 2019
@harshshinde07 harshshinde07 deleted the backpresss branch November 16, 2019 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Solution to a bug or an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The app crashes when you try to navigate out of it
4 participants