Commit Graph

21150 Commits

Author SHA1 Message Date
Misha Wagner
3499b34425 Change CacheOomRanker's "uses" feature. am: 7d611c750c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15684479

Change-Id: I00aa080b9a28739301ee234503b4ddda198ce4c2
2021-09-25 02:21:36 +00:00
Hui Yu
7ce5b0bd00 Merge "tempAllowList duration can be updated if an UID is already temp allowlisted." into sc-qpr1-dev am: add3a2e361
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15851148

Change-Id: I98beccce014373f5ccb43e76c7e6acfc76407301
2021-09-25 02:17:35 +00:00
TreeHugger Robot
0a4f5a8295 Merge "Fix unstyled Notification RemoteViews inflation logic for apps targeting API 23 and lower." into sc-qpr1-dev am: 86536be56b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15861704

Change-Id: Ic6c9ef2e5d587a5f0351cd8c5ad7036afb555ea4
2021-09-25 02:16:55 +00:00
Andrii Kulian
47a107ad9a Deduplicate SplitInfo states from sidecar
Also make sure that the split info is updated after an activity is
appeared on the client side.

Bug: 199144146
Test: Manual, using the test app
Change-Id: I11e6dd9d1f55c107aaf40aed4d25b6b8fff7b9ca
2021-09-22 14:57:31 -07:00
Hui Yu
add3a2e361 Merge "tempAllowList duration can be updated if an UID is already temp allowlisted." into sc-qpr1-dev 2021-09-20 21:54:30 +00:00
Hui Yu
0ebc9cd55b tempAllowList duration can be updated if an UID is already temp
allowlisted.

Previously when PowerExemptionManager.addToTemporaryAllowList() is
called for a second time before the first time call's duration expires, the
second call does not update ActivityManagerService's
FgsTempAllowList for the new duration. This CL fixes this problem.

Bug: 199801023
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Change-Id: Ibb8c6f41740a9b7468b50a4cdabe526ae58550ec
2021-09-20 21:14:23 +00:00
Misha Wagner
7d611c750c Change CacheOomRanker's "uses" feature.
The previous implementation was incorrect, as an app goes in and out of
the cache several times during oom_adj calculation. If all apps started
at the same time, then this would be OK - as they all get incremented
the same amount, plus get incremented when they actually go in and out
of the cache. This would result in the relative counts being correct.

However, as all apps aren't started at the same time, the old
implementation is instead a measure of how long the app has been
started.

So instead we use mSetProcState, which isn't changed on each oom_adj
calculation. This measure should accurately reflect the number of times
the process is used - whether that's by a user app open, or a content
receiver call, or an intent being broadcast.

See go/sim-v-impl for more details.

Test: atest CacheOomRankerTest
Bug: 196031723
Change-Id: I49d02362b8277f8472355e78412f79256c2289a1
Merged-In: I49d02362b8277f8472355e78412f79256c2289a1
(cherry picked from commit 480cc3123c)
2021-09-20 18:16:31 +00:00
Jeff DeCew
72ea9c6884 Fix unstyled Notification RemoteViews inflation logic for apps targeting API 23 and lower.
Fixes: 199152536
Test: post ForegroundServiceNotification with ApiDemos; ensure expandble.
Change-Id: Iac5cb78fb8a8462c8778f92a407387c57792d812
2021-09-20 13:39:04 -04:00
Nick Chameyev
0a14f33198 Add should use default unfold transition attribute to wallpaper
Adds new attribute to wallpaper XML declaration to indicate
whether a wallpaper should receive default zooming transition
updates when folding or unfolding. This attribute allows to
opt-out from the default behaviour during this transition and
implement custom behaviour.

Bug: 196933493
Test: atest android.app.cts.WallpaperInfoTest
Change-Id: I7cb104bf7dfbbe92de72e505ec31d866a59bae4a
2021-09-20 09:55:02 +00:00
Lucas Dupin
6844741fb8 Add monet to AOSP
Test: manual
Test: atest ColorSchemeTest
Test: atest SystemPalette
Fixes: 199401230
Change-Id: I0695257765335f12ad47d5d8f40d0885c652bff6
2021-09-15 20:25:17 +00:00
Charles Chen
c72d4fc175 Merge "[RESTRICT AUTOMERGE] Send DA's config directly when attaching to DA" into sc-qpr1-dev 2021-09-15 13:29:40 +00:00
TreeHugger Robot
026574cca5 Merge "Update the documentation for onResume of Activity" into sc-v2-dev 2021-09-15 10:26:04 +00:00
Lucas Dupin
d4468037c7 Merge "Prevent WallpaperManager#getBitmap return recycled bitmap." into sc-v2-dev 2021-09-14 15:14:19 +00:00
Caitlin Cassidy
3eac9fde24 Merge "[Disable Flags] Move disable flag logging to a helper class and use it for StatusBar." into sc-v2-dev 2021-09-14 15:05:09 +00:00
wilsonshih
db4dce333d Prevent WallpaperManager#getBitmap return recycled bitmap.
The returned bitmap object could be recycled from client, check
isRecycled and re-create a new bitmap object if needed.

Bug: 176573309
Test: atest WallpaperManagerTests
Change-Id: I71d99d21836b73c93979685f3f7a6f49ba0df3e4
2021-09-14 15:21:37 +08:00
Charles Chen
37430c5ba8 [RESTRICT AUTOMERGE] Send DA's config directly when attaching to DA
WindowContext relies on WindowTokenClient#onConfigurationChanged after
calling WMS#attachWindowContextToDisplayArea.
However, it took some time to wait for onConfigurationChanged callback
from the server side so that we may get a stale value right after
creating WindowContext.
This confuses developers especially when the foreground activity is in
size compat mode or freeform because the process config is overridden
by activity's config.
This CL makes #attachWindowContextToDisplayArea return DA's configuration
and applies to WindowContext direcly.
It also benefits WindowProviderService because it can obtain DA's
 configuration before onCreate() based on [1] and this CL.

Bug: 190019118
Bug: 190745506
Bug: 198298520
Test: manual - 1. launch an Activity in size compat mode
               2. create a WindowContext and verify if WindowMetrics
                  matches DA bounds.
Test: atest WindowContextTest WindowContextTests
Test: atest WindowContextControllerTest ContextGetDisplayTest
[1]: dd4a748af0

Change-Id: I8dd3987b731662502bc01e9d2ed67e718ada5f46
2021-09-14 03:06:50 +00:00
Wu Ahan
a3921a91f4 Merge "DO NOT MERGE: Fix temporary black after setting a new image wallpaper" into sc-qpr1-dev 2021-09-13 15:54:44 +00:00
Jonathan Scott
54c399f81c Merge "Add TestApi to clear organization Id" into sc-v2-dev 2021-09-13 12:55:26 +00:00
Ahan Wu
7af300eea6 DO NOT MERGE: Fix temporary black after setting a new image wallpaper
Sometimes see temporary black wallpaper after setting a new image
wallpaper because of:
- decode bitmap twice, results in long latency until drawing.
- the set wallpaper apis didn't sync with wallpaper rendering well.
Solutions:
- Only decode bitmap when necessary.
- Make set wallpaper apis wait for image wallpaper rendering finished.

Bug: 194080642
Test: see b/194080642#comment3
Test: atest WallpaperManagerServiceTests --iterations 50
Test: atest SystemUITests
Change-Id: I369eff5195571161cf286b3ec97175481b02eed7
2021-09-13 18:53:27 +08:00
Jeff DeCew
14932fc95a Merge changes I0fc3b7ae,I712e6d6b into sc-qpr1-dev am: 2f0616bd79
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15795789

Change-Id: I6a1819dd38b091a737f421ab2511e020c93e063d
2021-09-10 15:58:27 +00:00
Jeff DeCew
2f0616bd79 Merge changes I0fc3b7ae,I712e6d6b into sc-qpr1-dev
* changes:
  Reduce the color contrast requirements for the emphasized action button fill color.
  Refactor the color span code inside Notification.java and add tests.
2021-09-10 15:28:37 +00:00
Rubin Xu
0a1f866c4e Add TestApi to clear organization Id
Needed in CTS tests to reset the organization ID and
enrollment specific ID.

Bug: 197760250
Test: atest android.devicepolicy.cts.EnrollmentSpecificIdTest
Change-Id: Ice1123744957ab57636ec1d9b0ca60a16c5a93cf
Merged-In: Ice1123744957ab57636ec1d9b0ca60a16c5a93cf
2021-09-10 12:29:30 +00:00
Jeff Chang
bd1724cf6d Update the documentation for onResume of Activity
onResume is not always an indicator that the activity is visible and
start interacting with the user. The case demonstrated activity is in
the relaunched process (onCreate() -> onResume()) while the screen is
still locked. Update the documentation to prevent developers from
being confused.

Bug: 187494420
Test: build
Change-Id: Id52a02b54218d899a948640049cb627eb98ef2f6
2021-09-10 17:59:30 +08:00
Caitlin Cassidy
8798f2eebf [Disable Flags] Move disable flag logging to a helper class
and use it for StatusBar.

Future CLs will utilize the logging methods in other classes.

Test: atest (+new tests) and manual
Bug: 197851207
Change-Id: I7936d4a42c7d361d6ccfc6ee2b1f9a7ae74f96c3
2021-09-09 22:49:00 +00:00
Jeff DeCew
050a0d0d64 Reduce the color contrast requirements for the emphasized action button fill color.
This reduces the contrast requirement between the notification background and the button fill from 3:1 to 1.3:1

Fixes: 196393060
Test: manual testing using the go/notify2-apk and the CallStyle color customizer
Test: android.app.NotificationTest
Change-Id: I0fc3b7ae1ede7afd28974c59fa2a58d7fea2e9de
2021-09-09 15:00:00 -04:00
Jeff DeCew
5cb7307ebb Refactor the color span code inside Notification.java and add tests.
* This makes it easy to reduce the contrast requirement between the notification background and the button fill in another review.
* This also fixes a bug where partial-length color spans within the emphasized buttons would be contrast-adjusted only with the notification background color rather than the button fill color.

Bug: 196393060
Fixes: 197572220
Test: manual testing using the go/notify2-apk and the CallStyle color customizer
Test: android.app.NotificationTest
Change-Id: I712e6d6b2da1de89afeacda7bd2fc4ad24632811
2021-09-09 14:59:59 -04:00
Ahan Wu
9c7a45f339 Fix temporary black wallpaper after setting a new image wallpaper
Sometimes see temporary black wallpaper after setting a new image
wallpaper because of:
- decode bitmap twice, results in long latency until drawing.
- the set wallpaper apis didn't sync with wallpaper rendering well.
Solutions:
- Only decode bitmap when necessary.
- Make set wallpaper apis wait for image wallpaper rendering finished.

Bug: 194080642
Test: see b/194080642#comment3
Change-Id: I369eff5195571161cf286b3ec97175481b02eed7
2021-09-09 00:10:44 -08:00
Evan Rosky
ac3bddc1ce Merge "Wrap IRemoteTransition in a parcelable to enable extra properties" into sc-v2-dev 2021-09-03 19:53:10 +00:00
Evan Rosky
bc94c3d524 Wrap IRemoteTransition in a parcelable to enable extra properties
This is in preparation for attaching some extra meta information
to remote transitions (eg. process token). Most of this refactor
just replaces references to the raw interface with references
to the wrapper class.

There is also a small refactor in RemoteTransitionHandler to
better-manage death-recipients. It is possible to have >1 filter
and >1 pendings referencing the same remote simultaneously, so
this arrangement properly handles the 1-to-many possibility.

Bug: 183993977
Test: refactor, so existing tests pass
Change-Id: Icae8f2128e0ffdf7aee51284cba106963450e3e7
Merged-In: Icae8f2128e0ffdf7aee51284cba106963450e3e7
2021-09-03 17:19:44 +00:00
Hyunyoung Song
ec092ff04a Merge "fix a bug that extra is not actually set to the query." into sc-qpr1-dev am: c0992e4ec4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15537322

Change-Id: I41d0e351486588c5d619538ecd76beafe246606b
2021-09-03 03:44:15 +00:00
Hyunyoung Song
c0992e4ec4 Merge "fix a bug that extra is not actually set to the query." into sc-qpr1-dev 2021-09-03 03:28:43 +00:00
Tim Van Patten
f9387616af Merge "Enable ANGLE as a Game Dashboard Intervention" into sc-qpr1-dev am: 4de992c9cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15697303

Change-Id: I1c33f82a510da16fd4566915171ccd8ca35f31a1
2021-09-01 00:34:06 +00:00
Tim Van Patten
4de992c9cb Merge "Enable ANGLE as a Game Dashboard Intervention" into sc-qpr1-dev 2021-09-01 00:10:33 +00:00
Tim Van Patten
08c3f5b379 Enable ANGLE as a Game Dashboard Intervention
Enable ANGLE as a Game Dashboard intervention via Phenotype.

Bug: b/188475576
Test: GameManagerServiceTests
Change-Id: I91894a76b8dcf7a97244cff679a501001734f671
Merged-In: I91894a76b8dcf7a97244cff679a501001734f671
(cherry picked from commit acf3851b8f)
2021-08-31 15:08:38 -06:00
Jing Ji
fdd58be715 Merge "Use ArrayMap instead of SparseArray to manage the ProviderKey" into sc-dev am: d5ea86eaf0 am: 9fd02e1b76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15664720

Change-Id: Iecb1bc15167e2c3b51826fd5bc36d96affe1a559
2021-08-31 06:13:04 +00:00
Jing Ji
9fd02e1b76 Merge "Use ArrayMap instead of SparseArray to manage the ProviderKey" into sc-dev am: d5ea86eaf0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15664720

