Commit Graph

6216 Commits

Author SHA1 Message Date
Todd Kennedy
57e6b4fb4d Merge "Fix package manager tests" 2017-12-12 00:37:35 +00:00
TreeHugger Robot
d8171027f3 Merge "OMS: Only allow trusted overlays to be registered." 2017-12-11 21:51:41 +00:00
Todd Kennedy
5b1df2fb5a Fix package manager tests
Test: bit FrameworksServicesTests:com.android.server.pm.
Change-Id: I06089adcdf6cdaebc7176cab30254cc2cbd836eb
2017-12-11 13:36:18 -08:00
Jeff Sharkey
27674aedc0 Merge "Add auto-doc support for @StringDef." 2017-12-11 16:47:13 +00:00
TreeHugger Robot
21ce736414 Merge "PROTECTION_FLAG_VENDOR_PRIVILEGED as @TestApi" 2017-12-09 01:10:58 +00:00
Jeff Sharkey
5db9a91135 Add auto-doc support for @StringDef.
Behaves pretty much the same as @IntDef, but now supports "suffix"
in addition to "prefix" when matching constants.

Test: manual docs output looks sane
Bug: 70406696
Change-Id: I35064b0f9f36f1f13ccdb40302d818a004014f15
2017-12-08 17:33:40 -07:00
Etan Cohen
6df47c6228 Merge "[RTT2] Update RTT service name" 2017-12-08 23:17:28 +00:00
Adam Lesinski
ab56b9d9df OMS: Only allow trusted overlays to be registered.
Bug: 69383160
Test: cts-tradefed run cts -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.OverlayHostTest
Change-Id: I930c11716317cff1ec485a3943d1f22f07a423df
2017-12-08 13:55:23 -08:00
TreeHugger Robot
0e1209bedf Merge "Introduce isForegroundDefaultLauncher in ShortcutServiceInternal" 2017-12-08 13:26:35 +00:00
Tony Mak
ed6ef62bda Introduce isForegroundDefaultLauncher in ShortcutServiceInternal
BUG: 70212757

Test: bit FrameworksServicesTests:com.android.server.pm.ShortcutManagerTest{1..10}

Change-Id: Ia85cf990e3fcf1dae129ca9b1fc4c3af2838a284
2017-12-08 11:51:04 +00:00
Jiyong Park
2f24f039c3 PROTECTION_FLAG_VENDOR_PRIVILEGED as @TestApi
The flag is used in CTS.

Bug: 70332172
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermission2TestCases
-t
android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered

Change-Id: Iba4ce1475991249980cc6a403037f4dd7bf722e5
2017-12-08 12:25:25 +09:00
TreeHugger Robot
1f5df44cf0 Merge "App Shortcuts: Update javadoc." 2017-12-08 01:57:53 +00:00
Neil Fuller
f3e904d4de Merge "Fix doc typo. Improve class javadoc..." am: e08f918a6e am: 26d28ef826
am: ac8f2c94fd

Change-Id: I3a587c589237460122cd2aacaed20c462e303db9
2017-12-08 01:49:33 +00:00
Makoto Onuki
88b4dcc363 App Shortcuts: Update javadoc.
Bug:  70336448
Test: presubmit
Change-Id: Ifd22979611c8b721d5e2028f2a00889cb41d3ac5
2017-12-07 15:59:08 -08:00
Etan Cohen
46efb48100 [RTT2] Update RTT service name
Change to a sensible name which doesn't conflict with legacy RTT
service.

Bug: 65108607
Test: unit test, integration test
Change-Id: I54855635061c09e8d4bd2e97bac049f2893de123
2017-12-07 13:53:44 -08:00
Geoffrey Pitsch
7c95a682ba Merge "New supported QuickViewConstant feature to delete a file." 2017-12-07 21:32:29 +00:00
Neil Fuller
ac8f2c94fd Merge "Fix doc typo. Improve class javadoc..." am: e08f918a6e
am: 26d28ef826

