With this change, WallpaperController sends "freeze" / "unfreeze" commands when the app window is letterboxed / not letterboxed indicating that:
- "freeze": a screenshot of the wallpaper is taken by WallpaperServices and put on top of the main surface while the wallpaper host is notified through onVisibilityChanged(false) callback that it's no longer visible.
- "unfreeze": a screenshot of the wallpaper is removed and the wallpaper host is notified through onVisibilityChanged(true) callback if the wallpaper is visible again (e.g., if transitioned from an app to the Home screen).
Logic isn't applied to static wallpapers.
When wallpaper size changes while being frozen, the screenshot is scaled and cropped to adjust to the new size.
Fix: 177884751
Test: Manual, atest WallpaperServiceTest, WallpaperServiceTests
Change-Id: If0300478cdccc07d226117e01ce3d43aa0b432a0
* When we changed the default color of emphasized actions to an accent color instead of the notification background color, I didn't split the two into different locals, and this meant the accent color was used to enforce the color contrast of the custom color. This led to color desaturation in an attempt to meet contrast (when in dark mode) and a failure to ensure sufficient contrast (in light mode).
* A piece of this that applies specifically to colorized notifications is that we used the 'night mode' state as a shortcut for whether the background was light or dark. This led to 1) different foreground colors for the same background color, depending on dark mode state, and 2) frequently a failure to meet contrast (and/or extreme desaturation) in one of those modes.
* Also adding different night-mode colors for CallStyle actions, to meet spec.
Test: validated sufficient contrast of default and various colorized background/button combos using the accessibility scanner.
Bug: 194935539
Change-Id: I3a69eadc89f1d9d98a816c44a36873c7615a177e
Starting in R, some methods in ConnectivityManager like
getNetworkCapabilities started passing the package name from
the context stored in CM to check that the package is really
whom it pretends to be. Unfortunately, in some cases, the
context contains package "android" for an app, and since the
app is not the system, the check fails and crashes the app.
It seems the culprit is updateHttpProxy, which is called by
ProcessList when the PROXY_CHANGE_ACTION broadcast is sent.
If this happens to run between the time the process is created
and the activity thread is "bound", then the mInitialApplication
member is not set, and updateHttpProxy uses a system context.
Since ConnectivityManager caches the context forever in a
static, this leads to subsequent legitimate calls crashing.
Setting the proxy can be deffered until such a time that the
app is bound, as it can't run any code before then. The member
is never reset to null, so it's guaranteed to be non-null at
bind time.
An alternative would be to post a runnable on the handler
thread if the member is null to try again later. This
could however run the lambda a considerable number of times
as binding can be delayed, and risks causing an infinite loop
if some invariants are changed in the future.
See also b/73572062 and ag/4056059
Bug: 155549446
Bug: 189360509
Test: ActivityThreadTest FrameworksNetTests NetworkStackTests
Test: Manually set a proxy, observe the broadcast being sent and
apps not crashing
Change-Id: I956f76be2e0a1a675576511fb394d7ed4354b28a
(cherry picked from commit b0d13e29515d5b7c82daed7533b78ac57e46bd93)
Track activity configuration changes, so that split controller has
a chance to apply metrics-based rules like launching a placeholder.
Not using ComponentCallbacks here, since they are only triggered for
Application configuration changes, which might be problematic if
there are multiple running activities with different sizes. They are
also usually triggered before individual activity resources are
updated.
Also moved post-creation actions to onActivityPostCreated(), since
onActivityCreated() is called from the base implementation in
Activity#onCreate() and there is still a chance that app may perform
some actions after calling super in its override.
Bug: 194538838
Test: Configure a placeholder, launch in a small size, enlarge.
Change-Id: Ied55d5f920890fa554cdd66419235d61ab03b440
Reason: There is only one telephony stack shared
between the personal and work profile.
Bug: 194382185
Bug: 189942529
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testGrantOfSensorsRelatedPermissions
atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDenyOfSensorsRelatedPermissions
atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSensorsRelatedPermissionsNotGrantedViaPolicy
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testGrantOfSensorsRelatedPermissions
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDenyOfSensorsRelatedPermissions
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSensorsRelatedPermissionsNotGrantedViaPolicy
Change-Id: I99384d5713bb2d04f5b6fbe20c17bd72a39b57d7
When a new Context is created from the Activity Context and used to
inflate views, Content Capture is disabled for those views because the
new Context is missing ContentCaptureOptions.
Fix: 194321297
Test: atest CtsContentCaptureServiceTestCases
Test: manual - view appeared events come through
Change-Id: I934d41953c7668e371d5961b66187ecd15408e3e
getActivityBelow() is necessary to check if a split rule should
be applied for two activities on top of each other. This will
only report an activity that belongs to the same process.
When an application starts an activity B on top of an existing
activity A normally, there might be a split rule to put them
side-by-side. Organizer needs to know that activities A and B
are on top of each other to check, so it can either intercept
new activity launch or observe it after it happens and check the
rules then. The second approach results in a cleaner implementation,
but it also means that the organizer needs a reliable way to check
which activity is directly below the launched one. There is no
reliable source of info for that on the client side yet.
Bug: 190433398
Bug: 190433500
Test: Manual, using the reference implementation of the organizer.
Change-Id: I0e0116b1b0144e0ba4d19039d78c34495fbe4457
Use this to implement Drag-to-split transition
BYPASS_INCLUSIVE_LANGUAGE_REASON=using existing API.
Bug: 192291727
Test: drag from taskbar into split and observe. Also,
drag same-app into split and observe no-op.
Change-Id: I710805c85c7d57ae8eebe18e5df7fca899f1b882
Included in this CL
- Skip layout of window when in transition to PiP mode
- Pass display cutout info via TaskInfo
- Removed TaskInfoCompat
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bpKcGg1eoOo5Jz5U6IwBYK
Bug: 191310680
Test: manual, auto-enter-pip from landscape with source rect hint being
turned on, see the video
Change-Id: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
Merged-In: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
Included in this CL
- Skip layout of window when in transition to PiP mode
- Pass display cutout info via TaskInfo
- Removed TaskInfoCompat
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bpKcGg1eoOo5Jz5U6IwBYK
Bug: 191310680
Test: manual, auto-enter-pip from landscape with source rect hint being
turned on, see the video
Change-Id: Ie657d15d9edb9d07555bd166b5919bb12cb217e6
When the activity override configuration changes, we need to apply any
pending application info changes so that when the activity is
recreated, it will have updated overlays.
Bug: 193256671
Test: change live wallpaper and observe launcher colors
Change-Id: I6b8c25a6e6756f612a0f57c921625bc58ac1ecf6
For cases where the attribution soruce doesn't need to be
registered as trusted we are now using a shares static
token since the only purpose of the token in these cases
is for watching the source process dying as opposed to that
and security for registered cases.
bug: 192415943
Test: CtsPermissionTestCases
CtsPermission2TestCases
CtsPermission3TestCases
CtsPermission4TestCases
CtsPermission5TestCases
Change-Id: I93fde9ca1cacada7929761533dcae11b2736ce1e
Obsolete: the use cases for which it was introduced now have a clean
internal API layer to use instead, and this reduces informational
exposure about package presence & states.
Bug: 185513355
Test: atest SyncManagerTest
Test: atest CtsSyncManagerTest
Change-Id: I4aa1848950061dce3a1378f7d0117364e62ba59f
This reverts commit 76370b6fe6.
Reason for revert: Fix the merge break in ShellTaskOrganizerTests.java
Fix: 193069342
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I02c4bddc407eaac0ebb7cd5abb0b394f242d4d6e
Part 1 of hooking up stage-split to legacy stuff. This
actually routes the legacy remoteAnimation through shell
in order to gather the dividerbar and interract with the
WindowProcessController
Bug: 192279476
Test: atest WindowOrganizerTests.
use SPLIT_SELECT to launch 2 apps in split and observe.
Change-Id: I4f8802e6eb33f068fae0e4b3c12942bea76e332b