Commit Graph

71 Commits

Author SHA1 Message Date
Felipe Leme
bd88450183 Adds a Util.setSafeIcon() function used to avoid crashes.
There are many places on Settings that loads an icon provided by an application,
and if the icon is too big it crashes Settings.

This CL creates a helper method used to set an icon in a safe way, and
uses it in a few places (but most likely not all of them).

Bug: 65739885
Test: manual verification with an app providing a 2MB png

Change-Id: Iae2becb6d0ec8893328d9ef1de618f9bd12fa4a0
2017-10-10 08:56:56 -07:00
Fan Zhang
18a168239e Index TTS-Settings and dedupe TTS-engine in search result.
Fixes: 63022866
Test: robotests
Change-Id: I5c711e7bafba4e413ee271768c58742be05d8640
2017-08-16 15:46:41 -07:00
Fan Zhang
5035f8c559 Move a11y indexing from DynamicContentMonitor to loader
This is necessary to kill DynamicContentMonitor later

- Removed all logic related to indexing accesiblitysetting from the
  monitor class and AccessibilitySetting page itself
- Created a loader to search against A11yServices at runtime

I noticed adding a loader in SearchResultsAdapter is rather manual. It's
something we should consider refactor in the future.

Bug: 64310452
Test: robotests
Change-Id: Iff31aff65ce000991229433f294e2ec69af99da2
2017-08-03 10:10:59 -07:00
Fan Zhang
cf38863a6b Update string id to make it more generic
Test: builds
Bug: 62354743
Change-Id: I321f5e3d7560dbc21d52dbaa8ebe2df07f99a3db
2017-06-27 14:24:47 -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
TreeHugger Robot
e2987d7173 Merge "Remove accessibility duplicates in settings search" 2017-05-02 19:07:44 +00:00
Matthew Fritze
49915a64c5 Remove accessibility duplicates in settings search
Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: Iae179b558065d728c14eb76f136d398081577779
2017-05-02 17:39:24 +00:00
Jeff Sharkey
ad597344a2 Merge "Change String to CharSequence in #loadSummary." into oc-dev 2017-05-01 17:52:27 +00:00
Saige McVea
2cc818acce Change String to CharSequence in #loadSummary.
Per API council review, localized strings should return CharSequence. Changes here
account for the different type returned.

Test: ag/1813674

Bug: 37723508

Change-Id: I7dacab8af48932db031de22835b65eba30393956
2017-04-28 20:35:21 -07:00
Saige McVea
b18e31bc5a Merge "Conditionally reposition experimental preferences." into oc-dev 2017-04-18 21:47:25 +00:00
Casey Burkhardt
65523b9cb0 Merge "Hide "Magnify with button" if no navbar is shown" into oc-dev 2017-04-18 00:06:53 +00:00
Saige McVea
6a6b97905f Conditionally reposition experimental preferences.
Specifically, move colour inversion and colour correction preferences
to the display category if device is color transform accelerated.

Test: Manual

Bug: 36603386

Change-Id: I4f7e4e569f5f358e6e3c705f9df02e0da473a081
2017-04-17 11:59:07 -07:00
Casey Burkhardt
875d3b2471 Hide "Magnify with button" if no navbar is shown
Devices without a software-rendered navigation bar will be unable to
use "Magnify with button" as no accessibility button trigger for
magnification can be shown.

In this case, we hide the setting by preventing
MagnificationPreferenceFragment from showing the list of mag
modes, instead launching directly into the PreferenceFragment for
"Magnify with triple-tap"

Bug: 36862906
Test: Manual - Configured marlin to disable the navigation bar and
      verified behavior in SUW and Settings

Change-Id: Ie614ec292d7779044274b7c79eaed1df080c0fd1
2017-04-13 15:50:28 -07:00
Saige McVea
672cb2edc6 Added generic icon and magnification icon to a11y Settings.
Test: Manual

Bug: 36895362

Change-Id: I85281c0904bd6f562f9ebd39dd35b1eeb79108e6
2017-04-12 12:52:21 -07:00
Casey Burkhardt
059a8e3d12 Fix Accessibility Settings crash
Update preference key to reference new magnification preference screen.
Bug: 36606349
Test: Manual

