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 get_service_alias_by_class in Android service manager. #942

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

xpconanfan
Copy link
Collaborator

@xpconanfan xpconanfan commented Sep 5, 2024

This is useful for looking up how many instances of a service has been registered, and find out their aliases.

Util functions may depend on services like uiautomator. Users tend to follow the anti-pattern of attempting to register the service again under the name the util expects. This causes duplication. This API can be used to clean things up.

This is derived from the discussion in #919


This change is Reviewable

This is useful for looking up how many instances of a service has
been registered, and find out their aliases.

Util functions may depend on services like `uiautomator`. Users tend
to follow the anti-pattern of attempting to register the service
again under the name the util expects. This causes duplication.
This API can be used to clean things up.
@xpconanfan xpconanfan added this to the Mobly Release 1.13 milestone Sep 5, 2024
@xpconanfan xpconanfan self-assigned this Sep 5, 2024
ko1in1u
ko1in1u previously approved these changes Sep 5, 2024
mobly/controllers/android_device_lib/service_manager.py Outdated Show resolved Hide resolved
@xpconanfan xpconanfan requested review from ko1in1u and removed request for xianyuanjia September 5, 2024 22:05
@xpconanfan xpconanfan merged commit de93e1e into master Sep 5, 2024
15 of 16 checks passed
@xpconanfan xpconanfan deleted the service branch September 5, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants