Commit Graph

23356 Commits

Author SHA1 Message Date
Ricky Wai
143b95ec82 Merge "Only add boolean extra to bundle when the value is false" into tm-dev am: 76f37a5d74 am: 06a00ac6f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628215

Change-Id: I1312e0090d9e814d2bc5569d4bac5e4cac096ce4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 10:36:34 +00:00
Ricky Wai
06a00ac6f6 Merge "Only add boolean extra to bundle when the value is false" into tm-dev am: 76f37a5d74
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628215

Change-Id: Ic15c3703b5258b6f058e5028db580de0803fde10
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 10:21:24 +00:00
Ricky Wai
76f37a5d74 Merge "Only add boolean extra to bundle when the value is false" into tm-dev 2022-05-30 10:01:52 +00:00
James O'Leary
91325cb29d Merge "Update light/dark detection." into tm-dev am: 4e6dfca5ed am: 43b5e96b7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18164065

Change-Id: I4dae9c5fcc58db5efe511d66db2ac9ffc4defcca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 20:29:31 +00:00
James O'Leary
43b5e96b7b Merge "Update light/dark detection." into tm-dev am: 4e6dfca5ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18164065

Change-Id: Ibef89a75e9ccd39553e82a5ed1a803ca7e0dbf92
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 20:05:18 +00:00
James O'Leary
4e6dfca5ed Merge "Update light/dark detection." into tm-dev 2022-05-27 19:44:39 +00:00
James O'Leary
ee04476acf Update light/dark detection.
Reset implementation based on design being comfortable with white
shadows now, so there doesn't need to be a bias toward saying the
wallpaper is dark.

- use luminance/tone instead of HSL to judge contrast
- if the median pixel has a luminance/tone less than mid-gray, the
wallpaper is dark.
- add a method to ColorUtils that returns luminance from a hex code
without any allocations (avoids converting to LAB)

End result is we move from judging a wallpaper as dark ~99% of the time
to 54% of the time, based on Monet Studio implementation checking ~1000
wallpapers, including Google's default wallpapers.

Bug: 213314628
Test: Manual inspection at runtime, long-running prototyping in Monet
Studio with UX across ~1000 wallpapers
Change-Id: Ia9122142728a8de9390b3e0471d7803376487864
2022-05-27 15:27:43 +00:00
Ricky Wai
57c032bf43 Only add boolean extra to bundle when the value is false
As the default value is false, we don't need to put it in bundle if the value is false.

Bug: 234070143
Test: atest android.app.cts.BroadcastOptionsTest#testTemporaryAppAllowlistBroadcastOptions_defaultValues
Change-Id: Ia23d2a03f8c3c64d25b47ed9a8d02ae22ce9246b
2022-05-27 15:01:33 +00:00
TreeHugger Robot
645973a3d8 Merge "Add hidden flag for allowing system app to use BAL permission to launch pending intent in background" into tm-dev am: 9cb2bb4e2a am: 0a444b324d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18486605

Change-Id: I10fe943fe6cd7d3dfd40c461a8ca07db97a3f6df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 20:56:27 +00:00
TreeHugger Robot
0a444b324d Merge "Add hidden flag for allowing system app to use BAL permission to launch pending intent in background" into tm-dev am: 9cb2bb4e2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18486605

Change-Id: Ibc3857ef81ef05cf5b20f0408a5f6c096bfd442f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 20:10:27 +00:00
TreeHugger Robot
9cb2bb4e2a Merge "Add hidden flag for allowing system app to use BAL permission to launch pending intent in background" into tm-dev 2022-05-26 19:53:34 +00:00
Ricky Wai
e5a896d56a Add hidden flag for allowing system app to use BAL permission to launch pending intent in background
Priv-app no longer use its BAL permission to launch background activity by default,
it needs to use this new flag to allow this operation.

Bug: 232921553
Test: PackageInstaller.Session.commit() no longer able to start BAL.
Change-Id: Ifbc642a32dbebdf8854e7e5b1366cb899e971fa7
2022-05-26 15:03:49 +00:00
Hongwei Wang
f2790fe724 Merge "Use snapshot in enter content-pip animation" into tm-dev am: a143492a2b am: b3643f53a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18501932

Change-Id: Ifcff7a1de0dd9ecebf8476db1b95f35501a9ac1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 07:57:00 +00:00
Hongwei Wang
b3643f53a1 Merge "Use snapshot in enter content-pip animation" into tm-dev am: a143492a2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18501932

Change-Id: Iaf6616d4873db8803bdf15246ef85e0553a0e5f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 07:34:42 +00:00
Hongwei Wang
fe5078f026 Use snapshot in enter content-pip animation
When entering content-pip
- We take a snapshot for the host task within the
  ActivityStarter#startActivityInner function, this is to make sure that
  the snapshot is taken before an app switches to the placeholder content
- We retrieve the snapshot in WM Shell when animating the newly created
  content-pip task, and use that snapshot during the animation
- This works similar to the solid color content overlay when app enters
  PiP without specifying a valid source rect hint. Therefore, we
  abstract the functionality to a dedicated PipContentOverlay class

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dRSTf7prHc0krPhTKZ0kXx
Bug: 220191201
Test: enter content-pip from ApiDemos app, see also Video
Change-Id: I2420402341a910b44bd8f64e3ad518ebef41bc19
2022-05-25 14:35:25 -07:00
Vadim Caen
21421cd776 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f am: 1d83999ad0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: I59cdc9e93cce4e8b7cbeaea5f0816d5a78a7d7de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:34:50 +00:00
Vadim Caen
1d83999ad0 DO NOT MERGE Only rely on developer option for back animation am: ab58191c7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310267

Change-Id: I150be6a4fae771ffe6e841806772aa2218ae871b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 19:32:00 +00:00
Vadim Caen
451dc8a3d3 Merge "DO NOT MERGE Only rely on developer option for back animation" into tm-dev 2022-05-23 19:05:48 +00:00
Vadim Caen
ab58191c7f DO NOT MERGE Only rely on developer option for back animation
BackNavigationController was still relying on a debug setting. Now the
animation request is handled via a boolean parameter passed by sysui,
which has access to the developer option.

Test: Existing test modified
Bug: 231502692
Change-Id: Icda4692e05396407d961610de0ce709492adadc1
Merged-In: Icda4692e05396407d961610de0ce709492adadc1
2022-05-23 10:43:04 +00:00
Louis Chang
e606dcceb0 Merge "Do not propagate always-on-top config to child containers" into tm-dev am: 0e52eb3aa7 am: 626fa3b45a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18492569

Change-Id: Ibde53f5879bc37ffdb748b412643bdf88ebc0d14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 05:38:32 +00:00
Louis Chang
626fa3b45a Merge "Do not propagate always-on-top config to child containers" into tm-dev am: 0e52eb3aa7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18492569

Change-Id: Ia5ecab69d7040152e664a8e9ac6405a676e5e8e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 05:18:44 +00:00
Louis Chang
0e52eb3aa7 Merge "Do not propagate always-on-top config to child containers" into tm-dev 2022-05-23 04:53:00 +00:00
Antoan Angelov
3278aeffd4 Merge "Also parse integer, long and boolean extras for NFC" into tm-dev am: 79e7d4b5f6 am: 01411697cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18281174

Change-Id: I2e14f3dbf889dd5abb6c4ed76c116407ba9bce00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 22:45:13 +00:00
Antoan Angelov
01411697cf Merge "Also parse integer, long and boolean extras for NFC" into tm-dev am: 79e7d4b5f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18281174

Change-Id: Ib978ead84ce57dc3aef8a624747af8feed63a163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 22:26:16 +00:00
Antoan Angelov
79e7d4b5f6 Merge "Also parse integer, long and boolean extras for NFC" into tm-dev 2022-05-20 21:12:56 +00:00
Louis Chang
8c5ad556c6 Do not propagate always-on-top config to child containers
Doesn't make sense to propagate the always-on-top config to
child containers. It also prevents positioning a newly
added child WC to top.

Bug: 230008268
Test: atest ConfigurationContainerTests
Change-Id: I981636f3297e5c77393320d052a7f1b4e5c5e97b
2022-05-20 21:22:37 +08:00
Alex Johnston
9e5d639171 Merge "Update network logging delegation docs" into tm-dev am: f428adf2e4 am: 2e71fc0ac5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18475051

Change-Id: I1f17a5b9d72d12c0a424bd3829075bd2ee7a22ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:52:34 +00:00
Calvin Pan
ae4658500e Merge "Avoid printing call stack for the app that doesn't add the LocaleConfig" into tm-dev am: cdcff91c57 am: 3b35df974a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18452917

Change-Id: I14846dfe7ddc309941389b252b3c1c692fce82c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:48:28 +00:00
Alex Johnston
2e71fc0ac5 Merge "Update network logging delegation docs" into tm-dev am: f428adf2e4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18475051

Change-Id: If03a62dc85831f97083ee8333cc48cdc80fe4174
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:25:38 +00:00
Calvin Pan
3b35df974a Merge "Avoid printing call stack for the app that doesn't add the LocaleConfig" into tm-dev am: cdcff91c57
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18452917

Change-Id: Ia7718f03133f127e1f62c23afe3a3d4a66188a78
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:22:27 +00:00
Alex Johnston
f428adf2e4 Merge "Update network logging delegation docs" into tm-dev 2022-05-20 08:29:47 +00:00
Issei Suzuki
a198a65234 Merge "Add ActivityOption to remove keyguard when an activity is launched." into tm-d1-dev 2022-05-20 07:29:31 +00:00
Alex Johnston
8d1317ca37 Update network logging delegation docs
Bug: 228445895
Test: NA
Change-Id: I98ddd4f012fa1d6bcd12fc31ab176cf1e43e8838
2022-05-19 14:33:53 +01:00
Alex Johnston
00090b1d4a Merge "Add background protection when work biometrics is shown" into tm-dev am: ed00c662dc am: 9eeb0112fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18351382

Change-Id: Ic48ca6f44aabcb4cc02ac03dc656603f8e8a3c4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:00:03 +00:00
Sanjana Sunil
ad494b49bb Merge "Set correct volume storage path for SDK sandbox" into tm-dev am: 0b28d29298 am: 49f81abcbe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17983856