Change-Id: I7db3a33c933142806cbae90423044ccbac061868
2017-12-07 14:28:32 +00:00
Neil Fuller
e08f918a6e Merge "Fix doc typo. Improve class javadoc..." 2017-12-07 11:02:52 +00:00
TreeHugger Robot
081be42c27 Merge "Introduce getProfileSwitchingIcon/Label In CrossProfileApps" 2017-12-06 22:56:17 +00:00
Chris Tate
f10f83d507 Merge "Introduce ServiceConnection#onNullBinding()" 2017-12-06 18:47:17 +00:00
TreeHugger Robot
9e33289902 Merge "Adds metadata to InstantAppResolveInfo" 2017-12-06 18:05:32 +00:00
Geoffrey Pitsch
bc02b77463 New supported QuickViewConstant feature to delete a file.
Bug: 65368139
Test: compiles
Change-Id: I45e31f9ee063a9bd1330b3031bc770f7f0bf312e
2017-12-06 12:48:29 -05:00
TreeHugger Robot
2e24967956 Merge "Add system service for slices" 2017-12-06 15:58:46 +00:00
Patrick Baumann
709ee1551d Adds metadata to InstantAppResolveInfo
This change introduces a metadata Bundle to the InstantAppResolveInfo
type to be passed along to the Instant App installer in the case of
resolution. This can be used by the resolver and installer to improve
launch by avoiding IPC to fetch needed data that lives in the resolver.

Change-Id: I0b9c168dd8803f5398d222384ebd436c787e1a48
Fixes: 68223794
Test: manual - modified resolver to populate data, verified in installer
2017-12-06 15:38:59 +00:00
Dianne Hackborn
d5b9266f01 Merge "Add major version code to platform." 2017-12-05 20:12:17 +00:00
Calin Juravle
d3392daa3b Merge "Add SystemApis to expose runtime profile information" 2017-12-05 19:10:34 +00:00
Jason Monk
8f5f7ff5fa Add system service for slices
Will be used to manage permissions and possibly pinned state for slices.

Test: manual
Change-Id: Ie53f4988f817ac5b920087567dbac751e2857dbf
2017-12-05 13:37:37 -05:00
Christopher Tate
5d73b6d7a9 Introduce ServiceConnection#onNullBinding()
Historically, if a service returns null from onBind(), the binding app
gets no information about the outcome:  the ServiceConnection is never
invoked.  We now introduce a new connection callback, onNullBinding(),
for apps that need to detect this situation.  When the service rejects
the binding by returning null, the onNullBinding() callback in the
associated ServiceConnection is invoked instead of onServiceConnected().

onNullBinding() has an empty default implementation, so there is no
binary-compatibility impact of this new interface method.

Bug: 67377345
Test: atest android.app.cts.ServiceTest

Change-Id: I224512c118f7d6e5c1c2bb69eca1902882e73594
2017-12-04 17:11:31 -08:00
Patrick Baumann
b4165d7267 Sends resolving action to Instant App installer
This change adds the action being resolved to an installing Instant
App to the installer so it may increase friction for untrusted or
potentially dangerous sources (NFC, nearby, etc.)

Change-Id: If6c47a219e4ddf453fb406e2b212b024aa24ade6
Fixes: 63102749
Test: manual - debugged the ephemeral installer to ensure extra
2017-12-04 23:23:45 +00:00
Calin Juravle
45f8b29ce0 Add SystemApis to expose runtime profile information
The API allows a system apps which acquired
{@code android.permission.READ_RUNTIME_PROFILE} to snapshot the runtime
profiles of installed packages.

The API is implemented in a new service class (AndroidRuntimeManager)
accessible from the context using
context().getPackageManager().getAndroidRuntimeManager().

The main functionality is exposed as a one way call into the
AndroidRuntimeManager with the result being posted on a callback. The
profile is available to the caller as a read-only ParcelFileDescriptor.

This CL only adds the API interfaces and validation. It does not fully
implement the functionality.

oneway void snapshotRuntimeProfile(in String packageName,
  in String codePath, in ISnapshotRuntimeProfileCallback callback)

Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

Change-Id: Iaa6be4715840f24508acba3162ea9c1ab725bd38
2017-12-04 14:26:46 -08:00
Dianne Hackborn
3accca05dd Add major version code to platform.
It turns the version code into almost a 64-bit integer, with the
new major part being the upper 32 bits.

The only tricky part about this is the backup manager, since it
stored 32-bit version codes in its backup data sets.  This is dealt
with by, when the major version code is not 0, writing MIN_INT as
the version code and following that by the full long version code,
which we can detect when reading.  Note that this makes backup sets
containing apps with major version codes incompatible with older
versions of the platform.

Bug: 64459786
Test: Added in Change-Id: Iab8a682b62103babd6c16a56b8dc1e97d7078658
Change-Id: Ibfffe235bbfcf358b3741abd3f7197fdb063d3f3
2017-12-04 13:02:10 -08:00
Neil Fuller
3ee89770bf Fix doc typo. Improve class javadoc...
Fix doc typo (value -> valid). Improve class javadoc,
fix lint error in import ordering.

Test: Build
Change-Id: I8899b1f568e052a3d152e6c36fca4d6bbf9584f2
2017-12-04 15:19:28 +00:00
TreeHugger Robot
70de9728d2 Merge changes from topic "priv_vendor_app"
* changes:
  BIND_IMS_SERVICE is exposed to vendors
  Support privileged vendor apps
2017-12-04 03:20:34 +00:00
Tony Mak
8246513dfc Introduce getProfileSwitchingIcon/Label In CrossProfileApps
Leave the resource retrieval part in client side to avoid passing
drawable across process boundary which should be bad for performance.

The verification part is done in client side, so in theory, apps can work
around the verification. That said, the strings and drawables
are not secret anyway, they are just a generic icon / label to represent
the user. Also, they can always retrieve them by using getDrawable
anyway.

BUG: 67765768
Test: bit FrameworksCoreTests:android.content.pm.crossprofile.CrossProfileAppsTest

Change-Id: I44a7ba17ecc81d0d366184b2d411caa7a82de3ef
2017-12-01 18:44:10 +00:00
Jon Dormody
311a849ee8 Merge "Docs: Renamed ParcelFileDescritor to ParcelFileDescriptor Test: make ds-docs Bug: 1766768" into oc-dev am: ce7f1e6601 am: 3ba37e1f53 am: 96dad7e0a3
am: c0c7c3bcbb

Change-Id: I6d8c7f76139522fae1b506519aba4ab6f8e54d3b
2017-12-01 16:53:12 +00:00
Jon Dormody
ff1e93a341 Merge "Docs: Added mention that the getSharedPreferences method is thread safe." into oc-dev am: fb839ce59a am: 728ca235b5 am: 37db2694eb
am: f506b49aa6

Change-Id: Ie4a7176be63ddcc8f1e4e9fad98ee2644f0a6758
2017-12-01 16:42:30 +00:00
Jon Dormody
c0c7c3bcbb Merge "Docs: Renamed ParcelFileDescritor to ParcelFileDescriptor Test: make ds-docs Bug: 1766768" into oc-dev am: ce7f1e6601 am: 3ba37e1f53
am: 96dad7e0a3

Change-Id: Ib8bbd7fa3dfc9ee5caa3b9f7f2696c7461c3faf3
2017-12-01 16:40:51 +00:00
Jon Dormody
f506b49aa6 Merge "Docs: Added mention that the getSharedPreferences method is thread safe." into oc-dev am: fb839ce59a am: 728ca235b5
am: 37db2694eb

Change-Id: I98151cf907cd2f635c8f4a0e128ff697024b3a54
2017-12-01 16:28:29 +00:00
Jon Dormody
96dad7e0a3 Merge "Docs: Renamed ParcelFileDescritor to ParcelFileDescriptor Test: make ds-docs Bug: 1766768" into oc-dev am: ce7f1e6601
am: 3ba37e1f53

