Commit Graph

560526 Commits

Author SHA1 Message Date
Almaz Mingaleev
d2dda0e8d3 Prioritise NTP over NITZ in time detection.
This change does not neglect NITZ. NITZ will be used if network
is not available for long enough so that previous NTP
suggestion becomes stale.

Before this change, if an NITZ time signal was available, it would be
given priority over an NTP-derived time.

After this change, if an NTP time signal is available, it will be given
priority over an NITZ-derived time.

This change modifies the default configuration of the system time
detector. It can be modified by partners altering the configuration
directly or by use of a build-time config overlay. The configuration can
not be influenced by users currently.

This change is being made because we have had reports over the years of
NITZ information being incorrect or inaccurate. Responsibility for
sending correct NITZ time lies with carriers and can even vary from cell
to cell on the same network. We assume NTP will be more consistent and
reliable, so we are modifying the default.

Testing plan: use `adb shell dumpsys time_detector` to see suggestions
history and what suggestion is currently being used.
One way to disable NTP suggestions is to turn off WiFi and cell data plan.
Other way is to remove "network" from config_autoTimeSourcesPriority
list in frameworks/base/core/res/res/values/config.xml.

Bug: 172230856
Test: presubmit only
Change-Id: I63e0b865eb454e6c368af846e6bcb3e1924a9d0f
2021-02-10 14:53:49 +00:00
Junyu Lai
c2d6240642 Merge changes from topic "removeNI"
* changes:
  [FUI07] Stop making NetworkState with NetworkInfo from external callers
  [FUI06] Stop using NetworkInfo in NetworkState from external callers
2021-02-09 03:37:59 +00:00
Rambo Wang
31083c40b9 Merge "Rename SignalThresholdInfo.Builder#setThresholdUnlimited" 2021-02-09 02:29:15 +00:00
Treehugger Robot
5968a3906e Merge "Specify version for aidl_interface explicitly" 2021-02-09 00:16:15 +00:00
Brian Stack
033681de6b Merge "Implement SessionHandle.hashCode()" 2021-02-08 23:09:27 +00:00
Junyu Lai
95f5889aff Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" 2021-02-08 21:40:09 +00:00
Brian Stack
7d487f4001 Implement SessionHandle.hashCode()
Bug: 178807258
Test: atest UwbManagerTests
Change-Id: Ib3d518c136282393f4f3bb06388404f76fad5b73
2021-02-08 20:59:31 +00:00
Benedict Wong
02fe346e84 Merge changes I414dce58,I165716a0,I101d8949
* changes:
  Implement RetryTimeout state
  Test Network startup in ConnectedState
  VDBG guard common verbose logging in Vcn
2021-02-08 20:53:10 +00:00
Jakub Pawlowski
c50447ad57 Merge "Add Volume Control UUID" 2021-02-08 19:37:38 +00:00
Łukasz Rymanowski
ebb62d5d58 Add Volume Control UUID
Sponsor: jpawlowski@
Test: compilation
Bug: 159786353
Tag: #feature

Change-Id: I14116848411026ceab0ee15098687bf821e74d38
2021-02-08 19:37:24 +00:00
Roshan Pius
482b2dda4f Merge "ConnectivityService: Plumb attribution tag for location permission checks" 2021-02-08 18:58:02 +00:00
Mitch Phillips
4d7b7a71d6 Merge "[MTE] Parse MTE sysprop in system_server" 2021-02-08 18:46:52 +00:00
Jeff Sharkey
1cf122b5a7 Merge "Add OWNERS for CPU-related files" 2021-02-08 18:31:18 +00:00
Collin Fijalkovich
4512e77b7c Merge "Introduce TracingServiceProxy System Services" 2021-02-08 17:24:06 +00:00
Rafal Slawik
ebc11b5899 Add OWNERS for CPU-related files
This covers files from CLs like:
- http://ag/13495669
- http://ag/13425120
- http://ag/13201721

Bug: n/a
Test: n/a
Change-Id: I7b1ba4e75c57cf53a9fe8b479b9472f627a63e82
2021-02-08 16:53:22 +00:00
Janis Danisevskis
14a82f7983 Merge "Keystore 2.0 SPI: Add CERTIFICATE_* tags." 2021-02-08 16:52:16 +00:00
Jeff Sharkey
d25ad6a116 Merge "Add resource owners" 2021-02-08 16:23:26 +00:00
Todd Kennedy
ce6c266d1a Add resource owners
Change-Id: I182d6b167ed33fa0d817e70c7811aa6a22840a69
2021-02-08 16:20:28 +00:00
Roshan Pius
15028495de ConnectivityService: Plumb attribution tag for location permission checks
Not currently setting the atttribution tag for location
permission checks. Plumb the attribution tag for all location permision
checks (so that location access is correctly attributed to individual
components within an app)

Bug: 162602799
Test: atest android.net
Test: atest com.android.server
Change-Id: Iee95f05204f51a4f8cb1f36acfb60e8cdeb156f4
2021-02-08 08:13:48 -08:00
Brian Stack
bf50d92faa Merge "Fix log message errors in RangingManager" 2021-02-08 16:11:59 +00:00
Treehugger Robot
39d22680c9 Merge "Do not propogate test api access flags to Zygote." 2021-02-08 15:27:19 +00:00
Treehugger Robot
4d20423db6 Merge "preloaded-classes-denylist: remove retired class" 2021-02-08 15:10:57 +00:00
Lorenzo Colitti
dbe68e90d7 Merge "Switch VpnDialogs from IConnectivityManager to IVpnManager." 2021-02-08 14:09:09 +00:00
junyulai
ed813ed767 [FUI07] Stop making NetworkState with NetworkInfo from external callers
Follow-up from previous patch. This change stop accessing the
constructor that needs NetworkInfo to create NetworkState, which
is no longer accessible after ConnectivityService become
mainline module. Instead, pass a legacy network type which is
dedicated for the need of the type.

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I24157bc33e5a5819eccd6a3111d2049f531c1d43
2021-02-08 21:58:02 +08:00
junyulai
7514e1b8bb [FUI06] Stop using NetworkInfo in NetworkState from external callers
This is achieved by:
  1. Use legacy network type inside NetworkState to replace the
     needs of referencing NetworkInfo.getType().
  2. Let getAllNetworkState only return networks with isConnected()
     equals true. This allows callers such as NPMS or NSS does not
     have to reference to NetworkInfo.isConnected().

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I1c4eb08d18ca973eb8f41d06258872eabc0006b8
2021-02-08 21:40:49 +08:00
Orion Hodson
cd272e3402 preloaded-classes-denylist: remove retired class
Remove com.android.server.BootReceiver$2 from the denylist as this
anonymous class was retired in change https://r.android.com/1565971.

(cherry picked from commit 1653aba6bf)

Bug: 159164105
Bug: 179645293
Test: atest PreloadCheck
Change-Id: I94122241dc4cef84524ca83513a68d1fa8ffbe65
Merged-In: I94122241dc4cef84524ca83513a68d1fa8ffbe65
2021-02-08 13:24:41 +00:00
Lorenzo Colitti
be331ab3a7 Merge changes I4256ca5f,I91528e1a,I48bd594c
* changes:
  Change ConnectivityServiceTest to prepare for VPN code move.
  Add to VpnManager the VPN APIs used by Settings and SystemUI.
  Remove temporary hack in VpnTest.
2021-02-08 10:41:32 +00:00
Chiachang Wang
385f58bf71 Merge "Move shared Proxy method and constants to shared lib" 2021-02-08 10:27:05 +00:00
Lorenzo Colitti
a5e942370f Switch VpnDialogs from IConnectivityManager to IVpnManager.
The VPN code is moving out of ConnectivityService to a new
VpnManagerService. Update VpnDialogs to call into the new
service.

Bug: 173331190
Test: builds, boots
Test: atest HostsideVpnTests
Change-Id: I173ed0c3e39afb91c0dde1426dc492e9225afb00
2021-02-08 19:25:40 +09:00
Chiachang Wang
698749b053 Move shared Proxy method and constants to shared lib
The static validate() method an PROXY_* constants in Proxy are
used by both module and Settings. After Proxy is moving into
connectivity module, Setting will not able to access them.
Thus, move them to ProxyUtils in net shared lib.

Bug: 172183305
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases:ProxyInfoTest
Change-Id: I02c88aeaeb53d62b87a42a2d8ead9b140b054650
2021-02-08 10:25:07 +00:00
Treehugger Robot
648c2e4c98 Merge "[VCN03] Linger the newly connected network for a short time" 2021-02-08 04:57:35 +00:00
Chiachang Wang
af6494310d Merge "Create new system API in UserHandle to get uid" 2021-02-08 03:56:39 +00:00
Xiao Ma
988d3f818b Merge "Allow connectivity namespace to enable native level access flags." 2021-02-08 01:40:51 +00:00
Treehugger Robot
905c2570cd Merge "Fix a bug in the USAP Pool refill logic." 2021-02-07 19:52:20 +00:00
Lorenzo Colitti
7a4c248582 Merge "More cleanly separate requests and listens." 2021-02-07 18:04:50 +00:00
Lorenzo Colitti
9ce4107f11 Change ConnectivityServiceTest to prepare for VPN code move.
No-op changes to make it easier to review the VPN code move.
1. Set underlying networks via MockVpn, not ConnectivityService.
2. Add a processBroadcastForVpn utility method that we can modify
   without too much churn when the code is moved.

Bug: 173331190
Test: test-only change
Change-Id: I4256ca5f33034ef9d1de79857795a6ed1d644e61
2021-02-07 20:40:52 +09:00
Lorenzo Colitti
a835b390cd Add to VpnManager the VPN APIs used by Settings and SystemUI.
Settings and SystemUI use these through raw AIDL calls.
Make them proper manager calls so we can move the implementation
without touching the callers again.

For now these still call into ConnectivityService via
IConnectivityManager. In an upcoming CL the implementation will
move to VpnManagerService.

