Commit Graph

1155 Commits

Author SHA1 Message Date
Nicolas Geoffray
af6d3a6cb5 Remove old code that isn't relevant anymore.
In order to reduce the CorePlatformAPI surface.

Test: m
Bug: 154796679
Change-Id: I428fe21d764bf6897942d7e67d85297d826d3716
2020-07-02 17:24:21 +01:00
Victor Chang
2ea241f6ee Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Merged-In: Id99a345ec024179295063c3644f72c062cb50554
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-30 13:53:47 +01:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
Hall Liu
0a5365b9c0 Add gating, logging for PhoneStateListener's limit
Add gating via PlatformCompat and DeviceConfig and logging via
PlatformCompat to the limit instituted on per-process listeners

Fixes: 152074216
Test: atest CtsTelephonyHostCases
Change-Id: I4d6681d90705b68c3349f4124e434a29b50fd3a2
Merged-In: I4d6681d90705b68c3349f4124e434a29b50fd3a2
2020-04-07 17:13:19 -07:00
Benedict Wong
7df882e039 Merge "Automatically set IPsec tunnel interface as up" 2020-03-25 04:18:50 +00:00
Benedict Wong
041bdf883a Automatically set IPsec tunnel interface as up
This change makes IPsec tunnel interfaces automatically get brought up
once they are created. Originally this was considered to be an
additional safety check, as they would not be start routing traffic
until explicitly brought up. However, in the intervening time, the
NetworkManagementController now requires the NETWORK_STACK permission to
set an interface as up. Additionally, that call is a hidden API, and
thus not usable for use cases such as IWLAN.

Bug: 149348618
Test: FrameworksNetTests, CtsNetTestCases passing.
Change-Id: I55b63a748463a388e1e2991d2d5d6b3023545e60
2020-03-10 23:08:16 -07:00
Automerger Merge Worker
6b32953b02 Merge "Remove two unused constants" am: c7d6b57055
Change-Id: Ie8eaa1437931fa37a2c162aedb8fadc147299a30
2020-03-05 08:45:50 +00:00
Neil Fuller
c7d6b57055 Merge "Remove two unused constants" 2020-03-05 08:32:25 +00:00
Automerger Merge Worker
2b554fa9d4 Merge "Add feature to disable slices" am: fa871a3642
Change-Id: I7b64d2b937a0ebe183440c430514e821e1174faf
2020-02-28 22:33:36 +00:00
Abhijit Adsule
fa871a3642 Merge "Add feature to disable slices" 2020-02-28 22:13:01 +00:00
Neil Fuller
a7f7d88766 Remove two unused constants
EARLIEST_SUPPORTED_TIME should have been removed in commit 4b03c07cc7.

To attone, this commit removes a constant that stopped being used in P.

Test: treehugger
Change-Id: Ibd687e54c3c86ba16656d45d73d48eb4f33ec0ea
2020-02-28 17:36:16 +00:00
Automerger Merge Worker
fdbd820293 Merge "Stop exposing generated AIDL from Tethering" am: ccf2c88a18
Change-Id: I5490acfc53c9ae68bb21069c7f04e46d023f308f
2020-02-20 12:32:28 +00:00
Anton Hansson
1a63549314 Stop exposing generated AIDL from Tethering
We don't want new modules exposing stable aidl directly. APIs should
be defined as java @SystemApi. It also seems like nothing actually
depend on these interfaces, except one simple exception.

Bug: 147200698
Test: m
Change-Id: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
Merged-In: Ia4222fa35a9a2f3c75cebb12f75c536f27e2fe16
2020-02-19 16:26:05 +00:00
Abhijit Adsule
014479dbb6 Add feature to disable slices
Bug: 142022263
Test: Manual - Verified CTS test passes on devices where the feature is
disabled

Change-Id: I090b4c1460fcc4784e9e901847829ee61bfc31ef
Merged-In: I090b4c1460fcc4784e9e901847829ee61bfc31ef
2020-02-14 02:25:01 +00:00
Automerger Merge Worker
7a3ca3763b Merge "Enable fdtrack in system_server." am: 62d4abfd06
Change-Id: I7792d474064696ce24dfca47823c73aab79c59f3
2020-01-31 16:42:57 +00:00
Josh Gao
679f3e4242 Enable fdtrack in system_server.
Spawn a thread that monitors the current fd count, and enables fdtrack
to hunt down leaks when it gets too high.

Bug: http://b/140703823
Test: setprop persist.sys.debug.fdtrack_enable_threshold; stop; start; logcat -c; killall -39 system_server; logcat -d | grep fdtrack
Change-Id: If5831f57d47e6958112abced181f07e18e6a7261
2020-01-28 18:10:55 -08:00
Neil Fuller
2260679ecd Merge "Remove an interface before more invasive changes"
am: e4a64b4e6b

Change-Id: I46f302b0ab055d2c7f826502df09ce8a759db9bf
2020-01-21 10:25:12 -08:00
Neil Fuller
290e90f672 Remove an interface before more invasive changes
Remove NetworkTimeUpdateService interface, replace it with its only
implementation.

