SysUI, for example, needs to be able to start services in secondary
users, and in those users they run as the user-appropriate decorated
uid.
Bug 35200453
Test: verify user switch behavior via logging
Change-Id: Ia154f140e315fd97aed414c6444ba550632eb610
- Never display AutoFillValue.text, because it could be sensitive.
- Simplified AutoFilllId.
Fixes: 35171960
Test: manual verification
Test: CtsAutoFillServiceTestCases passes
Change-Id: I0853cabb695b842c947b0ae007e344f5d8385395
Can be disabled by setting the "debug.bgcheck" system property to
"n" or "no" or "0" or "false" or "off". (Writing that property
requires root.)
Bug 30953212
Test: observed restrictions being enforced
Change-Id: I4cda9b7840ff25240b6bcaab210ea13888d08cad
As explained in the commit message of my previous CL [1], we have
had a design issue in how to notify the full-screen mode change
from the IME to InputMethodManager running in the target application.
Histrically we have done this by using hooking the following IPC
from the IME to the target application.
InputConnection#reportFullscreenMode()
However, since we also want InputConnection to be deactivated in some
situations such as the when the target application is no longer
focused. In other words, InputConnection is not a reliable way to
notify something.
As a result, we have suffered from many stale state issues.
Bug 21455064 and Bug 28157836 are such examples. In Android N, we
introduced yet another hack to work around those issues, but it is
really time to fix the protocol design instead.
The new strategy is to rely on internal IPCs provided by
InputMethodManager to deliver such critical notifications from one
process to the other. This is actually more natural because our goal
is to make sure that InputMethodManager#isFullscreenMode() always
returns the latest value as long as the caller is the focused
application.
For backword compatibility, applications that are monitoring
this callback should continue working, as InputMethodManager emulates
the previous behavior. However, as updated in JavaDoc, IMEs are no
longer allowed to invoke InputConnection#reportFullscreenMode(),
which should be OK because even on previous releases IMEs should rely on
InputMethodService#updateFullscreenMode() instead.
[1]: Iba184245a01a3b340f006bc4e415d304de3c2696
1544def0facda69c210b0ae64b17394ea2860d39
Fixes: 28406127
Test: Make sure Bug 21455064 is still fixed.
1. Input some words in extract mode.
2. Select a word.
3. Perform copy.
4. Select a word.
5. Rotate the device.
6. Try to select a word.
7. Make sure he word is selected and action mode starts.
Test: Make sure Bug 28157836 is still fixed.
1. Rotate device to landscape mode.
2. Tap on EditText and start full screen extracted mode.
3. Rotate device to portrait mode.
4. Long press to start action mode.
5. Make sure Action mode gets started.
Test: `adb shell dumpsys input_method` to make sure that fullscreen
state is synchronized across the app, IMMS, and the IME.
Change-Id: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
Currently, TextServicesManagerServices uses an AIDL interface called
ISpellCheckerService when binding to a spell-checking service.
However, this interface uses synchronous (blocking) binder calls
rather than asynchronous (oneway) calls. As a result, there are
situations where the system process has made a blocking binder call
into untrusted application code from its main looper thread.
As general policy, the system process must never allow its looper
threads to block on application code.
This CL addresses the above issue by converting ISpellCheckerService
into oneway interface, which instead takes a result receiver
ISpellCheckerServiceCallback so that spell-checking services can
return results asynchronously.
Note that the above protocol issue was also the root cause of
Bug 5471520. Hence we can also logically revert the previous CL [1]
for Bug 5471520.
[1]: Iedf2c2cdd8d4834545d06d72ade3ce211b104b1d
4e713f14419a37f385cf1509b011982bdcf67edc
Test: Ran `adb shell dumpsys textservices` to check the
"Spell Checker Bind Groups:" section in the following three
steps.
1. Before apps start requesting spell checker sessions.
2. While apps are owning active spell checker sessions.
3. After all the apps that owned spell checker sessions are
gone.
Made sure that spell checker service is not running when
there is not spell checker bind group.
Bug: 7254002
Change-Id: I92e7aa40dc9ea14f67d355f0bfa15325b775d27b