Add battery information accessors by mykola-mokhnach · Pull Request #882 · appium/java-client

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@mykola-mokhnach

Copy link Copy Markdown

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 Copy Markdown

Contributor Author

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

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 Copy Markdown

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 Copy Markdown

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 Copy Markdown

Contributor Author

Resolved

@TikhomirovSergey

Copy link Copy Markdown

Contributor

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

@mykola-mokhnach

Copy link Copy Markdown

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 Copy Markdown

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 Copy Markdown

Contributor Author

@TikhomirovSergey No problems

@mykola-mokhnach

Copy link Copy Markdown

Contributor Author

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

SrinivasanTarget reacted with thumbs up emoji

@mykola-mokhnach mykola-mokhnach merged commit 1cf90a9 into appium:master

May 7, 2018

@SrinivasanTarget

Copy link Copy Markdown

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

Reviewers

@TikhomirovSergey TikhomirovSergey Awaiting requested review from TikhomirovSergey

@SrinivasanTarget SrinivasanTarget Awaiting requested review from SrinivasanTarget SrinivasanTarget is a code owner

1 more reviewer

@vmaxim vmaxim vmaxim left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@mykola-mokhnach @TikhomirovSergey @SrinivasanTarget @vmaxim