Change-Id: Iefb114bea6a58d6f8939ae863959d4a6922f5a1d
2017-03-24 23:33:45 -07:00
Casey Burkhardt
5477832096 Update magnification strings
- Adjusts string for triple-tap instructions
- Adds summary text to Settings > Accessibility > Magnification

Bug: 30960346
Test: Manual
Change-Id: I151eeaa8b08c86ba8f9dec90d14388f1d775fb57
2017-03-24 19:24:34 -07:00
Saige McVea
5bbf987d1a Merge "Resolved accessibility service preference summary strings to use a common resource." 2017-03-24 22:56:04 +00:00
Phil Weaver
296b7263ad A11y shortcut settings enhancement
Adding shortcut on/off switch, improving the service picker,
and adding a switch to enable the shortcut on the lock screen.

Also adjusted setting search code to avoid indexing the
accessibility shortcut aside from the main accessibility settings
page.

Bug: 35872328
Bug: 35219988
Test: Ran in a variety of conditions, ran existing settings test.
Also added basic robo test, verified existing robo tests pass.
Change-Id: I4da9bad74caf96d9c8f3640e7db5417b4ee5d602
2017-03-24 13:15:13 -07:00
Saige McVea
6413604bbd Resolved accessibility service preference summary strings to use a common resource.
Test: Manual

Bug: 34682532

Change-Id: Idf617fb5008181a0739689e40fef6b3a86aaf72b
2017-03-24 12:48:11 -07:00
Casey Burkhardt
6075d46e85 Merge "Updates to Magnification Settings" 2017-03-24 19:35:20 +00: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
Fan Zhang
d53859df7d Set about phone subtext to device model string.
Also remove useless custom preference

Fix: 36395109
Test: robotests
Change-Id: I07297e6ade6991a8262473c9f59c21d914300244
2017-03-23 17:33:33 -07:00
Fan Zhang
e05b352758 Misc search summary text updates.
- Remove static text from default app summaries.They will be filled
dynamically at runtime, so we don't need the static ones here.
- Remove summaryOn/summaryOff strings from a few fragments. Search
framework does not need them.

Change-Id: I165766073ba70aceead88c3df02d62f3700e4592
Fix: 36474747
Fix: 34573952
Test: run existing tests
2017-03-21 14:52:40 -07:00
Saige McVea
061362754a Fixes string reference in SEARCH_INDEX_DATA_PROVIDER and minor changes to UI based on UX review.
Bug: 34682532

Test: ag/1813674 and manual testing with TalkBack, Switch Access, S2S, and Accessibility Scanner.

Undo "Revert "Accessibility settings refresh.""
This reverts commit 31d855e739.

Change-Id: I7187250e8070418894aee4ee6c8c5d8282339c82
2017-03-15 15:07:33 -07:00
Saige McVea
31d855e739 Revert "Accessibility settings refresh."
This reverts commit 89a5c62963.

Change-Id: I97e420e4f78ee3e48b8aa10c8f5c1e2861032fab
2017-03-13 18:04:00 +00:00
Saige McVea
89a5c62963 Accessibility settings refresh.
Added logic for proper handling of new accessibility service categories. Preferences and
services are no longer distinctly separated - services are added after system preferences
in their appropriate category, or are grouped under "Downloaded services".

Bug: 30374533

Test: CTS tests updated to accommodate addition of summary.

Change-Id: I38255ede8880922e60487607f8d1bd520b1adf75
2017-03-06 15:08:42 -08:00
Phil Weaver
a68c2f73d6 Remove a11y speak passwords settings.
Bug: 28139568
Test: Opened settings, and it's gone!
Change-Id: Ife931c3a076c9b8470b6cde24712cb9280999bea
2017-02-10 16:26:07 -08: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
Fan Zhang
1c118b5f2a Always reserve space for preference icons.
This aligns text on preferences on the same screen when some of them
don't have icons.

- Use a custom layout for
  preference
  EditPreference
  switch preference
  VolumeSeekPreference
  DialogPreferencei
  Restricted*Preference
  DropdownPreference

- Moved related style defs into a new file styles_preference.xml,
  because current styles file is too large to read.
- Switch <PreferenceScreen ...> to <Preference ...> for a bunch of
  regular preferences.
- Also removed some dead style.

Bug: 33430928
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java

