Skip to content
Snippets Groups Projects
  1. Aug 05, 2020
    • Tyler Gunn's avatar
      Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable. · 893a602e
      Tyler Gunn authored
      The API contract for createLaunchEmergencyDialerIntent indicates that
      the return value is @NonNull, however the code clearly can return a null
      value if either:
      1. Telecom is unavailable.
      2. There is a remote exception.
      
      Since the API just returns a new ACTION_EMERGENCY_DIAL intent with the
      package name of the emergency dialer (from Telecom string resources), we
      can provide a reasonable fallback behavior by just returning a new
      ACTION_EMERGENCY_DIAL intent with no targeted package.  The system will
      still launch the emergency dialer in this case, but if there is a scenario
      where multiple emergency dialers are installed on a device, the AOSP one
      may get launched instead.  This is, however, better than there being NO
      emergency dialer launched.
      
      Test: Comment out call to Telecom service and verify the AOSP emergency
      dialer still launches.
      Bug: 152187752
      Fixes: 155097434
      Merged-In: I1665d456dace8e41cc035e792f319d98dd07219c
      Change-Id: I06f8a5bebace5b22822f7bb714e14915126b904f
      893a602e
  2. Jul 29, 2020
  3. Jul 28, 2020
Loading