Commit Graph

13697 Commits

Author SHA1 Message Date
Neil Fuller
efaa3e6801 Merge "Update RulesManagerService after APEX files" am: ee15067180
am: 7421a00bb0

Change-Id: I86bba886037d93723957a33f913f6fa0c05e8b0f
2019-02-25 10:34:33 -08:00
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
Neil Fuller
ee15067180 Merge "Update RulesManagerService after APEX files" 2019-02-22 18:32:13 +00:00
Neil Fuller
a1ae02519d Update RulesManagerService after APEX files
Context
=======

The "time zone updates via APK" feature was implemented in O-MR1 to enable
devices to take time zone updates via an APK update and without needing
an OTA. RulesManagerService is an important part of the time zone updates via
APK feature. When RulesManagerService was implemented things were simple; there
was a copy of time zone data in /system. A new (optional) copy was introduced
in /data that could be managed / updated by the RulesManagerService.
Since there were only two copies the /system copy was referred to as the
"system" data.

With the introduction of the runtime APEX and time zone data APEX things
have become more complicated. Android devices can have time zone data in
several places:

1 The copy in /system/usr/share/zoneinfo/ is partially complete and remains
  for legacy usecases, e.g. binaries that "know" about the /system path and
  cannot be updated, or binaries which run before /apex paths are mounted.

2 The copy in /apex/com.android.runtime/ is a complete set of time zone
  data that can be used by libraries on the device.

3 The copy in /apex/com.android.tzdata/ is the "overlay" copy for use when
  the time zone data APEX can be updated. For devices that can take APEX
  updates it will be present and is expected to start with the same version as
  present in /apex/com.android.runtime. Note: Nothing in the code *requires*
  this copy to be present but it is expected to be present in most cases.

RulesManagerService is being kept around for devices that may not have the
capability of updating their APEX files but which still want to update time
zone data without taking an OTA. It is assumed that RulesManagerService will
*only* be turned on in these situations and *not* when the time zone
data in /apex/com.android.tzdata/ might actually be updated independently of
the copy in /apex/com.android.runtime/.

The RulesManagerService therefore adds the fourth copy of the data that *could*
be present:

4 The copy /data/misc/zoneinfo/ managed by RulesManagerService.

Important libraries / binaries on device know about all 4 copies and
prioritize them in order 4, 3, 2, 1. i.e. the libraries will use the
first copy of data found in that order.

In scenarios where RulesManagerService is disabled, 4 will not be present
and therefore 3 will be used (or 2 if 3 is also not present).

In scenarios where RulesManagersService is enabled, 4 is present iff an
APK update has been received. It is assumed that *if* /apex/com.android.tzdata/
is present, it contains the same version of tz data as in
/apex/com.android.runtime/, will never be updated, and can therefore
be ignored by RulesManagerService.

The changes
===========

This commit and others in the same topic do the following:

1) Change RulesManagerService references to "system" data to "base" data in a
   valiant attempt to limit confusion until it can be removed.
2) Switch RulesManagerService over from using the data in
   /system/usr/share/zoneinfo/ as base data to the data in
   /apex/com.android.runtime/.  As part of this change, the RulesManagerService
   can now use the tz_version file to identify the version of tzdb in "base"
   rather than reading the header of the tzdata file, so that is done
   here too.
3) Update imports neccessary to meet pre-upload check requirements.

Note: tzdatacheck, an independent binary that manages time zone data
after OTA, was updated to use /apex/com.android.runtime/ instead of
/system/usr/share/zoneinfo/ in commit c6a2737e0861472d1726ed472708d7762ab1e802.

Bug: 119293618
Bug: 113373927
Test: atest FrameworksCoreTests:android.app.timezone
Test: atest FrameworksServicesTests:com.android.server.timezone
Test: CTS: run cts-dev -m CtsLibcoreTestCases -t libcore.libcore.timezone.ZoneInfoDBTest
Test: CTS: run cts-dev -m CtsLibcoreTestCases -t libcore.libcore.icu.TimeZoneIntegrationTest
Change-Id: Idabe245c7ad337938c202b1796ce9d89ec68bbd6
2019-02-22 15:43:39 +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
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
7717e58a9f Merge "Remove deps from framework on netd interfaces" am: d36e3df7b0
am: ddd14b357d

