Commit Graph

54 Commits

Author SHA1 Message Date
Yongshun Liu
0e1bf4cff6 a11y: Only show the cursor following mode setting with detected mouse
This makes sure the cursor following mode setting to be visible only
when a mouse device is detected.

Bug: b/398066000
Flag: com.android.settings.accessibility.enable_magnification_cursor_following_dialog
Test: com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I7dd27e9d8a841461900e28d8ae07d17f86a0b662
2025-03-11 23:11:15 -07:00
Yongshun Liu
20d1a7d1b6 a11y: Add cursor following mode dialog
This a pure UI change that adds a new magnification cursor following
mode dialog behind a flag. The framework support will be added
separately later.

There are 3 modes as the following:
  - continuous mode
  - center mode
  - edge mode

It also renames magnification mode dialog xml file for general purpose
within accessibility.

NO_IFTTT=linter not working

Bug: b/388335935
Flag: com.android.settings.accessibility.enable_magnification_cursor_following_dialog
Test: SettingsRoboTests:com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentTest &&
      SettingsRoboTests:com.android.settings.accessibility.MagnificationModePreferenceControllerTest &&
      SettingsRoboTests:com.android.settings.accessibility.MagnificationCursorFollowingModePreferenceControllerTest
Change-Id: If2672186faf7443cc210d79630b1ea4f3808d7e4
2025-03-04 23:47:56 +00:00
Katie Dektar
e94d88c74e [Mag] Keyboard shortcut info shown when physical keyboard present
Shows keyboard shortcut info in magnification settings when a
physical keyboard is present. See bug for screenshots.

Hides touchscreen info in magnification settings when a touchscreen
is not present.

Adds ShadowInputDevice support for physical full keyboards.

Bug: b/388847050
Test: Manual, atest ToggleScreenMagnificationPreferenceFragmentTest
Flag: com.android.server.accessibility.enable_magnification_keyboard_control
Change-Id: Ib53fbd8f929d1cc8e294f6f04bab405c9bb576a9
2025-02-27 23:00:12 +00:00
Yongshun Liu
b8ee801dfd a11y: Clean up magnification mode controller and fix lint errors
This cleans up the magnification mode controller and related code. It
also fixes most of the lint errors in the files.

NO_IFTTT=linter not working

Bug: b/388335935
Flag: EXEMPT refactor
Test: com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentTest & com.android.settings.accessibility.MagnificationModePreferenceControllerTest
Change-Id: I368128c3c71285a9511a7831e1d01232e7536d2f
2025-02-18 23:02:08 +00:00
Riley Jones
75500c02b2 Cleanup of deprecated A11y settings functions
Bug: 367414968
Test: atest com.android.settings.accessibility
Flag: EXEMPT cleanup
NO_IFTTT= Change does not alter preference list

Change-Id: I64f5f7fba112b6fb5035b88f01c04d9ee309f2c0
2025-01-21 21:07:34 +00:00
Menghan Li
e218280902 Add HaTS entrypoint for Magnification page
This entry point allows users to access and adjust Magnification
settings for low vision accessibility. Visibility is controlled by
the aconfig flag and SurveyFeatureProvider#isSurveyAvailable.

NO_IFTTT=Revisit preference_list scope

Bug: 380346799
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Flag: com.android.server.accessibility.enable_low_vision_hats
Change-Id: I81a55487734fe7b139391a6c95834c7313e54d7a
2025-01-09 07:01:21 +00:00
Riley Jones
acccaff128 Cleaning up quick settings flag in Settings app
Removes all instances of a11y_qs_enabled. Any code that would be nontrivial to remove has been deprecated for later cleanup.

Test: atest com.android.settings.accessibility
Flag: EXEMPT flag cleanup
Bug: 367414968

Change-Id: I81f3c9cee377535eaa552a170d58ec1a79d1da65
2024-12-02 20:38:10 +00:00
Daniel Norman
3079b2d108 Makes Settings > Accessibility > Magnification prefs searchable.
All preferences are searchable except for "Keep on while switching apps"
which is only searchable if the user already has a magnification
shortcut enabled, to minimize user confusion from that generically-named
preference.

