Commit Graph

140 Commits

Author SHA1 Message Date
menghanli
a5d8e12766 Support accessibility shortcut secondary action (6/n)
Implements new edit shortcut dialog selection and save what user
prefered key back for color inversion, color correction, magnifiction,
downlaoded service - LEGACY, INVISIBLE, INTUITIVE case.

Bug: 142530063
Bug: 142531156
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityUtilTest
Test: make RunSettingsRoboTests2
Change-Id: I94607db918047ae4082457dd33f17c8675934e2c
2019-12-31 17:42:06 +08:00
jasonwshsu
0dd53520a5 Accessibility shortcut secondary action - improve shortcutPreference
1. Use setWidgetLayoutResource() for the controllable widget at the
right side.
2. Improve listener structure.
3. Extend checkbox clickable area.

Bug: 142530063
Test: make -j52 RunSettingsRoboTests ROBOTEST_FILTER=ShortcutPreferenceTest
Change-Id: Iebb9f62653914a0d7200c627f01cf7953d576960
2019-12-24 10:37:55 +08:00
menghanli
756104417a Create settings for window magnification (2/n)
Provide a setting for new Magnify area feature and joystick controller

Bug: 146019459
Bug: 146473544
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MagnificationModePreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MagnificationWindowControlPreferenceControllerTest
Test: make RunSettingsRoboTests2
Change-Id: Ia32fa073c59ad304e9ef9eb530ba37dd24c2f2f6
2019-12-19 18:08:10 +08:00
Kevin Chang
ea3d3520c3 Support accessibility shorcut secondary action (4/n)
Replace metrics constants of different edit dialogs.

Bug: 142531156
Test: Maunal
Change-Id: I52b3d481d815edab17b954283ae5e366723a842c
2019-12-18 16:37:14 +08:00
Kevin Chang
e65ed3ebb0 Support accessibility shorcut secondary action (3/n)
Combine the UI with both shortcut preference and edit dialog.

This CL only contains UI and related connections.
Related logic implementation will be added in next CL.

Since the drawable resources are not ready, put the mock
drawables as temporary. Once the drawbles are provided by UX,
create a CL to replace the related resources.

Bug: 142530063
Bug: 142531156
Test: Maunal
Change-Id: I21e4c6e99c2d1731c15d7c9553594160b8809eb5
2019-12-18 09:25:16 +08:00
Kevin Chang
b9cf6af2f0 Merge "Add metrics and code change for magnification dialog" 2019-10-16 08:12:47 +00:00
Kevin Chang
a6308c09a8 Change string of switchbar and installed service category title
Bug: 122897712
Test: Visual
Change-Id: I0f56b4b7375e651a74189dd17e6b3bd8b99ccfca
2019-10-14 11:05:59 +08:00
Kevin Chang
efd66bb814 Add metrics and code change for magnification dialog
This constant was delayed due to some high traffic in the file
and deadlines. This CL just adds it with some code modification.

Test: Visual
Bug: 134639303
Change-Id: I459877038d9d6174dfc0e59ab02e70356dde3973
2019-06-14 15:16:48 +08:00
Kevin Chang
0e1f39fad8 Add tutorial dialog for gesture navigation
Add new tutorial dialog for gesture navigation in order to teach
users how to use the gesture

Fixes: 133650388
Test: Manual
Change-Id: I7cc6a950af49044b27cf7ca41e3bcf67ef40b5fd
2019-06-06 13:56:54 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
hjchangliao
2f73a6646f Convert Magnify controller to TogglePrefController
Convert below to TogglePreferenceController:
MagnificationNavbarPreferenceController
(Magnify with Button)
MagnificationGesturesPreferenceController
(Magnify with triple-tap)

The two controllers share the same fragment,
Add static method for set/get state in fragment,
And use them in controllers and fragment.

Change-Id: I2bdbdb36be71e1a3ffb557abc5a6115d48de53cf
Fixes: 67997698
Fixes: 67997726
Test: make RunSettingsRoboTests
2018-05-16 16:05:41 +08:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Doris Ling
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -08:00
Doris Ling
d8f208e2ff Revert the change that remove the video layout listener.
The change causes regression on the video animation when the video view
scrolls out and back into view where it becomes blank in the
magnification settings page.

Change-Id: I6cb15ced8ddc193a01822fd5dcc50194a46a4939
Fixes: 68839840
Test: manual
2017-11-04 00:25:43 +00:00
Doris Ling
ed4685fafb Update activity titles for fragments without preference screen.
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.

2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.

3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.

4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
2017-10-26 12:01:06 -07:00
gaochong
aedbdd0df5 Merge "Fix Screen Magnification recursive draw" am: 4e7846fbe4 am: db233c6e88
am: dd3945eca5

Change-Id: Idb43358ecaa0ab0b04c59f255c75476857a5fb5d
2017-06-19 17:24:00 +00:00
gaochong
dd3945eca5 Merge "Fix Screen Magnification recursive draw" am: 4e7846fbe4
am: db233c6e88

Change-Id: If8a23a012e0b7a82dc0c6a7d349a15310b4eb43e
2017-06-19 17:12:41 +00:00
gaochong
f4372d914e Fix Screen Magnification recursive draw
When invoke the method View#setLayoutParams(), ViewRootImpl
will run method ViewRootImpl#performTraversals(). And
OnGlobalLayoutListener#onGlobalLayout() will be invoked.
When the method View#setLayoutParams() is invoked in
OnGlobalLayoutListener#onGlobalLayout(), there will be recursive
call. The view will be draw on and on. This situation happen in
Screen Magnification. It should remove the listener after
work completion.

Bug: https://issuetracker.google.com/issues/62613000

