summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorTony Mak <tonymak@google.com>2019-06-05 11:53:28 +0100
committerTony Mak <tonymak@google.com>2019-06-05 12:52:22 +0100
commit82e60027f452d2b36ce9d405a3b8e37aa0592857 (patch)
tree1ce681737b5c2ef4321ae7a0bc7e7e353c0eba3c /tools/aapt2/java/JavaClassGenerator.cpp
parentf61e5f24100ca5bd0606a4e628ad8fbe3723b9c2 (diff)
Fix an issue that clicking on a smart action chip on keyguard ...
failed to launch app resolver when there are more than one app handlers. What happened: 1. TextClassifier constructs an implicit intent to fulfill a task like opening a link, making a phone call, etc. 2. TextClassifier calls resolveActivity against the implicit intent to resolve the intent. The resolve component name will be used to create an explicit intent. In this case, the intent is resolved to the app resolver activity. 3. wouldLaunchResolverActivity in SysUI returns false for an explicit intent with component name android/ResolverActivity. 4. SysUI does not trigger the "start the activity after the keyguard is gone" logic because wouldLaunchResolverActivity returns false. 5. When user clicks on the action on keyguard, ResolveActivity.onStop is triggered because it is shown (and thus moved to the background) under the keyguard. So, finish() is called in onStop, and thus the bug. IMHO, wouldLaunchResolverActivity should not return false for an explicit intent with component name android/ResolverActivity. But since we are late at this point, the safest option is to not setting component name when the intent is resolved to package "android". Note that this is what we are doing for P, so it should be pretty safe. Test: 1. Install two browsers. Send myself a link. Tap on the Open Link chip on keyguard. App resolver is shown. 2. atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/ BUG: 129220155 Change-Id: I6d4d67c2233a2fec950887ea274825bf1cbc1ae2
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions