Commit Graph

1811 Commits

Author SHA1 Message Date
Suprabh Shukla
05212eaec7 Merge "Redact key value from log when DEBUG is false" am: 17a7d79ff4 am: 694cf0f6af am: 23315f8003 am: fefc7f08be am: 0708411189
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458401

Change-Id: I1a937222e7f92e2db0ca183f14f08aa05d7e295b
2021-09-30 00:21:32 +00:00
Suprabh Shukla
0708411189 Merge "Redact key value from log when DEBUG is false" am: 17a7d79ff4 am: 694cf0f6af am: 23315f8003 am: fefc7f08be
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458401

Change-Id: I00953ab4617fb631f792694e43376c67f421e705
2021-09-30 00:13:12 +00:00
Suprabh Shukla
694cf0f6af Merge "Redact key value from log when DEBUG is false" am: 17a7d79ff4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458401

Change-Id: Iea902e93f038cd3a06d63cf6c6cdd149c873df79
2021-09-29 23:39:49 +00:00
Suprabh Shukla
17a7d79ff4 Merge "Redact key value from log when DEBUG is false" 2021-09-29 23:25:21 +00:00
Jordan Demeulenaere
2dae097d13 Merge changes from topics "dialog-launch", "launch-animator" into sc-v2-dev am: 3bf72bd3f9 am: 6bd5b1160a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15663086

Change-Id: Id15f2116c09f4f98ec3df25005362711ae66dc43
2021-09-29 12:26:42 +00:00
Jordan Demeulenaere
6bd5b1160a Merge changes from topics "dialog-launch", "launch-animator" into sc-v2-dev am: 3bf72bd3f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15663086

Change-Id: If7f060b1c162f27d9659a0f71448d9622cbe25f8
2021-09-29 12:09:45 +00:00
Edward Savage-Jones
46b4ba4201 Redact key value from log when DEBUG is false
See bug for details

Bug: 170653379
Test: see bug
Change-Id: I713fd8c03444167faf35a170b885c38af5482e31
2021-09-29 06:53:42 +00:00
Jordan Demeulenaere
c0a85b7c3b Split ActivityLaunchAnimator (1/2)
This CL splits ActivityLaunchAnimator by extracting common logic into
LaunchAnimator. The goal of this CL is to be able to reuse the
LaunchAnimator logic for dialog launches.

This CL also improves GhostedViewLaunchAnimator such that it also works
with:
 * launch containers that are not located at (0, 0).
 * ghosted views that move.

Test: atest ActivityLaunchAnimatorTest
Bug: 193634619
Change-Id: Ic05603600d4a7d4e27182c79bef54286087d00d0
2021-09-23 17:17:47 +02:00
Michael Groover
daadf0795e Add support for APK Signature Scheme V3.1
This commit adds support for the V3.1 APK signature scheme; this
scheme allows an APK to target T+ for rotation without needing to
configure multi-targeting APKs. This scheme can be used by apps that
are impacted by any of the known issues with rotation on pre-T
releases. The v3.1 signature scheme uses a new block ID that is not
recognized by previous platforms, so earlier releases will use the
original signer in the v3.0 block, and T+ devices will use the
rotated signer in the v3.1 block. This scheme also supports SDK
version targeting allowing rotation to target a later release.

Bug: 192301300
Test: atest PkgInstallSignatureVerificationTest
Change-Id: I0b3345f0fd688aaaa1ef9f57d362d0fd0cb0565b
2021-09-20 14:14:12 -07:00
Kweku Adams
6a97c5d9f5 Improve replaceAll.
The default implementation of Map.replaceAll() iterates through the
entrySet. Switch to a simple for loop iterating through the array
since the iterator is an inefficient way to access the array contents.

Benchmark results:

Before:

android.util.ArrayMapPerfTest#testReplaceAll_Large:
	replaceAll_Large_min (ns): 888977
	replaceAll_Large_median (ns): 904642
	replaceAll_Large_mean (ns): 914596
	replaceAll_Large_standardDeviation: 23960
android.util.ArrayMapPerfTest#testReplaceAll_Small:
	replaceAll_Small_min (ns): 177767
	replaceAll_Small_median (ns): 179955
	replaceAll_Small_mean (ns): 180331
	replaceAll_Small_standardDeviation: 2865

After:

android.util.ArrayMapPerfTest#testReplaceAll_Large:
	replaceAll_Large_min (ns): 557385
	replaceAll_Large_median (ns): 586495
	replaceAll_Large_mean (ns): 583712
	replaceAll_Large_standardDeviation: 20356
android.util.ArrayMapPerfTest#testReplaceAll_Small:
	replaceAll_Small_min (ns): 108051
	replaceAll_Small_median (ns): 110802
	replaceAll_Small_mean (ns): 109987
	replaceAll_Small_standardDeviation: 1334

Bug: 194098491
Test: atest CorePerfTests:ArrayMapPerfTest (see results above)
Test: atest CtsUtilTestCases:ArrayMapTest
Test: atest FrameworksCoreTests:ArrayMapTest
Change-Id: If87ae5f3aa4b184b95c16aed5f2fb6f31d11668a
2021-09-10 14:33:40 -07:00
Nataniel Borges
a61012f1d7 [DO NOT MERGE] Sync flicker from master to sc-v2 am: c8287a930f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15716594

Change-Id: I1c8ba8041d346d6991fd113b60e75184aa849ea6
2021-09-04 00:36:01 +00:00
TreeHugger Robot
6bd19fab1c Merge "[DO NOT MERGE] Sync flicker from master to sc-v2" into sc-v2-dev 2021-09-04 00:15:31 +00:00
Michael Groover
b7701dd484 Merge "Update APK sig scheme verification OWNERS" am: 1e5f1a293a am: 16fd109212 am: baa5efcd7b am: acae3b9578 am: 221154184b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1817421

Change-Id: I70cbc711153770dced8a47ae569ed8f9a0c2060b
2021-09-03 18:29:46 +00:00
Michael Groover
221154184b Merge "Update APK sig scheme verification OWNERS" am: 1e5f1a293a am: 16fd109212 am: baa5efcd7b am: acae3b9578
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1817421

Change-Id: Ia93adaf84f08f75e5b964e047d3ef9c1ab69dade
2021-09-03 18:13:31 +00:00
Michael Groover
16fd109212 Merge "Update APK sig scheme verification OWNERS" am: 1e5f1a293a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1817421

Change-Id: I763efc9f320e551ca61462699e5f7ac12f6219fc
2021-09-03 17:25:21 +00:00
Michael Groover
1e5f1a293a Merge "Update APK sig scheme verification OWNERS" 2021-09-03 17:07:40 +00:00
shawnlin
bae802cfd8 [DO NOT MERGE]Support rounded corner for multi-display devices am: 6603444a76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15581983

Change-Id: Iaf7cd7b6c357c8df9f7abe39d737fd71e705d557
2021-09-03 04:04:19 +00:00
Shawn Lin
8ddf5486f4 Merge "Support rounded corner for multi-display devices" 2021-09-03 03:57:37 +00:00
Michael Groover
9688bab011 Update APK sig scheme verification OWNERS
Bug: 198670656
Test: Builds
Change-Id: I2dd8de24baf29759a9000213650e4de49d2bb521
2021-09-02 13:20:14 -07:00
Nataniel Borges
c8287a930f [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
2021-09-01 12:06:21 +00:00
Jackal Guo
b5663f10f2 Merge "Move CtsContentTestCases to group presubmit-large" 2021-08-25 23:21:35 +00:00
Jackal Guo
ccc91c4fa9 Move CtsContentTestCases to group presubmit-large
The test config takes longer than 900 seconds to run. Move it to a
dedicated group for running slow presubmit Test Mapping test.

Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.

Bug: 174654670
Bug: 174495337
Test: treehugger
Change-Id: Id9769bbc625b42257af603d69098ae69c0fabb80
2021-08-25 16:47:25 +08:00
shawnlin
6ec70a4497 Support rounded corner for multi-display devices
- Add new array configs for every rounded corner configs.
- Update rounded corner drawable when a display changes in
  ScreenDecorations.

Bug: 131221697
Test: atest DisplayCutoutTest RoundedCornersTest LocalDisplayAdapterTest
      ScreenDecorationsTest
Change-Id: I1f32ff680609267010b05a39a5b8e84511bf1243
2021-08-25 15:59:09 +08:00
shawnlin
6603444a76 [DO NOT MERGE]Support rounded corner for multi-display devices
- Add new array configs for every rounded corner configs.
- Update rounded corner drawable when a display changes in
  ScreenDecorations.

Bug: 131221697
Test: atest DisplayCutoutTest RoundedCornersTest LocalDisplayAdapterTest
      ScreenDecorationsTest
Change-Id: I1f32ff680609267010b05a39a5b8e84511bf1243
2021-08-25 15:58:28 +08:00
Kweku Adams
6310c8b1ad Fix indexing issue.
Bug: 158300259
Test: Check TARE dumpsys
Change-Id: I241033cfd7718e4e546a8940686ea8ca82347bad
2021-08-23 09:50:11 -07:00
TreeHugger Robot
2f9639e0fd Merge "Add a feature flag to guard the large screen feature in Settings app." into sc-v2-dev am: ed8dd882dc am: 2a084036e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15595470

Change-Id: Id1ca3957b886a19fbf934c6c595cd63476f05069
2021-08-18 07:47:05 +00:00
TreeHugger Robot
2a084036e0 Merge "Add a feature flag to guard the large screen feature in Settings app." into sc-v2-dev am: ed8dd882dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15595470

Change-Id: Iba4a28b14e0dd02a0f823a03bfa419805b091cc1
2021-08-18 07:32:13 +00:00
Tsung-Mao Fang
1f6c1537d4 Add a feature flag to guard the large screen feature in Settings app.
Test: Rebuilt rom and see the flag in the developer page.
Fix: 196954032
Change-Id: I408dc22033331e10f62ca9563d091208059b5e1e
2021-08-17 22:43:10 +08:00
Kweku Adams
4049d0fd9c Improve forEach.
The default implementation of Collection.forEach() uses the
iterator(). Switch to a simple for loop iterating through the array
since the iterator is an inefficient way to access the array contents.

Benchmark results:

Before:

android.util.ArrayMapPerfTest#testForEach_Large:
	forEach_Large_min (ns): 599759
	forEach_Large_median (ns): 655845
	forEach_Large_mean (ns): 636927
	forEach_Large_standardDeviation: 34373
android.util.ArrayMapPerfTest#testForEach_Small:
	forEach_Small_min (ns): 118822
	forEach_Small_median (ns): 121422
	forEach_Small_mean (ns): 121695
	forEach_Small_standardDeviation: 2079

After:

android.util.ArrayMapPerfTest#testForEach_Large:
	forEach_Large_min (ns): 403562
	forEach_Large_median (ns): 441364
	forEach_Large_mean (ns): 442301
	forEach_Large_standardDeviation: 24917
android.util.ArrayMapPerfTest#testForEach_Small:
	forEach_Small_min (ns): 81889
	forEach_Small_median (ns): 87889
	forEach_Small_mean (ns): 86905
	forEach_Small_standardDeviation: 2880

Bug: 194098491
Test: atest CorePerfTests:ArrayMapPerfTest (see results above)
Test: atest CtsUtilTestCases:ArrayMapTest
Test: atest FrameworksCoreTests:ArrayMapTest
Change-Id: Id528fe24f1d17af01a2d639753d42e2ad21144d2
2021-08-11 08:36:48 -07:00
Jooyung Han
c65e303681 APK signature verification: use FileChannel#size
RandomAccessFile#length returns 0 for block devices while
FileChannel#size returns the correct size.

APK signature verification utils should work with block-device zip files
when Android is running as a guest OS and APK/APEX files are passed via
block devices.

This is a follow-up of 1257f1505c.

Bug: 193592496
Bug: 192366904
Test: FrameworksServicesTests
Merged-In: I3015fc30574c36c18c0d0c9ae7453d33a1349927
Change-Id: I3015fc30574c36c18c0d0c9ae7453d33a1349927
(cherry picked from commit 310edbe3c7)
2021-08-03 01:26:54 +09:00
Jooyung Han
ec78f1a834 APK signature verification: use FileChannel#size
RandomAccessFile#length returns 0 for block devices while
FileChannel#size returns the correct size.

APK signature verification utils should work with block-device zip files
when Android is running as a guest OS and APK/APEX files are passed via
block devices.

This is a follow-up of 1257f1505c.

Bug: 193592496
Bug: 192366904
Test: FrameworksServicesTests
Change-Id: I3015fc30574c36c18c0d0c9ae7453d33a1349927
(cherry picked from commit 310edbe3c7)
2021-07-31 07:57:30 +00:00
Jooyung Han
310edbe3c7 APK signature verification: use FileChannel#size
RandomAccessFile#length returns 0 for block devices while
FileChannel#size returns the correct size.

APK signature verification utils should work with block-device zip files
when Android is running as a guest OS and APK/APEX files are passed via
block devices.

This is a follow-up of 1257f1505c.

Bug: 193592496
Bug: 192366904
Test: FrameworksServicesTests
Change-Id: I3015fc30574c36c18c0d0c9ae7453d33a1349927
2021-07-30 16:43:33 +09:00
Jackal Guo
1ce663dd30 Merge "Refactor PackageParser (12/n)" 2021-07-22 01:47:08 +00:00
Kweku Adams
5f49564deb Merge "Improve forEach." 2021-07-21 18:36:16 +00:00
Jooyung Han
3e705d0f26 Merge "ZipUtils: use FileChannel#size" am: d0798d7117 am: f92201554a am: 0c60cbf8c0 am: 1cbe6e0d72
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1765685

Change-Id: Ifb16c4b8f6cffeca9c7fc6f1a906137a7c65572d
2021-07-21 00:46:12 +00:00
Jooyung Han
0c60cbf8c0 Merge "ZipUtils: use FileChannel#size" am: d0798d7117 am: f92201554a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1765685

Change-Id: I07df9fab5a971cc8cc5a4029a5935845efce27b0
2021-07-21 00:22:34 +00:00
Kweku Adams
14bbb8a744 Improve forEach.
The default implementation of Collection.forEach() uses the
iterator(). Switch to straight iterating through the array since the
iterator is an inefficient way to access the array contents.

Benchmark results:

Before:

android.util.ArraySetPerfTest#testForEach_Large:
	forEach_Large_median (ns): 398480
	forEach_Large_min (ns): 395758
	forEach_Large_mean (ns): 400957
	forEach_Large_standardDeviation: 5457
android.util.ArraySetPerfTest#testForEach_Small:
	forEach_Small_min (ns): 82768
	forEach_Small_median (ns): 83884
	forEach_Small_standardDeviation: 896
	forEach_Small_mean (ns): 83724

After:

android.util.ArraySetPerfTest#testForEach_Large:
	forEach_Large_median (ns): 319481
	forEach_Large_min (ns): 316166
	forEach_Large_mean (ns): 339865
	forEach_Large_standardDeviation: 44201
android.util.ArraySetPerfTest#testForEach_Small:
	forEach_Small_min (ns): 58736
	forEach_Small_median (ns): 60648
	forEach_Small_standardDeviation: 1375
	forEach_Small_mean (ns): 60622

Bug: 194098491
Test: atest CorePerfTests:ArraySetPerfTest (see results above)
Test: atest CtsUtilTestCases:ArraySetTest
Test: atest FrameworksCoreTests:ArraySetTest
Change-Id: Ib14b96f095203e1f5811132f2a21be0452645f7e
2021-07-19 13:10:23 -07:00
Jackal Guo
2821e5d46f Refactor PackageParser (12/n)
Replace PackageParser.PackageParserException by either using the
PraseResult or throwing a more generic Exception in order to move
away from PackageParser.

Bug: 174723245
Test: m docs
Test: atest -p core/java/android/content/pm \
        core/java/android/util/apk \
        services/core/java/com/android/server/pm \
	services/core/java/com/android/server/integrity
Change-Id: I7ba3e693e636caa869641141ed83383326c67809
2021-07-16 13:49:16 +08:00
Jooyung Han
1257f1505c ZipUtils: use FileChannel#size
RandomAccessFile#length returns 0 for block devices while
FileChannel#size returns the correct size. ZipUtils should work with
block-device zip files when Android is running as a guest OS and
APK/APEX files are passed via block devices.

Bug: 193592496
Bug: 192366904
Test: FrameworksServicesTests
Change-Id: I6472e2a9051b92a5a778b4990b8e681492985d1a
2021-07-14 13:58:55 +09:00
Alex Buynytskyy
1a7c729164 Key rotation support when updating an app on IncFS.
Cherry-pick with conflicts resolved.

Bug: 190569284
Fixes: 190569284
Test: have two apks with .idsig; adb install <original apk>; adb install <apk with rotated keys>
Change-Id: I6ff854786aea31c6e9f3f1e33be0a33b4ba67ccb
Merged-In: I6ff854786aea31c6e9f3f1e33be0a33b4ba67ccb
2021-07-13 18:04:43 +00:00
Alex Buynytskyy
7a1de6fe81 Key rotation support when updating an app on IncFS.
Bug: 190569284
Fixes: 190569284
Test: have two apks with .idsig; adb install <original apk>; adb install <apk with rotated keys>
Change-Id: I6ff854786aea31c6e9f3f1e33be0a33b4ba67ccb
Merged-In: I6ff854786aea31c6e9f3f1e33be0a33b4ba67ccb
2021-07-13 17:04:35 +00:00
Yohei Yukawa
3beeb3e3c7 Merge android.util.imetracing into com.android.internal.inputmethod
This CL renames classes related to IME tracing as follows

 * android.util.imetracing.ImeTracing
     => com.android.internal.inputmethod.ImeTracing
 * android.util.imetracing.ImeTracingClientImpl
     => com.android.internal.inputmethod.ImeTracingClientImpl
 * android.util.imetracing.InputConnectionHelper
     => com.android.internal.inputmethod.InputConnectionProtoDumper

Other than those renamings, there should be no observable chagnes.

Fix: 175761228
Test: presubmit
Test: Manually verified that IME tracing still works
Change-Id: I6518d946e1832037f240f57aa900d3447083f1fa
2021-07-09 09:46:36 -07:00
Yohei Yukawa
9dde701446 Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:06:07 +00:00
Yohei Yukawa
662b48b72d Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:05:45 +00:00
Kweku Adams
88d0054ea5 Track ongoing events and record them to the Ledger.
Bug: 158300259
Test: Android builds
Change-Id: I9fd4c17d526618ac284ac2336da9bd2e28ccc820
2021-06-29 12:06:55 -07:00
Yanting Yang
001dfa2c40 Merge "Deprecate silky flag for official release" into sc-dev am: f995ce3c52 am: 041c55b51a am: bea1fa96d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14791881

Change-Id: I83f0ac56fdc25d643b84a13820b2cb2d518cc0dc
2021-06-03 04:33:11 +00:00
Yanting Yang
1213001059 Deprecate silky flag for official release
Bug: 183670633
Test: robotests
Change-Id: Ib2e7c6aa31d2428528af9e4a46c4dee5701a6729
2021-06-02 21:10:26 +08:00
Jan Tomljanovic
c18dc78409 Merge "Set SecurityHub to be enabled by default." into sc-dev am: 1008299eeb am: b6d7889e0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14589970

Change-Id: I53fb2598a25c578617c3fb1de17571d8cada0dfb
2021-05-20 00:00:19 +00:00
Jan Tomljanovic
88a1c55848 Set SecurityHub to be enabled by default.
Test: manual test (FeatureFlagUtils#isEnabled returns true)
Bug: 182552455
Change-Id: I318f210fbe11457e6c9ff9297a2024d249eb4442
2021-05-17 14:05:42 +01:00
vichang
8ab2a20952 Merge "Copy StringPool to framework" am: ffe7986d71 am: 91a9308a30 am: f4b981eb46 am: 3a424f08d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684883

Change-Id: Ie8bdb2482daddfd725a4a5d40b0b6d7818f7ce8e
2021-05-06 12:32:58 +00:00