Commit Graph

5438 Commits

Author SHA1 Message Date
Jayant Chowdhary
cc8cc7b5dc Merge "Limit preview stabilization mandatory stream sizes to 1440p (instead of RECORD)." into tm-dev am: f0094b8dd3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18704183

Change-Id: I46e6acc6d252c65abbd8dac72720e1e721dac3f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 21:35:34 +00:00
Jayant Chowdhary
f0094b8dd3 Merge "Limit preview stabilization mandatory stream sizes to 1440p (instead of RECORD)." into tm-dev 2022-06-17 21:35:12 +00:00
Jayant Chowdhary
d83e9b5325 Limit preview stabilization mandatory stream sizes to 1440p (instead of RECORD).
Also fix a logic error in an if check while retrieving mandatory streams
for preview stabilization. This was not caught by CTS since for devices
where preview stabilization was supported, skipped the test. A
modification has been made to CTS RobustnessTest to ensure that the
preview stabilization support and mandatory streams are in agreement
with each other.

Bug: 228245412

Test: atest RobustnessTest.java on device supporting preview stabilization

Change-Id: I18c7f3c728862866b8f088da3afe222afbad7051
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-06-17 17:18:29 +00:00
TreeHugger Robot
7165c7e54a Merge "Camera: Update streamConfigurationMap doc for JPEG sizes" into tm-dev am: 0558b51322
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18870021

Change-Id: I59213c17d98644b70de1e7172a053de2488d2839
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 03:35:17 +00:00
TreeHugger Robot
0558b51322 Merge "Camera: Update streamConfigurationMap doc for JPEG sizes" into tm-dev 2022-06-14 03:16:43 +00:00
Emilian Peev
5ea3dfe752 Merge "Camera: Allow synthetic extension metadata" into tm-dev am: eb177cd5d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18801658

Change-Id: I8ddd4eb83fbb0e2c7bdfb2a3c5262445290866ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 21:50:42 +00:00
Emilian Peev
eb177cd5d6 Merge "Camera: Allow synthetic extension metadata" into tm-dev 2022-06-13 21:29:03 +00:00
Shuzhen Wang
e07c69bfde Camera: Update streamConfigurationMap doc for JPEG sizes
Update the developer doc for reduced set of supported JPEG sizes
depending on media performance class level.

Also fix some broken links in developer doc.

Test: Build
Bug: 235804659
Change-Id: Iab3be52d13f02a19cc62732dcdf46feb576e0095
2022-06-13 14:09:58 -07:00
Michael Wright
a8bbf1c04c Merge "Revert "Revert "Do not send updates for disabled displays.""" into tm-dev am: f029d8cf1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18799664

Change-Id: Icb612ca3d0051a88de833dac1008140902194868
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 19:46:30 +00:00
Michael Wright
ce5906b4a1 Revert "Revert "Do not send updates for disabled displays.""
This reverts commit d04fae1ba7.

Reason for revert: Robolectric fixed

Change-Id: Idfba84d5aefb694f9af77a1d4f1a648e01e282b4
2022-06-13 11:08:32 +00:00
Sam Dubey
af193e8b8c Merge "Revert "Do not send updates for disabled displays."" into tm-dev am: 54e0824f85
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18803234

Change-Id: Iad033af25def1c56945567e8742a4aceb2d00893
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 06:46:33 +00:00
Sam Dubey
54e0824f85 Merge "Revert "Do not send updates for disabled displays."" into tm-dev 2022-06-10 05:51:43 +00:00
Sam Dubey
d04fae1ba7 Revert "Do not send updates for disabled displays."
This reverts commit 3175300106.

Reason for revert: Breaking roboelectric suw tests with an NPE accessing displayids() in shadowdisplaymanager

Bug: 235541208
Change-Id: Ib760b5b9a477eb3c8516f01614afe8192a6e597b
2022-06-10 04:38:26 +00:00
TreeHugger Robot
978fe93fed Merge "Do not send updates for disabled displays." into tm-dev am: ad3c32bff1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17245703

Change-Id: I7644ba09a1d62d77eb79dc6ac34d0b14e6271a67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 00:08:25 +00:00
TreeHugger Robot
ad3c32bff1 Merge "Do not send updates for disabled displays." into tm-dev 2022-06-09 23:45:39 +00:00
Santos Cordon
3175300106 Do not send updates for disabled displays.
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
2022-06-09 13:37:59 +00:00
Emilian Peev
cbd3739167 Camera: Allow synthetic extension metadata
Synthetic metadata such as 'STATISTICS_FACES'
could be of value to extension clients.
Allow extension implementations to advertise support
for synthetic keys.