Test: build only
Change-Id: Idf607957b7abe9a27f4fec2ebe3c0ee9e74f1694
2020-01-14 18:13:41 +00:00
Automerger Merge Worker
08074c62b0 Merge "[Tether13] Move TetheringManager into framework" am: 2410d67357 am: 25cc1f47c5
Change-Id: I9ec25eb984e3b534ddcc9313836a319b21526998
2019-12-20 14:00:29 +00:00
markchien
6d06f6d51a [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
David Sehr
7eb1d4251a Merge "Add hook for JVMTI agent in system server" am: 957ac164ef
am: a9cc5cf85a

Change-Id: I59491078b65f4df90d0066adcc825f2303ee32e2
2019-12-09 16:13:39 -08:00
David Sehr
8f3eee0466 Add hook for JVMTI agent in system server
Add a place to attach a jvmti agent into the system server in debug
builds.  This allows profiling and other investigations for performance
improvements.

Bug: none
Test: attach agent, collect result
Change-Id: I299dffb1774fdce48b9b695a614b7ab60f1307e2
Merged-In: I299dffb1774fdce48b9b695a614b7ab60f1307e2
(cherry picked from commit 1a88539df2)
2019-12-09 13:52:38 -08:00
David Sehr
f74eb32c12 Merge "Allow tuning of heaptargetutilization" am: 0e3e2a73c6
am: e673072feb

Change-Id: Ia7114c1d9fbee42ce27372947702c580bfd3159c
2019-12-09 13:40:46 -08:00
David Sehr
0e3e2a73c6 Merge "Allow tuning of heaptargetutilization" 2019-12-09 21:24:47 +00:00
David Sehr
a494449297 Allow tuning of heaptargetutilization
Remove a pair of explicit sets of this value.  This allows ART to tune
this parameter to improve GC responsiveness and memory usage.  Tuning
this parameter is a key area of work for OEM-requested high-memory
device configurations.

Bug: 145823510
Test: boot and run with various configurations of the flag.
Change-Id: I19680ff5fa1ebf9dfd4a3f71533d03510f4da414
Merged-In: I19680ff5fa1ebf9dfd4a3f71533d03510f4da414
(cherry picked from commit b2910d3b6f)
2019-12-09 10:49:47 -08:00
Treehugger Robot
2b65793cd6 Merge "Merge Android10 QPR1 into AOSP master" 2019-12-03 23:15:02 +00:00
Neil Fuller
f807b4c364 Merge "Add a new time zone detection service" am: 7d8a624085
am: 256f4df4b6

Change-Id: Ie1b28c5cea14a23beac2e70eb7878f7f09461d6c
2019-12-03 08:42:57 -08:00
Neil Fuller
256f4df4b6 Merge "Add a new time zone detection service"
am: 7d8a624085

Change-Id: Ic30cd636b4863a507dda0bdb05e982ee411d936f
2019-12-03 08:30:50 -08:00
Neil Fuller
7d8a624085 Merge "Add a new time zone detection service" 2019-12-03 08:40:07 +00:00
markchien
146e4976bf [Tether07] Migrate Tethering into module am: 0df2ebc43d
am: 6b828d2915

Change-Id: I6e71b418b7303d37144532ab056c21ccbefcb554
2019-11-30 04:31:28 -08:00
markchien
6b828d2915 [Tether07] Migrate Tethering into module
am: 0df2ebc43d

Change-Id: I1aaa034e91eae2d6e9abcbbd70741a54a18b3ddc
2019-11-30 04:25:57 -08:00
Mark Chien
e8401aff92 Merge changes from topic "tether_migrate"
* changes:
  [Tether10]Remove UserManagerInternal usage in Tethering
  [Tether07] Migrate Tethering into module
  [Tether07] Clean up build rule for libtetheroffloadjni
2019-11-30 12:17:47 +00:00
markchien
0df2ebc43d [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
Neil Fuller
3352cfce2f Add a new time zone detection service
Add a new time zone detection service. Much of the code is from
frameworks/opt/telephony with some changes for naming, threading and
to modify the interaction with the "Callback" class.

Overall goal:

Implementing the service in the system server means it will be easier to
add new time zone detection logic unrelated to telephony in future.

Bug: 140712361
Test: atest com.android.server.timezonedetector
Test: atest android.app.timezonedetector
Change-Id: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
Merged-In: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
(cherry picked from commit 3e3b5405b6)
2019-11-28 13:27:55 +00:00
Neil Fuller
18e458ef00 Merge "Remove dead code from SystemServer" am: 05eeef4188
am: 01d1dd28f1

Change-Id: Ifa10a6e2b48f596bfa6854e1a950cec060253c76
2019-11-25 06:28:07 -08:00
Neil Fuller
01d1dd28f1 Merge "Remove dead code from SystemServer"
am: 05eeef4188

Change-Id: I910fb0ac35c8de8fd500b3df0253c65b6b201fb4
2019-11-25 06:12:57 -08:00
Neil Fuller
05eeef4188 Merge "Remove dead code from SystemServer" 2019-11-25 13:53:15 +00:00
Felipe Leme
5c9f648edd Merge "Fixes usage of WallpaperManager to make it optional." into qt-qpr1-dev
am: 659f477f65

Change-Id: I6946b0001c524dff8d11b2889e8b30d6a059218d
2019-11-22 16:16:59 -08:00
Kenny Root
1b506101de Merge "Make RecoverySystemService more testable"
am: 49af39e751

Change-Id: I79d712e2c8739212c4a62e9db6deddf28091fafc
2019-11-22 08:27:49 -08:00
Kenny Root
d508e1e61f Make RecoverySystemService more testable
This allows the RecoverySystemService to be instantiated outside of its
lifecycle events and mocked connections to be injected during the tests.

Test: atest FrameworksServicesTests:RecoverySystemServiceTest
Merged-In: If75632b8dc16c916f3fa90853d6c1863b75d2c64
Change-Id: If75632b8dc16c916f3fa90853d6c1863b75d2c64
2019-11-21 23:54:05 +00:00
Neil Fuller
4b03c07cc7 Remove dead code from SystemServer
Remove dead code from SystemServer that obstensively protects devices
from negative (< 1970) system clock times, but does not.

In reality, SystemServer calls SystemClock.setCurrentTimeMillis(), which
calls through to the AlarmManager.setTime() binder call. When the code
runs the system server hasn't started any services yet, so this would
always fail.

AlarmManager has similar protections in place that do work: if the
device is earlier than a "build time", then the device's clock is forced
forward. That provides the protection that the code being removed from
SystemServer was trying to achieve.

Test: Added logging to SystemClock to prove AlarmManager is null /
manual debugging

Change-Id: I87dca1062829bc1a10202804fa7ee31e0a6f03a3
2019-11-21 17:30:03 +00:00
Kenny Root
53bb6db434 Merge "Move RecoverySystemService into its own package"
am: 9164399321

Change-Id: Iaa931ad488b059c981646fc6684c782e47a1edf3
2019-11-20 16:04:50 -08:00
Kenny Root
f96836ed3a Move RecoverySystemService into its own package
This helps reviewing the refactor of the RecoverySystemService in which it
is made a bit more testable.

Test: make && emulator
Change-Id: Ifc5a658fe68ed10ab400f43d1d3967c0acccbd11
2019-11-20 10:53:39 -08:00
Felipe Leme
8d4c825ce3 Fixes usage of WallpaperManager to make it optional.
As the main javadoc states:
"An app can check whether wallpapers are supported for the current user,
by calling {@link #isWallpaperSupported()}, and whether setting of
wallpapers is allowed, by calling {@link #isSetWallpaperAllowed()}."

Test: manual verification on automotive
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest # on automotive

Bug: 138939803
Bug: 132111956

Change-Id: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
Merged-In: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
(cherry picked from commit 34a861add1)
2019-11-19 01:24:52 +00:00
Andrei Onea
8579ddfb23 Merge "Initialize AppCompatCallbacks in system server"
am: 2773409cac

Change-Id: I493671298a3a976e45542f7c192b7f7861ba6be0
2019-11-01 16:02:05 -07:00
Andrei Onea
0611dbc7a6 Initialize AppCompatCallbacks in system server
This ensures that any calls made (intentionally or not) in the system
server using the Compatibility (in-app process) gating APIs will always
return true, and log the gated feature.

Bug: 143591326
Test: m
Merged-In: I96792cf852f4167fc39d5055704f8617efaae25e
Change-Id: I96792cf852f4167fc39d5055704f8617efaae25e
2019-10-31 11:49:50 +00:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
atrost
ff948d8a2f Add a native aidl API.
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.

Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
Merged-In: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
2019-10-22 18:54:13 +00:00
Roshan Pius
622547b553 NetworkStackClient: Refactor network stack process interaction
Refactor NetworkStackClient class to move the module service binding &
network stack process death monitoring to a separate class. This class
will only instantiated in the SystemServer process.
The new class |SystemServerToNetworkStackConnector| will be used from
the client classes corresponding to each module running on the network
stack process (NetworkStackClient, WifiStackClient, etc)

This has 2 main advantages:
a) Reduces code duplication (Otherwise the various Client classes need
to replicate the service bindding & process death monitoring).
b) Central crash recovery for the network stack process (Otherwise the
various Client classes will trigger multiple recovery for a single
network stack process crash).

Bug: 135679762
Bug: 140006229
Test: Device boots up & connects to wifi networks.
(cherry-picked from 7e6f5f5e08 & applied
aosp/977048)

Change-Id: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
Merged-In: I673581b0067b9a3f72dd68a3ab622c18183ebd2e
2019-08-26 10:43:21 -07:00
Kiyoung Kim
9b9ed234cb Revert "Merge "NetworkStackClient: Refactor network stack process interaction""
This reverts commit 049c9b40ba.

Reason for revert: b/140006229

Change-Id: I4cd4cd6919c0206b6023f744fe889fa0404365d6
2019-08-26 05:25:22 +00:00