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

ShadowTelephonyManager instances remember their ids #8751

Open
wants to merge 1 commit into
base: google
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

ShadowTelephonyManager instances remember their ids

Methods that used to ignore subId, phoneId, slotIndex, or PhoneAccountHandle parameters will now redirect to the proper TelephonyManager instance, making a new instance if needed.

Methods that used hardcoded 0 as the id now use the associated id if any, but still fall back to 0 to preserve legacy tests.

#getCurrentPhoneType now reads from the preexisting map. This was a preexisting bug revealed by this CL.

The shadowForSubId(...) and similar methods are public to make it trivial for users to correctly create new instances.

Added a #context() method to make it easier/faster to access the context for each TelephonyManager instance.

Methods that used to ignore subId, phoneId, slotIndex, or PhoneAccountHandle parameters will now redirect to the proper TelephonyManager instance, making a new instance if needed.

Methods that used hardcoded 0 as the id now use the associated id if any, but still fall back to 0 to preserve legacy tests.

#getCurrentPhoneType now reads from the preexisting map. This was a preexisting bug revealed by this CL.

The shadowForSubId(...) and similar methods are public to make it trivial for users to correctly create new instances.

Added a #context() method to make it easier/faster to access the context for each TelephonyManager instance.

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

Successfully merging this pull request may close these issues.

None yet

0 participants