Commit Graph

23740 Commits

Author SHA1 Message Date
Neil Fuller
a83c04893a Merge "Add command-line support for enabling auto time" 2022-06-06 09:41:03 +00:00
Neil Fuller
f448a290fe Merge "Implementation of time user configuration update" 2022-06-01 13:34:59 +00:00
Charles Chen
acf17e37e1 Merge "Respect minimum dimensions for embedded Activities" into tm-qpr-dev am: cc0966bfd7 am: 3b35b433bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18659388

Change-Id: Ib2d68131f04f5335cb5eecd676733d548f31b3e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 09:39:08 +00:00
Charles Chen
3b35b433bd Merge "Respect minimum dimensions for embedded Activities" into tm-qpr-dev am: cc0966bfd7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18659388

Change-Id: I936af3f3bf1ba633d57036c2ff4073887cb9a740
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 09:22:40 +00:00
TreeHugger Robot
b09650e5c0 Merge "Extend the max count for retrying to request DirectActions to 7." into tm-dev am: fcf090345b am: 57ea543dbd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18693166

Change-Id: I05db13a4f077cb0e5420643858f61659a2fec551
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 09:18:03 +00:00
Charles Chen
cc0966bfd7 Merge "Respect minimum dimensions for embedded Activities" into tm-qpr-dev 2022-06-01 09:02:22 +00:00
Peter Li
c80818f9ed Extend the max count for retrying to request DirectActions to 7.
Bug: 224789902
Change-Id: I986f1b5534c8cae69c770fb67cf9ebbbeb7c75dd
Test: atest CtsVoiceInteractionTestCases
2022-06-01 04:44:50 +00:00
TreeHugger Robot
89821d0d90 Merge "Postpone the request direct actions before onStart" into tm-dev am: 0d84708056 am: 07b67c2bd5 am: bd7b748358
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628126

Change-Id: I4216b4a4b580dbae84cb038bf931d21c10144e22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 04:11:56 +00:00
TreeHugger Robot
199d93fd54 Merge "Postpone the request direct actions before onStart" into tm-dev am: 0d84708056 am: cf05c79ea0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628126

Change-Id: Ibbfcc51b996298ce0880e4a95dbbb042aedeb75d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 04:11:34 +00:00
TreeHugger Robot
e7b3536cec Merge "Postpone the request direct actions before onStart" into tm-dev am: 0d84708056 am: b29e4ce242
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628126

Change-Id: Idae62c8453c27a0b0b4c800afa1a7c9e52fbf2c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 04:11:04 +00:00
TreeHugger Robot
bd7b748358 Merge "Postpone the request direct actions before onStart" into tm-dev am: 0d84708056 am: 07b67c2bd5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628126

Change-Id: Ib7c31753c6500420070990df3a4624641d4c4f65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 04:01:44 +00:00
TreeHugger Robot
cf05c79ea0 Merge "Postpone the request direct actions before onStart" into tm-dev am: 0d84708056
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628126

Change-Id: Ieb1eaeb742bf3a98c466d32fb6fff3ba5d795daf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 03:53:37 +00:00
TreeHugger Robot
07b67c2bd5 Merge "Postpone the request direct actions before onStart" into tm-dev am: 0d84708056
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628126

Change-Id: Id3b8fbaf50f0b55e64fe34f34dc256be147627ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 03:52:14 +00:00
TreeHugger Robot
0d84708056 Merge "Postpone the request direct actions before onStart" into tm-dev 2022-06-01 03:29:35 +00:00
James O'Leary
4a6b42b5e0 Merge "Revert "Update light/dark detection."" into tm-dev am: d88a6933e8 am: a5f967a20a am: b2d0ee2998
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18675018

Change-Id: I3433579fe279756ae30c74226bb2328eb269f15f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 02:24:05 +00:00
James O'Leary
2da7374219 Merge "Revert "Update light/dark detection."" into tm-dev am: d88a6933e8 am: 92f905e560
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18675018

