Protect IME tracing IPCs with CONTROL_UI_TRACING
With this CL, the following IPCs start requiring callers to have CONTROL_UI_TRACING permission [1]. * IInputMethodManager#startImeTrace() * IInputMethodManager#stopImeTrace() Note that the following shell commands adb shell cmd input_method tracing start adb shell cmd input_method tracing stop should not be affected by this CL because those commands are directly handled by * IInputMethodManager#onShellCommand(), which has been guarded with calling UID check [2]. [1]: Ibdeb38dc9a066cb8ed2904adcdac29014b166526 2ad02a38 [2]: If87189563ccaacd4f9c666bab4f9ad08a9343084 b8d240fa Bug: 34886274 Bug: 172444310 Bug: 237316307 Test: make RunSettingsRoboTests ROBOTEST_FILTER="WinscopeTraceTest" Test: Manually verifies as follows. 1. build aosp_coral-userdebug and flash it. 2. Go to System Settings. 3. Enable Developer Mode. 4. Go to Developer Options. 5. Tap "Quick settings developer tiles" 6. Enable "Winscope Trace" 7. Pull down the quick settings drawer then Tap Winscope Trace. 8. Tap some edit field to show AOSP Keyboard. 9. Pull down the quick settings drawer then Tap Winscope Trace. 10. adb root 11. adb shell ls -al /data/misc/wmtrace/ 12. Make sure that tracing files are saved there. Test: Manually verifies as follows. 1. build aosp_coral-userdebug and flash it. 2. adb shell cmd input_method tracing start 3. Tap some edit field to show AOSP Keyboard. 4. adb shell cmd input_method tracing stop 5. adb root 6. adb shell ls -al /data/misc/wmtrace/ 7. Make sure that tracing files are saved there. Test: Manually verifies as follows. 1. build aosp_coral-userdebug and flash it. 2. adb root 3. adb shell cmd input_method tracing start 4. Tap some edit field to show AOSP Keyboard. 5. adb shell cmd input_method tracing stop 6. adb shell ls -al /data/misc/wmtrace/ 7. Make sure that tracing files are saved there. Change-Id: Iaee7be9fb5066664b283a64273bf8685ba966046
Loading
Please register or sign in to comment