Commit Graph

6827 Commits

Author SHA1 Message Date
Sooraj Sasindran
0acab502a0 Merge "Allow UiAutomation to adopt the shell permission indentity" am: 9f0115bb6e
am: 178684530b

Change-Id: If21a26f16b8c88f1dab56ac7fa7a804a1e9077b0
2019-02-25 09:25:50 -08:00
Paul Duffin
70828b499b Merge "Update backwards compatibility support for android.test.base" am: 617e556477
am: f4dfe50594

Change-Id: I9ad5a85431e0ea747fff208430b3a61826674b62
2019-02-25 08:43:04 -08:00
Sooraj Sasindran
9f0115bb6e Merge "Allow UiAutomation to adopt the shell permission indentity" 2019-02-22 00:41:29 +00:00
Svet Ganov
c2841ec7fe Allow UiAutomation to adopt the shell permission indentity
For testing we often need to run shell commands. This can be done
today via running a shell command from an instrumentation test
started from the shell. However, this requires adding shell commands
which are not in the API contract, involve boilerplate code, require
string parsing, etc.

This change allows an instrumentation started from the shell to
adopt the shell UID permission state. As a result one can call APIs
protected by permissions normal apps cannot get by are granted to
the shell. This enables adding dedicated test APIs protected by
signatures permissions  granted to the shell.

Test: cts-tradefed run cts-dev -m CtsUiAutomationTestCases
          -t android.app.uiautomation.cts.UiAutomationTest#testAdoptShellPermissions

bug:80415658

Merged-In: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
Change-Id: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
2019-02-21 19:59:14 +00:00
Paul Duffin
5d70cdf262 Update backwards compatibility support for android.test.base
Previously, the plan was for android.test.base to be removed from the
bootclasspath in P, i.e. in the same release as org.apache.http.legacy.
Any apps that targeted < P were to have the android.test.base library
added to their app classpath in order to maintain backwards
compatibility.

Unfortunately, it was not possible to remove android.test.base from P
and instead it is being removed from Q. This update prepares for that
by updating the backwards compatibility support and its tests to add
the android.test.base library to apps that target < Q.

The affected code is only used at runtime when
REMOVE_ATB_FROM_BCP=true.

Bug: 73711752
Test: atest FrameworksCoreTests with and without REMOVE_ATB_FROM_BCP=true
Change-Id: I76b40dad14193cd174114a351b1350c18d647bed
2019-02-21 10:42:12 +00:00
Remi NGUYEN VAN
0d49d3863b Merge "Move NetworkStack to services.net" am: 762f9f0c24
am: 51490ad0fa

Change-Id: I6a0ddc23bf95039d9d51a4fde9dd87d2f5bf71ee
2019-02-15 03:10:18 -08:00
Remi NGUYEN VAN
51490ad0fa Merge "Move NetworkStack to services.net"
am: 762f9f0c24

Change-Id: Iab45985aedb8069ad50fd2913ef6e828989cdd0d
2019-02-15 03:01:11 -08:00
Remi NGUYEN VAN
5db454c28d Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib1d08a3669983640119d008db7e2990fa798724f
Merged-In: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-15 12:20:17 +09:00
Xin Li
07ec9dbec5 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master 2019-02-14 22:11:32 +00:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Po-Chien Hsueh
4ddcd60b84 Merge "Add DynamicAndroidClient" am: fa240e8054
am: 3699ba8e9f

Change-Id: I490f16ea9e123f6828d2e4d31e53fb9471a17f6f
2019-02-12 19:53:03 -08:00
Ng Zhi An
1033db8ddf Do not load xml metadata for unchanged packages in RegisteredServicesCache
RegisteredServicesCache caches services in an xml, so the system doesn't
have to scan all the apks. Whenever a package is changed
(add/remove/replaced), the broadcast receiver in RegisteredServicesCache
will refresh this cache by quering all matching services and reading
their
xml metadata. There is extra work done here, because only the changed
package
will have services added/removed.

The edge case is after a cache is invalidated, we want to query package
manager for everything, regardless of what changedUids is (we could
have arrived here if invalidateCache is called, and then a package
change event fires, before a getAllServices is called to rescan
everything).

Add a new test to verify that the optimization takes care of the case
when the cache is invalidated.