Bug: 235330843
Test:
atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionCharacteristicsTest.java
atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: I80133e4559610ecad714afa93400c00b2b6685fa
2022-06-08 14:13:56 -07:00
TreeHugger Robot
0e85d31190 Merge "Logging for DisplayPowerController SuspendBlockers" into tm-dev am: aedd857b68
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18375396

Change-Id: I1391e5ac4a6bb5ad480ebab9a154831db5fb8b95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 18:13:14 +00:00
TreeHugger Robot
aedd857b68 Merge "Logging for DisplayPowerController SuspendBlockers" into tm-dev 2022-06-03 17:59:53 +00:00
Antony Sargent
e1a0bf366d Merge "Prevent deadlocks during VirtualDisplay creation" into tm-dev am: fc6eb70e0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18246032

Change-Id: Ieafea2c80f875c16215ed05f77c22ec7445fe8af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 00:34:42 +00:00
Antony Sargent
725dad7d71 Prevent deadlocks during VirtualDisplay creation
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
2022-05-29 11:18:36 -07:00
Santos Cordon
1fe8fe5b7b Logging for DisplayPowerController SuspendBlockers
Bug: 213407479
Test: Manually verify via 'adb shell dumpsys display'
Change-Id: I2948319fc0354adf6e25b30ca11654c368c1e1d5
2022-05-28 17:13:20 +00:00
TreeHugger Robot
90b5c42444 Merge "Add ALL_INCLUDING_DISPLAYS category for getDisplays()" into tm-dev am: d5b0c3f163
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18488313

Change-Id: Idc7555a3d1334951c732100a6ab6347fb0c9c91a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 02:59:56 +00:00
TreeHugger Robot
d5b0c3f163 Merge "Add ALL_INCLUDING_DISPLAYS category for getDisplays()" into tm-dev 2022-05-25 02:40:34 +00:00
Emilian Peev
5deb7f1481 Merge "Camera: Pass shared outputs during advanced extension configuration" into tm-dev am: f25e9aec2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18192278

Change-Id: I8996ae2a7ede03fa90407234102d58e2a407fcdf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 22:43:32 +00:00
Emilian Peev
f25e9aec2a Merge "Camera: Pass shared outputs during advanced extension configuration" into tm-dev 2022-05-24 22:20:42 +00:00
Santos Cordon
3be5498e61 Add ALL_INCLUDING_DISPLAYS category for getDisplays()
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
2022-05-20 11:27:45 +00:00
TreeHugger Robot
95512285b0 Merge "Defines flag to disable touch feedback on display" into tm-dev am: beddca329f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607970

Change-Id: Ic76837b9790e2b70e27007135172d4507011b9f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 12:23:23 +00:00
yuanjiahsu
fc06fc5cb1 Defines flag to disable touch feedback on display
Define FLAG_TOUCH_FEEDBACK_DISABLED to disable touch sound and haptic feedback when creating virtual display.

Bug: 185558698
Test: atest FrameworksCoreTests:ViewRootImplTest, manual testing
Change-Id: Ida67f4027f2636e004218595b3bf088c06194522
2022-05-19 06:01:55 +00:00
TreeHugger Robot
709a36c947 Merge "Camera: Add videoStabilizationMode to Camera session stats" into tm-dev am: ed57953565
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18376844

Change-Id: I2db75ff9724fa95fe1a52c8c1093641faae6b9aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:36:39 +00:00
Treehugger Robot
8992cd567f Merge "Consolidate input OWNERS files" am: 467ebb8379 am: 7845f672bf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2021015

Change-Id: I0316c2bc2f120d9a6534758b49595a36c57f9158
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 19:18:41 +00:00
Treehugger Robot
7845f672bf Merge "Consolidate input OWNERS files" am: 467ebb8379
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2021015

