Commit Graph

84 Commits

Author SHA1 Message Date
Fan Zhang
46debf8256 Remove logic for select input method preference.
- The prefrence is not used in code according to comment, and it's not
  defined in xml. So this chunk of code is redundant and should be
  removed.

Bug: 32642706
Test: compiles, and manually navigate to fragment.
Change-Id: Iac38632d090c635f324bc4eed8e1c41300ddb08e
2016-11-03 15:38:57 -07:00
Fan Zhang
e0c253fccb Add summary provider for system tile.
Refactored getLocaleNames() into a FeatureProvider interface so it's
reusable and testable.

Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I2d31a66a4b32cfa7a364a4cfef1f6eea87084577
2016-10-14 11:08:51 -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
Yohei Yukawa
91c23ca03f Fix sentence capitalization of locale names.
It turns out that out previous CL [1] is not sufficient to address all
the requests regarding capitalization.

With [1], now InputMethodSubtype#getLocaleDisplayName() returns a locale
name whose capitalization is basically optimized to be used as a list
item.  It works well for list UI, but on a UI element that looks like a
sentence text, we still need to capitalize the first character.

This CL takes care of those UI elements in the Settings app.  This CL
also addresses a remaining TODO about locale-unaware text formatting by
using about android.icu.text.ListFormatter.

  [1]: If105082ce703db7a86738455db7e9fb37f3c6fe8
       e489baf96df2837a3a63b626d9023a4a8b322c28

Bug: 29035638
Change-Id: I59f93f0bc067cdd87c6065c972a7da3cde1128f9
2016-06-09 15:01:52 -07:00
Roozbeh Pournader
217b1d1581 Show only up to two locales in Settings
The list could otherwise grow very long, spamming the screen.

Bug: 28872122
Change-Id: I8c4dbe659e1c088eba8b5ba1b2905b5eb8bc0229
2016-05-26 19:01:06 -07:00
Yohei Yukawa
1ef9c4afd5 Follow class package change: LocaleList
In order to avoid layering violation, LocaleList needs to be moved from
android.util package to android.os package [1].  This CL follows up that
package change.

No behavior change is intended.

 [1]: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18

Bug: 28819696
Change-Id: Ibd7934b30062046830d63f33d1c6febef32da976
2016-05-17 16:25:39 -07:00
Keisuke Kuroyanagi
c7fc075e12 Fix: Spell checker cannot be re-enabled.
Without this CL, preference for enabling spell checking is disabled
when spell checking is disabled.
This issue makes it impossible to re-enable spell checking from the
settings UI.
This was introduced in I0ed71bbb580e3547d97e321799ac2b77b1f284a3
that fixes Bug: 26685795.

Bug: 28157871
Change-Id: I386baf2dd79347c1202f885a3f749aea3fb6a58d
2016-04-17 18:09:28 +09:00
Yohei Yukawa
1ea368b5d5 Handle the case where no spell checker is selected.
This follows up to a previous CL [1] that fixed Bug 26685795 that the
Settings app crashes when no spell checker is selected, but introduced
another Bug 26686710 that the user cannot re-select the spell checker
once the device has fallen into that state because the button to select
new spell checker is disabled.

This CL tries to deal with such a case more carefully and gracefully, by
adding more null checking and by showing a meaningful text
("Not selected" for English) to users when no spell checker is currently
selected.

  [1]: I65e6d269572e064aa6897807b6611ef947d90211
       093a646772

Bug: 26108333
Bug: 26685795
Bug: 26686710
Change-Id: I0ed71bbb580e3547d97e321799ac2b77b1f284a3
2016-02-26 18:12:43 +00:00
Mihai Nita
0c7bce8222 Sentence-case the locale list.
Bug: 26730313
Change-Id: I015c50cb0e82cf3f5ad88a57d43d39e7202cf62d
2016-01-28 09:36:09 -08:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Abodunrinwa Toki
976bb3f459 Change Input Settings UI flow.
1. Introduces new UI components as per the new flow
2. Temporarily disables components in the old flow that are to be
   replaced by the new flow. This is done so we can neatly revert
   to the old flow if there are issues with the new flow