Change-Id: I1ed4035f901b03e97d3ae3339b1d418cee8b06e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 02:23:02 +00:00
James O'Leary
4739705e53 Merge "Revert "Update light/dark detection."" into tm-dev am: d88a6933e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18675018

Change-Id: I35fb7afce801ace371638f78dfdbd457249bd6bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 01:57:40 +00:00
James O'Leary
b2d0ee2998 Merge "Revert "Update light/dark detection."" into tm-dev am: d88a6933e8 am: a5f967a20a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18675018

Change-Id: I4957dd990bfe07a05db1439e80885342d1685a22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 01:52:32 +00:00
James O'Leary
ca80341940 Merge "Revert "Update light/dark detection."" into tm-dev am: d88a6933e8 am: a5f967a20a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18675018

Change-Id: I010788b8a6bc8e86f5b5eecc3e8240c4119f5f3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 01:52:28 +00:00
James O'Leary
a5f967a20a Merge "Revert "Update light/dark detection."" into tm-dev am: d88a6933e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18675018

Change-Id: I3e5e4dca8fe95314e5ee935f688fac29ef199175
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 01:34:00 +00:00
James O'Leary
d88a6933e8 Merge "Revert "Update light/dark detection."" into tm-dev 2022-06-01 01:29:41 +00:00
James O'Leary
676c0c450d Revert "Update light/dark detection."
Revert "Update smartspace shadow"

Revert "Update app icon shadows"

Revert submission 17935777-lightDarkDetection

Reason for revert: Talked with Adam Cohen, white shadows are controverstial and we'd need to escalate to senior UX if we want to ship. James would rather do it in U timeframe, will flag to UXers we work with that the opportunity to escalate is available if needed.
Reverted Changes:
Ia91221427:Update light/dark detection.
Ie12d3d054:Update app icon shadows
Icc88c3496:Update smartspace shadow

Change-Id: I7d6b972d29b328a7d5ca7ac7241156b6e51a2cd6
2022-05-31 21:12:38 +00:00
Neil Fuller
8e40ded4f1 Merge "Change TimeDetectorStrategy.Environment API" 2022-05-31 18:44:44 +00:00
Charles Chen
482fbfabd7 Respect minimum dimensions for embedded Activities
Before this CL, minimum dimensions of Activity wasn't respected,
that said, an Activity could be embedded in a TaskFragment of which
bounds are smaller its minimum dimensions.
This CL add the minimum dimensions on several places:

WM core:
1. Verify minimum dimension requirement before adding an Activity to
   a TaskFragment. It'll be early return if the requirement is not
   satisfied.
2. Propagate the minimum dimensions to the client side through
   TaskFragmentInfo to notify the requirement.
3. If TaskFragmentOrganizer tries to shrink a TaskFragment to
   the bounds that smaller than minimum dimensions of its children
   Activity, switch to match the parent bounds.
AndroidX Window extensions:
1. Early return if TaskFragment is resized to the bounds that smaller
   than minimum dimensions which dispatched from the server side.
2. When organizer tries to show Activities side-by-side, verify if
   minimum dimensions requirement of the primary Activiy. If the
   requirement is not satisfied, show Activities in fullscreen
   instead.
TODO: Add an API to check if an Activity intent is allowed to embed
   in a TaskFragment.

Bug: 232871351
Test: atest TaskFragmentOrganizerControllerTest
Test: atest TaskFragmentOrganizerTest TaskFragmentOrganizerPolicyTest
Test: atest SplitActivityLifecycleTest
Test: atest CtsWindowManagerJetpackTestCases
Test: atest WmJetpackUnitTests

Change-Id: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
2022-05-31 23:25:18 +08:00
Neil Fuller
9e9fe6865d Add command-line support for enabling auto time
Adds support for toggling the global auto time setting via the command
line. Useful for manual and automated tests, and also makes
time_detector consistent with time_zone_detector.

This also helps to confirm that the new config-update code should work
when used by SettingsUI.

Manually tested using a combination of the command line and SettingsUI.