Change-Id: Ia807c8ccd0db5b37b010f64a417fc8e105c22866
2017-12-01 16:28:14 +00:00
Jon Dormody
37db2694eb Merge "Docs: Added mention that the getSharedPreferences method is thread safe." into oc-dev am: fb839ce59a
am: 728ca235b5

Change-Id: Ib6d81f2355ef9d902725e2e1ee1cd5337f4294ad
2017-12-01 16:16:53 +00:00
Jon Dormody
3ba37e1f53 Merge "Docs: Renamed ParcelFileDescritor to ParcelFileDescriptor Test: make ds-docs Bug: 1766768" into oc-dev
am: ce7f1e6601

Change-Id: If7798db1aea1f1d6cdb42a7d25509c814a31f6ca
2017-12-01 16:14:15 +00:00
Jon Dormody
728ca235b5 Merge "Docs: Added mention that the getSharedPreferences method is thread safe." into oc-dev
am: fb839ce59a

Change-Id: Ic135f510c6e5ff8a9a00f2d2be1fcc0c284dd5cf
2017-12-01 16:07:27 +00:00
Jon Dormody
ce7f1e6601 Merge "Docs: Renamed ParcelFileDescritor to ParcelFileDescriptor Test: make ds-docs Bug: 1766768" into oc-dev 2017-12-01 15:53:36 +00:00
Jonathan Dormody
1c7c4b2f14 Docs: Renamed ParcelFileDescritor to ParcelFileDescriptor
Test: make ds-docs
Bug: 1766768

Change-Id: Idfea122569bb6f80889be3f224f9629cfebc0ca3
2017-11-30 22:25:42 +00:00
Jiyong Park
002fdbdb95 Support privileged vendor apps
Privileged apps can now be located in the vendor partition. This is
mainly to move SoC-dependent apks to the vendor partition so that the
system partition becomes more generic.

Like existing privileged apps in the system partition, the list of
privileged apps in the vendor partition and the permissions they are
using must be white-listed. The whitelist can be specified via
<privapp-permissions> tags in one of /vendor/etc/permissions/*.xml
files. Note: vendors can only white-list the apps in vendor partition,
but not the apps in system partition.

This change also introduces a new flag 'vendor-privileged' to the
permission protection level. It is used to expose platform-defined
permissions to the privileged vendor apps. If a platform permission does
not have this flag, it is not granted to vendor apps even when the app
is privileged and white-listed.

Bug: 35301609
Test: `mm` under frameworks/base/tests/privapp-permissions
adb sync && adb reboot
adb shell cmd package \
com.android.framework.permission.privapp.tests.vendor
shows that the app is installed.
android.permission.BIND_IMS_SERVICE is in the installed permissions list
android.permission.MANAGE_USE is not in the installed permissions list,
but is in the requested permissions list.

Change-Id: I196375aaaa9ea3a2ba15686ef08cf3f70ade7046
2017-11-30 14:41:55 +09:00
Andrii Kulian
4d26c21a82 Merge changes from topic "lifecycle_transaction_base"
* changes:
  Add transaction unit tests
  Add basic lifecycle transaction containers
2017-11-28 20:47:34 +00:00
TreeHugger Robot
c26f4c5678 Merge "Remove scanFile argument" 2017-11-28 18:37:55 +00:00
Andrii Kulian
6b9d3a1400 Add transaction unit tests
Bug: 64797980
Test: android.app.servertransaction.ClientTransactionTests
Test: android.app.servertransaction.TransactionParcelTests
Change-Id: I108bacc819e9d43d0a2f5a30338ae88674a53239
2017-11-27 18:15:49 -08:00
Jeff Sharkey
c204c223a7 Deeper sanity checking of emitted types.
When emitting a method or field, verify that we're able to reference
all mentioned types.  This ensures that we don't accidentally
reference undefined classes/interfaces.

Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
2017-11-27 17:07:40 -07:00
Nikolas Bravo
cde72f1be7 Fixes javadoc documentation of PackageInstaller.SessionParams#setOriginatingUid(int)
am: 8aaf928fcd

Change-Id: I4a2efd6052b1bcc5344fd23722745b3532fb01c9
2017-11-27 22:29:21 +00:00