Extract the logic of MagnificationMode to the controller

To move the preference to the upper layer, we extract all logics
to its controller.

We move all tests to the test files and add server tests to
verify the behaviour of edit shortcut dialog.

Bug: 182992338
Test: atest  MagnificationModePreferenceControllerTest

Change-Id: I34c4361e2e116a22c3e34bd35c8ac8cac752ab96
This commit is contained in:
ryanlwlin
2021-04-01 17:25:48 +08:00
parent 9d14071637
commit 8e5e4dec12
8 changed files with 531 additions and 429 deletions

View File

@@ -42,12 +42,14 @@ public final class MagnificationCapabilities {
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({
MagnificationMode.NONE,
MagnificationMode.FULLSCREEN,
MagnificationMode.WINDOW,
MagnificationMode.ALL,
})
public @interface MagnificationMode {
int NONE = Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_NONE;
int FULLSCREEN = Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN;
int WINDOW = Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW;
int ALL = Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_ALL;