OSDN Git Service

[Magnifier-43] Refactor to remove code duplication
authorMihai Popa <popam@google.com>
Mon, 30 Apr 2018 18:08:57 +0000 (19:08 +0100)
committerMihai Popa <popam@google.com>
Wed, 2 May 2018 10:30:40 +0000 (10:30 +0000)
commitf298068a7fd9e8249eca86d74ed4bcf5a6410582
tree3e05d2b742f31d99eaa7d07f3ea0571d127cd6cc
parent227034b863d6720a3fb1438efa52fd6a8fcf4c09
[Magnifier-43] Refactor to remove code duplication

Since Ic5b5f6ca687db8b5d842f0ab20eac70f1fd2f85e, the magnifier can be
the child of a diffent surface than the one its content is copied from.
This initially led to much code duplication accross different methods,
making the code quite difficult to understand. This CL performs a small
refactoring, removing some of the TODOs and making the code a bit
cleaner.

Bug: 78876353
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ifa26f94ba2e4983446f058f016af6010c1017ea7
core/java/android/widget/Magnifier.java
core/res/res/layout/magnifier.xml [deleted file]
core/res/res/values/symbols.xml