Commit Graph

11953 Commits

Author SHA1 Message Date
Xin Li
14164fb11a DO NOT MERGE - Merge TP1A.220624.013
Merged-In: I2f3d04546af58edbe7bae2b7d856ab3d87365fdf
Change-Id: Iaf981a42ffa918ec7dc0b86e533c5c8371872271
2022-07-11 21:47:41 -07:00
Treehugger Robot
a447ff12be Merge "Fix javadoc typo in ApplicationInfo" am: 2df3ef5db3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142995

Change-Id: I5a96141c8fa3c4fef781639fb9171645371c088b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 18:21:56 +00:00
Matthew Zavislak
63d4f7eb82 Fix javadoc typo in ApplicationInfo
- FLAG_SYSTEM had a small typo

Test: Documentation only, not needed
Change-Id: Iaa27b7ccac6090658e5f893778997a6ce850b8b0
2022-06-30 22:19:35 -07:00
Winson Chiu
27cae49f7e 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
(cherry picked from commit bcf5b69c41)
Merged-In: I3a2b9baa82ebb8ca9031c9fa128ce12bff17226e
2022-06-29 00:03:34 +00:00
Roopa Sattiraju
e2abe03206 API changes requires for Bluetooth apk inside the apex to build.
Bug: 216731966
Test: Compile and Test
Cherry-picked from tm-dev
Merged-In: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5

Change-Id: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5
2022-06-27 16:35:47 -07: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
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
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
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
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
aa21aea93e Merge "Add new Telephony feature flags and update API annotations" am: 3d7b4e4ded
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1910630

Change-Id: Iaef6cfaa107be10d533d3e63ddcafe27806a82e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 17:45:09 +00:00
Hui Wang
160a0832e7 Add new Telephony feature flags and update API annotations
Bug: 206437821
Test: make
Test: atest CtsTelephonyTestCases FrameworksTelephonyTests
Change-Id: I511afb5afc52b859a37f8ae27ab671c2b8037527
Merged-In: I511afb5afc52b859a37f8ae27ab671c2b8037527
2022-05-12 11:12:39 -07:00
TreeHugger Robot
77ef5a4e45 Merge "Fix AppSearchShortcutInfoTest" into tm-dev 2022-05-12 02:07:52 +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
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
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
e3a61826eb Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev 2022-05-06 19:35:42 +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
Xin Li
fd1b1662e9 Merge SP2A.220505.002
Bug: 231319788
Merged-In: I7707d01be37582461227edcecf5d559f2019c8a5
Change-Id: I1dad245a352258f2a0017b85f14c99f305d8d660
2022-05-03 20:53:01 +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
Pedro Loureiro
2dc941678f Pass APK_IN_APEX flag when parsing apk in apexes
Not caught in unit tests because this is more an integration failure
(detected when writing e2e tests).

Bug: 208239394

Test: the actual e2e test will be published when this is submitted
Test: m ApkInApexTest
Change-Id: I8b62e473e2b3613cf290ff05963a47ba86140d99
2022-04-29 12:29:59 +00:00
Sam Dubey
7c0afb482a Start running PM tests in platinum production
Mock runs look good to me:
https://atp.googleplex.com/test_runs/198485238
https://atp.googleplex.com/test_runs/198490569

Bug: 140252512
Change-Id: Id3dedf792f380d84e982c3738a0ebb874286a929
2022-04-29 12:07:58 +00:00
Jonathan Scott
0ba2ac86ab Merge "Temporarily remove CtsDomainVerificationDeviceMultiUserTestCases from presubmit." into tm-dev 2022-04-29 09:55:51 +00:00
Songchun Fan
a645831a69 Merge "[pm] remove some tests from staged platinum tests" into tm-dev 2022-04-28 22:30:16 +00:00
TreeHugger Robot
a347b6c2e6 Merge "Restore V2+ signature requirement for system apps" into tm-dev 2022-04-28 20:56:41 +00:00
Songchun Fan
4932b90c4f [pm] remove some tests from staged platinum tests
The remaining tests have a low flakiness rate and a total runtime < 30mins.

BUG: 140252512
Test: n/a
Change-Id: Ic7631db5fd4e3c28a7b7cbe464bf46be93c4c05c
2022-04-28 17:41:09 +00:00
Jonathan Scott
fc780a07cf Temporarily remove CtsDomainVerificationDeviceMultiUserTestCases from
presubmit.

Test: N/A
Bug: 227644383
Change-Id: Iffa3ad236e3b164f8d5a56d1f6a8df0d778afac1
(cherry picked from commit f34d2e4c7f)
2022-04-25 10:35:58 +00:00
Michael Groover
80af2faccf Merge "Allow revoked capabilities to be restored in sharedUserId lineage" into tm-dev 2022-04-21 17:00:08 +00:00
Martin Stjernholm
8e8ff54f2e Merge "Add an argument to cmd pm dump-profiles to send --dump-classes-and-methods to profman." into tm-dev 2022-04-21 16:39:43 +00:00
Jon Eckenrode
ea8489c0ce Merge "Updated API documentation of screenWidthDp and screenHeightDp to include multiple-screen behavior." into tm-dev 2022-04-20 22:23:10 +00:00
Makoto Onuki
a501fcb752 Merge changes from topic "Sync-fix-redo" into tm-dev
* changes:
  Only allow the system server to connect to sync adapters
  Revert "Only allow the system server to connect to sync adapters"
2022-04-20 18:42:55 +00:00
Makoto Onuki
8140b786f4 Merge "Update OWNERS for the content and sync subsystem" am: f3265025d8 am: b5ca3914fe am: 925965ec28
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2051441

Change-Id: Idce6f13f8602867cf6f2da920a4ab58a0bd53b14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 18:09:49 +00:00
Makoto Onuki
b5ca3914fe Merge "Update OWNERS for the content and sync subsystem" am: f3265025d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2051441

Change-Id: Iea0c1d40359565041c6ae4f54083ebda0ef6532e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 16:54:14 +00:00
Makoto Onuki
f3265025d8 Merge "Update OWNERS for the content and sync subsystem" 2022-04-20 16:27:47 +00:00
Sudheer Shanka
7789dfbcdd Merge "Fix javadoc on Context#BIND_FOREGROUND_SERVICE." am: d8705358c6 am: 33c901faa0 am: 87f1412190
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2065471

Change-Id: I073708caa4a94b4b17d444e977fc464518ce0cfc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 04:37:08 +00:00
joneckenrode
e6cec1a2e4 Updated API documentation of screenWidthDp and screenHeightDp to include multiple-screen behavior.
Test: Built API docs
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: I44aec14f1607e3ddabb7f792eac22da982347613
2022-04-20 00:20:42 +00:00
Makoto Onuki
58270527d1 Only allow the system server to connect to sync adapters
Bug: 203229608
Test: Manual test with changing the check logic + debug log
Change-Id: If18009f61360564d02dcda9b1e5fa15685e3250f
2022-04-19 13:19:36 -07:00
Makoto Onuki
eef327f536 Revert "Only allow the system server to connect to sync adapters"
This reverts commit 4df2de8380.

There was a bug in the CL. Rather than fixing it forward, let's revert
it and fix it in a follow-up CL, so we'll only have to back-port
a single CL.

Bug: 203229608
Test: N/A, a follow-up CL will redo this change with a Test: line.

Change-Id: I5fddf283ace09996a2e5cfc272f8e9fd8168a114
2022-04-19 13:18:52 -07:00
Martin Stjernholm
b5ef87ae82 Add an argument to cmd pm dump-profiles to send
--dump-classes-and-methods to profman.

Test: adb root
      adb shell kill -SIGUSR1 '$(pidof com.android.systemui)' && \
        sleep 1 && \
        adb shell pm compile -m speed-profile com.android.systemui
      adb unroot
      adb shell pm dump-profiles --dump-classes-and-methods \
        com.android.systemui && \
        adb pull data/misc/profman/com.android.systemui-primary.prof.txt
  Check that the output is the same as:
      adb root && adb shell profman --dump-classes-and-methods \
        --reference-profile-file=data/misc/profiles/ref/com.android.systemui/primary.prof \
        --profile-file=data/misc/profiles/cur/0/com.android.systemui/primary.prof \
        --apk=system_ext/priv-app/SystemUI/SystemUI.apk
Test: adb shell pm dump-profiles \
        com.android.systemui && \
        adb pull data/misc/profman/com.android.systemui-primary.prof.txt
  Check that the output is in the usual `profman --dump-only` format
Bug: 198506529
Change-Id: I2559822fcc3ad32fe4b7b6ac2faa91e3c3ab6c8e
2022-04-19 11:01:25 +00:00
Sudheer Shanka
33c901faa0 Merge "Fix javadoc on Context#BIND_FOREGROUND_SERVICE." am: d8705358c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2065471

Change-Id: I53cc5c9a7baec50eb58417fd1df5c8aa0c33a742
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 19:48:41 +00:00
Sudheer Shanka
d8705358c6 Merge "Fix javadoc on Context#BIND_FOREGROUND_SERVICE." 2022-04-18 19:24:34 +00:00
Sudheer Shanka
54dd6faf2b Fix javadoc on Context#BIND_FOREGROUND_SERVICE.
Test: n/a
Change-Id: I5c5853cfb88c69e5cf39456fbc163af522410331
2022-04-17 23:48:47 +00:00
Michael Groover
148fa19a60 Allow revoked capabilities to be restored in sharedUserId lineage
When APK key rotation was initially introduced in P, an update to the
capabilities of a previous signer in the sharedUserId lineage only
took effect when the signing key of the package being updated was
changed. Android R addressed this by always merging the lineage of
a package being installed / updated in the sharedUserId with the
existing sharedUserId lineage; however, this approach always used
the most restrictive capabilities in the lineage, so once a
capability was revoked from a previous signer, it could not be
restored. This commit allows a capability to be restored by
initially applying the capabilities of the package being installed
with those in the sharedUserId; if a change in the signers or
capabilities is detected, then the most restrictive capabilities
from all packages in the sharedUserId are used to update the shared
lineage. This allows a package to restore a previously revoked
capability if no other packages have revoked the capability; however,
if a package in the sharedUserId has revoked a capability and a newly
installed package restores this capability, the restrictive rule will
ensure the capability is still revoked.

Bug: 227823594
Test: atest PkgInstallSignatureVerificationTest
Test: atest SigningDetailsTest
Change-Id: Id53a2cd235c7a557822b9a1bfc2f431801d415e4
2022-04-15 17:11:12 -07:00
Songchun Fan
1ae2bcd605 [pm] fix platinum test mapping
+ Use hostside test class for SplitTest
+ Remove duplicated PackageParserTest

BUG: 140252512
Test: manual
Change-Id: I73bdceb0c5b333041b96cd777790c0ba0cece0e0
2022-04-12 17:24:04 +00:00