Commit Graph

110 Commits

Author SHA1 Message Date
menghanli
334dc4f20b Support accessibility shortcut secondary action (7/n)
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
2020-01-13 12:34:04 +08:00
Peter_Liang
ec2fa7e872 Accessibility scary dialog for android R changed.
Show scary dialog only once when toggle shortcut preference and use
  service.

Fix: b/142532185
Test: manual test
Change-Id: Ic36fdd5eec8ec20ead79ce47cd5e5e19d2ef5768
2020-01-07 11:54:27 +00:00
jasonwshsu
8ef01d25fb Accessibility shortcut secondary action - save and restore shortcut key
- Implement onCheckboxClicked() to save shortcut key
- restore shortcut key when onViewCreated()
- Use preferredShortcutType to handle settings key

Bug: 142530063
Test: make -j52 RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityUtilTest
Change-Id: Iabe636641968d346e52becea19b6e201ea5bc1fb
2020-01-06 13:56:48 +08:00
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
Menghan Li
3b87b777b0 Merge "Remove all "Tapping Stop will stop x" dialog while turning off an accessibility service" 2019-12-25 01:29:00 +00:00
menghanli
f74f3061e3 Remove all "Tapping Stop will stop x" dialog while turning off an accessibility service
Bug: 146539308
Test: make RunSettingsRoboTests2
Change-Id: Ib3124aea307e42e648ba8d3f561dadb2901c06e5
2019-12-24 02:45:45 +00: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
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
Peter_Liang
64f1374c64 Support the rich content for accessibility service (1/n)
Goal: 1. let third party developer can use html text that include from their local image file and
         animated image instead of only plain text to rich their content.
      2. Avoid malicious links made by third party developer

Action: 1. Add html, static text, and animated image preferences.
        2. Add android:AnimatedImageDrawable, and android:htmlDescription attributes.
        3. Fine-tune interface and integration
        4. Add custom tag filter

Bug: 136292241
Test: Maunal & make RunSettingsRoboTests
Change-Id: I82cd5319efb7faa1ff7e8354a279828fce5135b8
2019-11-27 20:42:39 +08: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
ee15fa1c2d Change disable accessibility service dialog layout
Bug: 140307087
Test: Visual
Change-Id: I78d573f121e2f799a8395fcd2d21ee48a5fffb23
2019-09-11 15:47:08 +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
Kevin Chang
f8baacfe7f Merge "Revert "Change string of switchbar and installed service category title"" into qt-dev
am: f508ece42d

Change-Id: I1c01a995f3cacdd80f5f97bce342dd0ce0907fe2
2019-05-18 01:24:02 -07:00
Kevin Chang
d8927cbabf Revert "Change string of switchbar and installed service category title"
This reverts commit 7eddb0e4dc.

Reason for revert: There's some side effects with string.
Create a new CL in master branch to fix it.

Bug: 132840332
Change-Id: I17526a06474d25bdb32beda96f5bb6371f0e5ade
2019-05-17 08:38:54 +00:00
Kevin Chang
bfed5d1ca1 Merge "Change string of switchbar and installed service category title" into qt-dev
am: d0c5f2d443

Change-Id: I4e8f59bd9c5d0a9b906b4b0bbc05446dc24156ad
2019-05-14 19:50:05 -07:00
Kevin Chang
7eddb0e4dc Change string of switchbar and installed service category title
Bug: 122897712
Test: Visual
Change-Id: I4e15ebc8b91c58d24aadb7e665c6692ebcd627a8
2019-05-14 11:47:19 +08:00
Colin Cross
807e861105 Use if instead of switch for resources
Converting to Soong will move some code from directly compiled
into the app to compiled into an Android library and then
shared between the app and the tests.  This will cause resource
IDs in the library to become non-final, which means they can
no longer be used in case statements.  Convert affect case
statements to if blocks.

Test: m RunSettingsRoboTests
Change-Id: I25742a374f06d3fa4decbfc0d223a350acc50881
2019-05-13 13:42:01 -07:00
Kevin Chang
bb6395eb4a Improve the Accessibility warning dialog with new design
Create new Accessibility warning dialog based on the style of permission
dialog

Bug: 129788631
Test: Visual
Change-Id: I0ec693f9c29e6e85e17d5bd1a64a4c0fe9499f95
2019-05-10 11:46:19 +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
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Phil Weaver
633c9be21c Migrate to new overlay-stopping flag
Bug: 62196835
Test: Started an accessibility service that displays an app
overlay and verified that it disappears when approving an
accessibility service's capabilities.

Change-Id: I7c8d8b4143a5dd1cb684c31c4503608c8d5be0e3
2017-07-05 10:41:18 -07:00
Phil Weaver
64822d40dc Merge "Manual merge of ag/2319717" 2017-05-30 19:46:18 +00:00
Phil Weaver
2e2dbfe549 Manual merge of ag/2319717
Bug: 62104030
Test: Manually tested as described in original commit msg.
Change-Id: Ie00bafa736c837881a258c9de10891b27c5baefd
2017-05-30 10:41:52 -07: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
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00
Phil Weaver
ba29c47a74 Settings for new accessibility shortcut.
Repurposing shortcut setting to make it configurable.

Bug: 30160335

Test: Verified that the setting dialog appears with both
default and newly added accessibility services. Toggled
services on and off, and verified that nothing happened
when the shortcut was disabled.
Change-Id: I14d00109212bdd4b7919b2d51f702c8f118007fa
2017-01-18 10:45:55 -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
d65184faef Log visibility change for DialogCreatable in Settings.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Test: make RunSettingsRoboTests
Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
2016-09-21 16:30:32 -07:00
Phil Weaver
7382f2c15d Make a11y settings display consistent am: 99a66b5416 am: 17fb0f6cf5
am: 02b9cb27bb

