Skip to content

Conversation

Pezzah
Copy link
Contributor

@Pezzah Pezzah commented Sep 6, 2016

This PR adds the CPU/ABI information to the device information as suggested in #109

This is done slightly differently to ensure that the tests pass on android v4

cpuAbi = Abi2Wrapper.getAbi1andAbi2();
}

return cpuAbi;
Copy link
Contributor

Choose a reason for hiding this comment

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

This method can be simplified to

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
  return SupportedAbiWrapper.getSupportedAbis();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {
  return Abi2Wrapper.getAbi1andAbi2();
}
return Build.CPU_ABI;

Also is it worth wrapping Build.CPU_ABI in an array so that the output format is always consistent regardless of API level?

@kattrali kattrali merged commit 330d88c into master Sep 6, 2016
@kattrali kattrali deleted the add-cpuabi branch September 6, 2016 17:58
lemnik pushed a commit that referenced this pull request Jun 2, 2021
rich-bugsnag pushed a commit that referenced this pull request Sep 3, 2021
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