Commit Graph

5453 Commits

Author SHA1 Message Date
Treehugger Robot
282a29b8ba Merge "camera2: Fix getConcurrentCameraIds doc formatting" 2022-11-28 18:20:20 +00:00
Jayant Chowdhary
38ede54c5e camera2: Fix getConcurrentCameraIds doc formatting
Bug: 260248001

Test: Inspect make doc-comment-check-docs output

Change-Id: I2d97559da698cbcfe6e5bbe84085cb2b5fd064d5
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-11-24 01:14:23 +00:00
Cole Faust
4b5766ff13 Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Merged-In: I19920151701b25e34a1c82af073759d50e3bcc77
Change-Id: If7d7720bd650295d0e8be234ca5221a75cde167f
2022-11-18 22:40:01 -08:00
Treehugger Robot
ef9646b75b Merge "Update onwer file for broadcast radio package" 2022-11-18 02:14:16 +00:00
Weilin Xu
83f0a262a8 Update onwer file for broadcast radio package
Bug: 232461611
Test: m -j
Change-Id: I89183421c28ac617d9029f5839e51cdecef13c3c
2022-11-17 22:47:43 +00:00
Cole Faust
7da659bb6c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
2022-11-14 17:57:30 -08:00
Emilian Peev
4dd1477d72 Merge "Fix an issue that the FoldStateListener induces a memory leak" 2022-10-20 21:41:42 +00:00
Jayant Chowdhary
9ba6398d1d camera2: Add non burst sizes to mandatory streams for ultra high resolution sensors
Bug: 240128812

Test: Vendor testing
Test: RobustnessTest.java on cuttlefish

Change-Id: I92047456a43d49c5354718ead10df2cbd60363e2
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-10-04 21:10:10 +00:00
Brian Duddie
9c7e48eb1e Fix sticky firstEventAfterDiscontinuity setting
This value needs to be explicitly set to false to prevent re-using a
stale "true" value.

Fixes: 245965753
Test: CTS SensorHeadTrackerTest#testDiscontinuity (pending upload)
Change-Id: Icd018e0cab9e30b0677970760a38a390d9dd2a3c
2022-09-09 22:51:38 +00:00
Cole Faust
584140c83a Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
2022-08-25 10:57:12 -07:00
Kwangkyu Park
eb11b2401b Fix an issue that the FoldStateListener induces a memory leak
FoldStateListener is non-static inner class and keeps reference to
the outer class which is CameraManager. As CameraManager also keeps
context with mContext, memory leak could exist.

Changing FoldStateListener to static inner class, so that the class
won't keep the reference.

Bug: 242264787
Test: Manual test with memory profiling
Change-Id: I77652bd94b50eabc80041e13274b619c0da36601
2022-08-12 16:39:08 +09:00
Xin Li
0f466f51f1 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:16:59 +00:00
Venkatarama Avadhani
d9b319e0d2 CEC: Do not allow null callback
Do not allow oneTouchPlay and getDisplayStatus methods to be called
with null callback as an argument.

Bug: 236687418
Test: None
Change-Id: I9f1b3ec5c1a44fd588068881febd35d34930f031
2022-06-29 07:17:49 +00:00
Xin Li
14543d1ec7 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I5705ac7586cb73b7bc2bd60bb792d0a0a951ed74
Change-Id: I59a4fd917c95c8c9e258cd743cee2d950a46d9cd
2022-06-28 21:24:28 +00:00
Weilin Xu
de57566c98 Added new owner to radio service folder
Bug: 232461611
Test: m -j
Change-Id: I41c9bb1d0fd554e0f598223f8cbf013776275d39
2022-06-23 22:39:02 +00:00
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