Clear calling identity when dumping binder proxy map
Whenever the BinderProxy count limit hits a threshold in system
server, it dumps the binder proxy counts to help with debugging
and crashes the system server. In order to get the interface
descriptors for the binder objects, AMS disables the freezer
temporarily. This can throw a SecurityException if the proxy
is being created as part of a call from another app.
Clearing calling identity before disabling freezer should
eliminate the security exception and throw the correct
exception about BinderProxy count limit being exceeded.
Bug: 406203890
Test: Not easy to automate this as the threshold is really high,
and it's unpredictable exactly by whom the limit is hit.
Did some local testing with a custom build with low threshold
and a test app.
Flag: EXEMPT bugfix
Change-Id: I6b65ba3af00b16367ae2856c16d7b2a1db386105
Loading
Please register or sign in to comment