Bug: 117755076
Bug: 122912184
Test: atest RegisteredServicesCache
Test: dumpsys content # check sync adapters
Change-Id: I5c1f57108c4b67d24b198000d57216c63d35290a
(cherry picked from commit dc66ef5ed3)
2019-02-12 23:15:52 +00:00
Howard Chen
1eb4c54294 Add DynamicAndroidClient
DynamicAndroidClient is the SystemApi to invoke DynamicAndroid
installation service. It also provides a listener for status update.

Bug: 122440941
Test: Compile and run on internal target
Change-Id: I1ea5e861ecaca1647b445eac57ed15a144be68e8
Merged-In: I1ea5e861ecaca1647b445eac57ed15a144be68e8
2019-02-11 14:02:46 +08:00
Neil Fuller
e9c9b092f3 Merge "Revert "Minimum viable TimeZoneDetectorService"" am: 1fe970651f
am: 91145c9a6e

Change-Id: Id3d2d5802a5a68058b4d70e49b02380c55c4a236
2019-02-06 10:32:25 -08:00
Ng Zhi An
5a7c4f1c75 Merge "Add closing div tag for ContentResolver javadoc" into pi-dev
am: a3a280e4d8

Change-Id: I12f32a13f8b6ca1c33bee80207c6e1bed6f7cb4b
2019-02-04 11:52:44 -08:00
Neil Fuller
963fea9056 Revert "Minimum viable TimeZoneDetectorService"
Remove the stubbed TimeZoneDetectorService. Priorities
dictated that it not be worked on so it has never been
used.

This reverts commit 7fb88c3928.

Bug: 112827764
Bug: 78217059
Test: build / boot
Change-Id: I39ed2fc7f8de8d4b2c0d883cd264cc126579af27
Merged-In: I39ed2fc7f8de8d4b2c0d883cd264cc126579af27
(cherry picked from commit f4894d391b)
2019-02-01 13:21:55 +00:00
Howard Chen
1906271db6 Merge "Add the DynamicAndroid Service" am: 0b2057db02
am: 683251a1e2

Change-Id: Ia23e042273c8ab1a9d6de5e393b126794822cb5f
2019-01-31 07:11:33 -08:00
Howard Chen
f17f42b0df Add the DynamicAndroid Service
Define the DynamicAndroid with AIDL.
  Add a java implementation.
  Start a service instance in the system server.
  Add a permission test.

Bug: 122015653
Test: Build & Test on a pixel phone with following command \
  ./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest

Merged-In: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
2019-01-31 15:10:21 +08:00
Adrian Roos
5918a1cb6b Merge "API: Fix missing @NonNull annotations" am: b852f6636f
am: d1f5939c1a

Change-Id: I3d0ac8768dcc9c314e235dc679752dd5cbfde0c5
2019-01-30 02:17:56 -08:00
Adrian Roos
b852f6636f Merge "API: Fix missing @NonNull annotations" 2019-01-30 09:31:58 +00:00
Remi NGUYEN VAN
50c95ba67c Merge "Add INetd to SystemServiceRegistry" am: e3f18bd77c
am: 9268c0be32

Change-Id: I92cd23a587ab0f7df2db92918011a9a488c31668
2019-01-28 00:47:45 -08:00
Remi NGUYEN VAN
3193598566 Add INetd to SystemServiceRegistry
Includes @SystemApi for Context.NETD_SERVICE so system apps (including
the network stack) can obtain the service.

Test: m
Bug: 112869080
Change-Id: Ida63747cd30abb7b3c19559803353eb0e42e6efa
2019-01-28 12:13:08 +09:00
Ng Zhi An
3ca513070b Add closing div tag for ContentResolver javadoc
Bug: 123290414
Test: m docs and manually verify
Change-Id: Ibb159678c9e3538b186fe936ab2369b6fe6fb51d
2019-01-24 21:39:24 -08:00
Adrian Roos
1de5c629eb API: Fix missing @NonNull annotations
In pi-dev, those annotations were added out of band in
tools/metalava/manual/master.txt. The annotations were also
supposed to be added to master, but for some this did not happen.

Bug: 123221743
Test: m api-stubs-docs-check-last-released-api
Change-Id: Ia7589dfcc7f63923890e609dbf03175d2b035d29
Merged-In: Ia7589dfcc7f63923890e609dbf03175d2b035d29
(cherry picked from commit 918c4f1043)
2019-01-24 14:19:39 +01:00
Paul Duffin
455d2a92da Merge "Include OrgApacheHttpLegacyUpdater unconditionally" am: 87c1081c42
am: 34269e4b74

