Commit Graph

23748 Commits

Author SHA1 Message Date
Cole Faust
f9df26ae3c Merge "Fix errorprone warnings that should be errors" am: 677d6cd780
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I0e9c5077610407a117ee34ff688b40b52e161a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:11:55 +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
Jeff Sharkey
ae4b67dc4e Merge "Expand UiAutomation OWNERS to include IUiAutomation AIDL." am: 709357213d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2295981

Change-Id: I5c9ab1046ca79be349f7989fa6788cfd4c3da96f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 16:12:37 +00:00
Jeff Sharkey
709357213d Merge "Expand UiAutomation OWNERS to include IUiAutomation AIDL." 2022-11-10 15:46:10 +00:00
Bill Yi
3760f9b7db Merge "Merge TP1A.221105.002 to aosp-master - DO NOT MERGE" 2022-11-09 22:54:28 +00:00
Daniel Norman
686c971ece Expand UiAutomation OWNERS to include IUiAutomation AIDL.
Change-Id: I4cb112a47309d66be2c578740861004b505fda29
2022-11-09 22:13:03 +00:00
Xiang Wang
644aaa561e Merge "Add owners to GameMode* files" am: 4ca2015e9f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2292606

Change-Id: I73fb98159634a2f21df790e7cd1d84706276ff2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 19:52:12 +00:00
Xiang Wang
4ca2015e9f Merge "Add owners to GameMode* files" 2022-11-09 19:18:55 +00:00
Bill Yi
0de01a9871 Merge TP1A.221105.002 to aosp-master - DO NOT MERGE
Merged-In: I7caa2e966bae2ec146ca77b36d2a467d746e2531
Merged-In: I361e8838571ab7b3f19778833b820f0b1b584d94
Merged-In: I361e8838571ab7b3f19778833b820f0b1b584d94

Change-Id: Ic9224a1948b26c8703a272aa3b26337e0586f3e3
2022-11-09 06:33:42 +00:00
Xiang Wang
1f24e88039 Add owners to GameMode* files
Bug: b/243448953
Test: n/a
Change-Id: I8f5dd5e01a16afea8d0d9c8133dd096287469fc8
2022-11-08 18:09:47 -08:00
Jeff Sharkey
946f42e249 Merge "Add OWNERs for the android.app.ForegroundService*" am: 793ebebfe1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2290479

Change-Id: I2fa90b84a5bcdfb1d3f3d537e9f7ef08863734c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-07 23:12:20 +00:00
Jing Ji
78e6de07b0 Add OWNERs for the android.app.ForegroundService*
Test: m
Change-Id: If7acf753b3bd9cbe2a6f07518e4a88ef552c379d
2022-11-07 14:16:05 -08:00
Thiébaud Weksteen
0c93fbab73 Add PermissionEnforcer class am: ec0d763059
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2272966

Change-Id: If59d54d09ee650643d28b26ef41c245acea74f2a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-02 23:36:55 +00:00
Thiébaud Weksteen
ec0d763059 Add PermissionEnforcer class
Defines a new PermissionEnforcer class used to check permission as part
of the @EnforcePermission AIDL annotation. It is registered as a system
service to avoid the cost of creating a new object for each new client.

Bug: 234083358
Test: TH
Change-Id: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
Merged-In: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
2022-10-27 12:12:11 +11:00
Zimuzo Ezeozue
7a54741e61 Merge changes from topic "aidl_trace" am: e75a6f8696
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2254718

Change-Id: Iaa231773191a436e176730d0fb5ae1a9965d71ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 17:45:02 +00:00
Zimuzo Ezeozue
e75a6f8696 Merge changes from topic "aidl_trace"
* changes:
  Clean up binder txn tracking special case
  Enable binder txn tracing more broadly
2022-10-19 17:08:05 +00:00
Jonathan Scott
f1c5044051 DO NOT MERGE: Update owners files for AE. am: e662698795
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257206

