History log of /frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ce18c8167766f92856f94a8e88e19de4698960e6 28-Apr-2016 Jeff Sharkey <jsharkey@android.com> Introduce "unlocking" vs "unlocked" nuance.

There is a narrow window of time during user unlock where we're
reconciling user storage and dispatching the "unlock" status to
various internal system services. While in this "unlocking" state,
apps need to be told that the user still isn't actually "unlocked"
so they don't try making calls to AccountManager, etc.

The majority of internal services are interested in merging together
both the "unlocking" and "unlocked" state, so update them.

Clarify naming in AccountManagerService to make it clear that a local
list is being used, which mirrors the naming in MountService.

To match UX/PM requested behavior, move PRE_BOOT_COMPLETED dispatch
after the user is unlocked, but block BOOT_COMPLETED dispatch until
after all PRE_BOOT receivers are finished to avoid ANRs.

Bug: 28040947, 28164677
Change-Id: I57af2351633d9159f4483f19657ce0b62118d1ce
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
a09b4d2a611a7606e8fc8c73a24bd941b6fc173f 15-Apr-2016 Narayan Kamath <narayan@google.com> Remove unnecessary allocation+unboxing of objects.

Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
7f98aa4aa93497692f200c553d2d6fff402e3de2 07-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Added getProfileIds method returning array of userIds

Previously many usages of UserManager.getProfiles and getEnabledProfiles
were only using ids of returned users. Given that the list of users needs
to be parceled and unparceled for Binder calls, returning array of ids
minimizes memory usage and serialization time.

A new method getProfileIds was introduced which returns an array of userIds.
Existing method calls were updated where appropriate.

Bug: 27705805
Change-Id: Ic5d5decd77567ba0f749e48837a2c6fa10e812c0
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
08ce18728cbdadbf376d2d1014daa06cf05c295a 17-Mar-2016 Yohei Yukawa <yukawa@google.com> Add more @NonNull/@Nullable to TextServicesSettings.

We need to fix TextServicesSettings as well as InputMethodSettings,
because regarding Bug 27687531 the same issue was copied from
InputMethodSettings to TextServicesSettings by my CL [1].

This is basically a mirror of the fix for InputMethodSettings [2].

[1]: Ie3d61458648df469abe149b7aaad8087c531a675
49ed14017697f8f19b8d49d55462713396a0588e
[2]: I169ad4957e68b65c64251b0849056195b8ca4911

Bug: 27687531
Change-Id: I068f8821a32d2e199fbf6239bbe833da8c5a4e5e
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
ad150ee271d9a0d27289407bd023924e23ec2b26 17-Mar-2016 Yohei Yukawa <yukawa@google.com> Remove an unnecessary int to String conversion.

This is a safe refactoring to remove an unnecessary int to String
conversion in TextServicesSettings.

Settings.Secure.SELECTED_SPELL_CHECKER_SUBTYPE is a integer value that
indicates subtype ID (or SpellCheckerSubtype#hashCode() if the subtype
ID is not specified), and we can just rely on
Settings.Secure#putIntForUser() rather than converting int to String
by ourselves then pass it to Settings.Secure#putStringForUser().

Note that this change is still OK for existing users because
Settings.Secure#putIntForUser() has been internally doing exactly the
same thing.

Bug: 27687531
Change-Id: Ibcf12746f1295c12bec095300ea7f6ced0a51d09
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
f0f168066335ac1ec103e575d693a957da714c4e 09-Mar-2016 Yohei Yukawa <yukawa@google.com> Reset TSMS when the device is unlocked.

This ports my previous CL for InputMethodManagerService [1] to
TextServicesSettings (TSMS).

With File-Based Encryption (FBE), now we have yet another runteime event
to reset TSMS state in order to keep the list of available spell
checkers updated.

See my previous commit message [1] for details about the idea.

Rebuild spell checker list when the system becomes ready.

[1]: Ifa2225070bf8223f8964cf063c86889e312c5e9a
0e367d08aab2c1cb2d0fb9cbf1e8a6d09d1ac523

Bug: 27456430
Change-Id: I2b5a6989a99fd18b3bf109f5cda6270ccadaaf6d
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
49ed14017697f8f19b8d49d55462713396a0588e 08-Mar-2016 Yohei Yukawa <yukawa@google.com> Add copy-on-write mode to TextServicesSettings.

This ports my previous CL for InputMethodManagerService [1] to
TextServicesSettings (TSMS).

This is a preparation for File-Based Encryption (FBE) support in TSMS.

With this CL, we start switching TextServicesSettings from copy-on-write
mode to real mode and start rebuilding the list of available spell
checkers when the system becomes ready. Anything else should be the
same. See the previous commit message [1] for details.

[1]: I9c6f9bb3d51174198e5f73588637f87ea0d90e11
68645a638ad1bfb734b2b0f56b17fe206bb891c5