Change-Id: Ic1e72abe6ee64f763ec67c8c84de88c386943791
2021-08-31 06:04:45 +00:00
Jing Ji
d5ea86eaf0 Merge "Use ArrayMap instead of SparseArray to manage the ProviderKey" into sc-dev 2021-08-31 05:48:08 +00:00
Julia Reynolds
798e21e401 Revert "Don't restore notification channel if its sound is unavailable" am: cc547d33e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15718202

Change-Id: I65ed82759ab2a721331700a7856b8a993aff02eb
2021-08-30 23:20:05 +00:00
Julia Reynolds
cc547d33e5 Revert "Don't restore notification channel if its sound is unavailable"
This reverts commit 6a5ca92e75.

Reason for revert: This is affecting notification channels that are using the system sound and is resulting in users losing most of their notification settings

Change-Id: I350cf8190eec6296a597bef38b711900336ddf75
Fixes: 197129198
2021-08-30 20:30:57 +00:00
Chilun
e6692e20e6 [RESTRICT AUTOMERGE] Workaround to dump error log instead of exception am: f8fc1326f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15690060

Change-Id: I8107e094cd6182434683d359a52d9e0855c48221
2021-08-29 16:27:20 +00:00
Chilun
f8fc1326f7 [RESTRICT AUTOMERGE] Workaround to dump error log instead of exception
This is a short-term workaround to dump error log instead of throwing
the exception to unblock the test.

Bug: 197484331
Test: build pass
Change-Id: I2ece3b9d85edc1ae43038e6f69b35f59b160a3dd
2021-08-27 10:41:41 +00:00
Jing Ji
119dd01b49 Use ArrayMap instead of SparseArray to manage the ProviderKey
As the ArrayMap handles the hash code collision properly.

Bug: 197647956
Test: atest CtsContentTestCases:android.content.cts
Change-Id: Ibb57a22c08b0fa5462505d586d5fb0aaf908c80f
2021-08-24 11:42:58 -07:00
Charles Chen
1be9657cc4 Using LaunchActivity when possible
... to prevent race

In [1], we store ActivityClientRecord earlier to make
ActivityClientRecord accessible in onCreate Lifcycle callback.
However, we still store the activity after Activity#onCreate.

This CL fixes the exception by obtaining ActivityClientRecord
from launch Activity list first to prevent race.

fixes: 196900007
Test: Try reproducible steps several times and didn't see
the error log.

[1]: 85986bf974

Change-Id: I7553c56cad474feb73fca73c72b5e6e833b46fbf
2021-08-23 15:54:24 +08:00
Chris Li
9c606e2740 getActivityTokenBelow should exclude finishing activity
This method was introduced in ag/15302841 to check the new launch
activity and the activity below.

However, when launching an activity into split, the organizer may also
call to finish existing activity in split. We don't want to check the
split rule with a finishing activity.

Bug: 190433398
Test: test with demo app
Change-Id: I7f604ddea7c2f68adc3cee52b8872e653d5dad98
2021-08-21 12:25:57 -07:00
Govinda Wasserman
bfbda478d3 Merge "Allow BackupHelper to be overridden" into sc-qpr1-dev am: 3de2a1e721
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15596703

Change-Id: I242397f7dd28c8d4df9ccf57010b6072ebfc67cf
2021-08-19 18:36:15 +00:00
Govinda Wasserman
8de1c313e6 Allow BackupHelper to be overridden
This will allow vendor versions of System UI to backup their
vendor-specific data.

Test: Tested locally
BUG: 195548201
Change-Id: Iebf512104be2a8fa0dfb614af12d95ed6a3625eb
2021-08-19 12:30:40 -04:00
Andrii Kulian
14c735d9e9 Merge "Update split controller to latest extension interface" into sc-v2-dev 2021-08-18 01:06:10 +00:00
Jeff DeCew
7945079a77 Merge "Make foreground color selection in SmartReplyView and RemoteInputView match Notification." into sc-qpr1-dev am: 0c43fe4e92
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15549415

Change-Id: I4b2d8f1c866b4d0e823ed338f58a55a3c395dd80
2021-08-17 19:39:52 +00:00
Jeff DeCew
0c43fe4e92 Merge "Make foreground color selection in SmartReplyView and RemoteInputView match Notification." into sc-qpr1-dev 2021-08-17 18:59:51 +00:00
Andrii Kulian
ce4afed050 Update split controller to latest extension interface
Bug: 190433398
Bug: 190433972
Test: Manual
Change-Id: I215bd5925f35c2a798b7f82ac8753d86cf9b594c
2021-08-16 20:24:48 -07:00