Test: m
Bug: 173331190
Change-Id: I91528e1ad9948fbaa1fc5e37c61c5eb95f54964e
2021-02-07 20:40:51 +09:00
Lorenzo Colitti
001e831df7 Remove temporary hack in VpnTest.
This temporary hack was necessary due to b/175883995. Now that
that bug is fixed, remove the hack.

Bug: 171529940
Test: test-only change
Change-Id: I48bd594cf3a37575f4888c1be9a1cf535de2e4d2
2021-02-07 20:40:46 +09:00
Lorenzo Colitti
97d09a263f More cleanly separate requests and listens.
Currently, NetworkRequest has several types of requests (LISTEN,
TRACK_DEFAULT, REQUEST, BACKGROUND_REQUEST), and we expect more
to be added.

There are really three categories of request:
1. Requests satisfied by only one network and will keep that
   network up, and thus need to be sent to NetworkProviders:
   REQUEST, BACKGROUND_REQUEST.
2. Requests satisfied by only one network but will not keep that
   network up: TRACK_DEFAULT
3. Requests satisfied by multiple networks and will not keep any
   networks up: LISTEN.

Unfortunately the separation is not very clear. Currently, for
any valid request, either isListen() will return true or
isRequest() will return true. This makes it impossible to tell
whether a particular request should be sent to NetworkProviders,
so the current code sends TRACK_DEFAULT requests to
NetworkProviders as well. This is incorrect - a TRACK_DEFAULT
should never keep a network up, for example.

This CL attempts to clarify things by making isRequest() return
false for TRACK_DEFAULT requests and thus never sending them to
NetworkProviders. After this CL:

- isRequest will return true only for requests that attempt to
  bring up or keep up a network.
- isListen will return true only for requests that match multiple
  networks but do not keep any of them up.
- Neither will return true for TRACK_DEFAULT.

Test: atest ConnectivityServiceTest
Change-Id: I7aad30ade8f7ab2a179e53483d9afd8675f64a12
2021-02-07 18:20:59 +09:00
Serik Beketayev
57a531fdd6 Merge "Revert "[Mainline] Migrate android.utils package items"" 2021-02-07 03:11:47 +00:00
Serik Beketayev
28c40e2d49 Revert "[Mainline] Migrate android.utils package items"
Revert submission 1553146-android_util

Reason for revert: Build Breakage aosp-master/db845c-userdebug @ 7128996
Reverted Changes:
Ia39f6e03f:[Mainline] Migrate android.utils package items
Iaf99140d6:[Mainline] Migrate android.utils package items

Change-Id: I5bdaec5d1a87436510c3e05fadaf0124d86b1bdf
2021-02-06 09:19:47 +00:00
Jeongik Cha
ddd4aa0a18 Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: Ib1001deb3a88b633477c5b314be01ea773f2d298
Merged-In: I99a5000109b171a74ac4f604b88e86a87b48ec5f
2021-02-06 08:03:30 +00:00
Serik Beketayev
85e724153e Merge "[Mainline] Migrate android.utils package items" 2021-02-06 07:00:12 +00:00
Treehugger Robot
2ced350043 Merge "Keystore 2.0: Fix getKey returns null on key not found." 2021-02-06 04:43:49 +00:00
James Mattis
f76916a1c9 Merge changes Iabad7300,I85363e28
* changes:
  Stubbed setOemNetworkPreference in Connectivity
  Update OemNetworkPreferences to use 1:1 Map
2021-02-06 04:33:51 +00:00
Treehugger Robot
39338deffe Merge "[Mainline] Core Platform APIs migration" 2021-02-06 04:11:00 +00:00
Treehugger Robot
07f94fbb01 Merge "Keystore 2.0 SPI: Add NAMESPACE_WIFI." 2021-02-06 04:08:13 +00:00
junyulai
6a9c1e04cf [VCN03] Linger the newly connected network for a short time
This is mainly used by VCN, where VCN-eligible networks might
be registered before VCN management service can fire request
to prevent the newly created network from being torndown
immediately by ConnectivityService.

Test: atest ConnectivityServiceTest#testNewNetworkLingering
      atest ConnectivityServiceTest#testNewNetworkLingering_bgNetwork
      atest FrameworksNetTests --rerun-until-failure 20
Bug: 175180558
Change-Id: I7768daf4cf2d8f6d8057b5107412e06104ba82e0
2021-02-06 11:22:31 +08:00
Benedict Wong
36cbdb5391 Implement RetryTimeout state
This change adds support for retries with incrementally increasing
delays.

Bug: 165827287
Test: atest FrameworksVcnTests
Change-Id: I414dce5882540bbe338d0bc1f40481df424821fe
2021-02-05 15:11:39 -08:00
Benedict Wong
2ef953a9a1 Test Network startup in ConnectedState
Add additional tests based on proxy implementations of
ChildSessionCallback and ChildSessionConfiguration

Bug: 165827287
Test: atest FrameworksVcnTests
Change-Id: I165716a0212da7c06b9723656ffe35921cf81854
2021-02-05 15:11:38 -08:00