Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Fix various code smells and refactor our Application class #1221

Merged
merged 6 commits into from
Sep 30, 2020

Conversation

d4rken
Copy link
Member

@d4rken d4rken commented Sep 23, 2020

Description

Fix various code 👃 and refactor our Application class.

i.e. https://sonarcloud.io/project/issues?branch=fix%2Fflaky-downloader-test&id=corona-warn-app_cwa-app-android&resolved=false&types=CODE_SMELL

How to test

  • Review the changes
  • Launch the app

@d4rken d4rken added the maintainers Tag pull requests created by maintainers label Sep 23, 2020
@d4rken d4rken requested a review from a team September 23, 2020 17:36
@d4rken d4rken added 1.5.0 and removed 1.5.0 labels Sep 29, 2020
Copy link
Contributor

@mertsafter mertsafter left a comment

Choose a reason for hiding this comment

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

LGTM

@OnLifecycleEvent(Lifecycle.Event.ON_START)
fun onAppForegrounded() {
isAppInForeground = true
Timber.v("App is in the foreground")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need these Timber logs? Same below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Was there before I refactored, but I also like it because it gives us more clues about what happened when the testers provide us with a log where there was an issue, we'll know whether the app was in the foreground or background etc. I'm usually a fan of extensive debug logging, huge gains when we encounter heisenbugs 😁.

@sonarcloud
Copy link

sonarcloud bot commented Sep 30, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@harambasicluka harambasicluka merged commit 0d43121 into release/1.5.x Sep 30, 2020
@harambasicluka harambasicluka deleted the fix/code-smells branch September 30, 2020 12:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainers Tag pull requests created by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants