This reverts commit 3175300106.
Reason for revert: Breaking roboelectric suw tests with an NPE accessing displayids() in shadowdisplaymanager
Bug: 235541208
Change-Id: Ib760b5b9a477eb3c8516f01614afe8192a6e597b
If a display is disabled, do no share it outside of
LogicalDisplayMapper.
This will help by not creating unnecessary updates for displays that
are disabled.
Bug: 197515205
Bug: 221071695
Test: atest com.server.android.display
Test: Manually verify display layouts still successfully change, and
also that confirm logs no longer have excessive add/remove
display notifications.
Change-Id: Ie5954935bb1afc612935e52d421b0e103d8d0854
When creating a VirtualDisplay for a VirtualDevice, we need to do some
extra work like setting up for input injection, creating a
DisplayWindowPolicyController, and grabbing a wakelock to keep the
display awake. Some parts of this extra work end up calling back into
the DisplayManagerService from another thread, but since we're already
holding the mSyncRoot lock we sometimes get into situations where
those threads get blocked trying to acquire mSyncRoot, while holding a
lock that another thread ends up needing like the global window
manager one, so we get deadlock.
The fix in this CL is to break up the extra work the
VirtualDeviceManagerService needs to do into two parts: one part that
happens before the VirtualDisplay is created, and one part
after. Neither of these needs mSyncRoot to be held.
Fixes: 230544802
Test: atest CreateVirtualDisplayTest
Change-Id: I6a6e03f816567579510b3f1ef0705375549a3c88
Add a category for DisplayManager#getDisplays() that includes
disabled/inaccessible/temporary displays in the set of returned
Displays.
Bug: 221071695
Test: adb shell cmd display get-displays \
android.hardware.display.category.ALL_INCLUDING_DISABLED
Change-Id: If06f7f8b7f9ba4779a19d24d76fb49e95a908afc
In Android 13, this sensor type is generally not expected to be used by
apps.
Bug: 224619073
Test: compile; comment change only
Change-Id: Ic6f56b6d354777dcf608d34314d6e4e7b7af36b8
Describe the tradeoffs of preview jitter reduction, and mention that
the application can turn off jitter reduction for better latency.
Test: Build
Bug: 195025014
Change-Id: I68f99efe6a35ae9db0f4cdf75ef31879f8550ff8
This config value controls whether the "wake screen on notifications"
setting and functionality are available on a given device. By default
the value is "true", which means that there will be no change to any
current functionality.
Test: manually by checking that the "wake screen on notifications"
setting is still present in Settings, and the screen does wake up when a
notification arrives and this setting is enabled.
Bug: 231246919
Change-Id: I37f09fd3bcb820cbfa763bc8aa942924683cf9fb
This reverts commit 6b3c6cae3f.
Changes from revert:
- Explicitly maintain the same behavior as previous versions of Android,
where injection is allowed into all window if the caller has the
INJECT_EVENTS permission, even if it is targeting a certain uid. This
fallback will be removed separately in b/228161340.
- Clear the calling identity before checking if the injection source has
a permisssion to avoid hitting blanket-checks in PackageManager that
denys permissions in some cases, such as if the permission check call
is coming from an instant app (b/228319794).
- Leave the existing IInputManager#injectInputEvent method signature
unchanged, and add a new input method injectInputEventToTarget to
perform targeted injection. This makes it so that tools or apps
relying on the @UnsupportedAppUsage injection method will not be
broken by a change in the method's signature (b/228583652).
Bug: 207667844
Bug: 194952792
Test: Run tests affected by b/228319794 and its duplicates using
cts-tradefed, so that they are also run as instant apps.
Test: Test scrcpy tool works locally
Change-Id: I503e4f087501e3aecf2c18b4b1d27e51ecda59ac
Merged-In: I503e4f087501e3aecf2c18b4b1d27e51ecda59ac
Shared outputs are not expected to be part of the main output
configuration list. Expect to receive the shared surfaces only
as part of the corresponding shared list.
Bug: 231636379
Test: Camera CTS
Change-Id: I67547a38ed97d55c8270196403d4af5d62795351
This reverts commit 6b3c6cae3f.
Changes from revert:
- Explicitly maintain the same behavior as previous versions of Android,
where injection is allowed into all window if the caller has the
INJECT_EVENTS permission, even if it is targeting a certain uid. This
fallback will be removed separately in b/228161340.
- Clear the calling identity before checking if the injection source has
a permisssion to avoid hitting blanket-checks in PackageManager that
denys permissions in some cases, such as if the permission check call
is coming from an instant app (b/228319794).
- Leave the existing IInputManager#injectInputEvent method signature
unchanged, and add a new input method injectInputEventToTarget to
perform targeted injection. This makes it so that tools or apps
relying on the @UnsupportedAppUsage injection method will not be
broken by a change in the method's signature (b/228583652).
Bug: 207667844
Bug: 194952792
Test: Run tests affected by b/228319794 and its duplicates using
cts-tradefed, so that they are also run as instant apps.
Test: Test scrcpy tool works locally
Change-Id: I503e4f087501e3aecf2c18b4b1d27e51ecda59ac
Merged-In: I503e4f087501e3aecf2c18b4b1d27e51ecda59ac
Switched too_left with too_right face acquired string
Switched too_high with too_low face acquired string
Test: Verified manually on different devices
Fixes: 231400685
Change-Id: I6b29c8953f260e1c662acc38a1ce6006d18ecfc9