Commit Graph

21134 Commits

Author SHA1 Message Date
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
Jonathan Scott
54c399f81c Merge "Add TestApi to clear organization Id" into sc-v2-dev 2021-09-13 12:55:26 +00: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
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
Jeff DeCew
262b278197 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: I9597ee3b59967386c95bb5aa2129ed5ea7b5e58d
2021-08-16 19:38:07 +00:00
Jeff DeCew
2bd5f502fd Make foreground color selection in SmartReplyView and RemoteInputView match Notification.
Fixes: 196585371
Test: post colorized notification with luminance between .2 and .5; validate that smart replies and remote input use black text to match the notification.
Change-Id: I5ea69181755ed5c2b48352a0379ae4e898202e21
Merged-In: I5ea69181755ed5c2b48352a0379ae4e898202e21
2021-08-16 14:37:42 +00:00
Jeff DeCew
d8054270e7 Use tertiary accent color for expander with unread count.
Fixes: 196586577
Test: visual inspection
Test: atest android.app.NotificationTest
Change-Id: I09b3999ad1c51615fbf7c8027dc65e6750721f18
2021-08-16 14:19:13 +00:00
synch
00f00ace62 fix a bug that extra is not actually set to the query.
Bug: 196294479
Test: manually
Change-Id: I765ac6b996880c607aee4ed5e627c1c33bde2b6d
2021-08-12 14:44:22 +08:00
Makoto Onuki
96ae65cf6f Merge "Clarify how FGS restriction won't apply STICKY FGS restarts" into sc-dev am: 0c1dc2fc76 am: 911ed7c949
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15484572

Change-Id: I2dd4e7f72dfa8e5e6220fa9fbb5afc200009ee9b
2021-08-11 22:01:51 +00:00
Makoto Onuki
0c1dc2fc76 Merge "Clarify how FGS restriction won't apply STICKY FGS restarts" into sc-dev 2021-08-11 21:17:20 +00:00
Louis Chang
5eff403fff Renaming to initial TaskFragment token
Also adding comments to explain that it could be changed after
creation.

Bug: 194860679
Test: wm presubmit
Change-Id: I72b099a6134701377a73cbe76bb9d0cb501aa507
2021-08-09 14:55:32 +08:00
Ruslan Tkhakokhov
a4a55908ff Merge "Handle empty <cloud-backup> section in android:dataExtractionRules" into sc-dev am: b72bf2927e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15462078

Change-Id: I634558a7453972b8f4ea089c641692b485315a77
2021-08-06 23:43:53 +00:00
Makoto Onuki
5031c3a4f6 Clarify how FGS restriction won't apply STICKY FGS restarts
Fix: 195780554
Test: build
Change-Id: Ic627a89ac863729d36554070d04c22254747f014
2021-08-06 21:43:31 +00:00
Ruslan Tkhakokhov
21f45cd998 Handle empty <cloud-backup> section in android:dataExtractionRules
Currently the <cloud-backup> section in android:dataExtractionRules is
ignored unless it contains rules. Instead, we should interpret it as
'everything other than cache and no-backup dirs is eligible for cloud
backup'.

Bug: 195095045
Test: 1. atest BackupEligibilityHostSideTest
      2. Use a test app with empty <cloud-backup> section to manually
      test:
          2.1. Empty section - everything is backed up
	  2.2. Empty section but "disableIfNoEncryptionCapabilitites"
	  set to "true" - data only backed up if the transport supports
	  encryption.
Change-Id: Ic8066721a46bda688f9211c51a0f2497e9caf93b
2021-08-06 12:16:05 +00:00
Riddle Hsu
a44fcb0dd4 Fix NPE when calling recreate in onCreate am: 6c675a3a48
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15435289

Change-Id: Ia5aaf4ded7149db9c984ca1aa409d3b494a304c6
2021-08-04 05:38:43 +00:00
Andrii Kulian
94a6a10f90 Merge "Intercept activity start requests in client organizer" into sc-v2-dev 2021-08-04 02:23:59 +00:00
Riddle Hsu
6c675a3a48 Fix NPE when calling recreate in onCreate
ActivityClientRecord#activity is assigned after calling
Activity#onCreate. A use case is that the app uses
support library to set night mode in onCreate.

Bug: 195418295
Test: Invoke Activity#recreate() in Activity#onCreate.
Change-Id: I6319cd6ee94fc2603979da47303963d04168db04
2021-08-04 10:16:41 +08:00
Andrii Kulian
94354a9a7f Intercept activity start requests in client organizer
This allows applying split rules to activity start requests for
different processes and covers APIs like 'startActivityAsUser',
not requiring app developers to use dedicated APIs to start to side
instead.

When the client organizer observes a new activity being started, it
creates a new TaskFragment first and modifies the activity start
options to target that container.

Bug: 194140227
Bug: 190433398
Test: Manual, using reference implementation and sample app.
Change-Id: Ice3de8ec725d327266ec38052129b4158608855e
2021-08-03 14:38:02 -07: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
5d97f29218 Merge "Add attribution info to start callbacks" into sc-dev 2021-08-03 19:56:02 +00:00