Commit Graph

11984 Commits

Author SHA1 Message Date
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
Shan Huang
4472170cb9 Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev am: e3a61826eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17952046

Change-Id: I99d6b6964314a433d0f161dc9159e9113701f060
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 19:53:54 +00:00
Shan Huang
e3a61826eb Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev 2022-05-06 19:35:42 +00:00
Jing Ji
c0469d6231 Merge "Add a new binding flag BIND_TREAT_LIKE_VISIBLE_FOREGROUND_SERVICE" into tm-dev am: 8094df8ba3 am: 6a4d2e410b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18108533

Change-Id: Ifffa711a3012f42bf27359a38b92ccd0bb2cfcee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 00:45:08 +00:00
Jing Ji
6a4d2e410b Merge "Add a new binding flag BIND_TREAT_LIKE_VISIBLE_FOREGROUND_SERVICE" into tm-dev am: 8094df8ba3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18108533

Change-Id: I054a1a70fa74ad248bc9934c3b9d5d70bce4e98f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 00:23:22 +00:00
Adam Bookatz
7a5725bfe6 Merge "Ensure getUserName cannot return null" into tm-dev am: 1503b56202 am: 10b45a2107
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18126297

Change-Id: Ib4bc41d74d8f486e79e43e7b332c93a2051c562b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 17:58:46 +00:00
Adam Bookatz
10b45a2107 Merge "Ensure getUserName cannot return null" into tm-dev am: 1503b56202
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18126297

Change-Id: If3bc99316e0c3a3330ebaf775adbcf1590c122b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 17:42:18 +00:00
Jing Ji
84f00cf8af Add a new binding flag BIND_TREAT_LIKE_VISIBLE_FOREGROUND_SERVICE
Repurpose the legacy BIND_VISIBLE to this new flag, as the BIND_VISIBLE
was actually never implemented.

This new flag is for use by the system or persistent processes,
the process state of the service process will be bumped to
the PROCESS_STATE_FOREGROUND_SERVICE, with oom adj score "visible".

Bug: 230897753
Test: atest MockingOomAdjusterTests
Change-Id: If86ec9281ec482a0916c78338ae88cf2199256e4
2022-05-04 17:28:19 +00:00
Shan Huang
a6666f2221 Migrate IME to handle back with OnBackInvokedDispatcher.
We currently close the IME by having the target application forward KEYCODE_BACK to the IME process through InputMethodManager#dispatchInputEvent and having the IME handle the keycode in InputMethodService#onKeyDown. When apps opt in to OnBackInvokedDispatcher API, we will not dispatch KEYCODE_BACK to apps anymore. Thus we need to migrate IME to the new API for it to close on back invocation.

This implementation forwards OnBackInvokedCallbacks from the IME process
to the app process. This is necessary because all callbacks need to
exist in the app process for them to be considered by hardware back keys. While back gestures go through WM to resolve callbacks from the focused window, hw keys are directly sent to the focused window's ViewRootImpl, bypassing server side back nav logic.

Bug: 228358882
Test: atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test: atest CtsInputMethodTestCases
Change-Id: Ie207b63b11a56c9b2173f26b734a27b13ebccc60
2022-05-04 05:31:08 +00:00
Lucas Silva
b07fdf9c01 Revert "Merge "Restore V2+ signature requirement for system apps" into tm-dev am: a347b6c2e6 am: 8aa6d20125"
This reverts commit 613c328e13.

Bug: 230910314
Bug: 231165527

Change-Id: If4e49842ddcba42f01c629da54d14bc2d78d541e
Merged-In: a199b31307
(cherry picked from commit a199b31307)
2022-05-03 17:00:19 +00:00
Lucas Silva
a199b31307 Revert "Merge "Restore V2+ signature requirement for system apps" into tm-dev am: a347b6c2e6 am: 8aa6d20125"
This reverts commit 613c328e13.

Reason for revert: Fixes assistant dreams
Bug: 230910314

Change-Id: If4e49842ddcba42f01c629da54d14bc2d78d541e
2022-05-03 02:53:39 +00:00
Sam Dubey
9fd8d8978d Merge "Start running PM tests in platinum production" into tm-dev am: dcbd27d361 am: 72d6d7409d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18030831

Change-Id: Ifcaea8759e7031913c62bf72949ad70c00fdbd4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:37:50 +00:00
Jonathan Scott
bbf31fa287 Merge "Temporarily remove CtsDomainVerificationDeviceMultiUserTestCases from presubmit." into tm-dev am: 0ba2ac86ab am: 42b30de589
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17940786

Change-Id: I8ae77afbe66733519a769732c333858837e91571
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:33:07 +00:00
Adam Bookatz
cd2466ee30 Ensure getUserName cannot return null
A user can be created with an explicitly null name, as happens in tests.
But getUserName claims to never return null. So we must do a null-check
here to prevent it.

Bug: 227624966
Test: atest UserManagerTest
Change-Id: Iea0e7b6292c6dd49df1bebc5467091a82ddaedb5
2022-05-02 20:18:54 +00:00
Songchun Fan
d0a2d819b9 Merge "[pm] remove some tests from staged platinum tests" into tm-dev am: a645831a69 am: 8f68bc2234
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18011085

Change-Id: Id74290044a744e2227f27ed78d9a7710c97ac45e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:02:38 +00:00