Commit Graph

203 Commits

Author SHA1 Message Date
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
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
e55afb181b Merge "Settings app: Remove "Toggle keyboard shortcuts helper" button" 2016-01-27 15:12:02 +00:00
Abodunrinwa Toki
7adce5463a Fix comment.
Change-Id: Ie4a535d2bf46a1ac3380ca8dbcf0b6665760ecb2
2016-01-27 11:51:27 +00:00
Abodunrinwa Toki
c8da2e13a5 Settings app: Remove "Toggle keyboard shortcuts helper" button
Change-Id: I93bd51a05a8922e02e4e09add94d247442f67334
2016-01-26 21:10:15 +00:00
Abodunrinwa Toki
bfae9dd7f2 Merge "Input settings: Associate keyboard layouts with device/IME subtype." 2016-01-26 21:00:46 +00:00
Abodunrinwa Toki
c043de9fbf Merge "Settings app: Include package icons in list of virtual keyboards" 2016-01-26 20:59:15 +00:00
Abodunrinwa Toki
5f0b59babf Input settings: Associate keyboard layouts with device/IME subtype.
Implements selection of keyboard layouts using the new InputManager
methods that associate keyboard layouts to
device/InputMethodInfo/InputMethodSubtype
See: Ie88ce1ab77dbfe03ab51d89c1dc9e0a7ddbb3216

Bug: 25752812
Change-Id: Ib76880d66391ca37978054de80f4b3b5147cecc3
2016-01-26 20:57:06 +00:00
Sudheer Shanka
ba1a68b8ab Add preference summary when disabled by admin.
Change-Id: Iaa84e66b0abe0fccde50f116cbf6e68c6abbabc0
2016-01-25 22:39:34 +00:00
Abodunrinwa Toki
567ebd68e1 Settings app: Include package icons in list of virtual keyboards
Bug: 25752812
Change-Id: I2070de953c92cce90dbf178c9ffdbe300d4c2646
2016-01-25 22:19:23 +00: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
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
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
c03a45fa9c am 6d85d168: am d2975f9d: am d9774c9f: am cdcba9ce: Merge "Fix crashes in Settings" into mnc-dr-dev
* commit '6d85d1686e6a333fe990d9e3ae5b978e8a8ce8c2':
  Fix crashes in Settings
2015-10-16 16:56:40 +00:00
Jason Monk
77b11fa470 Fix crashes in Settings
Fix problems from unsupported intents being launched through adb.
Remove the ones we can, fix the other.

Bug: 19634064
Change-Id: Iba0adeb135e76ee70365e5891380ba8b55110c26
2015-10-16 10:13:53 -04:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Johan Redestig
b1570d285a 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-06-26 18:15:13 -07: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
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Yohei Yukawa
f9b806e5e9 Stop using InputMethodUtils.isValidSystemDefaultIme
This is a follow up CL for a recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845
- part4: I871ccda787eb0f1099ba3574356c1da4b33681f3

In the above changes,
InputMethodUtils.isValidSystemDefaultIme was deprecated in favor
of InputMethodUtils.isSystemImeThatHasSubtypeOf.

With this CL, InputMethodUtils.isValidSystemDefaultIme is not
used by the setting app anymore and we can remove that method
from InputMethodUtils finally.

This is a pure code refactoring with preserving the current
logic. Hence no behavior change is intended.

Change-Id: Ie96b0d17745735db63eebe6fe1654f32d9b9a170
2015-03-17 10:26:52 +00: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
1671fbbc9d Show "up navigate" icon in input method subtype enabler
Since API 16 (and API 14 with support library) and later, we started
supporting "up navigation" model.
http://developer.android.com/training/implementing-navigation/ancestral.html

As a part of Settings app and a part of an IME's settings activity,
the input method subtype enabler should have a "up navigate icon on
its action bar.

Bug: 16595009
Change-Id: Iaaadd970395b9c9254ab60b2e8fee22dffb8c7f6
2014-07-27 14:26:57 +09:00
Tadashi G. Takaoka
1f53937469 Use SwitchPreference for input method subtype enabler
Bug: 15781377
Change-Id: I80fe987e499722af7768147a184934650bbf8385
2014-07-22 17:22:15 +00:00
Tadashi G. Takaoka
5d56f6217f Use OnPreferenceChangeLister for subtype enabler
Change-Id: Id9eaed14803b6c4e194f1cf62900de0a053da012
2014-07-22 16:23:50 +00:00
Tadashi G. Takaoka
229ed1a784 Remove unused and unnecessary code from subtype enabler
Change-Id: I9935b5bda8ae7cd1ce2d20ee6c4622eeb9a02b6a
2014-07-21 14:56:22 -07: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
3460a2683c Remove unnecessary saved persistent preference
This CL also fixes a bug in
InputMethodAndSubtypeUtil.updateSubtypesPreferenceChecked method that
prevents solving the issue/16115751.

Bug: 16115751
Change-Id: Ib46790172ed539d444fd609a1a97dabb2cb2d2f3
2014-07-18 18:21:44 -07:00
Tadashi G. Takaoka
fc8202463e (DO NOT MERGE) Refactor InputMethodAndSubtypeEnabler to separate loops
Change-Id: I1b7d26c37293e03dc20f87d60eb146017a574c47
(cherry picked from commit 61d97ddda8)
2014-07-15 02:51:57 +00:00
Tadashi G. Takaoka
989c364f2d (DO NOT MERGE) Refactor InputMethodAndSubtypeEnabler a bit
Change-Id: Id91b62ed084f98e3a6dc724aac9d926d89a96201
(cherry picked from commit a5db65fe11)
2014-07-15 02:49:36 +00:00
Tadashi G. Takaoka
72c2a6e5c2 Small refactor, remove unused/unnecessary code, and cosmetic fix
Change-Id: Ia0771f547b0489d3519faf23495e5c6bdfefa42e
2014-07-12 20:19:14 +09:00