Commit Graph

17442 Commits

Author SHA1 Message Date
Dmitri Plotnikov
b4c3af22dd Merge "Check custom component names before aggregating BatteryUsageStats snapshots" 2021-08-17 03:05:04 +00:00
Dmitri Plotnikov
a1ea9ecd56 Check custom component names before aggregating BatteryUsageStats snapshots
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
2021-08-16 15:05:15 -07:00
Jeff DeCew
6b6610df79 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev am: 10c7e2b811 am: 2de4373e93 am: 7b19b1dd94
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15549414

Change-Id: I0d4fbd00d0403fc6b5c7c81a8fccd9a9d8d330d3
2021-08-16 20:06:42 +00:00
Jeff DeCew
7b19b1dd94 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev am: 10c7e2b811 am: 2de4373e93
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15549414

Change-Id: Iadfda414b3df0bd66e7f505cf8190000bd0b5367
2021-08-16 19:51:56 +00:00
Jeff DeCew
2de4373e93 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev am: 10c7e2b811
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15549414

Change-Id: I09ff92b8debe78859e621fd6ac013d8281959d07
2021-08-16 19:38:06 +00:00
Jeff DeCew
10c7e2b811 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev
* changes:
  Use tertiary accent color for expander with unread count.
  Fix ContrastColorUtil.findContrastColorAgainstDark to return the valid color
2021-08-16 19:21:18 +00:00
Jeff DeCew
4c0e8a62e6 Fix ContrastColorUtil.findContrastColorAgainstDark to return the valid color
Fixes: 196600502
Test: atest ContrastColorUtilTest
Change-Id: I590be0ba30c03e867bf08558483239818b3aff82
2021-08-16 14:14:53 +00:00
Jeff DeCew
d5c2749cac Merge "Collapse the CallStyle buttons to just an icon instead of truncating text." into sc-qpr1-dev am: 44527690ed am: 62a1033f13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15559241

Change-Id: I014ee9def5489aafc915a5c0be812fafd418827c
2021-08-15 02:12:49 +00:00
Jeff DeCew
e30260aa9a Merge "Collapse the CallStyle buttons to just an icon instead of truncating text." into sc-qpr1-dev am: 44527690ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15559241

Change-Id: Ib93a57b8bd4e2158f2edbd87a552de2db49d8032
2021-08-14 02:17:17 +00:00
Jeff DeCew
62a1033f13 Merge "Collapse the CallStyle buttons to just an icon instead of truncating text." into sc-qpr1-dev am: 44527690ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15559241

Change-Id: I9a60203a071be94737e09c9a1d0ffd77fe4323e8
2021-08-14 02:17:12 +00:00
Jeff DeCew
7ce358c005 Collapse the CallStyle buttons to just an icon instead of truncating text.
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
2021-08-13 15:52:48 +00:00
Ayush Sharma
3236d5e5a3 Merge "Remove isSeparateProfileChallengeAllowed API" 2021-08-13 15:49:02 +00:00
Jigar Thakkar
f96f4b9de9 Merge "Notify changes after loading icon in sharesheet" 2021-08-13 12:26:58 +00:00
Jackal Guo
42c12fa3d2 Merge "Remove the usage of PackageParser" 2021-08-13 06:53:18 +00:00
Jigar Thakkar
57882dab5f Notify changes after loading icon in sharesheet
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
2021-08-12 14:16:21 +00:00
Michael Wright
93b3c57a13 Make PointerLocationView more resilient.
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
2021-08-12 00:11:28 +00:00
Jackal Guo
1030f5807e Remove the usage of PackageParser
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
2021-08-11 09:23:31 +08:00
Yohei Yukawa
d55ddf27c6 Ensure View#onInputConnectionClosedInternal() timing
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
2021-08-05 17:02:02 -07:00
Yohei Yukawa
d1ff9740c1 Lock down RemoteInputConnectionImpl#getInputConnection()
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
2021-08-04 11:57:42 -07:00
Yohei Yukawa
b37f32cfec Let IC#reportFullscreenMode() honor IC#getHandler()
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
2021-08-04 11:37:16 -07:00
Yohei Yukawa
002ceeec8d Merge "Rename IInputConnectionWrapper to RemoteInputConnectionImpl" 2021-08-04 16:34:25 +00:00
Yohei Yukawa
23463870e9 Merge "Remove inaccurate words "main thread" from IInputConnectionWrapper" 2021-08-04 15:34:44 +00:00
Jeff DeCew
ab188125a5 Merge "Collapse the CallStyle buttons to just an icon instead of truncating text." 2021-08-04 15:19:44 +00:00
Yohei Yukawa
5693db4d66 Rename IInputConnectionWrapper to RemoteInputConnectionImpl
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
2021-08-03 14:34:36 -07:00
Yohei Yukawa
d6a6037196 Remove inaccurate words "main thread" from IInputConnectionWrapper
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
2021-08-03 14:34:05 -07:00
Nate Myren
e612997b53 Merge "Add attribution info to start callbacks" into sc-dev am: 5d97f29218 am: 9d1a9399b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15446590

Change-Id: Ib6fedf0b38bd88c3f6cd0aef6efa9529f17aaa44
2021-08-03 20:18:59 +00:00
Nate Myren
aad177261c Merge "Add attribution info to start callbacks" into sc-dev am: 5d97f29218 am: d1a82a7de8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15446590

Change-Id: Ic800a8e11e6d8513629ec8e9b1f64ffef0c85645
2021-08-03 20:18:08 +00:00
Jeff DeCew
4748afe362 Collapse the CallStyle buttons to just an icon instead of truncating text.
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
2021-08-03 20:09:56 +00:00
Nate Myren
7ebbcf1685 Merge "Add attribution info to start callbacks" into sc-dev am: 5d97f29218
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15446590

Change-Id: If5ddeb244befcaea57a3e53f741b94ec5bfd6dd0
2021-08-03 20:06:56 +00:00
Nate Myren
9d1a9399b8 Merge "Add attribution info to start callbacks" into sc-dev am: 5d97f29218
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15446590

Change-Id: I42bdf188ec74c9d3a7179f717a08c7fec7f33833
2021-08-03 20:06:34 +00:00
“Ayush
deb33311db Remove isSeparateProfileChallengeAllowed API
This API is not required by framework anymore.

Bug: 189502721
Test: N/A
Change-Id: Id24d365a0f7bf65af50c147c3655cb5f8c83e1a4
2021-08-03 19:37:23 +00:00
Nate Myren
06d07d54db Add attribution info to start callbacks
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
2021-08-03 08:25:31 -07:00
Yohei Yukawa
ca41a89bc9 Fix lint warnings in IInputConnectionWrapper
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
2021-08-02 18:00:01 -07:00
Wu Ahan
e7bcbbab71 Merge "Support surface only instrumentation" into sc-v2-dev am: d6d30bf7f6 am: 60894eefb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15256893

Change-Id: I2f43c2ba720d08446210639cb417af6dd2bc1266
2021-08-02 10:33:28 +00:00
Wu Ahan
60894eefb5 Merge "Support surface only instrumentation" into sc-v2-dev am: d6d30bf7f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15256893

Change-Id: I78d98f78086ace09d32fac4329c6b3357aed56b5
2021-08-02 10:23:59 +00:00
Wu Ahan
d6d30bf7f6 Merge "Support surface only instrumentation" into sc-v2-dev 2021-08-02 10:06:03 +00:00
Nataniel Borges
764792b6cb Merge "Introduce a .winscope extension for all winscope files" 2021-08-02 08:07:20 +00:00
Yohei Yukawa
d72d5a169c Move InputBindResult to com.android.internal.inputmethod
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
2021-07-30 13:08:44 -07:00
Yohei Yukawa
300f2ee283 Fix lint errors in InputBindResult
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
2021-07-30 13:08:13 -07:00
Yohei Yukawa
13ada96055 Merge "Simplify IInputConnectionWrapper" 2021-07-30 19:49:16 +00:00
Yohei Yukawa
3c596e3985 Merge changes I0ef1e1b4,Ia4043178
* changes:
  Revert "A unified data class to represent all the InputConnection call"
  Revert "Fix error swallowing in InputConnectionCommand unparcelling"
2021-07-30 17:47:49 +00:00
Li Li
69d46fa9b7 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75 am: 57240b0a67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: I8605df085ec636ea1dba1096076bee5c1d6dd4f4
2021-07-30 17:07:55 +00:00
Li Li
d7306136e8 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75 am: d2aeb490a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: Ica77c69580dd69bed4e260779c1f7318307282b1
2021-07-30 17:03:54 +00:00
Li Li
d2aeb490a8 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: I28f1b15ab636063727f02414a98896ee2679c6fc
2021-07-30 16:50:50 +00:00
Li Li
f97b1decee Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: I997b46822bd83f9c9f7dc6a02e9514a95b3758a1
2021-07-30 16:49:33 +00:00
Li Li
ef12967b75 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev 2021-07-30 16:35:16 +00:00
Yohei Yukawa
df38b9c68c Simplify IInputConnectionWrapper
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
2021-07-30 09:13:07 -07:00
Yohei Yukawa
7eec13b458 Revert "A unified data class to represent all the InputConnection call"
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
2021-07-30 09:07:36 -07:00
Yohei Yukawa
da04fd9eb8 Revert "Fix error swallowing in InputConnectionCommand unparcelling"
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
2021-07-30 09:06:19 -07:00
Ahan Wu
7141ab2619 Support surface only instrumentation
- Support surface only instrumentation.
- Add enums for pip and wallpaper instrumentation.

Bug: 170708749
Test: atest InteractionJankMonitorTest
Test: atest FrameTrackerTest
Change-Id: Iec1eb82d1a4756a7b85c8fbdd05f4132a74c613c
2021-07-29 19:21:31 -08:00