3. AvailableVirtualKeyboardActivity now responds to
   android.settings.INPUT_METHOD_SETTINGS intents instead of
   InputMethodAndLanguageSettingsActivity

Bug: 25752812
Change-Id: I728d7ee185827ed328c16cb7abce244557a26518
2016-01-22 18:24:44 +00:00
Mihai Nita
d7d48fda53 Implement multiple locales and sublocales in Settings
Does drag-and-drop reordering, supports adding / removing locales,
suggestions, search, removes locales already selected in the
user preferences.

Bug: 25800339
Change-Id: Iffe7b9810c77ec93a84d848ab20b2ba405249676
2016-01-20 12:31:11 -08:00
Michael Wright
17b6319884 Directly show the layout selection screen.
When a user clicks on the physical keyboard in order to select a
layout, rather than showing them a dialog with an empty list of
layouts, send them straight to the screen where they can pick which
layouts to enable.

Also, only request keyboard layouts that are appropriate for the
input device we're in the process of configuring.

Bug: 25062009
Change-Id: I4483dfc89afc8d148b2cfa7c6a5f66d2a02f712a
2016-01-05 16:44:42 -05:00
Jason Monk
9d80eeabe7 Add some more summaries for Settings Home
Change-Id: Iaca8db6bdce87e667832b5b670e4eb027580b668
2015-11-30 10:57:33 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Xiyuan Xia
67b438b118 am a218ebb0: am 9823f279: Merge "Implement default assist app setting" into mnc-dev
* commit 'a218ebb090e3ac06d5c324bafb89e2d4d3ef7741':
  Implement default assist app setting
2015-06-10 17:32:43 +00:00
Xiyuan Xia
86a554091d Implement default assist app setting
- Add "None" support to AppListPreference
- Add DefaultAssistPreference to manage assist;
- Add AppListPreferenceWithSettings to show a settings icon;
- Implement DefaultAssistPreference based on AppListPreferenceWithSettings;
- Move voice input settings into ManageAssist and implement it
  based on AppListPreferenceWithSettings;

Bug:20210110
Change-Id: If283b8b55a46b428ecfa6e45dc2123292b1d4302
2015-06-10 08:43:28 -07:00
Jason Monk
b84c5d3fce am 21c43016: Merge "Dont crash if there is no spellchecker"
* commit '21c430160fe6d9a6e53600ac350e3661802b85aa':
  Dont crash if there is no spellchecker
2015-06-03 13:56:51 +00:00
Seigo Nonaka
e792729b4c Making the behavior deterministic when the IME picker is shown.
In the language & input settings, the auxiliary IME subtypes have been
hidden since they should not be a default.  With Id156c85535a22, now we
can explicitly control the behavior of input method picker.
Note the this CL should not change any user visible behaviors.

Bug: 20763994
Change-Id: I9f797d07ba02363fab58ceb9aecb3cc11fbc407e
2015-05-07 23:18:49 +00:00
Johan Redestig
093a646772 Dont crash if there is no spellchecker
The fact that isSpellCheckerEnabled returns true does not mean
that getCurrentSpellChecker will return non null. By default
isSpellCheckerEnabled is true in TextServicesSettings, even when
there is no spellchecker service active on the device.

The issue can be verified by disabling the Google Keyboard (assuming
the GMS LatinImeGoogle is used) in Settings|Apps and later
entering Settings|Language & input. Without this patch Settings
crashes at that point with the following stack:

E/AndroidRuntime(13020): Caused by: java.lang.NullPointerException: \
Attempt to invoke virtual method 'java.lang.CharSequence android.vie\
w.textservice.SpellCheckerInfo.loadLabel(android.content.pm.PackageM\
anager)' on a null object reference
E/AndroidRuntime(13020):        at com.android.settings.inputmethod.\
InputMethodAndLanguageSettings.onResume(InputMethodAndLanguageSettin\
gs.java:253)
E/AndroidRuntime(13020):        at android.app.Fragment.performResum\
e(Fragment.java:2096)
E/AndroidRuntime(13020):        at android.app.FragmentManagerImpl.m\
oveToState(FragmentManager.java:928)
E/AndroidRuntime(13020):        at android.app.FragmentManagerImpl.m\
oveToState(FragmentManager.java:1067)

