diff options
author | Yohei Yukawa <yukawa@google.com> | 2016-10-14 00:07:59 -0700 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2016-10-14 22:26:35 +0000 |
commit | 93278ca144bef7d8af7a014e278f552da1fcb38c (patch) | |
tree | e79c6450509298a6469b89c57fe03932915d6369 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 8a032b98fea612d9418c32d83dea3159e3a8f57b (diff) |
Handle exceptions from #requestPermission()
This is a follow up CL to my previous CL [1] that let
IInputConnectionWrapper to call InputContentInfo#requestPermission()
automatically so that temporary URI permissions can be granted
automatically on API 25+ devices whenever
INPUT_CONTENT_GRANT_READ_URI_PERMISSION is specified.
However, in that CL we forgot to handle exceptions thrown from
InputContentInfo#requestPermission(). This is problematic because it is
actually easy for IMEs to cause SecurityException by specifying a
content URI that does not allow grantUriPermission, e.g.:
inputConnection.commitContent(
new InputContentInfo(Uri.parse("content://call_log/test"),
new ClipDescription("test", new String[]{"image/gif"}));
As a result, IMEs can let the application crash at any time because
InputContentInfo#requestPermission() is automatically called inside the
Framework.
This CL makes sure that exceptions thrown from
InputContentInfo#requestPermission() can be handled gracefully.
[1]: Id955435dd2e72549ee7134f46b3c6951581694ad
f3806f57a59ede663f3fa2ad1f5080bdbf20e372
Bug: 32162481
Change-Id: I08916a1f54518390d3b67ab1673dc901e3f9716a
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions