summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2020-04-23 10:16:26 -0700
committerTyler Gunn <tgunn@google.com>2020-08-05 13:37:27 -0700
commit893a602e61ebcd85748a4d74b71e055d5c4ed81a (patch)
tree2963656ce7ccc587f35f49a7dd62fd6d7c70d526 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9255edfa7d63e3708b91695d10d2bd65b38d7d8d (diff)
Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable.
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions