Commit Graph

6842 Commits

Author SHA1 Message Date
Treehugger Robot
f089867d9b Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." 2019-06-04 18:37:48 +00:00
Xin Li
c76d117d2a DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
2019-05-15 11:31:45 -07:00
Benedict Wong
ad1e0006b1 Merge "Add IPsec tunnel mode feature flag"
am: 86f2f55b86

Change-Id: I495ff2bfe4f60dfd77176bcd331816667ccd9c36
2019-05-08 13:30:11 -07:00
Benedict Wong
86f2f55b86 Merge "Add IPsec tunnel mode feature flag" 2019-05-08 20:04:06 +00:00
Benedict Wong
bc9c098e12 Add IPsec tunnel mode feature flag
This patch adds a feature flag for IPsec Tunnel Mode. This implies VTI
(with output-mark updating), or XFRM-I in the kernels.

Bug: 117183273
Test: Compiles
Change-Id: I6dd0e429cc0bd100f2ef1140a6651f6ef5294c79
Merged-In: I6dd0e429cc0bd100f2ef1140a6651f6ef5294c79
(cherry picked from commit dc92c69b08)
2019-05-07 20:12:17 -07:00
Neil Fuller
78ccbc3bec Merge "Switch to HexEncoding from ByteStringUtils"
am: 6badf7c7da

Change-Id: I0af52cb2289e1df89ac65fa01334d4e9de69e010
2019-04-24 06:08:15 -07:00
Neil Fuller
2c7cc6e5a7 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

Bug: 124232146
Test: build only
Change-Id: I738cd82a6472c5fadfc0f11ed87559cb905b30ba
2019-04-11 11:04:06 +01:00
Tyler Gunn
43a0c8191c Update NEW_OUTGOING_CALL broadcast deprecation docs.
Include alternative for detecting outgoing calls using the
PhoneStateListener.

Test: Docs only change.
Bug: 76150844
Change-Id: I00a1c5619a67703beccd65e7ece6c16eca1c1a6e
2019-04-05 13:35:11 -07:00
Remi NGUYEN VAN
2704d2f4f6 Merge "Add nullable annotations to startActivityAsUser"
am: 743a4b7872

Change-Id: Ifa44f448fd37ecc2051a16d979717b8aeaa05ebf
2019-03-25 03:41:34 -07:00
Remi NGUYEN VAN
ef8f79292f Add nullable annotations to startActivityAsUser
This change is already in internal branches.

Test: m
Bug: 128935825
Change-Id: I6f6c939c26215fbc113a6edafbdf865d365c9105
Merged-In: I9b61d833a68528f168611c83a8539eb095a42e01
2019-03-25 16:59:27 +09:00
Steven Moreland
48b058ef41 Merge "pm: SharedLibraryInfo: toString closing bracket"
am: 05a8e0b44c

Change-Id: I373baed1fdd987bef7dafdbabacb86a0ef6cfbc0
2019-03-20 11:06:08 -07:00
Treehugger Robot
05a8e0b44c Merge "pm: SharedLibraryInfo: toString closing bracket" 2019-03-20 17:51:00 +00:00
Chenbo Feng
c059f56e0f Merge "Add uid information in PackageListObserver"
am: 62e041a6dd

Change-Id: I4fef26fed802902d6a69563c19704a94916ff834
2019-03-19 14:42:14 -07:00
Treehugger Robot
62e041a6dd Merge "Add uid information in PackageListObserver" 2019-03-19 21:19:16 +00:00
Xiao Ma
5db1518bfa Merge "Move the IpMemoryStore to the network stack."
am: 93bf5ef495

Change-Id: I672d07ca2d0a251c246993ab8c7c3075de385570
2019-03-19 06:35:31 -07:00
Chenbo Feng
14981f31ed Add uid information in PackageListObserver
The uid information of a removed package cannot be retrieved by the
packageName anymore once it is removed. So it would be useful to provide
the uid of removed package in the onPackageAdded and onPackageRemoved
method of the PackageListObserver. This modification helps simplify the
design in PermissionMonitor.

Bug: 125396053
Test: dumpsys netd trafficcontroller