NO_IFTTT=adding IFTTT

Fix: 353772926
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Flag: com.android.settings.accessibility.fix_a11y_settings_search
Test: adb shell pm clear com.google.android.settings.intelligence;
      search Settings for the items in the bug
Change-Id: I01c7e5586ec0ea432cb2df80f156141683b97522
2024-10-08 23:42:18 +00:00
Daniel Norman
1890c16f90 Populates collection info count for A11y toggle feature pages.
This helps an accessibility service like TalkBack inform the user that
there are items that are skipped when navigating the list because they
are unimportant to accessibility.

Bug: 318607873
Test: atest AccessibilityFragmentUtilsTest
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Test: Enable TalkBack that supports the collection info count feature,
      open any of the pages from the bug, observe the item count and
      (un)important count are correct.
Flag: com.android.settings.accessibility.toggle_feature_fragment_collection_info
Change-Id: If64c89f2eb2f8301076baa79b9530124c850d2fc
2024-08-27 23:36:19 +00:00
Chun-Ku Lin
919019ca56 [Flag cleanup] edit_shortcuts_in_full_screen is always on now
- Cleaned up the code that won't be executed when the flag is on
- Remove unused resources

Bug: 300302098
Test: Manually verify the user can change the shortcut type, and the
changes are saved
Test: atest com.android.settings.accessibility
Flag: EXEMPT removing com.android.settings.accessibility.edit_shortcuts_in_full_screen

Change-Id: I1e32b724ca3da909feda55e20fb1d51dc4680c09
2024-07-25 22:49:02 +00:00
Yuchen
48f304a23f Clean up preference_summary_default_combination in Settings.
Test: Existing tests passed
Flag: EXEMPT clean up
Bug: 328519240
Change-Id: I86996c43243b7a8e2d4b1a83180c189986b3a6ca
2024-07-24 02:36:09 +00:00
Riley Jones
d902bdbb62 Merge "Refactoring Accessibility settings to use ShortcutConstants.UserShortcutType" into main 2024-07-09 20:59:30 +00:00
Riley Jones
8f313621aa Refactoring Accessibility settings to use ShortcutConstants.UserShortcutType
This removes AccessibilityUtil.UserShortcutType,
replacing all mention of it with ShortcutConstants.UserShortcutType

NO_IFTTT=UI order not changed
Test: atest com.android.settings.accessibility
Bug: 322014084
Flag: EXEMPT internal refactoring

Change-Id: I18695d040c4bd08a455143594e770adda2b1a8de
2024-07-01 19:42:32 +00:00
Roy Chou
2f1a7d6155 chore(onefingerpan): update onefingerpan preference summary and magnification settings page footer description
Based on b/338409557#comment5, we update the onefingerpan toggle's
summary, and make the magnification settings page's footer HTML
description be dynamic based on one finger panning preference state.

Bug: 338409557
Flag: com.android.server.accessibility.enable_magnification_one_finger_panning_gesture
Test: manually
      atest MagnificationOneFingerPanningPreferenceControllerTest
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest ToggleFeaturePreferenceFragmentTest
Change-Id: I817cad4fb0c034bcd2db0485ca27c30ea88a0280
2024-06-25 14:22:27 +00:00
Roy Chou
acf98a6a4a feat(onefingerpan): hide the one finger pan settings when window mode only
Like MagnificationAlwaysOn toggle behavior, when the magnification
capability is window-mode only we'll hide the OneFingerPan toggle too.

Also do a small refactoring in MagnificationOneFingerPanningPreferenceControllerTest

Bug: 333821725
Flag: ACONFIG com.android.server.accessibility.enable_magnification_one_finger_panning_gesture TEAMFOOD
Test: manually
      atest MagnificationOneFingerPanningPreferenceControllerTest
      atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I8684b5bae5cbfc5b75fc4c14d2e9173b17d0fb02