Test: use systrace when enter Screen Magnification,and view the
"traversal" times.

Change-Id: I01b1fcccb8b915ec436fb95f1d30c8ec0c0de0a9
Signed-off-by: gaochong <gaochong@xiaomi.com>
2017-06-19 17:26:18 +08:00
Phil Weaver
ed5f0951f8 Follow O patterns for a11y settings
Move the summary for the toggled features to a footer.
Make the settings appear as a preference.

Bug: 36780887
Test: Start settings and observe the new UI looks a lot
like the mocks referenced in the bug. Also added unit
test to verify that summary text shows up.

Change-Id: I1d002b194991d0901ecb27198ba5de73bd23a5a9
2017-05-24 10:35:20 -07:00
Noah Wang
ea5ebaa50c Prevent gaining audio focus when opening magnification screen.
bug: 30521125
Change-Id: I22fe63ed2b0529c2a08b7be03c12753f3f060c1a
2017-04-12 11:52:23 -07:00
Casey Burkhardt
bc3827d717 Settings revisions for Accessibility button
Populates and displays a warning message when a feature that relies
on the Accessibility button is enabled, but not assigned.

Bug: 34720082
Test: Manual
Change-Id: Ie7031716a91fdf7fc40f32bf4e0ad17af85aa573
2017-03-24 17:01:06 -07:00
Casey Burkhardt
9c7143c3e4 Updates to Magnification Settings
Restructures accessibility settings to support multiple
magnification modes.

Removes "preview" behavior within magnification settings

Test: Manual
Bug: 30960346
Bug: 36136580
Change-Id: I9f95b8ef2460f5178336e8cb44b10a2553d28ea9
2017-03-24 00:35:28 -07:00
Tamas Berghammer
5a638a6ad1 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
This reverts commit fbd5f5fdce.

Change-Id: I769f7a0f509996ccc39fd1c628cad7e5ec1202bf
2017-01-18 19:28:11 +00:00
Tamas Berghammer
fbd5f5fdce Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
(cherry picked from commit 265d3c2a0c)
2017-01-11 11:28:10 +00:00
Fan Zhang
33b0d91d74 Add video to each gesture preference screen.
- Refactor GesturePreference to a generic VideoPreference.
- The old video_preference.xml is only for magnification video, so
  renamed.
- And use VideoPreference in gesture setting pages.
- Refactor common logic into GesturePreferenceController.

Bug: 32637613
Test: RunSettingsRoboTests

Change-Id: I58580b01a32873cb32c5dc5bf2ec021d5b1400cc
2016-11-10 15:24:45 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Noah Wang
f3a20cc9bc Instantiating background image of preview video in
Magnification Gesture screen using ImageView, also
set GlobalLayoutListener to adjust its position.
Bug: 27992162
Bug: 27901691

Change-Id: I9563eb2776bcde3d7edeb4a420a9b3c02481baf8
2016-04-13 19:02:41 -07:00
Anna Galusza
082d977653 Prevent Magnification video from being paused by the user and automatically
pause the video on onPause and resume in onResume.
b/26984643
b/26705583

Change-Id: I7b805cf001ba3097fec4e7bd178588c3b23b455f
2016-02-18 13:51:27 -08:00
Noah Wang
c14ed74482 Add instruction video to Screen Magnification a.k.a. Tap to Zoom screen.
Change-Id: Id02796ea44e48fe04351c9ea6bda66526f77a5cf
2016-01-27 15:24:46 -08:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Anna Galusza
b1795f5549 Make A11y SUW launchable from SUW and small UX changes based on last round of
UX studies.

Change-Id: I9c20cd3abf910a37731da2af604f3af2cd30e942
2016-01-20 15:42:58 -08:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Fabrice Di Meglio
006b2cca13 Fix bug #15897505 Talk back state shows "off" while the talk back is still enabled.
- we were missing the update of the TextView from the SwitchBar so provide a new
setCheckedInternal() method that is doing the TextView and Switch update at the
same time

Change-Id: I6dd9c472a386bb534a58fbf5cf82d9d01fa74f6c
2014-06-27 19:13:19 -07:00
Fabrice Di Meglio
00b5e6b247 This CL is not working (even after careful testing) but when I tried I was not completely ToT.
Revert "Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads"

This reverts commit 1e52db8063.

Change-Id: I73bdfeba4a4b3e993e37cdae1e3733ffe272b9eb
2014-05-28 17:36:37 +00:00
Fabrice Di Meglio
1e52db8063 Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads
- refactor all the code that was using the Switch to control it thru the SwitchBar
- start the Switch as View.GONE and make it View.VISIBLE when it is set
as "enabled" or "checked" so that you dont see the Switch transition (it shows
only with it final state)

Change-Id: I382076bf3c819c530b5b2c06ca2429dfb2cdc6bf
2014-05-27 17:01:10 -07:00
Fabrice Di Meglio
6220275d6d Use SwitchBar for Accessibility Settings
Deals with Talkback / Captions / Magnification Gestures

- follow up CL to 4193776698

Related to bug #14898161 On/Off switches must move down from Action Bar

Change-Id: Ibda0ed05b399f1b2b4464c5b22a3e9fd3d378867
2014-05-15 17:44:26 -07:00
Fabrice Di Meglio
5160536df9 Code refactoring
- move ToggleSwitch to the widget package

Change-Id: Id277fc11c78363bf7d7b229ef9ae91c1ec5d6774
2014-05-15 15:55:33 -07:00
Alan Viverette
341ff66e03 Move accessibility settings to their own package
Change-Id: I5822bf4a81f5ade4ee0649ed30c2daa40d7e8fe2
2013-07-18 17:49:33 -07:00