Commit Graph

19267 Commits

Author SHA1 Message Date
Miranda Kephart
31c10616d7 Merge "Add device config flag to ignore clipboard source package" into tm-qpr-dev am: fb435f4376
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20499567

Change-Id: Ib7f2a92be9363a6f8d39399e8adeef88940fef9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 22:40:36 +00:00
Miranda Kephart
fb435f4376 Merge "Add device config flag to ignore clipboard source package" into tm-qpr-dev 2022-11-17 22:17:04 +00:00
Miranda Kephart
81a533d0a1 Add device config flag to ignore clipboard source package
Allows testing of remote copy clipboard UI without going through
Nearby. Effectively guarded by the CLIPBOARD_REMOTE_BEHAVIOR flag as
the isRemoteCopy method will only be run if that flag is enabled.

Bug: 246808749
Test: manual, using Clipboard Spammer app
Change-Id: I2a90709e61489d6ff5ae418b21d928c628320721
2022-11-17 15:40:21 +00:00
TreeHugger Robot
3f95840e70 Merge "Extract getIntentUser function in ResolverActivity" into tm-qpr-dev am: 858e21b54f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20495626

Change-Id: Iff07680bcdb63703f13e57145004cee27cb28491
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 12:31:42 +00:00
TreeHugger Robot
858e21b54f Merge "Extract getIntentUser function in ResolverActivity" into tm-qpr-dev 2022-11-17 12:02:31 +00:00
Treehugger Robot
807a2d906a Merge "Updated OWNERS file for expresslog APIs" am: 352e892f47 am: 900df4ad1a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2285193

Change-Id: I349a295e91699648ae5ed88324a2fedfb42e95c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 02:32:01 +00:00
Treehugger Robot
900df4ad1a Merge "Updated OWNERS file for expresslog APIs" am: 352e892f47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2285193

Change-Id: I741e921a741272151e20c183ef3e8328ff9b4108
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 02:08:03 +00:00
Treehugger Robot
352e892f47 Merge "Updated OWNERS file for expresslog APIs" 2022-11-17 01:33:49 +00:00
Nick Chameyev
4cc313e0aa Extract getIntentUser function in ResolverActivity
This should resolve conflicts with master.

Bug: 233348916
Test: presubmit
Change-Id: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
Merged-In: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
2022-11-16 17:00:16 +00:00
Azhara Assanova
c0cba4e226 Merge "Disallow dangerous zip entry names" am: fb6ff598b9 am: e974be93ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2281427

Change-Id: Idc85440cdf9002f88e3b2123d2f6e93211c0b0e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 11:27:19 +00:00
Azhara Assanova
e974be93ec Merge "Disallow dangerous zip entry names" am: fb6ff598b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2281427

Change-Id: I3dd4217728f41532c63409e7a5c47bf755d24cc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 10:54:53 +00:00
Azhara Assanova
fb6ff598b9 Merge "Disallow dangerous zip entry names" 2022-11-16 10:11:38 +00:00
Cole Faust
d3c499dabc Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I8090e254f06a3b5fc7e9b23fdae6c5bd3db230c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:37:15 +00:00
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
Jorge Gil
f28339c869 Merge "Add WCT#setDragResizing to optimize fluid resizing" into tm-qpr-dev am: 1f17bf7eba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20378671

Change-Id: I0d828b42ae8a3d6b62c15a0c3f3f78809e1a3663
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 21:37:55 +00:00
TreeHugger Robot
3374b69597 Merge "Remove atraces from RemeasuringLinearLayout" into tm-qpr-dev am: 6cf3dab11b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20462730

Change-Id: Ia117940212cb84b78d7c124674c959331eb986a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 16:36:07 +00:00
Nicolo' Mazzucato
03d923dada Remove atraces from RemeasuringLinearLayout
onMeasure was being called 246 times in 26 ms, and having all those traces was not helping much and causing a few millis of latency.

Bug: 258930580
Test: Recorded a perfetto trace and inspected it manually
Change-Id: I672b785a57fe6c6d78b6a89e68fa57735c225bc7
2022-11-14 12:46:55 +00:00
TreeHugger Robot
f826fd57a9 Merge "Add logs to aid slow notification measuring investigation" into tm-qpr-dev am: db45ef8514
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20438505

Change-Id: I44e7999269a4f348474b96316ff71b62bc861d3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-12 19:33:51 +00:00
Jorge Gil
5a95db047e Add WCT#setDragResizing to optimize fluid resizing
Allows WM Shell to indicate the start/end of drag resizing, which
core can use as a signal to reuse a single (larger) surface size
for the entire drag resize operation to avoid continuous buffer
allocations after each size change.

Bug: 249808500
Test: drag resize a freeform window, verify WindowLayout requests
a fullscreen sized surface; atest TaskPositionerTest

Change-Id: I27e2b44270d7ea4f701fa8037f93b20dc691284b
2022-11-11 00:48:49 +00:00
Nicolo' Mazzucato
318f6d69b7 Add logs to aid slow notification measuring investigation
Bug: 245268301
Bug: 243647188
Test: Recorded a perfetto trace and inspected it manually
Change-Id: I33ca2e0c7e9f71c97acca90eb0a29293e58c0442
2022-11-10 18:45:36 +00:00
TreeHugger Robot
d934789060 Merge "Add CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS" into tm-qpr-dev am: d825147525
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20340228

Change-Id: I58275d682324b9e2031f5cbbd5ffd4e2d3ecaffb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 13:08:46 +00:00
TreeHugger Robot
d825147525 Merge "Add CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS" into tm-qpr-dev 2022-11-09 12:27:24 +00:00
TreeHugger Robot
14391d46c7 Merge "Enable a shortcut selection test." into tm-qpr-dev am: 36e32b3884
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19921604

Change-Id: Idd95ac8d83f68f0b656fe244cf22a2530f677cf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 00:47:28 +00:00
TreeHugger Robot
36e32b3884 Merge "Enable a shortcut selection test." into tm-qpr-dev 2022-11-09 00:35:50 +00:00
Azhara Assanova
ef3688b947 Disallow dangerous zip entry names
Implement SafeZipPathValidatorCallback which throws ZipException if the
zip entry name contains ".." or starts with "/". The callback is then
set in RuntimeInit.

This feature will be enabled for apps with targetSDK >= U.

Bug: 252994429
Bug: 242716250
Test: atest FrameworksCoreTests:com.android.internal.os.SafeZipPathValidatorCallbackTest
Change-Id: Idef0f78a9da86d7606681a8fbc3f61b1be99adaf
2022-11-08 14:48:26 +00:00
Joanne Chung
cca384ebb2 Merge "Dump App exit reason if the remote service died." into tm-qpr-dev am: 055796e826
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20392455

Change-Id: I83fa75898fcd5894e4dcc8d659e5035b4afce60d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 11:15:12 +00:00
Vova Sharaienko
0aee6e1b11 Updated OWNERS file for expresslog APIs
Bug: 247803110
Test: n/a
Change-Id: I64d2565b82070ac3b87f68726e5809eeaebd88f8
2022-11-07 18:31:25 +00:00
Nicolo' Mazzucato
b649e5d34c Add CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS
Bug: 231130484
Bug: 228969045
Test: recorded prefetto trace while going to recents
Change-Id: I5819894196839af962010b66178e45abad516f0f
2022-11-07 16:52:40 +00:00
Joanne
908ee5ed9d Dump App exit reason if the remote service died.
We received many bugs the ContentCaptureService entered zombie
state but we don't know the reason why the process died. The issue
timing didn't be captured in bugreport.

Currently, the AbstractRemoteService will enter an odd state if the
service cannot be reconnected. This state does not allow the requests
be sent until the service be reconnected again on an unknown timing.
In some cases, it is expected the service will not be reconnected.
e.g. app stop from settings. We should fix the problem in the
AbstractRemoteService but before doing this, we try to add debugging
signal in bugreport to help us understand if the existing issues come
from this odd state for reasonable reasons.

The change was merged in master so skip automerge. The minor change
here will have a seperate change in master.

Bug: 248218072
Bug: 250859760
Test: disable app and dumpsys content_capture
Change-Id: Ia33462006a3925754001562b0d80540b9b0bc45d
Merged-in: Ia33462006a3925754001562b0d80540b9b0bc45d
(cherry picked from commit d060ed5697)
2022-11-07 12:40:48 +00:00
TreeHugger Robot
cd1b1623fa Merge "Ignore onPostListReady call if the activity has been destroyed" into tm-qpr-dev am: b67434ebea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20330377

Change-Id: Ib057fc1f7d5ffd8d8945a50453598f16ff2e7a98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 23:41:11 +00:00
TreeHugger Robot
b67434ebea Merge "Ignore onPostListReady call if the activity has been destroyed" into tm-qpr-dev 2022-11-03 23:20:05 +00:00
Vova Sharaienko
6e80081112 Merge "[TeX] Introduced Telemetry Express Logging APIs" am: 42bf7a986d am: 05c391241f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2272886

Change-Id: Ie1afd3d68f0768f77d15d4017ebf88a8534347c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 19:12:13 +00:00
Vova Sharaienko
05c391241f Merge "[TeX] Introduced Telemetry Express Logging APIs" am: 42bf7a986d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2272886

Change-Id: I69b291aabb3ddead72c043b9c080b0c7e252206e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 18:41:34 +00:00
Behnam Heydarshahi
97b43449c2 Merge "Add flag to separate notification audio and ui" into tm-qpr-dev am: dd4b1a0d7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20180063

Change-Id: I8d858b5deaaa340039edc1c3b87d20d34d915f47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 16:15:00 +00:00
Behnam Heydarshahi
dd4b1a0d7d Merge "Add flag to separate notification audio and ui" into tm-qpr-dev 2022-11-03 15:57:35 +00:00
TreeHugger Robot
7273e4b03b Merge "Inform Assistant visible activity when the stage of activity lifecycle is invoked." into tm-qpr-dev am: d35150f907
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20308987

Change-Id: I87b31354db0a112cb2481e1d1654d2e5ca1a7c95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 04:59:14 +00:00
TreeHugger Robot
d35150f907 Merge "Inform Assistant visible activity when the stage of activity lifecycle is invoked." into tm-qpr-dev 2022-11-03 04:11:11 +00:00
TreeHugger Robot
373b3e5a21 Merge "Combining widget broadcasts" into tm-qpr-dev am: e6e061e5d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20055672

Change-Id: Idaecc02a707948eb9ac1f00d3a704bb1810e2907
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 02:32:52 +00:00
Vova Sharaienko
ff1ed5d78d [TeX] Introduced Telemetry Express Logging APIs
- provided Java Counter metric logging API

Bug: 247803110
Test: m
Change-Id: Ib154f8fda2c136a62f4a90fb2b14b816233d3b47
2022-11-02 20:22:03 +00:00
Peter Li
eedc06b463 Inform Assistant visible activity when the stage of activity lifecycle is invoked.
By the original design, we register the activity event in the
ActivityManagerService. After getting the activity event, we will
query current visible activities and report them to Assistant.
Assistant will start to get direct actions of those visible
activities. But sometimes they can not get the direct actions
due to the stage of activity lifecycle before onStart().

We change the logic to make sure that the stage of visible
activity that we reported to the Assistant is after onStart().

Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Test: atest android.app.activity.ActivityThreadClientTest
Test: atest android.view.DisplayTest
Test: atest android.window.ConfigurationHelperTest
Test: atest android.window.SizeConfigurationBucketsTest
Change-Id: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
(cherry picked from commit 29bb3a3428)
Merged-In: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
2022-11-01 09:19:51 +00:00
Sihua Ma
1037ad0c30 Combining widget broadcasts
Combining broadcasts WIDGET_ENABLED and WIDGET_UPDATE into
WIDGET_ENABLE_AND_UPDATE to reduce response time at boot time

Test: Manually verified that some app widgets would function properly
Fix: 221890505
Change-Id: I6aff0f00464ec8628d2258d0d84dcd3c82258d57
(cherry picked from commit 1ae08fe75e)
Merged-In: I6aff0f00464ec8628d2258d0d84dcd3c82258d57
2022-10-31 20:47:38 +00:00
Andrey Epin
64714a02b2 Ignore onPostListReady call if the activity has been destroyed
ResolverActivity#onPostListReady is called asynchronously on the main
thread and it is possible for it to be executed after activity’s
onDestroy call.
A check for activity’s status is added to the method.

Test: atest FrameworksCoreTests:ChooserActivityTest
Fix: 254787909
Change-Id: I96d98a03d86881845868a67e33ea8ee7c9dc6631
2022-10-31 13:16:18 -07:00
Victor Hsieh
e8fe134280 Provide a method to verify a PKCS#7 signature am: 3363fd4da9 am: 8c8e63ea89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2274630

Change-Id: I46b786d9786f0a2c41e7e37096d3284ec76c1143
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-31 17:28:59 +00:00
Victor Hsieh
8c8e63ea89 Provide a method to verify a PKCS#7 signature am: 3363fd4da9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2274630

Change-Id: If8c8a52c610f44222b20ee297f8ab04f8c195f84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-31 16:55:14 +00:00
TreeHugger Robot
708134b584 Merge "Add API in AppWidgetServiceImpl" into tm-qpr-dev am: 9fa15007e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20056790

Change-Id: Ie31410fb55c69593a4432d8fc9db253c57dada4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-31 10:53:22 +00:00
Behnam Heydarshahi
b206e0b6a2 Add flag to separate notification audio and ui
AudioService and SeekBarVolumizer now read a flag instead of a config
boolean, when trying to determine if notification stream is separate
from ring.

Remove the now unused config & symbol for ring/notif stream alias

Bug: b/38477228

Test: atest AudioServiceTest#testRingNotifAlias

Change-Id: I1ee08c78984d3841711f88fcec360c936da00090
2022-10-28 21:26:41 +00:00
Treehugger Robot
281db21f41 Merge "Fix imprecise name of a fs-verity helper function" am: 2af62aa321 am: 8c3b93803d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2274628

Change-Id: Icc781004780d82a789c95374f3dabec06ee20303
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-27 22:04:36 +00:00
Treehugger Robot
8c3b93803d Merge "Fix imprecise name of a fs-verity helper function" am: 2af62aa321
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2274628

Change-Id: Ia9ba79c5d6bc8f9e65780166b5456afaf01f3c88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-27 21:33:48 +00:00
Victor Hsieh
3363fd4da9 Provide a method to verify a PKCS#7 signature
There is existing PKCS#7 signature used in the kernel for verifying
fs-verity digest. The purpose of this change is to pave the way to
migrate the existing signature check to userspace (and longer term,
migrate away from PKCS#7).

To mitigate the complexity of PKCS#7, only the configuration we're
currently using is supported.

Bug: 253668864
Test: atest FrameworksCoreTests:com.android.internal.security.VerityUtilsTest
Test: Manually added some code to use the API with correct and incorrect
      signatures. Saw the API behave expectedly.
Change-Id: I80bbbd88881303c0b9a261b1fe59e9682e43bcad
Merged-In: I80bbbd88881303c0b9a261b1fe59e9682e43bcad
2022-10-27 10:37:11 -07:00