SystemService class has already provided SystemService#onSwitchUser()
callback event. We do not need to set up SynchronousUserSwitchObserver
separately in InputMethodManagerService.
Bug: 25816558
Bug: 26279466
Change-Id: I8ce2ba1335ae4caa35f9a21d87b751bfb4614033
This is 2nd attempt of I5bb1bd8cdb9096d516d60beb9936e55bf2b757ae
The motivation of this CL is enhance the default IME subtype enabling
algorithm. The new approach is done by score based algorithm. The
design of the matching score is determined as follows:
- The matching score for the each two locale is up to 3 and determined
as follows:
- Score of 3 : matches all language, script and country.
- Score of 2 : matches the language and script.
- Score of 1 : matches the language regardless of country.
- Score of 0 : doesn't match the language regardless of script and
country.
- All locales are fully expanded before matching by addLikelySubtags in
ICU.
Bug: 27129703
Bug: 27348943
Change-Id: I8fc774154f5175abff2f16e8f12a4847bf5f5b7c
There is a race due to the modification of shared data structures in the framework ResTable.
See b/27499488
This reverts commit d4b169173ad7805369204277580d3942cb08174a.
Change-Id: I3f400a2ad3b5ffc652b84dd5fe777f7cf34b5548
The getEnabledServices and setAccessibilityServiceState now have an
overloaded version to take in a userId parameter.
Bug: 27383941
Change-Id: I3ea648fd5f22cd2e9402686b83ca42976b5306f8
(cherry picked from commit 2d1c0154b1f9aeeb991dc96efb29aa53c76f4957)
The size of the list reduces when a child window is removed from the
list. So, we copy the window list and loop from the last entry to the
first when removing to avoid IndexOutOfBoundsException.
Bug: 27345523
Change-Id: I15986e418d29ee5035dc9d4c4f728ad33bfe6999
updated. Also fiddle with the UI to use more standard values.
To be sure the print service state alwasy updated I changed
PrintManager.getPrintServices to return a loader which just wraps a
registerListener/getList/removeListener combo.
I also added a new function to enabled/disable a print service to be
keep all updating logic inside the PrintManagerService->UserState.
Then I changed all code to use this new interface.
Detailed comments:
PrintServiceInfo:
- I had to add the enabled state to the PrintServiceInfo as some users
of PrintManager.getPrintServices want all services but then display
different data depending on the enabled state. Of course I could have
created two PrintManager.getPrintServices-loaders to load the two
separate list of services. I think it is much easier to add this
property though. It is updated every time new data is returned to the
PrintManager.getPrintServices-loader.
AddPrinterActivity:
- This is shown as a dialog-style overlay to indicate that the user will
return to the select-printers activity. It contains of three list that
are updated via separate loaders.
- The recommended services will be added later to keep this path set
small.
PrintActivity:
- There are two small places where we have to update the data when we
get a new list of print services.
- In very, very rare conditions it can happen that the print service
of the current printer gains or looses the "advancedOptions"
activity
- If we have no enabled print services we want to show "Add printer"
instead of "All printers...".
- Also the print registry is not the only loader anymore, hence we have
to assign loader ids to it to not conflict with the other loaders in
this activity.
- Small bug in onPrintersChanged: If a printer is selected and the print
service of this printer gets disabled the holder goes into "removed"
state which disables the printer. When the print service is then
enabled again, we forgot to re-enable the holder.
PrinterRegistry:
- The registry assumed that the FusedPrinterProvider was the only loader
in the activity. This is not true anymore, hence it has to assign the
appropriate loader ids.
- The FusedPrinterProvider has an internal loader, hence we have to
forward a loader Id into it.
- The PrintRegistry is only called backed for a single loader, hence no
need to check the loader-id.
SelectPrinterActivity:
- The AddPrinterDialog was removed as we now have the
AddPrinterActivity.
- Added a loader for the enabled services to update the empty state.
- Added dedicated loader Id for the PrinterRegistry again.
- If we have no enabled services, the SelectPrinterActivity chainloads
the AddPrinterActivity as this is the only thing the user can do
anyway. "Save a click". This should only happen when the activity is
create the first time.
- Moved the "add printer" from the menu item to the list of printers as
suggested by UX and Zach.
PrintManagerService, UserState and IPrintManagerParamtersTest:
- As the only place where the print service state is updated is now the
userstate, we have no more sychronization problems. Whohoo.
- The users can now register for changes to the print services similar
as they can register for changes to the print jobs.
- UserState.getPrintServices is the only function can exposes any
knowledge of the print services to the outside world.
Change-Id: I9be2c7300431e06aaff9bdf7eb36120d869b56ac
This will let it play nicely with heads up.
- Move to QS Container.
- QS Edit is always full height (some layout hacks to do this)
- Always draw QS customizer on top when animating
- Block all panel scrolling while QS edit is open (all touches
go to editing)
- Instantaneously change the height of the QS container at
start/end of animation as needed
Bug: 26969293
Change-Id: Iedc6f5aaf659dcc6750972eae5f69cc0cd2df844
KeyChain can throw an assertion error if
is not around, don't allow that to take down
system.
Bug: 27518175
Change-Id: I99418dfb65c58d3e07cbda91860cdb493b96a836
This is a very hacky fix to make layoutlib work with the latest support
lib. Inject a couple of fields in android.content.res.Resources to
allow using most of the earlier code as is.
Bug: 27403642
Bug: http://b.android.com/201934
Change-Id: Ia96a1b4642a1907a77d9ca7a2392f78809b92e38
Currently PopupDecorView temporarily gets FLAG_NOT_FOCUSABLE bit during
exit transition. When doing this we it is important that PopupDecorView
does not have FLAG_ALT_FOCUSABLE_IM bit, because having both
FLAG_NOT_FOCUSABLE and FLAG_ALT_FOCUSABLE_IM means that PopupDecorView
is IME-focusable.
To prevent IMEs from flickering, this CL ensures that PopupDecorView is
not IME-focusable during exit transition.
Bug: 27396330
Change-Id: I0cc81791b826f7d4257f0b6085c028c796fd9536
Add the hidden networkId list in scan settings to be used for
connectivity scans.
BUG: 27503786
Change-Id: Ibe7eaccd84d03a7b48728e3ea1d98ccc974377ec
TEST: Compiles & unit-test passes