Change-Id: If22ad91b285e7a47cc481a8a282b085d5dd53a9d
2019-02-14 19:39:05 -08:00
Remi NGUYEN VAN
ddd14b357d Merge "Remove deps from framework on netd interfaces"
am: d36e3df7b0

Change-Id: I341533244d9c7cd2c1cf8315f0806695310ba03c
2019-02-14 19:29:49 -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
Remi NGUYEN VAN
dacee147b4 Remove deps from framework on netd interfaces
If included in framework.jar, the interfaces conflict with any app that
needs to depend on them, including the NetworkStack.

Bug: 124033493
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I2db9f87b7154130726d4700b241d55b041635d98
Merged-In: I0ecae20d514bf888f3a80331f19369ceb1c52aa3
2019-02-14 17:26:59 +09:00
vichang
0865347dac Merge "Include /apex/com.android.runtime for native library in app classloader" am: 9de24de618
am: 8c6c630bcf

Change-Id: I8f8a014446f9d3079a4e78d2010bbd9b4e3f69af
2019-02-12 19:47:58 -08:00
Victor Chang
a366cc8c52 Include /apex/com.android.runtime for native library in app classloader
Bug: 123702996
Test: Manual test. After moving libicuuc.so into the apex path,
  call System.loadLibrary("icuuc") in test app
Test: CtsJniTestCases pass after moving libicuuc into apex and applied
CTS patch here. http://r.android.com/898053

Change-Id: Ic9049c1595b4ea029ec65649c3f3283672744569
2019-02-12 14:53:01 +00:00
Neil Fuller
e9c9b092f3 Merge "Revert "Minimum viable TimeZoneDetectorService"" am: 1fe970651f
am: 91145c9a6e

Change-Id: Id3d2d5802a5a68058b4d70e49b02380c55c4a236
2019-02-06 10:32:25 -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
Pavel Grafov
2b60849c5c Whitelist packages from VPN lockdown: DPM API.
Bug: 77468593
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7508070f828fb7150df5d9e34846535d57c6a7c3
Merged-In: I7508070f828fb7150df5d9e34846535d57c6a7c3
2019-01-29 21:49:07 +00:00
Pavel Grafov
5cba336daf Whitelist packages from VPN lockdown: DPM API.
Bug: 77468593
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7508070f828fb7150df5d9e34846535d57c6a7c3
2019-01-29 19:37:21 +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
Dan Albert
fb54fde402 Merge "Revert "Whitelist packages from VPN lockdown."" am: 9f73671651
am: 2f94ef95c4

Change-Id: I933a58f97b48f7a2db372cff6fb43318c840c6f8
2019-01-24 13:58:15 -08:00
Dan Albert
9f73671651 Merge "Revert "Whitelist packages from VPN lockdown."" 2019-01-24 21:08:46 +00:00
Dan Albert
ee8e6a0fae Revert "Whitelist packages from VPN lockdown."
This reverts commit bb9cef04c5.

Reason for revert: broke pi-dev-plus-aosp

Change-Id: Iaf5c8aa4a8720eb2852da8cd91c81a77ccb92b68
2019-01-24 21:05:39 +00:00
Irina Dumitrescu
b866a5b6e6 Merge "Add API for proxy configuration over VPN." am: 8b5917965d
am: ac77629a1e

Change-Id: I51930e4ed99cc3df10db2c8bbef27989f0a06a46
2019-01-24 10:20:32 -08:00
Pavel Grafov
52e0e403d2 Merge "Whitelist packages from VPN lockdown." am: efc773525c
am: 295016b22b