Change-Id: I19a0c5d9d9a2c2c0e5cf482a5a574f304a8ce765
2019-01-24 03:46:43 -08:00
Paul Duffin
87c1081c42 Merge "Include OrgApacheHttpLegacyUpdater unconditionally" 2019-01-24 11:12:47 +00:00
Brad Ebinger
93dd117ee6 Merge "Add FEATURE_TELEPHONY_IMS definition" am: ad075a3837
am: 86999554ea

Change-Id: Ie28a6a11a97dcff35f26dd003d495c14ceb67242
2019-01-23 21:17:22 -08:00
Brad Ebinger
4e65f803a3 Add FEATURE_TELEPHONY_IMS definition
Bug: 118823723
Test: manual
Change-Id: Ic1e65cfba8ecb117199db6ebd636e0d39007b6c6
2019-01-23 23:52:26 +00:00
Mathieu Chartier
43986e38b3 Merge "[view compilation] Add --compile-layouts flag to pm compile" am: 52cf4adf70
am: 581c43404a

Change-Id: Ie02b1129ee81a1346a775d1873531e3f714b5fea
2019-01-23 09:46:34 -08:00
Mathieu Chartier
52cf4adf70 Merge "[view compilation] Add --compile-layouts flag to pm compile" 2019-01-23 17:02:31 +00:00
Tyler Gunn
38f42a6f8e Merge "Mark NEW_OUTGOING_CALL broadcast as deprecated." am: 1e08a90339
am: 8aa49b57f3

Change-Id: Ie60bbc11e0bd5ca434be609dd596ea1a33ba8812
2019-01-22 12:52:26 -08:00
Eric Holk
b1a736d49c [view compilation] Add --compile-layouts flag to pm compile
This allows us to generate precompiled layouts for installed applications.

If the system property view.precompiled_layout_enabled is set, then
PackageMannager will also automatically generate precompiled layouts for apps at
install or upgrade time.

Bug: 111895153
Test: manual
Merged-In: If6455e1b9b0542a36882af9f3e29d0185a53393c
Change-Id: Iea40f5bc90bca0d2605c3c5221159cef13e1e447
2019-01-22 17:40:47 +00:00
Tyler Gunn
d8f76c857b Mark NEW_OUTGOING_CALL broadcast as deprecated.
Mark NEW_OUTGOING_CALL broadcast as deprecated and document that callers
should use the CallRedirectionService API.

Test: Build APIs.
Bug: 64959558
Change-Id: I9192b50b16be2ff0cdc0f864ee99b42b83e261e9
2019-01-22 08:09:24 -08:00
Paul Duffin
025bfab929 Include OrgApacheHttpLegacyUpdater unconditionally
Previously, OrgApacheHttpLegacyUpdater was added to the bootclasspath
(in the framework-oahl-backward-compatibility library) if and only if
the org.apache.http.legacy.jar was not on the bootclasspath. Its
presence caused the runtime to maintain backwards compatibility by
adding org.apache.http.legacy.jar to the app's classpath for apps that
target < P.

The org.apache.http.legacy.jar was permanently removed from the
bootclasspath in P and so the framework-oahl-backward-compatibility
library, and hence OrgApacheHttpLegacyUpdater, are always on the
bootclasspath and so there is no need to treat it as optional. To that
end this change:
1) Includes it in the main framework target, previously it was
   explicitly excluded.
2) Removes the code for handling the case when it is not present.
3) Removes tests for when it is not present.
4) Removes documentation describing what happens when it is not
   present.

Bug: 18027885
Test: cts/tests/signature/runSignatureTest.sh
Change-Id: I3892ead8cd2a8bf17e57bf08e3bf6ee65afac0a1
2019-01-22 14:16:14 +00:00
Remi NGUYEN VAN
42079df1cc Merge "Add startActivityAsUser to SystemApi" am: 3f4873baef
am: 54ec5162de

Change-Id: I665295721ff7b2eb41f29c96ce2a64844a08705e
2019-01-21 18:25:57 -08:00
Remi NGUYEN VAN
bf1ecd1957 Add startActivityAsUser to SystemApi
Normal applications do not have permissions to use this method.

Test: m
Bug: 112869080
Merged-In: I693b3bf56f3be71f0790776e3aad5694717786ef
Change-Id: Ibe91c1bc4c94883a313e799cb0a37db7696fc62e
2019-01-22 08:27:21 +09:00
Nandana Dutt
5adab037d7 Merge "Add a privileged API for capturing and consuming bugreports" am: c2b8bc0a7d
am: 98eef9a909

Change-Id: Ic2cc853f1566bdb5796c233538792cb0618ef1bc
2019-01-11 07:46:45 -08:00
Nandana Dutt
3386fb7172 Add a privileged API for capturing and consuming bugreports
The API is mostly implemented; except for hooking up the listener
and handling an already running bugreport.

BugreportManager is the handle to the new API exposed to apps.

Generating bugreports requires root privileges. To limit the footprint
of the root access, the actual bugreport generation in Dumpstate binary,
is accessed as a oneshot service and dies after it finishes
running.

System server accesses Dumpstate via a binder interface since it does
not have root privileges.

Starting a oneshot service is done via setting a system property, which
needs to be done from system server. BugreportManagerService is the
new system server service that does this. BugreportManager calls into
BugreportManagerService via a binder interface, since the former is in
the app's process.

Both app to system server as well as system server to native service
calls are via implementations of IDumpstate binder interface.

Bug: 111441001
Test: builds. Flashed & verified it boots.
Test: wrote a test client (not included) and verified invoking
startBugreport works.

Change-Id: I4abeb753388c055c36ae0dd916af1ec8d40b7bf0
Merged-In: I4abeb753388c055c36ae0dd916af1ec8d40b7bf0
2019-01-11 13:29:09 +00:00
Chalard Jean
2304c7c508 Merge changes from topic "IPMS1" am: 3627deac88
am: 54d91e605c

Change-Id: I2541996b9bfe338acabac858fdea0ad89d55df5b
2019-01-11 03:53:57 -08:00
Chalard Jean
8c141bdb8f [MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0
2019-01-11 15:00:36 +09:00
Ruchi Kandoi
a33da54c8d Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2
am: d0c8a165d8

Change-Id: I886941a5011fdf204fe62c1162dd2ad69d466f62
2019-01-04 14:06:55 -08:00
Ruchi Kandoi
96fe50bc1b Deprecate Android beam APIs and create a feature flag to gate them
Test: Test application trying to invoke the API
Bug: 117519147
Change-Id: Icd3187e4f3e0f180cb42d36011f60895fb395002
2019-01-04 21:49:00 +00:00
Ruchi Kandoi
650ff88a4c Merge changes from topic "multi-se-support" am: 54502d68ea
am: 9c0ec9be9f

Change-Id: Ieca9b142094c8c568409290fdf690fad529ef604
2019-01-04 12:25:13 -08:00
Ruchi Kandoi
54502d68ea Merge changes from topic "multi-se-support"
* changes:
  Add a mechanism to register AIDs to specific off-host SE
  Add Off-Host Card Emulation Features
2019-01-04 19:56:41 +00:00
Ruchi Kandoi
ebf267a2a4 Add Off-Host Card Emulation Features
Test: CTS test; manual
Bug: 117253962
Change-Id: I7c35b1bffbc57870bb8c67704811a2649854d94e
2019-01-03 23:00:59 +00:00
Tobias Thierer
4c6f437438 Merge "Fix @NonNull -> Nullable for Intent.replaceExtras()." am: 645a9d1253
am: a2cc0fbeec

Change-Id: Idd0c12ea791db459dbba39115c38eae843634bb9
2019-01-02 15:16:07 -08:00
Treehugger Robot
645a9d1253 Merge "Fix @NonNull -> Nullable for Intent.replaceExtras()." 2019-01-02 22:49:30 +00:00
Mathew Inwood
8501ae1763 Merge "Limit access to suspected false positives." am: aeda49d185
am: 152d5a5dcd

Change-Id: I8e10322e69d2d479079df5cf8fec0287c7c117f1
2019-01-02 05:00:54 -08:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Remi NGUYEN VAN
5673820f9b Merge "Add NetworkStack app" am: d01eaecbd2
am: e1922923fc

Change-Id: Iebe5aa5ea7cd235b8a6e734bde0f9a14dce5acdc
2018-12-25 17:09:42 -08:00