Exempt-From-Owner-Approval: Already merged in internal master
Merged-In: I2bd4bdf924687960a4fa3a47235bae68d885e445
Change-Id: I2bd4bdf924687960a4fa3a47235bae68d885e445
2019-03-18 19:32:29 -07:00
Steven Moreland
1e35a413ca pm: SharedLibraryInfo: toString closing bracket
before:
SharedLibrary[...

now:
SharedLibrary{...}

Switched from square to curly braces because curly braces appear to be
the standard in this directory.

Bug: N/A
Test: manual
Change-Id: I02c63dd594fde68e645348cb1227f8594e2a7d3e
2019-03-18 18:30:22 -07:00
Chalard Jean
952135122d Move the IpMemoryStore to the network stack.
Test: atest FrameworksNetTests
Change-Id: Ic5bd6ff54b09a6fa92b6863f240a5b053011acb6
2019-03-18 11:33:17 +09:00
Benedict Wong
016ac0a953 Merge "Integrate testNetworkService and Manager with Connectivity stack"
am: b86c3255fd

Change-Id: I571e583d896841c814efe58b8c0875fa9cd3873c
2019-03-15 10:50:06 -07:00
Benedict Wong
b86c3255fd Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-15 17:41:02 +00:00
Steven Moreland
cfea213006 Merge changes from topic "hidl-updater-system"
am: 5a490d4bb7

Change-Id: I1fe4f587bb5f7452752ea3c7fc23635fb4a8aee2
2019-03-13 10:11:57 -07:00
Steven Moreland
5a490d4bb7 Merge changes from topic "hidl-updater-system"
* changes:
  pm: AndroidHidlUpdater: system only
  pm: PackageBackwardCompatibility -> applyPolicy
2019-03-13 16:51:30 +00:00
Benedict Wong
a341fbcdc3 Integrate testNetworkService and Manager with Connectivity stack
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.

This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.

Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: Ic1a04aa66014d1c66a74e65dbace3218437403ae
Merged-In: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
2019-03-13 02:26:30 +00:00
Steven Moreland
2410821b67 pm: AndroidHidlUpdater: system only
Backwards compatibility takes a slight performance hit. Only apply this
rule to outdated system apps as they are the only ones that use these
libraries.

Bug: 86259915
Test: boot Pixel 2
Test: boot Pixel 3 and systrace app startup
Test: atest android.content.pm.AndroidHidlUpdaterTest

Change-Id: I2d2e2ca79266a92ba0e4efcf25e31d15daee87a1
2019-03-12 21:44:22 +00:00
Steven Moreland
b28b7960b2 pm: PackageBackwardCompatibility -> applyPolicy
This moves PackageBackwardCompatibility from parsePackage to
applyPolicy.

The motivation of this is to expose partition information to these
files. Specifically, to expose whether the app is a pre-installed
(or updated pre-installed app) for certain backwards compatibility
rules that should only apply to these cases.

Bug: 86259915
Test: boot Pixel 2
Test: Pixel 3: atest -p cts/tests/signature
- all passed except for CtsSystemApiAnnotationTestCases test which
  failed (known issue b/124210145)
Change-Id: Ic824f06489781233dc98bf3dc0182681d32f7142
2019-03-12 21:44:08 +00:00
Andrei-Valentin Onea
42f62d86b5 Merge "Add @UnsupportedAppUsage annotations"
am: 5d256870aa

Change-Id: I2ff775d4b5f9417f8f68274b05829457fb00fe7a
2019-03-08 05:56:53 -08:00
Andrei Onea
d4915d1d5c Add @UnsupportedAppUsage annotations
For packages:
  android.app.admin
  android.app.backup
  android.app.job
  android.app.usage
  android.bluetooth
  android.content
  android.content.om
  android.content.pm

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: Id84ee490f3435a196fca10a89bda9f7217b750c6
Change-Id: I0e3753f8907f8eb38215ba96706470e834438f3a
2019-03-04 12:56:53 +00:00
Xin Li
f90d07b1b3 Merge "DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master" into stage-aosp-master 2019-02-23 00:39:16 +00:00
Sooraj Sasindran
9f0115bb6e Merge "Allow UiAutomation to adopt the shell permission indentity" 2019-02-22 00:41:29 +00:00
Xin Li
b455c3a7f3 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I2f9a524f2ba552de3f62e343075cf0abf400bbae
2019-02-21 16:02:06 -08: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
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
Ng Zhi An
8094880025 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
Merged-In: I5c1f57108c4b67d24b198000d57216c63d35290a
Change-Id: I5c1f57108c4b67d24b198000d57216c63d35290a
2019-02-11 17:03:02 +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
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
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
b852f6636f Merge "API: Fix missing @NonNull annotations" 2019-01-30 09:31:58 +00: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
87c1081c42 Merge "Include OrgApacheHttpLegacyUpdater unconditionally" 2019-01-24 11:12:47 +00: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
52cf4adf70 Merge "[view compilation] Add --compile-layouts flag to pm compile" 2019-01-23 17:02:31 +00: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