Change-Id: I2f605ab06441b647bd46eb80271509090aa8e336
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:59:50 +00:00
TreeHugger Robot
5e287d77d9 Merge "Improve javadoc for Wi-Fi related policies" into tm-dev am: e51b62b2a3 am: 46c447841b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18374443

Change-Id: I1116841f8b67c8fc0859e02af4c21dae18c922bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:53:35 +00:00
Sudheer Shanka
8ea69bab70 Merge "Update OWNERS for broadcast response related classes." into tm-dev am: 9af0eed1de am: 851c7f61ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18377776

Change-Id: Ic1cf7242ebe613ec73fd10884743e424f82f6ca6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:52:49 +00:00
Calvin Pan
cb612e4f8b Avoid printing call stack for the app that doesn't add the LocaleConfig
Most apps have not added the LocaleConfig yet and it will print each application's stack when settings query package status.

To keep the logs clearer and reduce calls to getStackTrackString() to improve a little performance.

Bug: 232557302
Test: Saving about 80% under java stack tracing mode
Change-Id: Ic28641c35bad24928418820159a92efc1e146538
2022-05-18 11:21:12 +00:00
Alex Johnston
ed00c662dc Merge "Add background protection when work biometrics is shown" into tm-dev 2022-05-17 16:35:37 +00:00
Sanjana Sunil
0b28d29298 Merge "Set correct volume storage path for SDK sandbox" into tm-dev 2022-05-17 15:40:12 +00:00
Issei Suzuki
36f0a83ead Add ActivityOption to remove keyguard when an activity is launched.
Replaced ActivityOption#dismissKeyguardIfInsecure by
ActivityOption#dismissKeyguard, with which the server doesn't check if
the keyguard is insecure again. The caller has to make sure if the
keygaurd can be dismissed without additional authentication.

Bug: 203044476
Test: atest KeyguardLockedTests KeyguardTransitionTests
Change-Id: Ia83da6286875f1a539edbaf515fe01c07ce1ba76
Merged-In: Ia83da6286875f1a539edbaf515fe01c07ce1ba76
2022-05-17 10:13:57 +00:00
TreeHugger Robot
e51b62b2a3 Merge "Improve javadoc for Wi-Fi related policies" into tm-dev 2022-05-16 22:04:37 +00:00
Sudheer Shanka
9af0eed1de Merge "Update OWNERS for broadcast response related classes." into tm-dev 2022-05-16 21:26:19 +00:00
Sanjana Sunil
79241ae7d9 Set correct volume storage path for SDK sandbox
Context.getDataDir() for SDK sandbox incorrectly returns /data volume
path even if the actual storage is on another volume. This CL sets the
correct storage path by checking the uuid from the ApplicationInfo of
the client app and setting it to the same value.

Bug: 229736419
Test: atest
SdkSandboxStorageHostTest#testSdkSharedStorage_DifferentVolumeIsUsable

Change-Id: Ib72ea559363cdeb4b7cfcc2f48ca8ddace96e352
Merged-In: Ib72ea559363cdeb4b7cfcc2f48ca8ddace96e352
2022-05-16 15:43:37 +00:00
Rubin Xu
1638b20f44 Improve javadoc for Wi-Fi related policies
Bug: 226128486
Test: none
Change-Id: I21f0f0eb1f9a4754d42f4ae3c8e8a36865d58afa
2022-05-16 15:38:14 +00:00
Alex Johnston
b3aa96f89f Add background protection when work biometrics is shown
* Remove existing coloured background.
* Add a background with a layout that includes a
  badged icon of the app being opened.

Manual testing steps:
* Set up device with a work profile using TestDPC
* Set a fingerprint in the work profile
* Open a work app
* Lock the device
* Verify the background protection is shown behind
  the biometric prompt

Screenshots:
* Dark mode: https://screenshot.googleplex.com/3SwGWrBREYoZFaH
* Light mode: https://screenshot.googleplex.com/8bzX9wLoFGJ2ado

Bug: 206761107
Test: Manual testing
    WorkLockActivityControllerTest
    TaskStackListenerImplTest
Change-Id: I90d117a97d7457a3186953c16db8bd0bbac048ed
2022-05-16 14:20:56 +01:00
Tony Huang
0a066377f3 Merge "Remove supportsSplitScreenMultiWindow" into tm-qpr-dev 2022-05-16 08:04:27 +00:00
Wei Sheng Shih
6cfafc4b2b Merge "Send client relaunch event to WMCore." into tm-dev am: a688a7499d am: ad95d22b9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18367863

Change-Id: I7e0cbe1713b18456605b17098ea8f3e1edcc4ed6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 03:53:22 +00:00
Riddle Hsu
044de12a14 Merge "Round screen size of configuration" into tm-qpr-dev 2022-05-16 03:13:29 +00:00
Riddle Hsu
9605ca616b Merge changes Ibd113f4f,I09c2feff into tm-qpr-dev
* changes:
  Remove client side deferred config for cached state
  Defer sending config change to cached process
2022-05-16 03:12:44 +00:00