Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add battery information accessors #882

Merged
merged 3 commits into from
May 7, 2018

Conversation

mykola-mokhnach
Copy link
Contributor

Change list

Depends on
appium/appium-uiautomator2-driver#164
appium/appium-xcuitest-driver#661

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@mykola-mokhnach
Copy link
Contributor Author

@KazuCocoa FYI

public BatteryStatus getStatus() {
final int status = ((Long) getInput().get("status")).intValue();
switch (status) {
case 2:
Copy link

Choose a reason for hiding this comment

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

I think it would be better to move these magic numbers to enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are used only once in this particular place. Creating a separate enum for them would be an overkill.

@TikhomirovSergey
Copy link
Contributor

@mykola-mokhnach There is the conflict. Could you resolve it?

… into battery

# Conflicts:
#	src/main/java/io/appium/java_client/ios/IOSDriver.java
@mykola-mokhnach
Copy link
Contributor Author

Resolved

@TikhomirovSergey
Copy link
Contributor

@mykola-mokhnach Going to run Android tests today.
@SrinivasanTarget What about iOS part?

@mykola-mokhnach
Copy link
Contributor Author

@TikhomirovSergey Android is still not merged. There are problems with server publishing. I'll add a comment when it's done

@TikhomirovSergey
Copy link
Contributor

@mykola-mokhnach Ok. Maybe there is sense to publish 6.0.0 without this change? How about 6.0.1?

@mykola-mokhnach
Copy link
Contributor Author

@TikhomirovSergey No problems

@mykola-mokhnach
Copy link
Contributor Author

The Pr for uia2 driver has been merged, so this PR can be merged as well.

@mykola-mokhnach mykola-mokhnach merged commit 1cf90a9 into appium:master May 7, 2018
@SrinivasanTarget
Copy link
Member

@TikhomirovSergey We are good to release 6.0.0 with this now :)

@mykola-mokhnach mykola-mokhnach deleted the battery branch May 7, 2018 19:28
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.

4 participants