Bug: 172891783
Bug: 229740080
Test: atest com.android.server.timedetector android.app.time
Test: adb shell cmd time_detector is_auto_detection_enabled
Test: adb shell cmd time_detector set_auto_detection_enabled
Change-Id: I39ce8c9381c2eef3f0fb5a42b54bc9c68e545f67
2022-05-31 11:16:08 +01:00
Neil Fuller
7573cc80a6 Implementation of time user configuration update
This adds support for updating user-facing time detector configuration
via the TimeDetectorService.

Bug: 172891783
Bug: 229740080
Test: atest com.android.server.timedetector android.app.time
Change-Id: I109e59e44dbe085d456fc36bcd98375d118940c0
2022-05-31 09:38:11 +01:00
lpeter
f8342c8db5 Postpone the request direct actions before onStart
By the original design, we register the activity event in the
ActivityManagerService. After getting the activity event, we will
query current visible activities and report them to Assistant.
Assistant will start to get direct actions of those visible
activities. But sometimes they can not get the direct actions
due to the stage of activity lifecycle before onStart().

We will postpone the request direct actions a few times
before onStart().

Bug: 224789902
Test: atest CtsVoiceInteractionTestCases
Change-Id: If7cd52c5ba749523e575c0be5595e8f20704c4f2
2022-05-31 14:59:42 +08:00
Neil Fuller
3756421121 Merge "Basic renames / tidy ups" 2022-05-30 12:50:53 +00:00
Neil Fuller
8247153b48 Change TimeDetectorStrategy.Environment API
Switch TimeDetectorStrategy.Environment to returning
ConfigurationInternal in place of an individual property.

This is in preparation for implementing the methods to update
time detector configuration and support listeners. More properties will
be added to ConfigurationInternal / removed from Environment in later
commits.

This mirrors the situation in com.android.server.timezonedetector and is
part of a sequence of changes to make com.android.server.timedetector
follow the patterns for configuration used there.

Bug: 172891783
Bug: 229740080
Test: atest com.android.server.timedetector android.app.time
Change-Id: I0ffe467ede4b6b0279b284108a368c5265a323a0
2022-05-30 12:12:42 +01:00
Ricky Wai
5f31450404 Merge "Only add boolean extra to bundle when the value is false" into tm-dev am: 76f37a5d74 am: 06a00ac6f6 am: 143b95ec82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628215

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

Change-Id: Ic2bdc6222592e97a0c973faafb7c95ee838e38a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 10:36:44 +00:00
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
8ee585f01c Merge "Only add boolean extra to bundle when the value is false" into tm-dev am: 76f37a5d74 am: 4c519f8fb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18628215

Change-Id: I5a345f1bc468f72b6c7cefe16886a0941fe4f648
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 10:36:02 +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
43fb7b6be4 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: I0beb4a6bcce2d1164970c01c18e2c14b83fa70dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 10:20:05 +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
aca9a98b25 Merge "Update light/dark detection." into tm-dev am: 4e6dfca5ed am: 9d7db3464b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18164065

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

Change-Id: I42073ba995861dbdd1f631227a544a865bfa16f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 20:35:28 +00:00
James O'Leary
abcfc13d9f 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: I30194eecd5035488beb9b7eabdf62390ff543685
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 20:29:41 +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
8a21df0c92 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: I326ffa04f784f8edb405104edb8bc6789d690ed9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 20:04:05 +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
Neil Fuller
a5db2b6c3a Basic renames / tidy ups
Bug: 172891783
Bug: 229740080
Test: build only
Change-Id: I2fbbd8b65b3ad3738b6ec4d8d8ab2840f5c04a0f
2022-05-27 14:47:16 +01:00
Rhed Jao
baade6945c Merge "Fix cross user package visibility leakage for queryInstrumentation" 2022-05-27 02:39:53 +00:00
TreeHugger Robot
e09d835640 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 am: ddd5805287
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18486605

Change-Id: Ic83d19c059311a6a674d37b91917405304f2917a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 21:13:01 +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
ddd5805287 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: I7458bf01d3849774842bb6ae78d437f55d861f7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 20:55:58 +00:00