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

Commits on Jan 18, 2024

  1. 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.
    
    PiperOrigin-RevId: 596083118
    Googler authored and Copybara-Service committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    35b15e5 View commit details
    Browse the repository at this point in the history