Change-Id: Ie1b6446275299c2941271e433746d0b605404e0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 19:01:24 +00:00
Treehugger Robot
467ebb8379 Merge "Consolidate input OWNERS files" 2022-05-18 18:42:33 +00:00
Shuzhen Wang
23767f998d Camera: Add videoStabilizationMode to Camera session stats
Test: ./out/host/linux-x86/bin/statsd_testdrive 227
Bug: 224639088
Change-Id: I2a7b0965662b729585d0aa6e6a1e6407e448ddfe
2022-05-17 14:20:53 -07:00
Prabir Pradhan
648717a3b1 Merge "Consolidate testing for input changes" into tm-dev 2022-05-16 13:22:00 +00:00
TreeHugger Robot
b15596cb67 Merge "Camera: Update doc to describe tradeoff of DEFAULT timestamp base" into tm-dev 2022-05-14 18:05:10 +00:00
Brian Duddie
73d4b0f98f Add note about Sensor.TYPE_HEAD_TRACKER visibility
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
2022-05-13 20:47:08 +00:00
Shuzhen Wang
bca2a32c73 Camera: Update doc to describe tradeoff of DEFAULT timestamp base
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
2022-05-13 10:47:37 -07:00
Prabir Pradhan
0f9ea02be0 Reland: Change input injection security model
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
2022-05-10 18:40:32 +00:00
Emilian Peev
c7f3fa1920 Camera: Pass shared outputs during advanced extension configuration
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
2022-05-09 11:10:48 -07:00
TreeHugger Robot
4d2ae2655e Merge "Camera: Propagate extension results in case of dropped frames" into tm-dev 2022-05-05 23:11:58 +00:00
Prabir Pradhan
9c54e12337 Consolidate testing for input changes
Make sure a consistent and comprehensive set of tests run when parts of
the input pipeline are changed.

Bug: 231623960
Test: presubmit
Change-Id: I08cd9966d436d21694e26b81aaf9c141cea47595
2022-05-05 21:19:15 +00:00
Prabir Pradhan
dd2c72a65d Merge changes from topics "presubmit-am-e1ccffb4201944be9e638acb9f6f4dfc", "presubmit-am-e6236e948fb14688bc4afb3adb9e745b" into tm-dev
* changes:
  Synchronize pointer display change requests
  Make virtual input device creation synchronous
2022-05-05 19:21:40 +00:00
Evan Severson
7935bf8b27 Merge "Make the authentication requirement configurable for toggles" into tm-dev 2022-05-05 16:28:13 +00:00
Prabir Pradhan
d4fd3a112b Synchronize pointer display change requests
Previously, when InputManagerService requests for PointerController to
change the pointer display, there was no way to know when the request
was completed or whether it succeeded. This could lead to a few issues:

- WM's MousePositionTracker's coordinates would not be updated until the
  next mouse event was generated, meaning the position would be out of
  sync.
- The creation of a virtual mouse device moves the pointer to a specific
  displayId. In order to test this behavior, we would need to sleep in
  the test code to wait for the system to update the pointer display and
  position, resulting in generally flaky tests.

Here, we add a way to synchonize changes to the pointer display so that
InputMangerService can know the current pointer display with certainty.
PointerController, which is updated in the InputReader thread, is the
source of truth of the pointer display. We add a policy call to notify
IMS when the pointer display changes.

When the pointer display is changed, the cursor position on the updated
display is also updated so that the VirtualMouse#getCursorPosition() API
is synchronized to the pointer display change.

Bug: 216792538
Test: atest FrameworksServicesTests:InputManagerServiceTests
Test: atest PointerIconTest
Change-Id: I578fd1aba9335e2e078d749321e55a6d05299f3b
Merged-In: I578fd1aba9335e2e078d749321e55a6d05299f3b
2022-05-05 14:20:45 +00:00
Ilya Matyukhin
de84e3f019 Merge "Respect halControlsIllumination provided by the HAL" into tm-dev 2022-05-05 00:09:00 +00:00
Shuzhen Wang
b1d13ce6bd Merge "Camera: Fix typos and bad format in docs" into tm-dev 2022-05-05 00:01:18 +00:00
Ilya Matyukhin
59d49a4238 Respect halControlsIllumination provided by the HAL
Bug: 224573604
Test: atest SystemUITests:com.android.systemui.biometrics
Change-Id: I665b8c6a131ff3fd66701fea7ca6368e33b39c13
Merged-In: I665b8c6a131ff3fd66701fea7ca6368e33b39c13
2022-05-04 21:35:42 +00:00
Shuzhen Wang
2e3e00ee63 Camera: Fix typos and bad format in docs
Test: Build
Bug: 231252657
Change-Id: I3006f124baab76aa011c5b91d346b871ed6eea22
2022-05-04 12:07:47 -07:00
Evan Severson
75821bfd72 Make the authentication requirement configurable for toggles
Test: Manual && CtsSensorPrivacyTestCases
Fixes: 227517111
Change-Id: Id7ee5d8ca9ee264c18d2f7e1975e0d4fcb6210ab
2022-05-03 21:04:35 +00:00