Replace Hex class from GMS with the one from Apache #1067

Merged
kekkyojin merged 1 commit from use-apache-hex into master 2020-12-18 12:20:43 +01:00
kekkyojin commented 2020-12-14 18:29:56 +01:00 (Migrated from github.com)

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Issue Number: https://github.com/lbryio/lbry-fdroid/issues/6

What is the current behavior?

Helper imports a whole class from Google Messaging Service just to do some string transformation. That import injects some artifacts from Play Services which cannot be used on FDroid build, although they are required on the regular LBRY Play Store release

What is the new behavior?

Using the encodeHex method from Apache Commons artifact it is possible to exclude those Play Services injected dependencies without breaking the code.

Other information

New behavior of SHA256() method HAS NOT BEEN tested.

## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [x] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes Issue Number: https://github.com/lbryio/lbry-fdroid/issues/6 ## What is the current behavior? Helper imports a whole class from Google Messaging Service just to do some string transformation. That import injects some artifacts from Play Services which cannot be used on FDroid build, although they are required on the regular LBRY Play Store release ## What is the new behavior? Using the encodeHex method from Apache Commons artifact it is possible to exclude those Play Services injected dependencies without breaking the code. ## Other information New behavior of SHA256() method HAS NOT BEEN tested.
kekkyojin commented 2020-12-15 02:52:17 +01:00 (Migrated from github.com)

I will add a new unit test to the method to check returned value is the same.

I will add a new unit test to the method to check returned value is the same.
akinwale (Migrated from github.com) approved these changes 2020-12-18 12:20:32 +01:00
akinwale (Migrated from github.com) left a comment

Looks good. Thanks.

Looks good. Thanks.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1067
No description provided.