Bug: 27456430
Change-Id: Ie3d61458648df469abe149b7aaad8087c531a675
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
85df698df50262602ee2ac622d5c46f630c18f02 09-Mar-2016 Yohei Yukawa <yukawa@google.com> Dump spell checker service info from TSMS.

This is a preparation CL to make TextServicesManagerService (TSMS)
encryption-aware.

This CL changes nothing except for the output of TSMS#dump().

To diagnose File-Based Encryption (FBE) related issues, it would be
useful if we can see if each spell checker service is encryption-aware
or not. To do that this CL updates TSMS#dump() so that it can include
the result of ResolveInfo#dump() as we have done in
InputMethodManagerService.

This CL also updates TSMS#dump() so that its output can be more
consistent with IMMS#dump().

Bug: 27456430
Change-Id: Ie2321278f1d52533a3cd74d98f1f84c950a8f6d0
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
f0ed48d18d51021f0c7b6d771d4f8048d21fd5bd 08-Mar-2016 Yohei Yukawa <yukawa@google.com> Have unified setter/getter for TSMS Settings.

This ports my previous CL for InputMethodManagerService [1] to
TextServicesManagerService (TSMS).

In order to make TSMS encryption-aware, we are going to introduce a new
state where any read/write access to Secure Settings from TSMS is
virtualized so that we can temporarily enable only encryption-aware
spell checkers until the user unlocks the device then revert
any changes made before the device enters into an unlocked state.

See my previous commit message [1] for details.

This is still a preparation code. Behavior change is not intended yet
in this CL.

[1]: I0f79243e5cc1556764da37fa38078e075a27d42b
8752367042cb690f78953557433c16ac77eeea45

Bug: 27456430
Change-Id: I97a1e2f75bdecb0aa88fb35dfe56732c08fcbbd5
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
d1f7c4bad186b64d4d3f3cb56ac610afc2e81b86 07-Mar-2016 Yohei Yukawa <yukawa@google.com> Merge changes I2d6f9932,Ib3cc799d into nyc-dev

* changes:
Rely on SystemService#onSwitchUser() in TSMS.
Switch to SystemService lifecycle in TSMS.
9faa2aeb8a0d40bd834b7a4bf6343fbae3a302e3 07-Mar-2016 Yohei Yukawa <yukawa@google.com> Rely on SystemService#onSwitchUser() in TSMS.

SystemService class has already provided SystemService#onSwitchUser()
callback event. We do not need to set up SynchronousUserSwitchObserver
separately in TextServicesManagerService.

Bug: 25816558
Bug: 27456430
Change-Id: I2d6f9932f30b72cf4ae4bc0c41810f75e2667478
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
a6a152e7de2b6db73474620c1eccda1ebe2eee9b 07-Mar-2016 Yohei Yukawa <yukawa@google.com> Switch to SystemService lifecycle in TSMS.

Like we did this for InputMethodManagerService [1],
TextServicesManagerService (TSMS) needs to be recognized by
SystemServiceManager with SystemService lifecycle mechanism so that we
can receive SystemService#onUnlockUser() event, which is necessary to
make TSMS encryption-aware.

As a preparation, with this CL we only does mechcanical migration to
SystemService lifecycle mechanism in TSMS. Hence no user-visible
behavior change should occur.

[1]: Ic17667df60b30e5355b61a3601ad27a000cab3a3
1e33dc8fdf3f722ecd32cc586b2a9515de24a242

Bug: 27456430
Change-Id: Ib3cc799d384f259b4fa3f5295f2da198df015eb8
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
074637f1626a56031bcb98b8a88345c8f57cbb77 06-Mar-2016 Yohei Yukawa <yukawa@google.com> Use Java7 diamond operator in TSMS.

This CL changes nothing except for deleting redundant type parameters by
using diamond operator in TextServicesManagerService (TSMS).

No behavior change is intended.

Bug: 27456430
Change-Id: I18708fe44d2d9edfef8c1cf7cffef1bb0b5c003a
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
6005b3f87b063ee7ab7e8877a6a8c90b480f3341 24-Nov-2015 Fyodor Kupolov <fkupolov@google.com> Added SynchronousUserSwitchObserver

This class provides a synchronous version of onUserSwitching, which does not
require notifying a callback.

Bug: 25816558
Change-Id: Id31bb79bf10b5afd72dfca28cf4bea817e726f6f
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
777ef95ebf18c61ff09e7567a06058d351c530ca 26-Nov-2015 Yohei Yukawa <yukawa@google.com> Use Context.getSystemService(Class<T>) for InputMethodManager.

This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving
InputMethodManager. Note those are bundled code. Hence we don't need
to make sure Build.VERSION.SDK_INT >= 23.

Change-Id: Icc64942ad8f11e44bf84f8d4fe476b2fdd1257f3
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
7c69636c9a406265e1da368f3edfd8fb9651132c 16-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Cleanup USER_OWNER in various services

