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

feat: bump targetSdkVersion to 33 #583

Merged
merged 6 commits into from
Dec 29, 2023
Merged

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Dec 26, 2023

Screenshot 2023-12-25 at 9 15 57 PM

Screenshot 2023-12-25 at 9 16 05 PM

[Update]:
Below one has been resolved by calling Build.VERSION_CODES.TIRAMISU condition with accessibilityService.clearCache(); While existing method works with Android 14, probably the recommended way will be safe.

[Original]
One concern is https://developer.android.com/about/versions/13/changes/non-sdk-13#new-blocked

The following code box lists all of the non-SDK interfaces that were unsupported in Android 12 (API level 31) that are blocked in Android 13 (API level 33). That is, these interfaces belong to the max-target-s list, so your app can only use these interfaces if it targets Android 12 (API level 31) or lower.
Our goal is to make sure that public alternatives are available before we restrict non-SDK interfaces, and we understand that your app might have a valid use case for using these interfaces. If an interface that your app uses in a prior version is now blocked in Android 13, you should request a new public API for that interface.

Landroid/view/accessibility/AccessibilityInteractionClient;->clearCache(I)V # Use android.accessibilityservice.AccessibilityService#clearCache() instead.

// This call invokes `AccessibilityInteractionClient.getInstance().clearCache();` method
UiAutomatorBridge.getInstance().getUiAutomation().setServiceInfo(null);
could be related one.

i have tested the code with Android 13 and Android 14 by adding Logger.info("Calling UiAutomatorBridge.getInstance().getUiAutomation().setServiceInfo(null);"); before the UiAutomatorBridge.getInstance().getUiAutomation().setServiceInfo(null); call. Then, like driver.page_source and find element printed logs as below and they worked without issue. Thus I think it should not be our concern for now.

12-25 21:24:01.221 21448 21508 I appium  : Waiting up to 10000ms for the device to idle
12-25 21:24:01.221 21448 21508 I appium  : Calling UiAutomatorBridge.getInstance().getUiAutomation().setServiceInfo(null);
12-25 21:24:01.254 21448 21508 W tomator2.server: Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mSourceNodeId:J (unsupported, reflection, allowed)
12-25 21:24:01.262 21448 21508 I appium  : AppiumResponse: {"sessionId":"26f68b31-9a37-42c4-8383-361594d89cbd","value":{"ELEMENT":"00000000-0000-0018-ffff-ffff000000d8","element-6066-11e4-a52e-4f735466cecf":"00000000-0000-0018-ffff-ffff000000d8"}}
12-25 21:24:01.437  1083  1200 D VSC     : @ 185020.220: [WO] Proposed rotation: 0, flat angle threshold: 65

@KazuCocoa KazuCocoa marked this pull request as ready for review December 26, 2023 05:29
@KazuCocoa
Copy link
Member Author

If #584 succeeds, I'd like to merge #584 first to see how the ci will be

@mykola-mokhnach
Copy link
Contributor

Shall we change the parent class to call the clearCache method for higher Android APIs as adviced above?

@KazuCocoa KazuCocoa marked this pull request as draft December 26, 2023 09:24
@KazuCocoa KazuCocoa marked this pull request as ready for review December 29, 2023 09:30
@KazuCocoa
Copy link
Member Author

Yeah, I figured out how to call that. I have tested the condition with Android 14 with page source, find element and send keys. It worked, so I hope this won't break other functionalities...

@KazuCocoa KazuCocoa merged commit 25e9868 into master Dec 29, 2023
17 checks passed
@KazuCocoa KazuCocoa deleted the bump-target-sdk-version branch December 29, 2023 18:03
github-actions bot pushed a commit that referenced this pull request Dec 29, 2023
## [5.15.0](v5.14.0...v5.15.0) (2023-12-29)

### Features

* bump targetSdkVersion to 33 ([#583](#583)) ([25e9868](25e9868))
Copy link

🎉 This PR is included in version 5.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants