Skip to content

Commit

Permalink
Merge branch 'master' into bump-target-version
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa authored Dec 30, 2023
2 parents 82a6333 + b5e7707 commit 0ce4674
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [5.15.2](https://github.com/appium/appium-uiautomator2-server/compare/v5.15.1...v5.15.2) (2023-12-30)


### Bug Fixes

* use displayManager.getDisplay only for upcoming androidx.test.uiautomator:uiautomator:2.3.0-beta01 ([#588](https://github.com/appium/appium-uiautomator2-server/issues/588)) ([61af265](https://github.com/appium/appium-uiautomator2-server/commit/61af2655207fa984cf505e754fe1146a08b67d55))

## [5.15.1](https://github.com/appium/appium-uiautomator2-server/compare/v5.15.0...v5.15.1) (2023-12-30)


### Miscellaneous Chores

* use newer gradle ([#586](https://github.com/appium/appium-uiautomator2-server/issues/586)) ([5ae65f9](https://github.com/appium/appium-uiautomator2-server/commit/5ae65f9009b3d1eb8f5b13d2531f88e8860cb6aa))

## [5.15.0](https://github.com/appium/appium-uiautomator2-server/compare/v5.14.0...v5.15.0) (2023-12-29)


Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ android {
applicationId 'io.appium.uiautomator2'
minSdkVersion 21
targetSdkVersion 34
versionCode 148
versionCode 150
archivesBaseName = 'appium-uiautomator2'
/**
* versionName should be updated and inline with version in package.json for every npm release.
*/
versionName '5.15.0'
versionName '5.15.2'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@ public UiAutomation getUiAutomation() {
}

public Display getDefaultDisplay() throws UiAutomator2Exception {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// Device.getUiDevice gets the instance via 'androidx.test.platform.app.InstrumentationRegistry.getInstrumentation'
// context, thus here directly calls the method.
DisplayManager displayManager = (DisplayManager) getInstrumentation().getContext().getSystemService(Service.DISPLAY_SERVICE);
return displayManager.getDisplay(Display.DEFAULT_DISPLAY);
}
// 'getDefaultDisplay' will be removed from androidx.test.uiautomator.UiDevice in 2.3.0-beta01,
// thus here only relies on the getDisplay.

// "getDefaultDisplay" called inside the UiDevice calls
// https://developer.android.com/reference/android/view/WindowManager#getDefaultDisplay()
return (Display) invoke(getMethod(UiDevice.class, "getDefaultDisplay"), Device.getUiDevice());
// Device.getUiDevice gets the instance via 'androidx.test.platform.app.InstrumentationRegistry.getInstrumentation'
// context, thus here directly calls the method.
DisplayManager displayManager = (DisplayManager) getInstrumentation().getContext().getSystemService(Service.DISPLAY_SERVICE);
return displayManager.getDisplay(Display.DEFAULT_DISPLAY);
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath 'com.android.tools.build:gradle:8.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appium-uiautomator2-server",
"version": "5.15.0",
"version": "5.15.2",
"description": "A netty server with uiautomator2 handlers",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 0ce4674

Please sign in to comment.