Bug: 19832033
Change-Id: I65e6d269572e064aa6897807b6611ef947d90211
2015-04-09 17:40:57 +00: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
d34dd4fb9e Update synonyms and fix some issues related to them
- update synonyms definitions
- fix issue with L release regression for indexing "Backup & reset":
was missing the marker interface "Indexable"
- fix non working synonyms for "Language & input": their declaration
was done in the XML preference file but was not used because the
SearchIndexProvider was built "by hand"

See bug #17474866 Settings search synonyms needs an update

Change-Id: Iceab71a0e3214f3a8ba0dcd77756c3632609c5ce
2014-11-06 16:57:04 -08:00
Fabrice Di Meglio
daef2e2b06 Fix bug #15730311 Checkboxes on R side should update to Quantum/Material on/off switch
Per UX request, convert more CheckBoxes to Switches

Change-Id: I04712bce4c0a54516d9ecedbb554f403fd6dd9e7
2014-10-15 19:00:35 -07:00
Michael Wright
29aaa20442 If a device identifier is specified, bring up keyboard layouts dialog.
Bug: 17614683
Change-Id: I0c25033d05d482ba45f17b3141b0a8673d0ff4b5
2014-09-22 20:09:56 -07:00
Elliott Hughes
81395c8f3d Always use the LocalePicker's preferred locale names.
Without this change we have the odd situation where LocalePicker goes out of
its way to avoid saying certain things but then -- as long as there's more than
one locale for a given language -- Settings would happily report the name we'd
been avoiding. (Either because it's too specific or because it's too sensitive.)

Also remove the unused bit-rotted duplicate of the blacklist; even if we needed
to access that list directly, we should use LocalePicker's copy.

Bug: 17150708
Change-Id: I9bfa0bf9a82bebd29ba45f4cbeaabb4e78570779
2014-09-09 14:33:11 -07:00
Elliott Hughes
d5ee3bc858 Merge "Settings psuedolocalization fixes." into lmp-dev 2014-08-22 20:42:38 +00:00
Elliott Hughes
c550f0bff4 Settings psuedolocalization fixes.
We don't need -c zz_ZZ any more, and LocalePicker now checks
the global developer options settings itself.

Also remove some dead code now zz_ZY and zz_ZZ are gone.

Bug: 17190407
Change-Id: I27f9f5bc8b27457004e7e4996ec76b76a17523eb
2014-08-22 12:24:00 -07:00
Kenny Guy
333f2bc71a Disable non-permitted accessibility services and IMEs
Bug: 14469005
Change-Id: I4986f035318854c27ecb92bbe2f0c977d53b6361
2014-08-21 17:15:49 +01:00
Tadashi G. Takaoka
fe3794a937 Remove "Choose Keyboards" settings
Bug: 17109233
Change-Id: Ia3860b12238d9d2233dc270e37a055a9a411b037
2014-08-21 11:41:57 +09:00
Michael Wright
bf55863b41 Remove indexes for removed hard keyboard options.
Bug: 16027438
Change-Id: If668024e3b7073b49142de7e9aae4a46b4969d40
2014-08-13 22:06:54 +00:00
Fabrice Di Meglio
9dc5f80874 Fix bug #16958103 android.content.res.Resources$NotFoundException: String resource ID #0x7f080971
- remove the indexing offending part from InputMethodAndLanguageSettings as the strings
has been changed
- add indexing for VoiceInputSettings

Change-Id: Ib8da55c935e00538ad6fff2f2590b0d525140734
2014-08-12 22:01:01 +00:00
Michael Wright
572f90bdf8 Remove non-functional hardware keyboard options.
Bug: 16027438
Bug: 16486654
Change-Id: Ia53d5d98c05586bbbd232519d8094706877ecaaf
2014-08-11 13:02:09 -07:00
Michael Wright
02d501433d Show physical keyboard settings even when IME is enabled.
The WindowManager lies about the configuration in order to get the
IME to show but the Settings page should still show the physical
keyboard options if one is connected though, so remove the
configuration check and just always check to see if there's a full
keyboard connected.