Bug: 19913735
Change-Id: I980370bab18e1b9ccf4043eed2b9fd721a940f72
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
174843afb629c57af19e14ee3ec4a91358061dd9 27-Jun-2015 Yohei Yukawa <yukawa@google.com> Check system locale when picking up an initial SpellChecker.

Since Ia25e7b4f308778891929e31b8cbd741f6848cce4, the TSMS has
picked up the first found spell checker no matter regardless of
the system locale.

The primary goal of this CL is to introduce a low-risk fix for
the situation where two or more spell checker services are
pre-installed but they are well different from each other in
terms of supported languages. Solving the problem in more
ambiguous and complicated situation is beyond the goal of
this CL.

With this CL, we still pick up the first found spell checker
but also require the spell checker supports a certain locale.
We will try several locales starting with the system locale
to some fallback locales until we find one appropriate spell
checker. If no spell checker is picked up in this process,
we simply pick up the first one as we have done.

Examples about what locales will be checked are:

A. System locale: en_US
1. en_US
2. en_GB
3. en

B. System locale: en
1. en
2. en_US
3. en_GB

C. System locale: en_IN
1. en_IN
2. en_US
3. en_GB
4. en

D. System locale: ja_JP
1. ja_JP
2. ja
3. en_US
4. en_GB
5. en

E. System locale: fil_PH
1. fil_PH
2. fil
3. en_US
4. en_GB
5. en

F. System locale: th_TH_TH
1. th_TH_TH
2. th_TH
3. th
4. en_US
5. en_GB
6. en

Bug: 22042994
Change-Id: I094f1c33430f7904a1dac6167431d6df64a07212
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
d69e4c1460017062e7c36be55801cb434ad19d97 24-Apr-2015 Dianne Hackborn <hackbod@google.com> Update use of procstate for services.

Now that we have a separate foreground service proc state
(above a sleeping top app), update various system services
to put their bindings into this state when appropriate.

There are two new bind flags for this -- one that just always
makes it a foreground service, another that only does it when
the device is awake (useful for things like the wallpaper).

And with all of that, tweak network policy manager to only
include apps that are at least foreground service state when
in power save and device idle modes. This will allow us to
further reduce the set of apps that have network access
(in particular not giving access to the current top app when
the screen is off), hopefully leading to even better battery
life.

Change-Id: I91d85a5c5ed64e856149e9a5d94a634a7925ec7f
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
429796226a8831af63a6303a58329f6b68f7b100 13-Apr-2015 Kenny Guy <kennyguy@google.com> Add foreground profile changed to user switch observer.

Called when the focused activity changes from one profile
to another to allow sys ui to vary display based on the
current profile.
This reverts commit 735a3f90598be31bca5d551d781280a205a5f27f.
Resubmitting with fix for build break in another package.

Bug: 19531782
Change-Id: I98cd2968ade3b1d23feb90d98057f306695d569e
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
735a3f90598be31bca5d551d781280a205a5f27f 13-Apr-2015 Kenny Guy <kennyguy@google.com> Revert "Add foreground profile changed to user switch observer."

This reverts commit 99b9030a3ececd9b88e5011c98be0a5b9499c776.

Change-Id: If152904f298ecd9e6fd5d038797d061a5c85eec8
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
99b9030a3ececd9b88e5011c98be0a5b9499c776 01-Apr-2015 Kenny Guy <kennyguy@google.com> Add foreground profile changed to user switch observer.

Called when the focused activity changes from one profile
to another to allow sys ui to vary display based on the
current profile.

Bug: 19531782
Change-Id: I1f98398f4b37ce77077394546906ef4dff06cd47
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
095fa371643b1d8e829067ea4ed93c357b39e773 27-Oct-2014 Yohei Yukawa <yukawa@google.com> Conditionally allow non-primay profiles to use TextServices

With this CL, non-primary profiles become able to use
TextServices (spelling correction services) if and only if
the active spell checker service is the system's one.

Basically this CL just copies the same logic from
InputMethodManagerService that were implemented as
I3bd87b32aec69c3f8d and Id5d4f29017b7ca6844632 with adding
a condition to see if the spell checker is system's one
or not.

Note that this is a tentative solution and can be removed
once TSMS fully supports multiuser.

Also note that this CL heavily relies on the fact that
setting apps isonly running in the current user. This is
because that some risky operations that are exposed from
TSMS are non-public APIs an accessible only from @hide
methods in TextServicesManager, and those @hide methods
are actually used only by the settings app so far.

BUG: 16285536
Change-Id: Iae9045ba5baccd04ed68906e7afb9160677ec4a5
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java
49782e46c0eb85a25ae2abcf80880c48dbab5aea 20-Dec-2013 Amith Yamasani <yamasani@google.com> am 9158825f: Move some system services to separate directories

* commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce':
Move some system services to separate directories
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/TextServicesManagerService.java