Repository navigation
适配设备端 u2.apk 0.5.0,输入法改由 u2.apk 内置提供 - #1203
Open
codeskyblue wants to merge 1 commit into
Open
codeskyblue wants to merge 1 commit into
codeskyblue wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1203 +/- ##
==========================================
+ Coverage 45.31% 45.32% +0.01%
==========================================
Files 29 29
Lines 4162 4163 +1
Branches 813 812 -1
==========================================
+ Hits 1886 1887 +1
+ Misses 2164 2163 -1
- Partials 112 113 +1 ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
🟡 Changes recommended
The new IME-discovery/reinstallation path lacks regression coverage because the shell mock cannot distinguish installed from selected keyboards, leaving stale-default and installed-but-unselected scenarios untested.
1 open issue
What changed in this PR
Migrates the Python client to device-side u2.apk 0.5.0, which provides both the automation server and the bundled keyboard.
Changes:
- Replaces separate JAR and keyboard APK handling with unified APK synchronization, setup, and cleanup.
- Updates keyboard discovery, protects the new package during bulk app operations, and documents Android 5.0+ support.
- Adds end-to-end tests and fixtures, updates asset references, and points
make testtoe2e_tests/.
| File | Description |
|---|---|
uiautomator2/version.py |
Defines the unified server version. |
uiautomator2/core.py |
Pushes and launches u2.apk; retains the setup alias. |
uiautomator2/assets/sync.sh |
Downloads the unified APK and records its version. |
uiautomator2/_input.py |
Uses the bundled keyboard and checks installation before selection. |
uiautomator2/__main__.py |
Updates initialization, purge, and asset export. |
uiautomator2/__init__.py |
Protects the new package during bulk app operations. |
tests/test_input.py |
Updates the mocked keyboard identifier. |
tests/test_core.py |
Updates hash-check tests to APK paths. |
README.md |
Documents the APK, Android minimum, and keyboard identifier. |
README_CN.md |
Updates Android requirements and the keyboard comment. |
Makefile |
Targets the end-to-end test directory. |
e2e_tests/testdata/AE86.jpg |
Adds an image-test fixture. |
e2e_tests/test_xpath.py |
Adds XPath interaction tests. |
e2e_tests/test_watcher.py |
Adds a watcher-context test. |
e2e_tests/test_swipe.py |
Adds swipe-duration verification. |
e2e_tests/test_simple.py |
Adds basic interaction tests and skipped legacy cases. |
e2e_tests/test_settings.py |
Waits for the target before measuring operation delays. |
e2e_tests/test_session.py |
Adds session and app-lifecycle tests. |
e2e_tests/test_screenrecord.py |
Adds a skipped legacy recording test. |
e2e_tests/test_push_pull.py |
Adds file-transfer verification. |
e2e_tests/skip_test_image.py |
Adds image tests outside default test discovery. |
e2e_tests/runtest.sh |
Adds an ApiDemos installation and test runner script. |
e2e_tests/conftest.py |
Provides shared device and app fixtures. |
docs/2to3.md |
Updates keyboard identifiers in migration examples. |
demo_tests/test_core.py |
Uses the APK path in server-recovery testing. |
.github/copilot-instructions.md |
Updates asset and test-directory guidance. |
Review effort: Balanced
Comment on lines
+54
to
+58
| ime_list = self.__get_ime_list() | ||
| if self.__ime_id not in ime_list: | ||
| # default_input_method may keep a stale value after the apk is | ||
| # uninstalled or upgraded, so always verify the ime is installed. | ||
| self._setup_ime() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.