- 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
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
This bug-fixing flag has been in Trunkfood in two months.
Test: existing presubmit (no functional change)
Bug: 294560581
Change-Id: I05282f1f7ee6b1bb4e4bf873771d80ae68204b4c
since the user can't access the Quick Settings Panel.
Bug: 294560581
Test: manual
- Turn on feature flag: adb shell device_config put accessibility com.android.settings.accessibility.remove_qs_tooltip_in_suw true
- Modify the font scale in SUW, verify the QS tooltip doesn't show up
- Modify the font scale after SUW, verify the QS tooltip shows up
Test: atest SettingsRoboTests:com.android.settings.accessibility
Change-Id: I1d1a4f8f70ea3e1d929952d5c273de1b4cd80503
This launches the existing app info page for the a11y feature's owning
package. Features without a valid component (framework features) do not
have this button. This is also not shown in Setup Wizard which does
not support the App Info page.
This helps users find more info about the app that provided an
accessibility feature.
Screenshot: https://screenshot.googleplex.com/B9FXLoomxFjLBv8.png
Flag: accessibility com.android.settings.flags.accessibility_show_app_info_button
Bug: 277378550
Test: atest ToggleFeaturePreferenceFragmentTest (robotest)
Test: Open and interact with the button, ensure it opens the app info
page for the correct app.
Change-Id: I2041c09077ce5fadc72117dc0c72409dd33ef60b
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
**Root cause**
Robolectric doesn't like to launch a spy'ed fragment. You will get an
error like java.lang.IllegalStateException: Can't access ViewModels from detached fragment
Since the test itself doesn't require launch a fragment, I removed the
setup part and renamed the test.
Bug: 279082331
Test: atest ToggleFeaturePreferenceFragmentTest
Change-Id: Iafc431fd8c9cf7812ea99164e5e85683f3e0c121
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
Root Cause: TextUtils.isEmpty() will return true both null and empty case, and write config key into it.
Solution: Write config key only if settings key is null. That means no one (developers or users) touch the key ever, so we should respect config key here.
Bug: 255912415
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I092975ea3de8fce78b7ae2a6241a30f6af8125a6
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
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
Root cause:
Original framework design which has 3 seconds restriction to prevent users from easily triggering the accessibility volume shortcut when first time using it.
Solution:
The system would bypass the 3 seconds restriction if users manually set any feature as the volume key shortcut.
Bug: 202602908
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I324321577263904b6ff8b66e411766d16a6430dc
Root cause: The ag/16569955 to fix unknown items issue when using Switch Access by grouping of related content. The design change impacts AccessibilityFooterPreference#setLinkEnabled that call TextView#setMovementMethod to change components can be focusable to break the grouping relation.
Solution: Reset summary view to nonFocusable after applied TextView#setMovementMethod.
Bug: 221342261
Bug: 221339524
Bug: 223526982
Bug: 215792117
Bug: 215792876
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityFooterPreferenceControllerTest AccessibilityFooterPreferenceTest ToggleFeaturePreferenceFragmentTest
Change-Id: I4a051ea036ded264ee7bf615375177db796f74c7
- Lowercase for one-handed mode, color correction, color inversion, extra dim in quick settings tooltips if these words are not first words.
Bug: 220655084
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityShortcutPreferenceFragmentTest ToggleFeaturePreferenceFragmentTest LaunchAccessibilityActivityPreferenceFragmentTest ToggleAccessibilityServicePreferenceFragmentTest
Change-Id: I309ca48cecb80942112c9d5adde5857c062706c8
- Implements a TopIntroPreference into the Accessibility Settings base fragment.
- Creates a protected API or variable to provide content to support if needed.
Bug: 218407398
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: Id0f7700bb8f62960951913db8bd034fce1b15a90
- Show tooltips when main switch is on
- Reshow tooltips when rotate device
- Add abstract functions for child components to show tooltips
Bug: 210356011
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I543d8af7d24a9fc82659625961850f975a7a0787
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
Root cause: A long content textview shows the accessibility service info and learn more link. User cannot double click to open help link. They need to swipe up and right to pops up dialog to move to next page. But, the dialog show the "Learn more", it is not clear for user to idendify what the link page.
Solution: Add another textview to show the "Learn more" and provides more clear content description for this link. Also, user just need to double click to activate it.
Bug: 188603037
Test: make RunSettingsRoboTests -j52 ROBOTEST_FILTER=AccessibilityFooterPreferenceTest
Change-Id: Ia9a56f11bbd235ae3a698fcb2e1a2fcff64ef940
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
1. Implement API extends Material Next FooterBarPreference and support Accessibility API for icons
2. Apply solutions to accessibility tools and framework tools in
accessibility settings page.
3. Apply DashboardFragment for Caption preference for xml parser
Bug: 185973304
Test: make RunSettingsRoboTests -j52
Change-Id: I6b80bc80190d6666e3fbcd462442a9f2c0e60bba
* mUserShortcutTypesCache -> get value from savedInstanceState only
* mUserShortcutTypes -> use local variables to replace its mission
Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Change-Id: I1473f89ed743261f616e8d19733bae829c9dbb02
* 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
* 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
* 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
Because can't save the value into setting keys for the service before version R, and in order to let tutorial dialog can get the consistent value, using alternative that each fragment with shortcut to must implement the new abstract method.
Bug: 148989018
Test: manual test
Change-Id: Iba2a7daa70eb00f0bba37317c9355531fbb77628
- Removes edit shortcut disable condition.
- Shows "off" if user removes all items in edit dialog.
- Restores last time what user chosen options when show edit dialog.
Bug: 148989269
Test: Manually test
Change-Id: I105abda782999d38c92e3de9811e2fd378869e73
Implements sharedPreference to keep the user preferred shortcut for each
service.
Bug: 142530063
Bug: 142531156
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Test: make RunSettingsRoboTests2
Change-Id: I2a7c54ddc32764f6d88f2efed87982d469acc183
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Fix all Roboletric test cases.
In this CL, some test cases are broken.
So, We ignored these test cases temporarily.
Test: make RunSettingsRoboTests -j56
Bug: 110259478
Change-Id: I1a3075438a614432a2de4f2d96d8abf9a83ce58c
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
- addPreferencesFromResource() call has been added to
InstrumentedPreferenceFragment, and hence sub-class should not call it
again.
Change-Id: Ia016d9d407ac3f838c962d1ced585647382a051a
Fixes: 68820835
Test: make RunSettingsRoboTests