Prevent un-necessary call to framework
The Bluetooth framework API are requiring permission. If we want to make sure our permission works correctly, we need to add some additional linter that does it for us. Unfortunately, when making re-entrang calls, it require internal code to be annotate with permission, which bloat the code and remove entirely the purpose of the annotation. Instead, make sure that once we are within the boundary of the Bluetooth app, remove call to framework by an internal code. This has another advantage of shortening the stack trace call and making investigation easy. Example of such modification: device.getBondState() -> AdapterService.getBondState(device) Bug: 349682934 Test: m Bluetooth Flag: Exempt refactor Change-Id: Iad72b1962b1807c60491d496e00514b3225835ee
Loading
Please register or sign in to comment