Commit Graph

11965 Commits

Author SHA1 Message Date
Nikita Ioffe
bebc71b9e5 Add FEATURE_VIRTUALIZATION_FRAMEWORK system feature
This feature is used to signal that device supports Android
Virtualization Framework.

Bug: 243512044
Test: m
Change-Id: I0738f26bdd1889b4047132369ace1e80e1a42336
2022-11-15 08:41:34 +00:00
Thiébaud Weksteen
ec0d763059 Add PermissionEnforcer class
Defines a new PermissionEnforcer class used to check permission as part
of the @EnforcePermission AIDL annotation. It is registered as a system
service to avoid the cost of creating a new object for each new client.

Bug: 234083358
Test: TH
Change-Id: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
Merged-In: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
2022-10-27 12:12:11 +11:00
Santiago Seifert
868f2e071f Non-functional simplification of ComponentName.equals
Bug: 205124386
Change-Id: Ib9c895592ed67e10cb965890cd67499bd55e444d
Test: atest ComponentNameTest
2022-10-24 18:17:33 +00:00
Patrick Baumann
0ef37c52ee Expand ownership to all package manager owners
Change-Id: I8608cd42f3fb737831f022b1e9ad6ea600eb9b2f
2022-09-22 16:05:06 +00:00
Mayank Garg
1206d8d742 Merge "Added check for user info is not null" 2022-09-01 22:18:45 +00:00
Mayank Garg
a833ca3056 Added check for user info is not null
Bug: 237413499
Test: atest HandlerThreadingDomainTest LocationTimeZoneProviderControllerTest LocationTimeZoneProviderTest ZoneInfoDbTimeZoneProviderEventPreProcessorTest
Change-Id: I79087a3e83a51b81568bdb6ff5540ee78b51b91a
2022-09-01 19:42:28 +00:00
Cole Faust
a1eb8cf128 Merge "Fix array-related errorprone warnings" 2022-08-30 18:03:01 +00:00
Treehugger Robot
3d8681e31d Merge "Exclude large tests from presubmit." 2022-08-29 20:52:36 +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
Lucas Henneman
adbe824324 Exclude large tests from presubmit.
Bug: 222555677
Test: N/A
Merged-In: Ib19a2096a97367b37b3a22033ec2001693f23bff
Change-Id: I9ea72fd69a4771231b2342c50423cb1461d9ea09
2022-08-05 18:19:24 +00:00
Xin Li
14164fb11a DO NOT MERGE - Merge TP1A.220624.013
Merged-In: I2f3d04546af58edbe7bae2b7d856ab3d87365fdf
Change-Id: Iaf981a42ffa918ec7dc0b86e533c5c8371872271
2022-07-11 21:47:41 -07:00
Bill Yi
16c119018a Merge SQ3A.220705.003 to aosp-master - DO NOT MERGE
Merged-In: I7cffe34a393991c4ef98740f7c3a052c0b6344fb
Merged-In: Ie0b7151fabd09f58d58745a3f9e2e0252e04411a
Change-Id: Id75747f4a2519f9fa1c7850f99f0298a39dbc79e
2022-07-08 07:18:02 -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
Evan Severson
a3bf26d6bc 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
(cherry picked from commit c0ce69bc8d)
Merged-In: I9a331f71c7052b294d4eada0f0f658dba989d881
2022-05-16 21:11:38 +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