Change-Id: Ic9b75d3f133f2a83cd999297b8596253d4b10161
2016-12-12 16:02: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
Fan Zhang
10ad09b658 Clean up some unnecessary inheritance.
Bug: 30681529
Change-Id: I84fa1085cc18b167d506dec3b3054d9f74d3d3e7
2016-08-16 14:53:48 -07:00
Sudheer Shanka
b3dc3f2983 Don't set useAdminDisabledSummary when there is already a summary.
Bug: 27155568
Change-Id: If2a7bf127307731b2e2258dc6389caed13950f79
2016-03-16 11:42:58 -07:00
Andy Hung
acef55d099 Add mono audio to AccessibilitySettings
Bug: 15283594
Change-Id: If5ca14a800e1932b17ef479589beb8a5d1489b5d
2016-02-26 14:35:09 -08:00
Casey Burkhardt
fcb84e6912 Merge "Remove ActivityManagerNative dependency for adjusting font scale" 2016-02-04 19:35:53 +00:00
Sudheer Shanka
f755baf1c3 Use the correct userId when checking if disabled by admin.
And when adding accounts if only one account type is possible and
it is disabled by admin, show the admin support dialog.

Bug: 26897250
Bug: 26767564
Change-Id: I5cca64491a100efc34307c45aa35c14412f043cd
2016-02-02 20:31:48 +00:00
Casey Burkhardt
a8b2a5072c Remove ActivityManagerNative dependency for adjusting font scale
ActivityManagerService now holds a ContentObserver for
Settings.System.FONT_SCALE, so it is no longer necessary to notify
ActivityManagerNative of a configuration update involving the font scale
directly.

Bug:23033258
Change-Id: Ifd002bd25724b133e83a1285be2953019178c65a
2016-02-01 18:42:56 -08:00
Noah Wang
a6bb3d2307 Add entry point of screen zoom to accessibility and font size to display.
Also removing large text preference.

Change-Id: I076664edf1d1afd69385e34f9300bf5c0788b3e7
2016-01-28 12:49:38 -08:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
ba1a68b8ab Add preference summary when disabled by admin.
Change-Id: Iaa84e66b0abe0fccde50f116cbf6e68c6abbabc0
2016-01-25 22:39:34 +00:00
Sudheer Shanka
17b9fa3e52 Merge "Add padlocks to more preferences that can be disabled by policy." 2016-01-19 17:58:27 +00:00
Sudheer Shanka
9c32468cd5 Add padlocks to more preferences that can be disabled by policy.
Change-Id: I7cc999dd1d46c20c888e0ba67053564e4d50946b
2016-01-19 16:56:58 +00:00
Noah Wang
49fabb9b47 Accomodating multiple preview screen with ViewPager for the users to
swipe across, along with some UI refinements.

Change-Id: I9487bcce88cdab490a4b6baa752224acddc5be52
2016-01-14 22:50:54 -08:00
Anna Galusza
6bc8144e97 Add A11y SUW hub page after verifying build fix.
Original CL: 
https://googleplex-android-review.git.corp.google.com/#/c/828444/.

Diff (fixes build and adds a period):
https://googleplex-android-review.git.corp.google.com/#/c/841247/

This reverts commit 44be967e95.

Change-Id: I971806022dcd791de2d7819fa19df7801f51b673
2016-01-07 17:45:31 +00:00
Anna Galusza
44be967e95 Revert to fix build breakage.
Revert "Add A11y SUW hub page. Minor alterations of Magnification screen to be consistent wtih most recent desigs."

This reverts commit bf95133f75.

Change-Id: I4559dfdcf5c0f6eea316a190d507a3bccd195149
2016-01-06 21:42:43 +00:00
Anna Galusza
bf95133f75 Add A11y SUW hub page. Minor alterations of
Magnification screen to be consistent wtih most
recent desigs.

Change-Id: I191f6f66edb26597db6f4ed41311998b8ce26ca4
2015-12-18 12:58:31 -08:00
Jun Mukai
5875bb86a1 Add a toggle switch for accessibility large pointer icons.
Bug: 25778857
Change-Id: I85f23253dda73b315aa8b1a612cb556f843d94db
2015-12-07 11:52:40 -08:00
Jason Monk
2fe90293a1 Various small crash fixes and guards
Bug: 25501551
Bug: 25583654
Bug: 25510495
Bug: 23575961
Change-Id: Id0e7f6aacdf763bf95b49d281aa8755afcd2e5ef
2015-11-10 15:43:54 -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