mozilla-mobile / firefox-echo-show

Firefox for Amazon's Echo Show
Mozilla Public License 2.0
25 stars 12 forks source link

Issue #186: Refactor IntentValidator to IntentResponder #251

Closed mcomella closed 5 years ago

mcomella commented 5 years ago

The pattern IntentValidator was using before https://github.com/mozilla-mobile/firefox-echo-show/pull/249 was actually decent so I actually put something similar back. However, I improved it by decoupling a few other parts of the code and centralizing the code outside of MainActivity.

Sorry for the churn! This has been a long, annoying hole but I understand a little more how our session restoration code is working now.

Pull Request checklist

codecov-io commented 5 years ago

Codecov Report

Merging #251 into master will increase coverage by 0.08%. The diff coverage is 69.56%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #251      +/-   ##
============================================
+ Coverage     34.93%   35.02%   +0.08%     
+ Complexity      377      371       -6     
============================================
  Files           122      123       +1     
  Lines          3232     3238       +6     
  Branches        507      507              
============================================
+ Hits           1129     1134       +5     
  Misses         2008     2008              
- Partials         95       96       +1
Impacted Files Coverage Δ Complexity Δ
...pp/src/main/java/org/mozilla/focus/MainActivity.kt 0% <0%> (ø) 0 <0> (ø) :arrow_down:
.../src/main/java/org/mozilla/focus/ext/SafeIntent.kt 100% <100%> (ø) 0 <0> (?)
...a/org/mozilla/focus/MainActivityIntentResponder.kt 90% <90%> (ø) 7 <7> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a062b4e...9df1ce4. Read the comment docs.