Change-Id: I9a6c530e5fbb7bf2023b0f84186b568c47e694f3
2016-09-13 02:10:10 +00:00
Phil Weaver
99a66b5416 Make a11y settings display consistent
We were using two methods to decide whether or not to show
that an a11y service was enabled, one on the main
Accessibility screen and another on the individual service
screen. In some situations, an enabled service would show
up as enabled on the main screen but not enabled on its
individual screen.

Bug: 30829589
Change-Id: I560d86684a2fb8987d3dd06279e033ecb7cc1a58
2016-09-12 16:17:09 -07: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
Anna Galusza
db0dbef52b Remove "Help & feedback" from toggle screen for accessibility services to
prevent confusion when users are trying to submit feedback for a specific
accessibility service (accessibility services can place their own "Help &
feedabck" in their apks and route it appropriately).
Bug: 29278252

Change-Id: Ie6f0d92a9ded82eaf3a0ac1122861f26639bc58a
2016-06-10 23:40:11 +00:00
Jim Miller
358ff29f38 Move legacy full disk encryption code to Settings.
Fixes bug 27617297

Change-Id: Ib975cf8d4f2e1e7fa8a77550ca4ee8233647e9db
2016-06-07 15:44:46 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Tony Mantler
514b81d233 Move more Accessibility stuff to SettingsLib
Change-Id: Id5dec8af86c1d4b0d98b169c4365410c2cee10b6
2015-10-30 16:20:25 -07:00
Tony Mantler
351321c2b5 Move AccessibilityUtils to SettingsLib
Change-Id: I1ad6b89e6dce1f7cad337b49774694f16479342b
2015-10-29 13:16:31 -07:00
Adrian Roos
5437588abd Require explicit userId in LockPatternUtils
Bug: 18931518
Change-Id: Ie2faa18918aaadf17a84287898438549a693b0cc
2015-04-28 12:01:09 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Alan Viverette
3c682c32a4 Show a toast when filtering obscured touch input
We can't verify user consent if the touch input is obscured, so the
best we can do is fail with an informative message.

BUG: 18082299
Change-Id: I99bea51171d998c0e0ba58dd7bbf1167d4af925d
2014-12-16 16:51:19 -08:00
Svetoslav
1f39d6a6e7 am edbada7a: am ba202e9f: Merge "Accessibility no longer overrides strong encryption (Settings)." into lmp-dev
* commit 'edbada7acd2d40db1c472e291f3191c6f26d980a':
  Accessibility no longer overrides strong encryption (Settings).
2014-10-17 23:14:01 +00:00
Svetoslav
40ca78f6f3 Accessibility no longer overrides strong encryption (Settings).
Updating the accessibility layer behavior to reflect the new
model where accessibility no longer overrides strong encryption.
Now enabling an accessibility service lowers the encryption
level but the user can bump it up in settings if desired.

bug:17881324

Change-Id: Iaf46cbabf1c19c193ea39b35add27aaa4ff509e4
2014-10-17 14:41:58 -07:00
Svetoslav
b363c26e2f am 431e2460: am 3ea423ae: User to confirm credentials if an accessibility service changes encryption.
* commit '431e246032d58b8aae72d348107f0d2aaa9efbac':
  User to confirm credentials if an accessibility service changes encryption.
2014-10-17 18:53:32 +00:00
Alan Viverette
ea2810ad0f Prevent NPE when no accessibility services are enabled
BUG: 18023183
Change-Id: Icad0631410f1436f7726bd7311ac3b766a2c46b2
2014-10-16 18:27:18 -07:00
Svetoslav
3ea423ae0f User to confirm credentials if an accessibility service changes encryption.
When an accessibility service is enabled we are not using the user secure
lock when encrypting the data. If the latter is already used for encryption
we are decreasing the encryption level and therefore shall challenge the
user with their secure lock.

bug:17881324

Change-Id: If8905c05e20bc6bb6a6415e501871e5ad83f3d86
2014-10-16 17:35:07 -07:00
Alan Viverette
0ba89bd54c Update Settings to use themed Context.getDrawable()
Explicit null theme is passed when using Resources.getDrawable() and
no theme is available, e.g. when using getResourcesForApplication().
This fixes an issue with ic_text_dot theming and helps avoid similar
issues in the future.

BUG: 17648301
Change-Id: I3e97c3490b6f2a55744f567b21284f2935ae9af7
2014-10-10 10:58:58 -07:00
Svetoslav
17fd600fc6 Update accessibility service toggle switch when resuming.
An accessibility service can be enabled via a global gesture
in which case if the settings activity for enabling the service
is running its toggle switch is shown in the wrong state.

bug:16558106

Change-Id: I2821b148475a7afae21e29148ef98db724c817f2
2014-10-08 19:47:55 +00:00
Svetoslav
5244844268 Use default encryption password if an accessibility service is enabled.
If accessibility is on and the user selectes a secure lock we use weaker
encryption to enable running accessibility layer at the time the user
authenticates. This change adds a warning message to the enable accessibility
service dialog if there is a secure lock and also adds a warning as a
summary for the secure lock in the lock chooser activity. Both warning
mention the weaker encryption to be used.

bug:17671790

Change-Id: Ib5cc9d3a78f751e18362bb9238fd2804c3b600f8
2014-09-30 23:03:37 +00:00