Skip to content
Commit d59c695a authored by Tarandeep Singh's avatar Tarandeep Singh
Browse files

Stop using unsupported Canvas operations in IME

KeyboardView relies on deprecated Canvas#clipRect(Rect, Op.REPLACE).
This method is now unsupported and throws runtime exception.
Operations other than Difference and Intersect are unsupported.
This method call can be replaced by saving initial Canvas and calling
intersect operation of Canvas#clipRect(Rect).
Saving initial state can be achieved using Canvas.save() and
Canvas.restore().

Fixes: 79777033
Test: Manually verified with SoftKeyboard (which uses KeyboardView)
1. m SoftKeyboard
2. Set current keyboard to SoftKeyboard
3. SoftKeyboard runs fine
Test: Tested Canvas.getClipBounds() is consistent across save() &
.restore() operations

Change-Id: Id34c289f152b2ec06f37fffa9f940a909153447c
parent 52ecba88
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment