Commit Graph

10002 Commits

Author SHA1 Message Date
Hyunyoung Song
a2f98d16a6 Merge "Add Initial SearchUIManager" 2020-12-15 23:17:45 +00:00
Alexander Dorokhine
c51d98c112 Merge changes I3a17ec73,Ie460dbbb
* changes:
  Unhide AppSearchManager APIs.
  Unhide GlobalSearchSession API.
2020-12-15 20:47:01 +00:00
Hyunyoung Song
21e60a9d43 Add Initial SearchUIManager
Bug:162234997

Test: builds, locally ran cts tests

CTS tests: ag/13129468

[Meeting notes with Svet/Sunny/Winson] go/aaplus-search-api
[Design diagrams] go/aaplus-search-supl

Change-Id: I4589cd411e124dc9d7ea132a71651f6b9f9656ae
2020-12-15 18:54:43 +00:00
Felka Chang
b19810da77 Throw appropriate exception for session transferring
If the parameter "packageName" is invalid, such as null or
empty string for package name, an IllegalArgumentException is thrown.

In PackageInstallerSession.transfer(packageName), in order to let
the throwing exception more close to the real situation, we throw
IllegalStateException rather than IllegalArgumentException when
one file isn't closed or the state is wrong.

Test: atest InstallSessionTransferTest
Bug: 158804946
Change-Id: Ib0a3e8dc19b829c7382791e622e0b86ee8b387e8
2020-12-15 20:23:55 +08:00
Alexander Dorokhine
7749895904 Unhide AppSearchManager APIs.
Bug: 172180369
CTS-Coverage-Bug: 175661706
Test: AppSearchCtsTests
Change-Id: I3a17ec73708226ef7894ab894a8327ee2a6973d3
2020-12-14 23:43:41 -08:00
TreeHugger Robot
e527e4cc65 Merge "Add GLES dEQP level feature flag" 2020-12-14 16:37:39 +00:00
TreeHugger Robot
1923524096 Merge "Move permission methods in PackageManager to PermissionManager." 2020-12-11 23:24:05 +00:00
TreeHugger Robot
f4bb783cbe Merge "Move a subset of PermissionManager APIs into LegacyPermissionManager." 2020-12-11 20:40:57 +00:00
Wale Ogunwale
c27f0525b7 Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6 am: 926aa8da2c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib3dd38c02eb596d1223ecfae9b383931e985fe6d
2020-12-11 17:15:02 +00:00
Wale Ogunwale
926aa8da2c Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32e5f8566ba916c892898f3f521a5a4309646142
2020-12-11 16:58:45 +00:00
Charles Chen
09f4e85ac2 Add more OWNERS coverages
Test: manual
Bug: 174932174
Change-Id: Ia798bdbce8516a3d675c55028ab637ad7f0695cf
2020-12-11 19:16:38 +08:00
Jeff Sharkey
d25af5c84a Merge "configure owners for ShortcutInfo" am: 694df14654 am: 2948fb99c5 am: e6d38e61cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520446

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If5877f9fc510c553e3299d1e33fc3ec4f2d74137
2020-12-11 10:57:13 +00:00
Hai Zhang
65404d6c66 Move permission methods in PackageManager to PermissionManager.
A number of permission-related methods were implemented in
ApplicationPackageManager by calling the IPermissionManager AIDL
interface. However since we are moving permission into module, the
AIDL inteface can't be an API and the implementions must be moved.

This change moves these methods into PermissionManager, with the
javadoc and interface from PackageManager and the implementation from
AppliationManager. The javadoc remains mostly the same except for
style and typo fixes. The API interface also remains the same except
for inclusive language changes since we are defining new one and have
a chance to fix them now.

We have to lazily get the PermissionManager instance because the
context passed in may be null for an instrumentation use case.

Bug: 158736025
Test: presubmit
Change-Id: I1c28433ca6200679a41e3518354fe03b866621b5
2020-12-10 16:19:05 -08:00
Hai Zhang
e7d707ceb0 Move a subset of PermissionManager APIs into LegacyPermissionManager.
And move their implementation from PermissionManagerService to
LegacyPermissionService.

The DefaultPermissionGrantPolicy related methods are not APIs, and
are thus moved to LegacyPermissionManager and their usages are updated
to use LegacyPermissionManager.

The checkDeviceIdentifierAccess() method is also moved into
LegacyPermissionManager, because it's merely an application of
permission checking, not the permission management infra itself, and
there isn't great benefit in updating it. However since it is an API,
we still have to keep a delegate for it on PermissionManager, and make
the delegated method @SystemApi.

Bug: 158736025
Test: presubmit
Test: LegacyPermissionManagerServiceTest
Change-Id: Ic838f3685427217c8e0477551c3373258408983f
2020-12-10 16:19:01 -08:00
Jeff Sharkey
e6d38e61cc Merge "configure owners for ShortcutInfo" am: 694df14654 am: 2948fb99c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520446

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I27c7ab6c7a1325b43857e1456e631c044ac0d3b5
2020-12-10 22:39:20 +00:00
Jeff Sharkey
694df14654 Merge "configure owners for ShortcutInfo" 2020-12-10 21:36:20 +00:00
Pinyao Ting
5df24bca42 configure owners for ShortcutInfo
Bug: 151359749
Test: manual
Change-Id: Ic3f338083402f2c189f36b8ec9db502e11e50a55
2020-12-10 13:13:26 -08:00
Hai Zhang
aa7d64b8eb Merge changes from topics "role-permission", "role-permission-internal"
* changes:
  Add internal as a new permission protection level.
  Add role as a new permission protection flag.
2020-12-10 07:47:21 +00:00
Chris Wailes
2a6f9b05a3 Adds an "install scenario" field to the appropriate datastructures am: d42204a865 am: e2c2f7ec15
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1465553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieb120d7fd34ab55c2d01978f01a6ab474d6a5664
2020-12-09 02:23:45 +00:00
Chris Wailes
e2c2f7ec15 Adds an "install scenario" field to the appropriate datastructures am: d42204a865
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1465553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifeb0c921ec079202dba5b0b50eb147b09ea3042e
2020-12-09 01:22:52 +00:00
Christian Wailes
21b065b610 Merge changes from topic "install-hints"
* changes:
  Modify dexopt invocation based on install scenario
  Adds an "install scenario" field to the appropriate datastructures
2020-12-09 00:00:26 +00:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Chris Wailes
d42204a865 Adds an "install scenario" field to the appropriate datastructures
This CL adds an "install scenario" field to several data structures used
by the Package Manager.  This value will be used by a following CL to
adjust the invocation of dexopt based on the indicated use case.

Bug: 173137187
Test: build
Merged-In: I1d0df8edf85a598905a5e7509f6c811df5c20e2e
Change-Id: I1d0df8edf85a598905a5e7509f6c811df5c20e2e
2020-12-07 15:05:54 -08:00
Hai Zhang
b9893a600e Add internal as a new permission protection level.
Permissions with the new internal protection level are similar to
signature permissions in that they can be controlled internally by the
system via the specified protection flags, but they are no longer
granted according to signatures. This enables us to create role-only
permissions.

Bug: 158736025
Test: presubmit
Change-Id: Ie5f76f14d6e32b05b9113090e10b8a1a41a2d9da
2020-12-07 14:44:10 -08:00
Hai Zhang
a396875109 Add role as a new permission protection flag.
Permissions with the role protection flag will be able to be managed
by role via grant/revokeRuntimePermission(), similar to development
permissions but only manageable by role.

Also fixed a bug that PermissionController can get any signature
permission.

Bug: 158736025
Test: presubmit
Change-Id: I49603cee91466a791be66055a922ba1a8bd08d4e
2020-12-07 14:05:23 -08:00
Christian Wailes
bf0bed337e Merge changes from topic "install-hints"
* changes:
  Modify dexopt invocation based on install scenario
  Adds an "install scenario" field to the appropriate datastructures
2020-12-07 20:08:07 +00:00
Ruslan Tkhakokhov
39ede62cbf Merge "Update eligibility rules for adb backup" 2020-12-07 14:10:38 +00:00
Jeff Sharkey
db4ae71beb Merge changes from topic "nov30"
* changes:
  Hand-migration to TypedXml interface.
  Mechanically apply TypedXml refaster template.
  Mechanical refactoring to new typed XML classes.
  Additional hand-migration to TypedXml interface.
  "Resolve" both human-readable and binary XML.
2020-12-04 21:32:44 +00:00
Ruslan Tkhakokhov
735cbd5ad0 Update eligibility rules for adb backup
1. Adb backup is enabled by default for "android" package that corresponds to SystemBackupAgent (no change from current behavior)
2. System and privileged apps can use android.backup.ALLOW_ADB_BACKUP manifest property to enable / disable adb backup. Disabled by default.
3. Other apps can only use adb backup when running in debuggable mode.

Bug: 171032338
Test: 1. atest BackupEligibilityRulesTest
      2.1. Run adb backup / restore for SystemBackupAgent and verify
           success (running in system_server)
      2.2. Run adb backup / restore for NexusLauncher with
           "allowAdbBackup=true" and verify success (privileged app)
      2.3. Run adb backup / restore for a non-privileged debuggable app
           and verify success.
Change-Id: Ifefe6d888377d3ac9482928b27c86b2e562ad8fa
2020-12-04 20:57:52 +00:00
Brian Stack
c57e2123d4 Expose UwbManager through Context.getSystemService am: 3163bf0d35 am: 2557747c4d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I5213f04b2bf1f0db39a872ab7dd7f0d45fd60103
2020-12-04 18:00:40 +00:00
Brian Stack
2557747c4d Expose UwbManager through Context.getSystemService am: 3163bf0d35
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I14aa423224f37447024ddb4cc67cabe06d60a30a
2020-12-04 17:39:49 +00:00
TreeHugger Robot
73d6176569 Merge "Update CPA startActivity javadoc to refer to passing the result back" into rvc-qpr-dev am: e9fd7678bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13144034

Change-Id: I8c8dc5cb9910c977169d220d5ece84a2403ccade
2020-12-04 14:05:18 +00:00
TreeHugger Robot
e9fd7678bf Merge "Update CPA startActivity javadoc to refer to passing the result back" into rvc-qpr-dev 2020-12-04 13:39:26 +00:00
JW Wang
94dae5c028 Merge "Populate APK files using hard links (2/n)" 2020-12-04 09:29:33 +00:00
Chris Wailes
04f2c2d651 Adds an "install scenario" field to the appropriate datastructures
This CL adds an "install scenario" field to several data structures used
by the Package Manager.  This value will be used by a following CL to
adjust the invocation of dexopt based on the indicated use case.

Bug: 173137187
Test: build
Change-Id: I1d0df8edf85a598905a5e7509f6c811df5c20e2e
2020-12-03 14:43:59 -08:00
Jackal Guo
ccfa9a6682 Merge "Reduce package parsing times" 2020-12-03 05:57:53 +00:00
Brian Stack
3163bf0d35 Expose UwbManager through Context.getSystemService
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I04c1263a191fcfeee5824be5d6d1944354819d02
Merged-In: I04c1263a191fcfeee5824be5d6d1944354819d02
2020-12-02 13:58:28 -08:00
TreeHugger Robot
1d2102b503 Merge "Expose UwbManager through Context.getSystemService" 2020-12-02 21:58:01 +00:00
Jeff Sharkey
a2c132d9c6 Hand-migration to TypedXml interface.
Previous changes have applied mechanical refactorings, but this change
hand-migrates the remaining logic which was too complex to identify.

This change should have no behavior change; famous last words.

Bug: 171832118
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I85cd830eb6bfde18fca6e73ee7adfdc385a890de
2020-12-02 13:55:35 -07:00
TreeHugger Robot
88a7d70b2b Merge "Annotate ContextWrapper with @Nullable" 2020-12-02 20:12:25 +00:00
Kevin Hufnagle
786e3d0906 Merge "docs: Mention app query filters on Android 11" into rvc-dev am: ace19f5537 am: 6030f5b0cb am: fe2da4e99b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13113598

Change-Id: I6455816bb0bdd5fc34b00a3bc8dd9974c1d3a718
2020-12-02 20:10:16 +00:00
Kevin Hufnagle
fe2da4e99b Merge "docs: Mention app query filters on Android 11" into rvc-dev am: ace19f5537 am: 6030f5b0cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13113598

Change-Id: I14c6ed59a8dbf90170424abe2738a568c7fe672a
2020-12-02 19:00:53 +00:00
Kevin Hufnagle
27b2c5cc6e Merge "docs: Mention app query filters on Android 11" into rvc-dev am: ace19f5537 am: c59c54bbe3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13113598

Change-Id: Ia15e30d2242d9cb67a658fa0145d71d64fd67153
2020-12-02 19:00:40 +00:00
Kevin Hufnagle
c59c54bbe3 Merge "docs: Mention app query filters on Android 11" into rvc-dev am: ace19f5537
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13113598

Change-Id: I851de99e1ef5686259b322e5b59d667b92997c17
2020-12-02 18:32:02 +00:00
Kevin Hufnagle
6030f5b0cb Merge "docs: Mention app query filters on Android 11" into rvc-dev am: ace19f5537
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13113598

Change-Id: I810cb264829917cc07af833dc4a1486ec4943574
2020-12-02 18:31:08 +00:00
Alex Kershaw
fabbba0c8a Update CPA startActivity javadoc to refer to passing the result back
Update both versions of CrossProfileApps#startActivity to refer to
passing the result back to the passed in calling activity.

Bug: 174506563
Fixes: 171957840
Test: atest com.android.cts.devicepolicy.CrossProfileAppsHostSideTest#testStartActivityIntent_crossProfile_returnsResult
Change-Id: I14bf779d9307232b31300b828a1606c7411c7bb3
2020-12-02 10:51:44 +00:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00