Change-Id: I25005ec12701b861f743c9f1211d2c23b2bf8a1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 16:13:51 +00:00
Jonathan Scott
e662698795 DO NOT MERGE: Update owners files for AE.
Test: N/A OWNERS change
Bug: 253514184
Change-Id: Ib8402921dbcdffdeb62fa79becaa6454838ba447
2022-10-17 15:32:18 +00:00
Zim
ab23aee04d Clean up binder txn tracking special case
Previously, binder txns were only traced for txns from sysui/launcher
to system_server.

ag/Iffc4bb534d239c07d2e4d43ab43a9ed76abe7496 enabled binder txn tracking
more broadly

Removed the special case for sysui/launcher and cleaned up the code

Test: Manual
Bug: 161393989
Change-Id: I9d46d2362ca0ca33bc2477d68092f7ba5fe9c8ac
Merged-In: I9d46d2362ca0ca33bc2477d68092f7ba5fe9c8ac
2022-10-14 19:30:37 +01:00
Xin Li
4b1dc6dbf6 Merge TP1A.221005.003
Merged-In: I6ffbb7510e6854f18bc427d1ae1e782918c799dc
Change-Id: I32d05cdabc6579f00bb4af0657b38539ec81a588
2022-10-03 13:38:22 -07:00
Daniel Norman
c228a05807 Merge changes from topic "danielnorman-a11y-owners" am: de7d3fb6cb am: 41b4e4d919 am: 9d01b9f223 am: 0a428ee1f8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2237693

Change-Id: Ia45d0561d5289558977ad28075d607abb6cfacc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 21:18:58 +00:00
Daniel Norman
0a428ee1f8 Merge changes from topic "danielnorman-a11y-owners" am: de7d3fb6cb am: 41b4e4d919 am: 9d01b9f223
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2237693

Change-Id: Ief342756fde5cda25904f2ae62e24c75bdc13381
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 20:13:25 +00:00
Daniel Norman
9d01b9f223 Merge changes from topic "danielnorman-a11y-owners" am: de7d3fb6cb am: 41b4e4d919
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2237693

Change-Id: Ibf40ad15677d091a2158a688b6daa83eb0b52380
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 19:43:41 +00:00
Daniel Norman
de7d3fb6cb Merge changes from topic "danielnorman-a11y-owners"
* changes:
  Extends UiAutomation OWNERS to wildcard for UiAutomationConnection.
  Adds more OWNERS to a11y FW dirs.
2022-09-29 18:47:33 +00:00
Alexander Roederer
fdfc0d81d6 Merge "Document fullScreenIntent requires IMPORTANCE_HIGH" into tm-qpr-dev am: a9a1ba19c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20069356

Change-Id: Ia40cfae3c149f3069fd2b201d1b75c61cef31d90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 14:05:15 +00:00
Alexander Roederer
502dbc10a7 Document fullScreenIntent requires IMPORTANCE_HIGH
Adds documentation mentioning that full screen intent requires
not just calling setFullScreenIntent, but also posting the
notification to a channel with importance set to IMPORTANCE_HIGH.
This is currently checked by NotificationInterruptStateProviderImpl,
in shouldLaunchFullScreenIntentWhenAdded.

Bug: 232793248
Test: Only documentation change
Change-Id: Ia9f90464c6f1125339e5d4ebef791c449d01febc
2022-09-29 00:40:21 +00:00
Daniel Norman
b24895fac3 Extends UiAutomation OWNERS to wildcard for UiAutomationConnection.
Bug: n/a
Test: n/a
Change-Id: I70800f6e2d5e38ba09cb315fb86171dd87f7fc83
2022-09-28 15:29:09 -07:00
Juan Yescas
1713d59d14 Merge changes from topic "ddr_size_api" am: c12a383385 am: a4ed6716da am: 12ffdf5523 am: 4b3bbca1c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193505

Change-Id: I539c176132222b3a024cb789ea7808dc386e6fe2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 22:00:06 +00:00
Juan Yescas
4b3bbca1c6 Merge changes from topic "ddr_size_api" am: c12a383385 am: a4ed6716da am: 12ffdf5523
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193505

Change-Id: Icc0df936abdc8ee6ce89400d4c5340ac1b56f0ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 21:17:52 +00:00
Juan Yescas
12ffdf5523 Merge changes from topic "ddr_size_api" am: c12a383385 am: a4ed6716da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193505

Change-Id: I872060fbb5e3d4ba311ed83c7be539e9925e573c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 21:02:01 +00:00
Juan Yescas
7afbbec42f Add new field in MemoryInfo to get advertised memory size.
This API will get the advertised memory size from the bootloader parameter
passed to the kernel. The advertised memory size might be different from
the MemTotal value in /proc/meminfo. This could be due the original design
manufacturer (ODM) reserved part of the memory for the Trusted Execution
Environment.

Test: Run test caes
Bug: 231718727
Change-Id: I06494cb9013048d73a83f2180a9241c2259d46eb
2022-09-27 15:11:52 +00:00
Joanne Chung
62d698f8e8 [DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time"" am: 8be1773964
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19992748

Change-Id: I93dcd232eb6205c8c6361406b4ccd0863a0dea46
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 09:38:07 +00:00
Joanne Chung
990b2f2682 Merge "[DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time""" into tm-qpr-dev 2022-09-23 09:05:50 +00:00
Hui Wu
9af4e0bd3d Merge "Remove impl of cloudsearch api" into tm-qpr-dev am: aa0ffaee0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20019599

Change-Id: I8475cd36abd09908238d7e996dcc9f5dbf14b784
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 22:50:42 +00:00
Hui Wu
1a25dca0bc Remove impl of cloudsearch api
Bug: 246376638
Test: Manually Tested
Change-Id: I1740d5e1a0fb25a0fedea0a92e8a901684e35635
2022-09-22 15:08:56 -07:00
Julia Reynolds
21bb24fa44 Merge "Fix NPE" into sc-v2-dev am: 70cc3c99d3 am: 1cdad7c9ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19886854

Change-Id: I242499c2f01c1b6453dc5291b79555a99a1fb846
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 18:12:45 +00:00
Julia Reynolds
5f40892acc Merge "Fix NPE" into sc-v2-dev am: 70cc3c99d3 am: 1cdad7c9ae am: 812f10cff1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19886854

Change-Id: I48578b4893887197cbeddd26524e5b63aa1a4cd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 17:36:32 +00:00
Julia Reynolds
812f10cff1 Merge "Fix NPE" into sc-v2-dev am: 70cc3c99d3 am: 1cdad7c9ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19886854

Change-Id: I6f175a177d4dca48cd383782617cfbf975e58790
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 17:25:27 +00:00
Julia Reynolds
1cdad7c9ae Merge "Fix NPE" into sc-v2-dev am: 70cc3c99d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19886854

Change-Id: Id6b047d1c50f922da3b54cfc00a5251c1df711e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 17:21:09 +00:00
Jeff Chang
1c5e0a84df Merge "Remove duplicated white space in ContextImpl when throw AndroidRuntimeException" am: 67d1bacd75 am: 5998e8c203 am: 96b69de42f am: e302eeec12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2219559

Change-Id: Icb4ba4d67c5587f1276ccdc3a66130bd1be4a6d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 14:32:07 +00:00
Jeff Chang
e302eeec12 Merge "Remove duplicated white space in ContextImpl when throw AndroidRuntimeException" am: 67d1bacd75 am: 5998e8c203 am: 96b69de42f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2219559

Change-Id: Ia6f1ae30a094fe827736e5eeb8614e650ce927b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 13:21:11 +00:00
Jeff Chang
96b69de42f Merge "Remove duplicated white space in ContextImpl when throw AndroidRuntimeException" am: 67d1bacd75 am: 5998e8c203
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2219559

Change-Id: Id12ed0e37db2e537f1990092648fce39d7c057da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 12:35:40 +00:00
Joanne Chung
8be1773964 [DO NOT MERGE] Revert "Revert "[DO NOT MERGE] Remove selection toolbar code from build time""
This reverts commit 888e79f7a0.

Reason for revert: The feature is planned in QPR2. This should be removed before QPR1 deadline.

Change-Id: I8af811935171d7ff51d9ba2a9ea60437695d7966
2022-09-20 02:23:28 +00:00
Shen Lin
f6ca5e5fbf Remove duplicated white space in ContextImpl when throw AndroidRuntimeException
Change-Id: Ica74e4a6754256efeec07ddbdb37536004a25867
Test: atest CtsActivityManagerDeviceTestCases:StartActivityTests
Bug: 247465690
2022-09-19 09:03:03 +00:00
Darrell Shi
3a8fcd0b27 DO NOT MERGE: add interim startDream api. am: 93e654d66c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19901885

Change-Id: I9a71dac740cb498ed64aaecf2e6c7556bf6fc57e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 16:11:48 +00:00
Darrell Shi
05dfa43c03 Merge "DO NOT MERGE: add interim startDream api." into tm-qpr-dev 2022-09-15 16:00:34 +00:00
Lee Shombert
21085953e7 Merge "Refactor PropertyInvalidatedCache locks" into tm-qpr-dev am: ab5c609adb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19903012

Change-Id: Ic9e62660a7e336afff16eb3cb50e682f7be44067
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-15 15:57:26 +00:00
Lee Shombert
a6b4f410f2 Refactor PropertyInvalidatedCache locks
Bug: 241763149

Refactor the sCorkLock into sCorkLock, which protects code that
specifically supports corking, and sGlobalLock, which protects all
other code that touches global objects (like the list of all caches).

Deadlock was not actually observed in the bug and has never been
reported, but the possibility was identified and is being fixed here.

Bypass the bulk of disableLocal(name) if the name has already been
bypassed.  This speeds repeated calls to disableLocal() by not
iterating over sCaches.

Many threads were terminated by a watchdog while iterating over
sCaches inside disableLocal().  It is not known why this block of code
was running so often when the time out expired.

An open question is whether or not disabled caches should be removed
from the sCaches array.  The only reason to leave them in the array is
to report on them during dumpsys, but this seems like a small benefit

Test: atest
 * FrameworksCoreTests:IpcDataCacheTest
 * FrameworksCoreTests:PropertyInvalidatedCacheTests
 * CtsOsTestCases:IpcDataCacheTest
Change-Id: I4c298f380044c0be93cdb47d66d7d7e2b260004f
2022-09-14 23:59:46 +00:00
Darrell Shi
93e654d66c DO NOT MERGE: add interim startDream api.
DreamManager#startDream has been updated on QPR and master which removes
the unnecessary component name parameter, but it breaks TM CTS tests.
The interim api added in this change will prevent breakage on TM, and
should not be merged downstream.

Test: atest DreamManagerServiceTests
Fix: 245223722
Fix: 245058392
Fix: 245070240
Change-Id: Id9e8cc67003da9fc3e03bffd6ec50643d10652b5
2022-09-14 20:42:20 +00:00
Yuri Lin
e533796b45 Trim any long string inputs that come in to AutomaticZenRule
This change both prevents any rules from being unable to be written to disk and also avoids risk of running out of memory while handling all the zen rules.

Bug: 242703460
Bug: 242703505
Bug: 242703780
Bug: 242704043
Bug: 243794204
Test: cts AutomaticZenRuleTest; atest android.app.AutomaticZenRuleTest; manually confirmed each exploit example either saves the rule successfully with a truncated string (in the case of name & conditionId) or may fail to save the rule at all (if the owner/configactivity is invalid). Additionally ran the memory-exhausting PoC without device crashes.

Change-Id: I110172a43f28528dd274b3b346eb29c3796ff2c6
Merged-In: I110172a43f28528dd274b3b346eb29c3796ff2c6
(cherry picked from commit de172ba0d4)
(cherry picked from commit d4b5212eb6)
Merged-In: I110172a43f28528dd274b3b346eb29c3796ff2c6
2022-09-14 17:52:38 +00:00