Skip to content

Conversation

@malmstein
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/inbox/1157893581871899/1119619712088571/1167491198050484

Description:
Renaming NotificationScheduler introduced a bug that made it impossible for DaggerWorkerFactory to create Workers. The classpath had changed and therefore no longer possible to find.

This PR fixes this issue, also adding a layer of security in DaggerWorkerFactory preventing it from crashing if the worker can't be found.

As part of this PR we also fixed a new issue that was introduced with the Change App Icon feature. On some devices the themeResourceId was not found after changing the icon, so we added a default option for that too based on the AppTheme

Copy link
Member

@CDRussell CDRussell left a comment

Choose a reason for hiding this comment

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

I haven't had time for a full test, so just adding some comments from skim reading it.

Hoping that @cmonfortep can do the full review. If not, I can review fully on Monday.

@CDRussell CDRussell removed their assignment Mar 20, 2020
@cmonfortep
Copy link
Contributor

Taking this one @CDRussell @malmstein.

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. Not sure if there's any difference between cancelUniqueWork and cancelAllWorkByTag tho. Tested and it's working fine.

Tested this:

  1. Replace Days for Minutes when scheduling workers.
  2. Fresh install with this branch and open the app to schedule notifications.
  3. Rename workers parent class.
  4. Install again.
  5. Open the app to schedule new notifications.
  6. Wait a some minutes to receive notifications.

Results:

  • Privacy notification appeared ✅
  • Error appeared in console for SearchPromptNotificationWorker ✅ This was expected as we don't cancel those type of notifications.
  • SearchPromptNotification appeared ✅(this one was the one scheduled after renaming the parent class)

@malmstein malmstein merged commit 70cedcf into develop Mar 20, 2020
@malmstein malmstein deleted the hotfix/5.47.1.fixes branch March 20, 2020 13:07
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.

3 participants