Commit Graph

18766 Commits

Author SHA1 Message Date
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
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
Victor Hsieh
c49d0bfa1a Fix imprecise name of a fs-verity helper function
Root hash is only part of the fs-verity digest covers. Rename to avoid
confusion.

Bug: N/A
Test: m
Change-Id: I12c2a4ac57fb8772483473f951e97474ebd894c9
Merged-In: I12c2a4ac57fb8772483473f951e97474ebd894c9
2022-10-27 10:37:05 -07:00
LiZhihong
95c1165bb8 Add global microphone mute key for keyboard
This change will enable the "mic mute" key on keyboards to globally mute
the microphone using the SensorManager, which has UI implemented in
multiple places (quick shortcuts, privacy center, settings...).

Test: manual
Bug: 237355207
Signed-off-by: LiZhihong <lizh52@lenovo.corp-partner.google.com>
Signed-off-by: DingYong <dingyong2@lenovo.corp-partner.google.com>
Change-Id: I492e501503b0ab9f56e1fa84fcc77a8c798bcb83
2022-10-20 14:59:19 +00:00
Nicolas Geoffray
6cbc807a6f Merge "Cleanup and consistency around system server profiling." 2022-10-19 06:39:04 +00:00
Nicolas Geoffray
1c2e7ed14c Cleanup and consistency around system server profiling.
The profiling currently works by accident: only because we profile the
boot classpath which executes in JIT zygote do we not load system server
AOT artifacts.

So make the not loading AOT artifacts in system server explicit when the
system server is being profild.

Test: system server profiling
Change-Id: I8d787c8f8524d9d6074dc0f552a856640f11cef0
2022-10-18 12:38:33 +00:00
Ruslan Tkhakokhov
bcc956623e Add B&R OWNERS to internal/backup
Bug: 254231632
Change-Id: If8e0d5c2ef7bed5e6acd05a0301b2d7f373412c3
Test: n/a
2022-10-18 12:36:58 +00:00
Islam Elbanna
1ed9d64bcd Allow profiling for standalone system server jars.
Currently we profile only main system server classpath, this is to allow
profiling for the standalone system server jars.

Bug: 241823638
Test: System server profiling: verified the profile snapshot of the boot image profile, and it showed the new jars profiling data.
Change-Id: I5b10373fb22ddfecdb95b6a4611f4af97bb5666d
2022-10-17 17:09:45 +00:00
Philip Junker
01f38dc5bc Initialize ContentObserver in startObserving().
This removes a race condition where ContentObserver is initialized
while mHandler is null which causes the ContentObserver#onChange() callback to run on a different thread and can cause an NPE.

Bug: 246843362
Test: manual
Test: atest BrightnessSynchronizerTest
Merged-In: Ib8e192c3961390ece721fa473d5c09323c30bafe
Change-Id: Ia7443efb9e8020d46b251c7f7100adbf58072345
2022-10-10 09:00:24 +00:00
Xin Li
4b1dc6dbf6 Merge TP1A.221005.003
Merged-In: I6ffbb7510e6854f18bc427d1ae1e782918c799dc
Change-Id: I32d05cdabc6579f00bb4af0657b38539ec81a588
2022-10-03 13:38:22 -07:00
Daniel Norman
b6dc971384 Adds more OWNERS to a11y FW dirs.
Bug: n/a
Test: n/a
Change-Id: I1331e89caf4942d2118e644ed3f9710daa66be95
2022-09-28 09:15:49 -07:00
Mythri Alle
f3683fca37 Merge "Reland "Don't enable jdwp by default on userdebug builds""" 2022-09-21 07:49:34 +00:00
Orion Hodson
773627cfd3 Merge "Prefer valueOf() to boxed primitive constructors" 2022-09-20 07:40:59 +00:00
Mythri Alle
0fc653c307 Reland "Don't enable jdwp by default on userdebug builds""
This reverts commit 50c258ca37.

Reason for revert: Relanding after fixes for the failures Fixes:
1. Mark the com.android.perftests.core as profileable from shell so
that we would be able to read /proc/self/io
2. Fix a JDWP test to expect the new behaviour on userdebug builds.
We can no longer attach debugger on profileable apps on userdebug builds

Bug: 240410400, 246616689
Test: System boots
Change-Id: I6fff6f1a683893244bc2d40f930044747befb2ce
2022-09-15 14:33:36 +00:00
Mythri Alle
50c258ca37 Revert "Don't enable jdwp by default on userdebug builds"
This reverts commit 1b989de3d7.

Reason for revert: Test failures:
https://b.corp.google.com/issues/246707198
https://buganizer.corp.google.com/issues/246616689

Change-Id: Ibeb5a92bcfe129df01f94bec2a41fea57303e53e
2022-09-14 09:57:03 +00:00
Orion Hodson
ebe28b0254 Prefer valueOf() to boxed primitive constructors
Constructors for boxed primitives (Byte, Short, Integer, etc) have
long been deprecated. The preferred pattern is to use valueOf(). d8
fails to convert these instances in TypedProperties, most likely due
to the method complexity.

Bug: N/A
Test: Treehugger
Change-Id: Ib58ecc853e2bd1e5d53e9ec256ef0467aa051d9f
2022-09-14 09:53:07 +01:00
Mythri Alle
1b989de3d7 Don't enable jdwp by default on userdebug builds
We would like to have userdebug builds as close to user builds as
possible so don't enable jdwp by default on userdebug builds. This
means that we won't be able to attach a debugger to non-debuggable
builds in userdebug builds by default. However, this support can
be enabled by setting persist.debuggable.dalvik.vm.jdwp.enabled
property. Eng builds still enable jdwp by default.

Bug: 240410400
Test: System boots
Change-Id: Iad52254be9b9bc8c9deac8b3ad46e9db1b610160
2022-09-13 09:11:21 +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
Jernej Virag
1b9dc28da9 Prevent loading of Icon resources from the wrong package
If an Icon carries package designator, LocalImageResolver has now
ignored it. This could lead to loading of a wrong icon in cases where
the ID collided with the same ID in android package.

This is fixes that corner-case.

Bug: 241066484
Test: atest LocalImageResolverTest - the new test checks for pkg
      correctness and fails on devices without this cl

      manual test: bluejay device with known, reproducible resource
      collision in media player notification. In reproducible case,
      icon appears as a broken block.

      After applying this patch, small icon in media notification loads
      correctly for the collision case.

Change-Id: Ic79c0d4acb1d347a24282972e009a5a079ce6c21
(cherry picked from commit 32f176e470)
Merged-In: Ic79c0d4acb1d347a24282972e009a5a079ce6c21
2022-08-19 18:43:34 +00:00
Treehugger Robot
115e87852f Merge "Adds OWNERS for ScreenshotHelper" am: 3614185d38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2168665

Change-Id: I57e4f422318fc35b31fe6ec2cc7ec06d01eda317
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 19:39:19 +00:00
Mark Renouf
27df215eba Adds OWNERS for ScreenshotHelper
This code is managed as part of SystemUI screenshots.

Change-Id: I624a52754cffcca66798d2813d25d8896597a39a
2022-07-29 14:20:16 -04:00
Jeff Sharkey
954431c4df Merge changes from topic "jul15" am: 0e27faa039
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2155659

Change-Id: Ie949e0bb40967581190f7b98bb5005bab19cb7fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 19:12:28 +00:00
Jeff Sharkey
c6b3699b63 Offer explicit 3-byte vs 4-byte modified UTF-8.
As documented in art/runtime/jni/jni_internal.cc, ART has deviated
from the RI by using a 4-byte encoding instead of the 3-byte encoding
required by the JNI specification.

Some users are okay with this 4-byte encoding (where they control
both the reading and writing logic) but other users require
compatibility with the DataOutput/DataInput API contract, so this
change lets users request either behavior.

This change now exercises all tests in both 4-byte and 3-byte modes,
and exhaustively confirms that all valid code-points match the
DataOutput/DataInput contract when in 3-byte mode.

Benchmark results still show significant performance benefits when
using this 3-byte encoding over the upstream RI:

    timeRead_Upstream_mean (ns):                  5090068
    timeRead_LocalUsing3ByteSequences_mean (ns):  1996032
    timeRead_LocalUsing4ByteSequences_mean (ns):  1813250

    timeWrite_Upstream_mean (ns):                 3856276
    timeWrite_LocalUsing3ByteSequences_mean (ns): 1632697
    timeWrite_LocalUsing4ByteSequences_mean (ns):  886503

Bug: 236923096
Test: atest FrameworksCoreTests:CharsetUtilsTest
Test: atest FrameworksCoreTests:FastDataTest
Test: atest FrameworksCoreTests:XmlTest
Test: atest FrameworksCoreTests:BinaryXmlTest
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:FastDataPerfTest
Change-Id: Ibddd36410a0d4a909522de011f23a337b53d6889
2022-07-19 10:36:37 -06:00
Alex Buynytskyy
2be5b4c118 Cache least recently used output buffer.
- reduce memory allocations especially when Xml is serialized inside a
tight inner loop,
- performance slightly improved.

BEFORE:
100 packages:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.516s)
	timeWrite_Binary_mean: 674979
	threadAllocCount_mean: 59
	timeWrite_Binary_min: 671194
	timeWrite_Binary_median: 674798
	timeWrite_Binary_standardDeviation: 3658
	threadAllocSize_mean: 530176
10 packages:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.542s)
	timeWrite_Binary_mean: 71113
	threadAllocCount_mean: 56
	timeWrite_Binary_min: 70201
	timeWrite_Binary_median: 71237
	timeWrite_Binary_standardDeviation: 692
	threadAllocSize_mean: 59136
1 package:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.091s)
	timeWrite_Binary_mean: 15698
	threadAllocCount_mean: 56
	timeWrite_Binary_min: 15072
	timeWrite_Binary_median: 15677
	timeWrite_Binary_standardDeviation: 410
	threadAllocSize_mean: 6439

AFTER:
100 packages:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.221s)
	timeWrite_Binary_mean: 605862
	threadAllocCount_mean: 53
	timeWrite_Binary_min: 602353
	timeWrite_Binary_median: 604424
	timeWrite_Binary_standardDeviation: 4972
	threadAllocSize_mean: 492748
10 packages:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.575s)
	timeWrite_Binary_mean: 58710
	threadAllocCount_mean: 50
	timeWrite_Binary_min: 57551
	timeWrite_Binary_median: 57798
	timeWrite_Binary_standardDeviation: 2129
	threadAllocSize_mean: 21696
1 package:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.151s)
	timeWrite_Binary_mean: 11576
	threadAllocCount_mean: 50
	timeWrite_Binary_min: 11315
	timeWrite_Binary_median: 11381
	timeWrite_Binary_standardDeviation: 431
	threadAllocSize_mean: 4336

Test: atest FastDataPerfTest XmlPerfTest
Bug: 195994150
Fixes: 195994150

Merged-In: Ieedd27a676d718967c2fac30bc48a68ae636a180
Change-Id: Ieedd27a676d718967c2fac30bc48a68ae636a180
2022-07-15 16:07:19 -06:00
Treehugger Robot
4a0a36425a Merge "BatteryStatsImpl: Add parcel methods for DisplayBatteryStats." 2022-06-22 19:39:59 +00:00
TreeHugger Robot
5434f98a11 Merge "BatteryStatsImpl: Add parcel methods for DisplayBatteryStats." into tm-dev-plus-aosp 2022-06-22 00:12:27 +00:00
Chris Wailes
ca5df431c5 Merge "Add System Properties based settings for USAPs" am: a2143c07bb am: 6cb0a4dd92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2043395

Change-Id: I98e8a58abbbc5ac8ba5b8caad4dcb365495209c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-21 23:08:53 +00:00
Shumao Hou
e57b8c1749 BatteryStatsImpl: Add parcel methods for DisplayBatteryStats.
DisplayBatteryStats didn't have parcel methods and the estimated
multidisplay screen power was always initialized from 0.
The estimated screen power of the app will become inaccurate
after rebooting.

Bug: 235321975
Test: manual test.
1. Unplug the device.
2. Use an app for a while and keep screen on.
3. Capture the first bug report.
4. Reboot the device.
5. Capture the second bug report.
The estimated screen power of the app shouldn't become lower after rebooting the device.

Author: Shumao Hou <shumao1129@gmail.com>
Change-Id: If74e285102a7350c17c2fc40a205b2031e82f5f4
(cherry picked from commit 79c3779bb1)
2022-06-21 20:57:40 +00:00
Vadim Caen
b38e19fdc3 Merge "Prevent callback registration when back flag is disabled" into tm-dev am: 1c6de844ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18794217

Change-Id: I8054556537104bb80d940272b367ed9b8ffa520c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 21:02:34 +00:00
Vadim Caen
a2e45f1ed1 Prevent callback registration when back flag is disabled
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.

Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible

Bug: 235206960

Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
Merged-In: I54d843f11130a78ed5a68cbe4722e601a2086ee1
(cherry picked from commit aa48dc3c2d)
2022-06-20 11:40:18 +02:00
Chris Wailes
e05e1ffffe Add System Properties based settings for USAPs
This CL updates the configuration handling for USAP system properties.

Test: Build; flash; set property; check device state
Bug: 161725679
Change-Id: Ia1f6c4f4f7b8798d9c906953629bed61ce618f54
2022-06-17 10:49:17 -07:00
Xin Li
195b02b570 Merge "Merge Android 12 QPR 3" 2022-06-16 18:51:54 +00:00
Hui Yu
b8f5fadbf7 Merge "Fix the missing history event problem." into tm-dev am: 25019b3782
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18582121

Change-Id: If5c508f866cec2c22cb534ae20da06dade629438
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 18:05:34 +00:00
Hui Yu
25019b3782 Merge "Fix the missing history event problem." into tm-dev 2022-06-16 18:03:26 +00:00
Shumao Hou
eecb54dfeb BatteryStatsImpl: Add parcel methods for DisplayBatteryStats.
DisplayBatteryStats didn't have parcel methods and the estimated
multidisplay screen power was always initialized from 0.
The estimated screen power of the app will become inaccurate
after rebooting.

Bug: 235321975
Test: manual test.
1. Unplug the device.
2. Use an app for a while and keep screen on.
3. Capture the first bug report.
4. Reboot the device.
5. Capture the second bug report.
The estimated screen power of the app shouldn't become lower after rebooting the device.

Change-Id: I5d6ad56aa7e1dcd07994b1e1832c19c94e316b72
Merged-In: If74e285102a7350c17c2fc40a205b2031e82f5f4
2022-06-16 17:45:53 +00:00
huiyu
ae5e234cec Fix the missing history event problem.
[ag/8009931 is to fix the missing event problem and it get reverted in ag/15961577.
Now revert the change that causes the problem.]

Make a copy of mHistoryCur and add the copy to history buffer after
starting a new history file.

Bug: 230799882
Test: ag/8009931 reproduce steps.
Change-Id: If9339ed5182b65b9c59c119894e4f317b2e5751c
2022-06-15 12:55:09 -07:00
Treehugger Robot
4ecafadd7b Merge "statemachine migration from base to modules-utils" am: 51e6e8a0e1 am: 8cc1782ba5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893671

Change-Id: I5ba9d65a7223fbf9d1f371e672491f09b05c1940
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 01:25:27 +00:00
Treehugger Robot
8cc1782ba5 Merge "statemachine migration from base to modules-utils" am: 51e6e8a0e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1893671

Change-Id: Ica83696aafc34e98de5a8a90838bb4b6a92ac58c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 00:59:17 +00:00
Treehugger Robot
f510d4e024 Merge "Add runtime crash information to sysprops" am: 68f657619c am: 0a3e8a46af
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2107991

Change-Id: Ib5c224cd8192d883977d001a56194f8f8584e9ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 00:40:26 +00:00
Treehugger Robot
51e6e8a0e1 Merge "statemachine migration from base to modules-utils" 2022-06-14 23:52:11 +00:00
Treehugger Robot
0a3e8a46af Merge "Add runtime crash information to sysprops" am: 68f657619c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2107991

Change-Id: Ia6e09648c74410ce5d14dd6b2032e59466034cb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 22:58:00 +00:00
Treehugger Robot
68f657619c Merge "Add runtime crash information to sysprops" 2022-06-14 22:28:58 +00:00
Matt Casey
5f3b7d655f Merge "Finish mini-resolver after user action." into tm-dev am: 831370bffb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18838611

Change-Id: I51f844182e43db1ebe3c50a543ea04f499943fed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 16:03:03 +00:00
Matt Casey
831370bffb Merge "Finish mini-resolver after user action." into tm-dev 2022-06-13 15:46:13 +00:00
Yurii Zubrytskyi
4226e4b4e4 Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev am: 120aa88d0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18764290

Change-Id: Ic040b07c1559829833a4998f5001b8f34267c9a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:19:12 +00:00
Yurii Zubrytskyi
120aa88d0d Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev
* changes:
  Catch parsing errors for pre-release platforms
  Revert "HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE"
2022-06-11 05:42:37 +00:00
Matt Casey
5b015f84af Finish mini-resolver after user action.
Bug: 235440512
Test: Trigger mini resolver, press each button and press back and verify
      the resolver is gone.
Change-Id: Ib22f7f38b4c5f7143b5898dbc3c74e3c7a0450f3
2022-06-10 18:06:18 +00:00
Daniel Sandler
a95ab05e3a Merge "Android 1<3." into tm-dev am: 0f8269e68e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18819106

Change-Id: Id245d8b53ae63dc7e47f1812528513e42b390312
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 01:43:24 +00:00
Daniel Sandler
0f8269e68e Merge "Android 1<3." into tm-dev 2022-06-10 01:19:44 +00:00
Dan Sandler
2c57c9c164 Android 1<3.
Fixes: 216297617
Test: adb shell am start -n android/com.android.internal.app.PlatLogoActivity
      adjust clock to 13:00
      for a bonus, long press on the bubbles
Change-Id: I3d32d452c6dd7a7e69aad86a033aba09ae8625d5
2022-06-09 12:54:27 -04:00