Skip to content

Conversation

@marcosholgado
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/1125189844152671/1183093181516711
Tech Design URL:
CC:

Description:
App crashes when unregistering twice on application stopped. We don't really need to unregister here because it is done when the app gets killed anyways as per the documentation If you register with the Application context, you receive broadcasts as long as the app is running.

Steps to test this PR:
Reproduce the crash

  1. Add another unregisterReceiver(shortcutReceiver) below the one that already exists in the DuckDuckGoApplication (line 317).
  2. Launch the app and close it, you should see the crash in the logcat.

Make sure the toast doesn't crash the app when is taken to the background by an OEM
@CDRussell might be able to help with this one. This is an edge case that we have not been able to test yet.

  1. Launch the app on a S6
  2. Add a shortcut
  3. App should go to the foreground and the toast message (if it shows) should not crash the app.

Normal test

  1. Launch the app and close
  2. The logcat should not show a crash

Internal references:

Software Engineering Expectations
Technical Design Template

Copy link
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

"Make sure the toast doesn't crash the app when is taken to the background by an OEM"

I haven't tested this case, but I don't see any related crash in our play store stats.

@cmonfortep cmonfortep merged commit c27cc77 into develop Jul 5, 2020
@cmonfortep cmonfortep deleted the feature/marcos/crash_when_unregistering branch July 5, 2020 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants