If the lists of custom power components do not match, a crash will occur.
Instead of causing a crash, simply skip incompatible snapshots.
Bug: 196040329
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsProviderTest
Change-Id: I87ba605371a5f3119dcff33f6109e94ee46ab57d
Fixes: 195019654
Test: post CallStyle notification without custom action; observe text
Test: post CallStyle notification with custom action; observe buttons shrink to icon only.
Test: repeat tests using various font and screen sizes.
Change-Id: Icbd6189a1e03494e481e8672263570ae2657f946
The icon loading inside the sharesheet happens as a separate
async task inside the bindViewHolder. We have seen it taking longer
time in some cases which caused the icon loading to happen after the
bindViewHolder resulting in empty icons being loaded in the
sharesheet for wembley/namaste phone devices. This change introduces a
call to notify observers after the icon loading is done.
Test: Tested on device
Bug: 194886990
Change-Id: Id1752f10ced7877efe5eff90aac6db2bd656f34c
Right now it crashes if we miss an up event since the active pointer
won't get reset. We can't just clear this in onDetachedFromWindow
because of how it gets drawn in system_server, so instead we just check
before using the active pointer.
Bug: 109779280
Test: put settings into split screen, frequently enable / disable
Pointer Location while tapping in another app window. See that it
doesn't crash.
Change-Id: If2b1f3157574c962b24115b0ecf0a27feec8e84c
PackageParser.PackageParserException is deparected, and should be
either using the PraseResult or throwing a more generic Exception.
Remove the unused setError method.
Besides, using alternative instead of PackageParser when checking
AndroidTestBaseUpdater.
Bug: 174723245
Test: build
Test: atest PackageBackwardCompatibilityTest
Test: atest AndroidTestRunnerSplitUpdaterTest
Change-Id: I572d167ae3d794ef9f11e7564f09694d0f906f0c
This is a follow up CL to our previous CLs [1][2], which introduced
an @hide callback
View#onInputConnectionClosedInternal()
to notify View when an is closed.
What this CL aims to do is to fix a potential problem in a code path
that has not been yet used. Thus there should be, in theory, no
observable app compat impact.
The problem is that
RemoteInputConnectionImpl#deactivate()
can dispatch
A: View#onInputConnectionClosedInternal()
before
B: InputConnection#closeConnection()
is completed when A and B need to be dispatched to two different
threads. This can, in theory, happen when
A: View#onInputConnectionClosedInternal()
C: InputConnection#getHandler()
are both explicitly overridden. That said, A is still @hide and only
by TextView, which basically does not support InputConnection with a
custom InputConnection#getHandler().
Anyway, with this CL A is guaranteed to happen after B under any
circumstances.
[1]: Iaafb0a03126c9292c24415f866dbdd72cadfa239
7b384751ea
[2]: I9280604e7ec7e8d08c1179e6bbf0068647a41040
7b384751ea
Bug: 163400105
Test: atest FrameworksCoreTests:ViewInputConnectionTest
Change-Id: I8a0e321ecf6e0b3be4b6ab1a35e6ac7259826c2e
This is a mechanical refactoring CL that locks down
RemoteInputConnectionImpl#getInputConnection()
as a private method.
This is supposed to be helpful to to avoid future misuse of raw
InputConnection instance outside RemoteInputConnectionImpl.
Note that InputMethodManager#isAcceptingText() remains to have the
same observable behavior in this CL. The key fact is that the
following two fields are updated in an atomic way.
* RemoteInputConnectionImpl#mInputConnection
* RemoteInputConnectionImpl#mFinished
Bug: 192412909
Test: presubmit
Change-Id: Ic5fbc6213ad62df95fc0b7eef18bab1fd9fbdbf1
This CL fixes a regression that
InputConnection#reportFullscreenMode()
is always called back on the main thread rather than its associated
thread. In most of cases those two threads are the same hence there
is no semantic problem, threads are the same, but for some special
cases, e.g. when apps explicitly override
InputConnection#getHandler(),
our thread affinity contract can be violated.
This regression was accidentally introduced in Android O time frame
while attempting to make the system more robust at Bug 28406127 [1].
Although we have never received any actual issue report from app
developers so far, this is still worth fixing.
[1]: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
2bc66171cc
Bug: 28406127
Fix: 193588937
Test: atest CtsInputMethodTestCases:InputConnectionHandlerTest
Change-Id: Id3ac21c11d6b062bb66719109376ff642309b8ff
This is a mechanical refactoring CL that renames
com.android.internal.view.IInputConnectionWrapper
to
com.android.internal.inputmethod.RemoteInputConnectionImpl
with no observable behavior change.
Bug: 192412909
Test: presubmit
Test: No lint error under core/java/com/android/internal/inputmethod
Change-Id: I171106ad0b46fbb495a6bf08d10f33915c2d29ac
This is a clean-up CL for up my CL [1], which introduced
InputConnection#getHandler()
per request from the Chromium team.
This CL only renames misleading and/or inaccurate code commends and
field names. There should be no observable behavior change.
Even before my change [1], IInputConnectionWrapper had been
responsible for re-dispatching incoming IPCs onto the "UI thread"
obtained from View#getHandler(), which is not guaranteed to be the
"main thread" in some rare situations.
With my change [1], the target thread is no longer limited to the UI
thread.
This CL removes misleading and confusing "main" terminology from the
variable names and comments for future readers.
[1]: Id9e579bb3e2966986cdcb1c34bc8cacfeca2e1a9
612cce92ad
Bug: 26945674
Bug: 192412909
Test: presubmit
Change-Id: Ibb31da4f66e8a6cd35f93c3ca1cc0f871dfb3b73
Fixes: 195019654
Test: post CallStyle notification without custom action; observe text
Test: post CallStyle notification with custom action; observe buttons shrink to icon only.
Test: repeat tests using various font and screen sizes.
Change-Id: Icbd6189a1e03494e481e8672263570ae2657f946
Add attribution flags and chain IDs to start callbacks, and have the
PermissionUsageHelper listen for starts. This ensures that, if another
start happens while an op is already running, and has chain information,
then this chain information will be recorded.
Test: manual
Bug: 194198234
Change-Id: I0ab1aa0969b70e18001f4a814ea5689f9329a019
This is a clean-up CL of IInputConnectionWrapper with no behavior
change.
As a preparation to move IInputConnectionWrapper into
com.android.internal.inputmethod
this CL cleans up all the existing lint warnings in this file.
There should be no behavior change in this CL.
Bug: 192412909
Test: presubmit
Change-Id: I215437cc4e45f369af56e3d42fdc2bdc6d353a4f
This CL mechanically moves InputBindResult from
com.android.internal.view
to
com.android.internal.inputmethod
without changing any observable behavior.
Bug: 192412909
Test: presubmit
Test: No lint error under core/java/com/android/internal/inputmethod
Change-Id: Ifd68c8a0a0d1b410c9a480ad39ca470fe2da5bc6
This is a clean-up CL of InputBindResult with no behavior change.
As a preparation to move InputBindResult into
com.android.internal.inputmethod
this CL cleans up all the existing lint warnings in this file.
There should be no behavior change in this CL.
Bug: 192412909
Test: prebuilts/checkstyle/checkstyle.py -f \
frameworks/base/core/java/com/android/internal/view/InputBindResult.java
Change-Id: I5c94e6d8f91656654065c624257971ae7835a1aa
* changes:
Revert "A unified data class to represent all the InputConnection call"
Revert "Fix error swallowing in InputConnectionCommand unparcelling"
This is a mechanical refactoring CL for IInputConnectionWrapper with
no observable behavior change.
This is a preparation CL before introducing InputConnection task
cancellation (Bug 195115071).
Bug: 192412909
Test: test CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I814377fd7f73d65f0d5526feebb6bf39e19809d7
This reverts commit 2757c24880 [1].
Reason for revert:
We will try another approach to implement InputConnection task
cancellation without InputConnectionCommand.
[1]: I86eba7185b4b0664c1b0b3da794dfc5eeddc725c
Bug: 194151409
Change-Id: I0ef1e1b498b77caf7704742d88c7c81944d75c42
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
This reverts commit 11694b0633 [1].
Reason for revert:
We will try another approach to implement InputConnection task
cancellation without InputConnectionCommand.
[1]: Icd2b40e63771085cb8d88721fbdca7a089256b28
Bug: 194151409
Bug: 194567417
Change-Id: Ia404317848d74a0d8ca0606bfb07cbad36ab97c1
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest