Commit Graph

11998 Commits

Author SHA1 Message Date
Songchun Fan
9d198ade93 Merge "[pm] fix getPackageArchiveInfo" into tm-qpr-dev 2022-09-13 16:43:45 +00:00
Songchun Fan
0079f9bcb4 [pm] fix getPackageArchiveInfo
BUG: 243479679
Test: atest android.content.pm.cts.PackageManagerTest#testGetPackageArchiveInfo
Change-Id: I3a353c9b0f05117b233888d74a42f1ed3cf26eb8
(cherry picked from commit 9407d10cd0)
Merged-In: I3a353c9b0f05117b233888d74a42f1ed3cf26eb8
2022-09-13 16:43:25 +00:00
TreeHugger Robot
1d9daf50c3 Merge "Added check for user info is not null" into tm-qpr-dev 2022-09-07 04:23:04 +00:00
Mayank Garg
0ad4f80cbb Added check for user info is not null
user's actual state might have changed by the time the broadcast is
received, so added a null check.

Bug: 237413499
Test: atest HandlerThreadingDomainTest LocationTimeZoneProviderControllerTest LocationTimeZoneProviderTest ZoneInfoDbTimeZoneProviderEventPreProcessorTest

Change-Id: I79087a3e83a51b81568bdb6ff5540ee78b51b91a
Merged-In: Ieacbb35e522b35353c96de1f162a8a71388b4b04
(cherry pick from commit 799c6528f5)
2022-09-07 03:59:14 +00:00
Vali Calinescu
0c66bf2399 Adjust aspect ratio override portrait fullscreen
We're defining a new compat framework change id that restricts
the other aspect ratio overrides for devices in portrait fullscreen.

Fix: 218959984
Test: As manual testing use 'adb shell am compat disable/enable OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'.
Change-Id: I84eaab4df045c93fb2c159a789852094caf9121a
Merged-In: I84eaab4df045c93fb2c159a789852094caf9121a
2022-08-31 11:20:50 +00:00
Massimo Carli
4f1e391a83 Per-app config for split screen aspect ratio
We're defining a new compat framework change id that indicates whether a
given app should use the split screen aspect ratio.

Test: As manual testing use 'adb shell am compat disable/enable 208648326 <package-name>'. For the unit tests run 'atest WmTests:SizeCompatTests'.

Fixes: 208648326

Change-Id: I0232d6d98b10e546b840c08ffbf6e7be9c465965
Merged-In: I0232d6d98b10e546b840c08ffbf6e7be9c465965
2022-08-03 15:51:32 +00:00
TreeHugger Robot
4d334f4534 Merge "Fix the bug where the added field into the toString implementation does not have a corresponding %s formatting." into tm-qpr-dev 2022-08-03 02:16:08 +00:00
Ömer Yaveroğlu
1d502c375b Fix the bug where the added field into the toString implementation does
not have a corresponding %s formatting.

Bug: 239134974
Test: atest frameworks/base/core/tests/coretests/src/android/content/integrity
Test: atest services/tests/servicestests/src/com/android/server/integrity
Change-Id: Ib9c3ecadfc5a823cd4fcd44237b25900f86b4e5c
Merged-In: Ib9c3ecadfc5a823cd4fcd44237b25900f86b4e5c
2022-07-27 09:26:46 +00:00
Tiger Huang
c77eaf873d Send size-compat scale to the client
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.

Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.

This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.

This is also a step to enable the client to perform local window layout.

Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
      ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
2022-07-27 14:10:10 +08:00
Alex Buynytskyy
da1a68e6f6 Use the same application info instance.
Bug: 238461609
Fixes: 238461609
Test: Follow the repro steps in the bug.
Change-Id: I0432ad981d8bd15d10874bc07bb89dfa0574eba5
2022-07-20 18:16:57 +00:00
Achim Thesmann
c761b5c52b Merge "Add attribution tag to clipboard." into tm-qpr-dev 2022-07-07 17:16:35 +00:00
TreeHugger Robot
3cb72a002c Merge "Correctly parse minSdk even when targetSdk is a codename" into tm-dev am: 2fb8b2d84c am: 657e9583c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19087061

Change-Id: Ib4e80eb6214222a66e4a513df6376a64ec541d56
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:30:06 +00:00
Winson Chiu
bcf5b69c41 Correctly parse minSdk even when targetSdk is a codename
The code that assigned target to min if min was not specified was
only checking for min codenames, but if the manifest specified a
numerical minSdkVersion, that is valid and would incorrectly prevent
the package from installing.

Bug: 237059024

Test: mts-tradefed > mts-eng-only -m ApkInApexTest

Change-Id: I3a2b9baa82ebb8ca9031c9fa128ce12bff17226e
2022-06-27 18:29:39 +00:00
Achim Thesmann
0e3e509b3b Add attribution tag to clipboard.
Bug: 235542330
Test: ClipboardManagerTest ClipboardAutoClearTest ClipboardManagerTest ClipboardManagerListenerTest ClipboardAccessTest ClipboardAccessTest
Test: manually tested copy-paste
Change-Id: I122a48a299f890ac565afb1042615edfa263b1c7
2022-06-24 15:57:17 +00:00
Tiger Huang
157514510f Send the attached frame to the client
The attached frame is the frame of the parent window that its child
attaches to, as long as the child is not
TYPE_APPLICATION_ATTACHED_DIALOG. It is a factor while computing the
window frame.

Previously, we let the child obtain the attached frame from its parent
view root. However, if the parent and the child are not in the same
process, it can be tricky.

This CL sends the attached frame from the server to the client via
ClientWindowFrames. In this way, the child can compute its window frame
without having to accessing the parent view root.

Bug: 161810301
Bug: 175861127
Test: atest ActivityRecordTests WindowLayoutTests
Change-Id: Ia844a4c927027e305a56114216eaee2bf7933b1f
2022-06-20 21:09:40 +08:00
Yurii Zubrytskyi
4c2b5c8470 Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev am: 120aa88d0d am: 801d350fff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18764290

Change-Id: Ia19898c436e9b168efebc363ec19e9d3f10084a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:38:11 +00:00
Yurii Zubrytskyi
f067137656 Revert "HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE" am: 6f5250836d am: e189e7abbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18561182

Change-Id: I410ce3b7d69bc05fdd4d0e470490c1953a919594
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:37:27 +00:00
Yurii Zubrytskyi
bb146e1b71 Catch parsing errors for pre-release platforms
In cases when a parsed APK is built with a pre-release platform
(e.g. Tiramisu for 33) our generic parsing code may not fail, as
it is called for user packages as well, and a single bad package
may disable the whole device.

Bug: 233398506
Test: presubmits

Change-Id: I7f93176efceac94b0768d0e4d5be1c28ccce23e3
2022-06-06 15:00:44 -07:00
Yurii Zubrytskyi
6f5250836d Revert "HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE"
This reverts commit 47a70c8253.

Reason for revert: time to get rid of the hack

Change-Id: I64b0cd74a124f68d8b72fcc6686634cc43989603
Bug: 233398506
Test: presubmits
2022-06-06 15:00:34 -07:00
Jon Eckenrode
45ad92756e Merge "Revised the API documentation for screenWidthDp and screenHeightDp to include information about window insets and embedded activities." into tm-dev am: f7ed36ba88 am: 6174850f23
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18557780

Change-Id: I4874fbe2e7abe3be55db85140bf49d56dd30a87b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 08:01:44 +00:00
Jon Eckenrode
f7ed36ba88 Merge "Revised the API documentation for screenWidthDp and screenHeightDp to include information about window insets and embedded activities." into tm-dev 2022-06-04 07:23:40 +00:00
joneckenrode
136e08f619 Revised the API documentation for screenWidthDp and screenHeightDp to include information about window insets and embedded activities.
Bug: 170805355
Bug: 232947647
Test: Built API documentation
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: I72f1e6a9b724ce2559aacc0162f2107799c0252f
2022-06-03 23:32:32 +00:00
Charles Chen
6671340ddf Merge "Improve logging of embed failure" into tm-qpr-dev 2022-06-01 15:46:42 +00:00
Charles Chen
822ca6ec47 Improve logging of embed failure
There's a lot of issue about embed failure from 1P apps.
Usually, it's because the Activity is going to launch on a new Task,
which is not allowed to embed.
This Cl tries to improve the logging to make 1P developers know how
to fix the embed failure.

fixes: 234414942
Test: presubmit
Change-Id: Id0ea961997afdec2b4f7d49c56f76e9ffc2f0360
2022-05-31 16:55:09 +08:00
TreeHugger Robot
3cf3f98002 Merge "Fix INTERACT_ACROSS_USERS change version" into tm-dev am: 970cdf91ec am: 84f256e3a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18634281

Change-Id: Ie888db1c760b06c47cbdad1dc50847a9cb3457e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 22:52:05 +00:00
Adam Bookatz
be3eb54663 Fix INTERACT_ACROSS_USERS change version
Commit I47d6f86fd159aa993971366ee9d7d334644d391e changed how bindServiceAsUser behaves  with INTERACT_ACROSS_USERS. This was a change in T, but the documentation accidentally referred to S. So we fix that.

Bug: 209989958
Change-Id: Ib8f614bfa4ae1b4333c56dec3e6cae731e4137ee
Test: N/A
2022-05-27 18:01:48 +00:00
Kweku Adams
245aa2cdbf Merge "Note BATTERY_LEVEL_CHANGED semantics." into tm-dev am: ce680c7636 am: 923e6c3e87
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18458392

Change-Id: Ic9c35a20394e677dc82d40a24b5043a450d11f2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 22:47:47 +00:00
Michael Groover
8bb6ff1806 Merge "Revert "Revert "Merge "Restore V2+ signature requirement for system apps" into tm-dev am: a347b6c2e6 am: 8aa6d20125""" into tm-d1-dev am: c2da54f24e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18409337

Change-Id: I5e804e0d066435a0745ea9e506e2b6f21560b165
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 12:19:02 +00:00
Michael Groover
c2da54f24e Merge "Revert "Revert "Merge "Restore V2+ signature requirement for system apps" into tm-dev am: a347b6c2e6 am: 8aa6d20125""" into tm-d1-dev 2022-05-20 01:03:34 +00:00
Kweku Adams
c2378e619f Note BATTERY_LEVEL_CHANGED semantics.
Despite the name, BATTERY_LEVEL_CHANGED is also sent when the plug type
changes. Note that in the documentation and remove the wtf when that
happens.

Bug: 232840504
Test: N/A
Change-Id: Ib3e0f6c43ecbd5bf1841081b36f4b3eaa8b20039
2022-05-18 15:43:26 +00:00
Michael Groover
7b308a4d3c Revert "Revert "Merge "Restore V2+ signature requirement for system apps" into tm-dev am: a347b6c2e6 am: 8aa6d20125""
This reverts commit b07fdf9c01.

Reason for revert: Both b/230910314 and b/231165527 have been resolved with the updated APKs in the system image. tm-dev is still enforcing the V2+ signature requirement for system apps; this revert restores this requirement for Pixel devices.

Bug: 215046612
Bug: 230910314
Bug: 231165527
Change-Id: I801b14b1031c44fdd34d53450bddf56f437b1fbe
2022-05-16 20:28:15 +00:00
Jeremy Meyer
aeeb6b7c17 Merge "Revert "Revert "Revert "Have AssetFileDescriptor.AutoCloseInputStream us...""" into tm-dev am: 0308928e2b am: b1210bb389
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18377375

Change-Id: Idb3f2d01caf3248125c989a556144af7ad2f9559
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 01:15:14 +00:00
Jeremy Meyer
b1210bb389 Merge "Revert "Revert "Revert "Have AssetFileDescriptor.AutoCloseInputStream us...""" into tm-dev am: 0308928e2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18377375

Change-Id: Ic04298a025b8f55885b0bc566a4b838b9f75b053
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 00:59:32 +00:00
Jeremy Meyer
d89f634cdc Revert "Revert "Revert "Have AssetFileDescriptor.AutoCloseInputStream us...""
This reverts commit f26bb9d683.

Reason for revert: causes b/204612606

Fixes: 204612606
Test: checked failing CTS test
Change-Id: I92090318c0f111931acf0875c726bf4da4db08bd
2022-05-13 22:38:29 +00:00
TreeHugger Robot
a6a0cb4b5a Merge "Fix AppSearchShortcutInfoTest" into tm-dev am: 77ef5a4e45 am: becf8fa048
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18322991

Change-Id: I07927ae48448918300830782b148007bb58f1871
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 02:44:22 +00:00
TreeHugger Robot
77261fff6d Merge "Add excludedPackages parameter to broadcast" into tm-dev am: e10b6c4df4 am: 7ce51c29f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18196149

Change-Id: Id12d98d2d66957e7012a58bc46322b105a1293da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 02:43:07 +00:00
TreeHugger Robot
becf8fa048 Merge "Fix AppSearchShortcutInfoTest" into tm-dev am: 77ef5a4e45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18322991

Change-Id: I76066d6af35b23b018634fcd2d14edca880fea77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 02:32:57 +00:00
TreeHugger Robot
77ef5a4e45 Merge "Fix AppSearchShortcutInfoTest" into tm-dev 2022-05-12 02:07:52 +00:00
TreeHugger Robot
7ce51c29f1 Merge "Add excludedPackages parameter to broadcast" into tm-dev am: e10b6c4df4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18196149

Change-Id: I3691555025e4412bba1f69e6449f2cec6cc8d54c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 01:57:29 +00:00
TreeHugger Robot
e10b6c4df4 Merge "Add excludedPackages parameter to broadcast" into tm-dev 2022-05-12 01:46:39 +00:00
Pinyao Ting
8c1026fceb Fix AppSearchShortcutInfoTest
Bug: 208375334
Test: atest AppSearchShortcutInfoTest
Change-Id: I40ddafd325ab55f83e8e6f7f8b4886fe5e63f681
2022-05-11 15:51:37 -07:00
Evan Severson
1968e5df71 Add excludedPackages parameter to broadcast
This parameter is useful for when a broadcast's intent is not targeting
specific package and it is not wanted to be delievered to a specific
one.

Test: Install two apps and create shell command argument to exlude
        packages, verify the correct packages can receive or get
	skipped. Verified with manifest and registered receivers.
Bug: 231635380
Bug: 210118427

Merged-In: I9a331f71c7052b294d4eada0f0f658dba989d881
Change-Id: I9a331f71c7052b294d4eada0f0f658dba989d881
2022-05-11 18:48:35 +00:00
Pedro Loureiro
835d60448f Merge "Pass APK_IN_APEX flag when parsing apk in apexes" into tm-dev am: 938c3d933f am: cc0bb910b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18029245

Change-Id: I7a64e02041d165b11a29c7d25efa1ac8cda11950
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 19:26:18 +00:00
Pedro Loureiro
cc0bb910b3 Merge "Pass APK_IN_APEX flag when parsing apk in apexes" into tm-dev am: 938c3d933f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18029245

Change-Id: I8837548601c794a3707bef47fb06f3135b111d9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 18:48:44 +00:00
Pedro Loureiro
938c3d933f Merge "Pass APK_IN_APEX flag when parsing apk in apexes" into tm-dev 2022-05-09 17:46:53 +00:00
Yurii Zubrytskyi
9e8fb5d5c5 HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE am: 47a70c8253 am: 977d51ac01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18161336

Change-Id: I711210ac1a0b904af015631cf19105c0ddb26c34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 16:13:18 +00:00
Yurii Zubrytskyi
977d51ac01 HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE am: 47a70c8253
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18161336

Change-Id: I18001d945baf777806ede29baa8f0c8e89704841
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 15:42:49 +00:00
Yurii Zubrytskyi
0e158d0440 Merge "HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE" into tm-dev 2022-05-07 15:11:19 +00:00
Yurii Zubrytskyi
47a70c8253 HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE
Revert before releasing
Let the apps built with pre-release Tiramisu SDK parse
+ fix a test that didn't expect REL builds to throw
  when checking for lettered versions

Test: build
Bug: 225745567
Bug: 231407096
Change-Id: I965c01b4453289c3e9a930180804728be0b5b045
2022-05-06 17:03:31 -07:00
Shan Huang
78c429f948 Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev am: e3a61826eb am: 4472170cb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17952046

Change-Id: Icf52d1afb13bdab55270c3e6319b4d889d114db0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:19:10 +00:00