Commit Graph

5450 Commits

Author SHA1 Message Date
Sam Dubey
53ff5b141e Merge "Revert "Do not send updates for disabled displays."" into tm-dev am: 54e0824f85 am: 525a41a6db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18803234

Change-Id: I85e89210aedbbd98b1dc8038c8cc1915cf2ea4f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 07:03:34 +00:00
Sam Dubey
525a41a6db 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: Ide0cddaef2914222fbea373abcb2d517e50edbe1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 06:47:39 +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
c0d2c1c48b Merge "Do not send updates for disabled displays." into tm-dev am: ad3c32bff1 am: 627bbbe717
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17245703

Change-Id: I5f20fab9786a0df3a0cdfac0d72799c2df18222f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 00:35:04 +00:00
TreeHugger Robot
627bbbe717 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: Iccc9059b93b53ff6443c7ee1a970c06e97e81223
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 00:10:02 +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
TreeHugger Robot
dcf650285e Merge "Logging for DisplayPowerController SuspendBlockers" into tm-dev am: aedd857b68 am: a6cc576b31
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18375396

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

Change-Id: Ie72dc45b6f7f5e55876cf8798553712db36f6b58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 00:59:09 +00:00
Antony Sargent
de2d849abd 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: If653afb4a286de6046e9bf4392a2fa924de5c92b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 00:35:54 +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
560421a8c0 Merge "Add ALL_INCLUDING_DISPLAYS category for getDisplays()" into tm-dev am: d5b0c3f163 am: c8571df946
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18488313

Change-Id: Ia5e508629fb4aba9d7ce60287e0f2d627b0e9a63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 03:19:29 +00:00
TreeHugger Robot
c8571df946 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: I7d8ed0e3dd91a8c0bd54868de5333f63d2268fdf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 03:01:12 +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
adbbd77689 Merge "Camera: Pass shared outputs during advanced extension configuration" into tm-dev am: f25e9aec2a am: be108d910c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18192278

Change-Id: I7685cd04307f866112cebf60d31da7f1d26d490c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 22:35:11 +00:00
Emilian Peev
be108d910c 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: I7d72a960a3ef9480f2d357aac08d54e6aed4422f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 22:25:30 +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
f5a4b7fd86 Merge "Defines flag to disable touch feedback on display" into tm-dev am: beddca329f am: 02afba9572
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607970

Change-Id: I4e7280b4493b9f602e5469125302dbe2dc596978
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 12:50:52 +00:00
TreeHugger Robot
02afba9572 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: Ie13675a43f0ddf29f926292fb2813508d890b583
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 12:24:55 +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
f3b2486f1d Merge "Camera: Add videoStabilizationMode to Camera session stats" into tm-dev am: ed57953565 am: 936834e3b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18376844

Change-Id: I44df8872c2032b93612b4ece954335f39b0aa623
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:15:19 +00:00
TreeHugger Robot
936834e3b5 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: If1a8c3eccb6676f891a7e8742b49aacdaccfddb3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:33:08 +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
a2436c7ed1 Merge "Consolidate testing for input changes" into tm-dev am: 648717a3b1 am: 978c20b808
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18186410

Change-Id: I6e6cf0c853f048e1fb769511933d6dc14cb72e72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 14:33:28 +00:00
Prabir Pradhan
978c20b808 Merge "Consolidate testing for input changes" into tm-dev am: 648717a3b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18186410

Change-Id: I91801a48d0c935f990b71216c4ece2bd0ba29f8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 14:15:48 +00:00
Prabir Pradhan
648717a3b1 Merge "Consolidate testing for input changes" into tm-dev 2022-05-16 13:22:00 +00:00
TreeHugger Robot
cda2f8b06b Merge "Camera: Update doc to describe tradeoff of DEFAULT timestamp base" into tm-dev am: b15596cb67 am: 065c279cb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18322257

Change-Id: I6ff627ac95497938f78c42f57463755ecbeb15ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 20:07:46 +00:00
TreeHugger Robot
065c279cb6 Merge "Camera: Update doc to describe tradeoff of DEFAULT timestamp base" into tm-dev am: b15596cb67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18322257

Change-Id: I7ced63c3e66fc4275382d8801cc950b55a17ec06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 19:34:43 +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
TreeHugger Robot
a615103af1 Merge "Add note about Sensor.TYPE_HEAD_TRACKER visibility" into tm-dev am: 616530de0e am: edc4e42618
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18381200

Change-Id: I2dc7ff890eb55c536ba00248a99b6b1c2a5b9187
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 05:06:14 +00:00
TreeHugger Robot
edc4e42618 Merge "Add note about Sensor.TYPE_HEAD_TRACKER visibility" into tm-dev am: 616530de0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18381200

Change-Id: Ibecbc1b8eb6b42b1a68f760961e3fbd9cba14f39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 04:20:56 +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
Will
6ef1b59021 Add a config for "wake screen on notifications".
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
2022-05-12 10:21:35 -07:00
TreeHugger Robot
200c269fc7 Merge "Reland: Change input injection security model" into tm-dev am: d0f6ad2f30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17689973

Change-Id: I79f4598fd2d915422d8db6b3ed0076f78a369dab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:34:28 +00: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
Prabir Pradhan
b8fce23aa4 Merge "Reland: Change input injection security model" into tm-qpr-dev 2022-05-10 18:22:09 +00:00
TreeHugger Robot
847661ebbd Merge "Switched face acquire strings" into tm-d1-dev 2022-05-09 21:46:01 +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
Shuzhen Wang
9895959a71 Camera: Clarify benefit of readout vs exposure timestamp
Update developer doc with minor clarification.

Test: Build
Bug: 229097448
Bug: 229773853
Change-Id: Ice7c88a47366759c6024de7a9a30a8114c1ff655
2022-05-09 15:42:12 +00:00
Prabir Pradhan
379d54a32f 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-09 09:32:58 +00:00
TreeHugger Robot
daf69b3d66 Merge "Camera: Add support for readout timestamp" into tm-d1-dev 2022-05-07 04:09:50 +00:00
Joshua McCloskey
d3c44a394d Switched face acquire strings
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
2022-05-06 17:09:00 +00:00
TreeHugger Robot
284657d0ae Merge "Camera: Propagate extension results in case of dropped frames" into tm-dev am: 4d2ae2655e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18104867

Change-Id: I148bcfb5a0811ce42b76065a8a19802a2ceff43c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 23:34:01 +00: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