Commit Graph

27 Commits

Author SHA1 Message Date
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +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
af1552251f Add some pages to search index.
* Notification access page
* VR Listener page
* Feature flags in dev options
* QS Tile developer options
* User dictionary
* Billing cycle
* Some accessibilty pages

Bug: 70720645
Test: robotests
Change-Id: I4f7d3d65b2803cebf178ac345a79721232df707c
2018-07-11 16:39:29 -07:00
Emily Chuang
5e3718d354 Migrate UserDictionaryList to DashboardFragment
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.

Test: manual
Test: make RunSettingsRoboTests -j
      atest UniquePreferenceTest SettingsGatewayTest
Change-Id: Ia3d885cb8917c7d5498b87818e24b938f0d95dbb
2018-04-17 12:27:24 -07:00
Fan Zhang
31d8a89220 Misc polishing fixes for Settings
- Never return null when querying userDictionaryLocales
- Auto mirror mobile setting icon in RTL to match status bar.

Fixes: 65298627
Fixes: 65361092
Test: robotests
Change-Id: I0f9827f7bc23baf4895712c0f86584aeccfb9c73
2017-09-06 10:58:52 -07:00
Fan Zhang
6539c9a1d0 Load only unique dictionary words
- Move UserDictionarySettings to sub package
- Convert cursor to loader

Fix: 22058788
Test: robotests

Change-Id: I1e8828abee58362b815abc210c044b678bf9d578
2017-07-13 16:05:35 -07: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
016f875ae7 Fix crash when rotating screen in a few screens.
Bug: 26946312

Fixed in the following screens:
Apps > Gear > Special Access > Modify system settings
Apps > Gear > Special Access > Draw over other apps
Apps > Gear > Special Access > Apps with usage access
Language & input > Personal dictionary
Wireless & networks (More) > Android Beam

Change-Id: I0b9bd6c19f710302625dd87989e9d4ce3c96a9a2
2016-05-09 17:56:06 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Svetoslav
990159abaa Adding search for dynamic accessibility settings.
The language and input settings are highly dynamic and this change adds search
support for that. This category depends on installed IMEs, input devices, user
dictionary configuration, etc. We not only compute the right preferences to be
indexed but also track related system state in the settings app to rebuild the
index if needed.

bug:14066763

Change-Id: Ia89d9e35bd79abf8d74614691aedf4ca9b11b6f2
2014-04-14 17:31:23 -07:00
Satoshi Kataoka
bac2974dd0 Show all languages if user enables multiple subtypes
Bug: 8976598
Change-Id: Idbed69da04321a6f27033329686572d452d26f7a
2013-07-24 15:26:26 +09:00
Satoshi Kataoka
b355683253 Stop redirecting the user dicitonary settings fragments
Bug: 9755092
Change-Id: If4443412ca8f33e076edbe2c23c15b07b9b89fa9
2013-07-23 17:28:07 +09:00
Satoshi Kataoka
a5c08c9a6f Remove the locale spinner and show the current language
Bug: 8976598
Change-Id: I092141d0cc5c6d7af499ab8ceb69275923180e37
2013-07-22 16:34:41 +09:00
Satoshi Kataoka
f64e3b7b92 Improve the language list in the personal dictionary
Bug: 9117704
Change-Id: I0b0fdb9418baa634eeaf4b8a65aebabe291aa005
2013-06-27 20:29:01 +09:00
Satoshi Kataoka
71c915b672 Show subtype locales in the personal dictionary
...and change the destination of the intent

Bug: 9117704
Bug: 8856930

Change-Id: I39e55d2c5ca9a602f9a586625dcf25d5fb065a0a
2013-06-20 19:28:34 +09:00
Jean Chalard
f54622e46c Cut a helper method to increase encapsulation.
Change-Id: Ie47503a99d455f7266e281914e92ed680b993551
2012-05-09 17:49:59 +09:00
Jean Chalard
b9f837dd1d Fix a janky transition
Bug: 6026080
Change-Id: I75bd244b2b09c371805a67057d2a9c45dc12f3db
2012-05-08 13:09:39 +09:00
satok
a43dd3962e Show a security warning dialog when switching a spell checker
Bug: 5402295

Change-Id: I021e6e923fa137248d23c8fa39e68afdf73fead9
2011-10-05 19:11:28 +09:00
Jean Chalard
4e658ba969 Fix an NPE
It seems the user dictionary fragment does not tolerate being
called by name, and needs to be called only by action.

Bug: 5242122
Change-Id: I6b954db549b98d4d0076fdce8e00d336fc18b6e3
2011-09-02 21:44:12 +09:00
satok
e077d2b607 [Step 1] Add preference activities for spell checkers
Bug: 5057977
Change-Id: I8f2f3d480325029c794c058beed2475033a617f9
2011-07-25 09:40:36 +09:00
Jean Chalard
410e75b15b Remove the "user dictionary" settings entry if none
When the user dictionary service is not present or disabled,
the settings application should not be showing an entry to use it.

Bug: 5024166
Change-Id: Ic57d67eb03cf54e2c411fb0909c2a5d23d3e1fd7
2011-07-21 20:30:17 +09:00
Jean Chalard
ea41e087f9 Do not crash when the user dictionary service is disabled.
This still does not remove the UI. It only prevents the Settings
application from crashing.

Bug: 5024166
Change-Id: I6e8c0a8953af6c02273de2a881e85a5248cb8bd6
2011-07-21 19:08:04 +09:00
Jean Chalard
71ad1f4e3e Change the interface for user dictionary multiple locales.
The user dictionary interface now works the following way:
* Locale gathering
- The current locale is always considered as present, even if
there are no words for it in the user dictionary.
- Any locale for which at least one word is registered is
considered present.
- A null locale is considered a valid locale meaning "all
languages".
- If no words are present at all, since the current locale is
always considered present, the system will consider there is
exactly one locale present - and allow editing this user
dictionary.

* Options display
- If only one locale is present, the interface is the same as
for Honeycomb: display a "User dictionary" PreferenceScreen
that brings up the dictionary editor interface.
- If there are several locales present, then the user
dictionary option will jump to a screen that will display a
list of available locales.

* Word insertion
- Inserting a word will always use the locale of the currently
displayed dictionary. If it is the "all languages" null
pseudo-locale, that will still hold and the word will be added
to this pseudo-locale.

It is worthy to note that the "All languages" locale is only
accessible if for some reason there are already words with a
null locale in the database before this is installed. For
example, if an application has inserted some words that way,
or if the user inserted words with a previous version of the
settings application.
On a freshly flashed device, barring the use of third-party
application that would add such words, it is not possible to
access the "all languages" locale any more because there is
no interface to do it, though it works if such words are
inside.

Bug: 3479738
Change-Id: Iba323e5aeb3f4f575896903a4e8bef6ffb3ea306
2011-05-18 12:54:20 +09:00