Change-Id: I643fc2603f7cd2b928fe517eb473048004273835
2019-01-24 10:06:37 -08:00
Treehugger Robot
8b5917965d Merge "Add API for proxy configuration over VPN." 2019-01-24 17:52:22 +00:00
Pavel Grafov
bb9cef04c5 Whitelist packages from VPN lockdown.
Bug: 77468593
Test: atest com.android.server.connectivity.VpnTest
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7f6c5b9172063b588feacd6b9930a6cb88f764ab
Merged-In: I7f6c5b9172063b588feacd6b9930a6cb88f764ab
2019-01-24 16:17:11 +00:00
Irina Dumitrescu
044a436ac9 Add API for proxy configuration over VPN.
Test: runtest -x
frameworks/base/tests/net/java/com/android/server/ConnectivityServiceTest.java
&& atest HostsideVpnTests
Bug: 76001058
Change-Id: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a
Merged-In: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a
2019-01-24 16:07:20 +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
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
Remi NGUYEN VAN
c094a5402c Add NetworkStack app
The app is not started yet, and does not contain any service for now.

Test: built, booted
Bug: b/112869080
Change-Id: Id5a0fd02c891100e85d86b1040e53beec3581950
2018-12-25 11:42:42 +09:00
Paul Duffin
6e5de81b95 Merge "Remove uses of libcore.io DropBox and EventLogger" am: 1c3592a865
am: 14c0c4185c

Change-Id: I7450fe00df591155dc84e405d13e887e5c03f651
2018-12-17 07:39:26 -08:00
Paul Duffin
bf76cf7c82 Remove uses of libcore.io DropBox and EventLogger
DropBox and EventLogger provide hooks for use by framework to intercept
messages sent by libcore. However, neither of these mechanisms are
actually used by libcore so there is no point in framework code using
it.

(cherry picked from commit ecb6124d54)

Bug: 119748341
Test: make checkbuild, flash
Merged-In: I9dbd1b6dea92f7441efb6d0a579efd13bc0e5139
Change-Id: I65425e49ab9ad9752b65772d27f788d1a674eeff
2018-12-17 12:10:11 +00:00
Andrew Solovay
ad7477b192 docs: Fixing malformed javadoc
am: 6eaf48ea57

Change-Id: Idf8415ee4fb85e52d74e1f8bec8d0e2f8d1f58f1
2018-12-14 10:50:44 -08:00
Andrew Solovay
6eaf48ea57 docs: Fixing malformed javadoc
Several @link & @see javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/slice/Slice.Builder
http://go/dac-stage/reference/android/app/slice/SliceProvider
http://go/dac-stage/reference/android/text/style/ImageSpan
http://go/dac-stage/reference/android/content/ContentProvider

Bug: 120743732
Test: make ds-docs
Change-Id: I589644f8d266a116441409fbdaf7a0c533e0e356
Merged-In: I589644f8d266a116441409fbdaf7a0c533e0e356
Exempt-From-Owner-Approval: Doc-only change
2018-12-14 00:11:19 +00:00
Sahin Caliskan
02278c9c53 Merge "Move RCS APIs to android.telephony.ims" am: 4929a0d782
am: 7c7dc29e8d

Change-Id: I2301681cd38c2d364c9e3a5bf94adb400065418c
2018-12-13 15:29:00 -08:00
Adrian Roos
84f03da369 Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi (2/2)" am: a48e431113
am: a11f1d2d50

Change-Id: I726f41142ead73b0a579b01ea477df63e74673e5
2018-12-13 14:33:46 -08:00
Sahin Caliskan
4929a0d782 Merge "Move RCS APIs to android.telephony.ims" 2018-12-13 20:48:34 +00:00
Andrew Solovay
b2ad787a44 Merge "docs: Fixing malformed @links" into pi-dev
am: 39f74d5732

Change-Id: Iaf4fefbba3e1e76b348923ba9501107b2439ac1a
2018-12-13 09:35:03 -08:00
Sahin Caliskan
7719db2b16 Move RCS APIs to android.telephony.ims
This is due to being compatible with other RCS related changes by by other engineers.
Test: Existing tests pass

Bug: 109759350
Change-Id: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
Merged-In: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
2018-12-13 16:50:28 +00:00