2024-04-15 07:16:57 +00:00
Roy Chou
1c898252cb fix(magnification): make always on toggle unavailable when capabilities is window only
As b/328787031, we make the MagnificationAlwaysOnPreferenceController observe the magnification capabilities then update the preference enabled state. Therefore, when changing the capabilities to window mode only, the preference will become unavailable.

We use the bug-fix flag to verify the fix with rollout process.

Bug: 328787031
Flag: ACONFIG com.android.settings.accessibility.hide_magnification_always_on_toggle_when_window_mode_only DEVELOPMENT
Test: manually flip the flag
      atest MagnificationCapabilitiesTest
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest MagnificationAlwaysOnPreferenceControllerTest
Change-Id: I1a25f80131d84ecdd927030e40a18ebb32b7862f
2024-03-26 05:11:06 +00:00
Chun-Ku Lin
deba8599d8 Reflect QS shortcut changes in a11y pages.
Bug: 314843909

Test: manual (modify qs tiles in QS panel while the a11y page is open,
verify the a11y page reflect the qs changes)
Test: atest com.android.settings.accessibility
Test: atest com.android.settings.accessibility.shortcuts

Flag: ACONFIG android.view.accessibility.a11y_qs_shortcut

Change-Id: Ie5b46459faab902912a214ca131eb5d0b105a7ef
2024-03-12 01:32:00 +00:00
Chun-Ku Lin
8b67c17a7b Show QS shortcut option if the a11y feature provides a tile.
Bug: 314852953
Test: atest com.android.settings.accessibility
Test: atest com.android.settings.accessibility.shortcuts
Test: manual
Flag: ACONFIG android.view.accessibility.a11y_qs_shortcut STAGING
Change-Id: Id7a6b3adfd4c4f3cb2b9f7fe15269b57a3d00543
2024-03-06 20:26:28 +00:00
Roy Chou
654e43b2e8 chore(magnification): remove onResume overrides for controllers in ToggleScreenMagnificationPreferenceFragment
As b/186731461, so far MagnificationModePreferenceController and other
magnification preference controllers are only used in
ToggleScreenMagnificationPreferenceFragment, which is DashboardFragment.
Since DashboardFragment already updates preference state in its
onResume, so we can remove the onResume overrides in those controllers.
Besides, we can also remove the LifeCycle dependency for the controllers
since it's not used anymore.

Bug: 186731461
Flag: NA
Test: manually
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest MagnificationAlwaysOnPreferenceControllerTest
      atest MagnificationFollowTypingPreferenceControllerTest
      atest MagnificationJoystickPreferenceControllerTest
      atest MagnificationModePreferenceControllerTest
Change-Id: I379a6a3a985c9d8b7a37bbb878b84cee1bd6adfb
2024-03-04 03:44:59 +00:00
Chun-Ku Lin
1d1b9e451f Move the default shortcut types in a separate utility method.
Bug: 322701168
Test: atest
Flag: N/A (Strict mechanical refactors, no behavior change)
Change-Id: I1beb36e5aeeec0f303228b57baf034a000a72b75
2024-01-29 02:17:49 +00:00
Daniel Norman
01e624c76b Adds a summary to the (screen) Magnification preference for the main A11y Settings page.
This helps differentiate this from other magnification tools.

Reuses (and slightly modifies) the `magnification_feature_summary`
string which was not used by any existing code. This helps ensure
the existing localizations should be close enough, until L10n
translators have time to update based on the new shorter version.

Bug: 303499185
Test: ToggleScreenMagnificationPreferenceFragmentTest
Test: Open Settings > Accessibility, observe summary
Change-Id: If5ee4f937bbd655b425d4767ad8bbcef08dbe345
2023-12-06 01:10:52 +00:00
Jean Chen
48d73aa3f3 feat(MultiFingerMultiTap): Add two-finger triple-tap shortcut on magnification dialog
The shortcut is separate from single-finger triple-tap. It’s under hardware shortcut and above/outside of Advanced section.