Bug: 14066881
Change-Id: I085fe4160f3524f3c95737a6809ee03fec5230b4
2014-08-11 13:02:01 -07:00
Tadashi G. Takaoka
9a8b4f239f Preserve enabled subtypes across disabling and re-enabling an IME
Bug: 16464156
Change-Id: I2ea4d010e47e5f48b2df11775b0c262330b28e89
2014-07-28 11:40:22 +09:00
Tadashi G. Takaoka
a82c3824f3 Fix Settings behavior when disabling current IME
Bug: 16195373
Change-Id: I95d086e152b07e81aece773bc115ac0ac4517392
2014-07-19 17:29:28 -07:00
Tadashi G. Takaoka
cd6fdead7c Reorganize spell checkers settings
Bug: 15976603
Bug: 16115751
Change-Id: I3b23d7f01d8d39da27215a5263b12304ac64db0f
2014-07-11 19:51:30 +09:00
Tadashi G. Takaoka
74e7c3e360 Reorganize language & input settings
Bug: 14860252
Bug: 16115751
Change-Id: I198aabebc08421764b78e137e7f26d2a7772d452
2014-07-10 18:58:06 +09:00
Tadashi G. Takaoka
d2dd7d33c9 Add TODO comments to Language & input settings
Bug: 16115751
Change-Id: I7bc426b95af214374db98c35314f4893dabfb2d4
2014-07-09 15:29:33 +09:00
Fabrice Di Meglio
5bdf0423f9 Fix SettingsPreferenceFragment.startFragment()
- was always passing R.string.lock_settings_picker_title as a title res

Change-Id: Iab47ef3da00e91d5ce3b6dc50c50c943bd78b08f
2014-07-01 15:36:47 -07:00
Fabrice Di Meglio
bb26141ddf Enable Search result highlight for Accessibility and IME settings
- add missing keys
- update Database version to force re-indexing (because the keys
were missing)

Change-Id: I7533d86b0f9d79d838e5c16d4bc51b7b09dffae5
2014-04-21 13:27:23 -07: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
RoboErik
813a54d216 b/12068020 Update calls to InputManager
This is part of work on making key layouts get saved per vendor/product
instead of per device. The corresponding change in fw is
https://googleplex-android-review.git.corp.google.com/#/c/399886/
This changes all uses of InputDevice descriptor to InputDeviceIdentifier.

Change-Id: I3eeebc0223820aeab62c2b8aa822f4d91adaf2d1
2014-01-08 13:57:34 -08:00
Satoshi Kataoka
aa4fa0ea09 Fix a bug on updating enabled IMEs
Bug: 11354619
Change-Id: Ie33630b3dc150536bc0325ad6116ea5fdcf60740
2013-11-01 07:00:13 +09:00
Satoshi Kataoka
ea90cd2fca Do not merge. Refresh "InputMethodPreference"s onResume
Corresponding change is I015075d57ebed94d6b

Bug: 11245599
Change-Id: I8be2b9a81d41fab979afe000bd1bce6fc57550c7
2013-10-18 18:55:07 +09:00
Satoshi Kataoka
cabde98bcd Change the refresh timing in input method settings
Bug: 8364845
Change-Id: I564a4b0d80cec5be670e2ca89e09d45944671082
2013-08-07 18:24:10 +09:00
Satoshi Kataoka
c6fc8e46f2 Allow the users to disable system IME
Bug: 8364845
Change-Id: Icc5173a68fa00b2895c0768ff8f8b9dcf30e6171
2013-08-02 20:06:34 +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
1ecdb22b4e Use InputMethodUtils in input method settings
Change-Id: Ifd054c86b7099db3984e559feb5fadf1df5ca227
2013-07-11 02:20:04 +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
Satoshi Kataoka
5df3307309 Fix the title of the fragments of the personal dictionary settings
Bug: 8600958
Change-Id: I9b8bab21b144385bc2386e7fcb67e1c197f84113
2013-04-30 16:08:00 +09:00