Bug: 297805269
Test: manual
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Id74cf3e457c04e167f3100d977b6c70c5d601026
2023-10-25 13:30:27 +00:00
Chaohui Wang
cfdb3b1f1b Migrate new() to SwitchPreferenceCompat
Bug: 306658427
Test: manual - on Settings pages
Change-Id: I258a8c63d5c46403c6d333a9d2f34c33cb35e27f
2023-10-24 14:05:34 +08:00
Chun-Ku Lin
ccdb949cc9 Fix ToggleScreenMagnificationPreferenceFragmentTest
**Root cause**
ShadowFragment makes the test using an empty implementation of onCreate,
hence the test execution throws SuperNotCalledException.

ShadowFragment was accidentally added to this test when migrate to the
latest Robolectric. Removing ShadowFragment in the config fixes the
test.

Fix: 300158627
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I8782ac11a93c5f89b781dcca1713968ed18802cf
2023-10-13 02:44:12 +00:00
Rex Hoffman
3c961e1c0e Setup external/robolectric for SettingsRoboTests
Current failing tests: ab/I64100010182936387
Had to Ignore some of com.android.settings.accessibility tests, which will be fixed separately

Bug: 261728063
Test: atest SettingsRoboTests -- --test-arg com.android.tradefed.testtype.IsolatedHostTest:java-flags:-XX:CompressedClassSpaceSize=3g

Change-Id: I4a0cb992db924936826e0c9808accc78dddb5f30
2023-08-17 22:33:20 +00:00
Chun-Ku Lin
b65108ba1b Split the string resource id for non-generic accessibility preference.
- Keep the accessibility settings strings the same as in U.

Bug: 289425138
Test: manual
Test: atest
Change-Id: Iddbbfe627c93529d2421e153094a30628229c4bc
2023-08-08 19:17:54 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Jean
137cc9af68 Set the shortcut size to large when user enabled Magnification
Set the settings shortcut size to large when the Magnification shortcut it enabled. Provide users with the large size as the default, which is easy to see.

Bug: 283844702
Test: manually - attach videos in the bug
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I8fac5780b8388b1b4f124cffbdd305235f035e72
2023-07-11 02:21:09 +00:00
Chun-Ku Lin
c8c67d731f Fix ToggleScreenMagnificationPreferenceFragmentTest
- Prevent mocking ToggleScreenMagnificationPreferenceFragment for test
- Use Robolectric's way to launch the fragment so that the fragment
  contains necessary setup

**Root cause**
- We called onCreateView directly in the test without the necessary setup
  in onCreate, which causes the FooterPreferenceController not being
  initialized.
- We created a spyContext that returns a mock PackageManager, however,
  in the test execution, we didn't mock the context used by the fragment
  under test. Hence, the fragment didn't use the mock PackageManager in
  test.

Bug: 284209879
Test: atest ToggleScreenMagnificationPreferenceFragmentTest --iterations
5

Change-Id: I7e71a03177526f5bb0c20a58855a7dfdffc2a22f
2023-06-02 03:04:37 +00:00
Chun-Ku Lin
b8084ecfcd Unified service and shortcut state summary on a11y settings page.
Bug: 210026562
Test: manual
Test: atest

Change-Id: I4d5ff6b10d6bfd2fe6b3de1849d00a9d084bf269
2023-05-23 22:19:55 +00:00
Daniel Norman
203d362d2d Stops @Ignore-ing a11y robotests.
Our team is trying to determine the state of our tests in automation,
which is tough to do when some tests are skipped completely.

A11y SettingsRobotests are currently run only in postsubmit, so even
if the Ignored tests fail it should not cause presubmit issues.

Bug: 279082331
Test: Use go/abtd to ensure tests run (and some fail)
Change-Id: I767b25427e748b7e94ab05e81a2f645f8b6279cf
2023-05-19 21:32:19 +00:00
Arc Wang
1596a2838d Allow Magnification Settings launch from outside of AccessibilitySettings
Before this CL, Magnification Settings can only be
launched from MagnificationPreferenceController.

This CL initializes FooterPreferenceController if the
parent class does not initialize it from Intent extras.

Bug: 268411305
Test: manual
      make RunSettingsRoboTests ROBOTEST_FILTER=MagnificationGesturesPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I954739c39c823ce7fe0daa711743f729d182571b
2023-02-24 15:56:43 +08:00
Tyler Freeman
36557e9810 fix(#AlwaysOnMagnifier): update state when setting is changed outside the app
Refactor to keep track of all controllers and notify them all when a key
changes, similar to ColorAndMotionFragment.java

Bug: b/265086261
Fix: 267433655

Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
Change-Id: Id44d1d4074318aff8c4c4bc6f07d65b3e0ffc561
2023-02-07 23:14:54 +00:00
Treehugger Robot
9040efdccc Merge "Fix errorprone warnings that should be errors" am: 5744d7c560 am: 7094507528 am: 778ef161bb
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2255054

Change-Id: I1f3cbce7d5de6e63477bc2da2ad115ec53b06472
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-01 00:02:10 +00:00
Cole Faust
43ff89802c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I29f691a22617b1fc834680ff1cf4ab4244203f06
2022-10-23 12:41:39 -07:00
Jason Hsu
20f06012f6 Merge changes Ib9cb9b6d,I85209170
* changes:
  Change updatePreferenceOrder() to onCreateView()
  Migrate to DashboardFragment in ToggleFeaturePreferenceFragment
2022-07-13 04:32:22 +00:00
jasonwshsu
8145631ab8 Migrate to DashboardFragment in ToggleFeaturePreferenceFragment
Root Cause: ToggleFeaturePrefreferenceFragment becomes heavy when more and more features come in.

Solution: Mirgrate to DashboardFragment, a plugin-style preference controllers, can help us separate the preference and its logic into its own controller.

* This is the first step for the whole migration. Change to extend DashboardFragment and fill up the missing override functions.
* Reorder fields and functions to the recommended general approach.

Bug: 171272809
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.accessibility

Change-Id: I852091700a4b3b3c7bbdbc82f0b5dc47c087d61c
2022-07-13 00:40:55 +08:00
menghanli
6c85a215de Add SearchIndexable to improve search coverage
- Add searachIndex test
- Increase accessibility framework feature fragment coverage

Bug: 197695932
Test: make RunSettingsRoboTests
Change-Id: Icb7e2cf70bb0443304af7866efd48bed1d9af5bf
2022-07-12 10:51:59 +08:00
mincheli
57b35f9f35 Hides the settings entry in Magnification Settings if window magnification feature is not supported
If the device doesn't support window magnification featue, we
should hide the settings entry in mangification settings

Bug: 213414385
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I73f087da54cd2930c049dabb6b843c3b373e3c20
2022-03-21 22:48:34 +08:00
Daniel Hsieh
55bc49860b Refactor SettingsContentObserver and add it to follow typing feature.
Refactor SettingsContentObserver and rename it to
AccessibilitySettingsContentObserver. Besides, we register it to observe
follow typing feature preference value.

The reasons behind refactor:
1. We change callback signature due to the consistency for register it
by preference key, not by Uri.
2. We refactor the default preference key to a seperate method. Since
the default value is related to accessibility, we rename it with
accessibility prefix.
3. We can register different callback for difference collections of
preference keys.

Default preference keys: They existed in the previous constructor.
1. Settings.Secure.ACCESSIBILITY_ENABLED
2. Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES

Bug: 194668976
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
           AccessibilitySettingsTest
           AccessibilitySettingsContentObserverTest
           AccessibilityShortcutPreferenceFragmentTest
           MagnificationFollowTypingPreferenceControllerTest
           ToggleFeaturePreferenceFragmentTest
           ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Iafd27e044ebe2536ae7ae55c1c80af54f7f0f822
2022-01-20 08:38:27 +00:00
Daniel Hsieh
6f4fb88538 Support following typing focus in window mode [3/n].
There are 3 milestones in this feature.
1. Refactor the callbacks for Accessibility in WindowManagerInternal.
2. Implement this feature in such new architecture.
3. Implement the setting choice in preference page.

This CL is for the 3rd milestone.

We add a preference key "magnification_follow_typing" to access and
update the ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED value
which controls its corresponding preference page UI.

Bug: 194668976
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
	MagnificationFollowTypingPreferenceControllerTest
	ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Ib2602c997a535c1acca6a7ddd7bb2c25921f9280
2022-01-14 07:11:05 +00:00
menghanli
e771cbb1aa Add AccessibilityShortcutPreferenceFragment to share non-accesibility tools to add shortcut
Bug: 190022774
Test: make RunSettingsRoboTests -j52 ROBOTEST_FILTER=AccessibilityShortcutPreferenceFragmentTest
Change-Id: I1cae8fbed059ba7c309126e2dff46adfb48cffd8
2021-06-08 22:58:05 +08:00
menghanli
78c093b0b3 Move DialogEumn into AccessibilityDialogUtils
Bug: 190022774
Test: Manual testing
Change-Id: I391089b675b415c26bbacd028caf1d1ab617e707
2021-06-07 13:38:50 +08:00
menghanli
11a0700847 Fix style in "Vision Settings" is inconsistent
Root cause: "Accessibility button" page apply BC style but other pages in SUW didn't. It causes page style inconsistency.
Solution: Don't show annotation link to make user open "Accessibility
button" page during SuW.

Bug: 187658718
Test: Manual testing
Change-Id: I6cc3da9a72b68829efd5537ae93fc329ef716fb4
2021-05-12 07:16:05 +00:00
ryanlwlin
6269a92e16 Move Magnification Mode Settings to the main page
We move the mode settings because currently there is
only one item in the settings page. To fully test all logic,
we don't use fragament anymore in the controllerTest, and
test the interaction between the controller and the fragment
in the test of these two fragments.

Bug: 182992338
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
      atest MagnificationModePreferenceControllerTest
      atest MagnificationSettingsFragmentTest
      manually test
Change-Id: Ia6b0ea4f116f3215407637d7aeaddb8d8196d8fb
2021-04-29 20:12:35 +08:00
mincheli
3d41fe560b Hides the settings entry in Magnification Settings if device is not supported
If the device doesn't support magnification area, we should hide the
settings entry in mangification settings

Bug: 177371954
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I41fc3177f86c6a19e3ef0d2fbe5e052d77c1cb47
2021-03-02 06:56:59 +00:00
jasonwshsu
ba7b4bb727 Apply the new design of mUserShortcutTypesCache & mUserShortcutTypes in Magnification
Bug: 158540780
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I941a6e571a5a70f27032b82fcdc00f43b672168f
2020-11-05 14:24:15 +08:00
jasonwshsu
48b546eccf Extract UserShortcutType functions from ToggleFeaturePreferenceFragment
* Simplify StringJoiner to '+' since it only have one case
* Simplify Collections usage to use removeIf() and findFirst() directly
* Change class name SharedPreferenceUtils to PreferredShortcuts

Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Test: atest PreferredShortcutsTest
Change-Id: I02f03ccba09b6d7edaa5c0c8223ab3561a5e976b
2020-10-09 00:34:04 +00:00
jasonwshsu
26f1b5f65c Add data class PreferredShortcut to replace inner class UserShortcutType
* Add basic function equals(), hashcode() into data class
* Change flatternToString() to toString()
* Change constructor to fromString(flatternToString)

Bug: 158540780
Test: atest PreferredShortcutTest
Change-Id: I0ee46dd940d22ff9f168b95fe75d9cff2f0fddfb
2020-10-08 10:53:48 +00:00
jasonwshsu
1a1ae82460 Modify flow in ToggleFeaturePreferenceFragment
* Show edit shortcut dialog should belong to the basic feature, so move
them back to ToggleFeaturePreferenceFragment
* Add test cases for UserShortcutType to prepare to further refactor

Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Change-Id: Ia84bea5581f85d199f395b2065652ce69738abbf
2020-09-26 04:30:04 +00:00