Commit Graph

565185 Commits

Author SHA1 Message Date
Chalard Jean
775feeb477 Fix a bug where callbacks would see blips
When a new OemPreference object is set, the requests
tracking that default will be re-created to track the
new default. This is true regardless of whether that
particular default has changed.

Because the new copied request doesn't know about the
old satisfier, the rematch code will mistakenly think
this callback didn't have a network and will send a
spurious onAvailable to it.

This patch fixes this by simply copying the satisfier
together with the rest of the NRI. The matching code
will then understand the correct previous status.

As a drive-by fix, this also fixes the annotations on
the reassignment contents that can be null. They have
more complex interactions (not everything can be null
at the same time), but the old annotations were just
putting @NonNull on nullable stuff.
In the same line, while there used to be a case with
a satisfier but no request when the satisfier is the
no-service network, there may now be a case where the
old satisfier is known but the old request isn't.

Test: FrameworksNetTests
Test: TODO : need a unit test for this
Change-Id: Ide2567b226722ea9d35ebd8205943363e27647a2
2021-03-04 13:11:59 +00:00
Chalard Jean
b80f9b0097 Fix a bug where a request would not be refcounted
This ends up crashing the system when the request
is unregistered, because the ref counter finds the
count associated with the relevant UID is zero.

Test: FrameworksNetTests
Test: TODO : this needs a new unit test
Change-Id: I0ee0ce925a826d35d8fd58cefb8a870e98ce9add
2021-03-04 22:08:09 +09:00
Chalard Jean
06985411b7 Fix a bug where UID ranges would not be removed
When a new preferences object is sent that no longer contains
a particular app, a new set of requests will be generated. All
requests corresponding to that app will be unregistered, and
no new ones will be filed since the preferences no longer
contain that app.

The place where the UID ranges are removed however is in
makeDefaultForApps(), which takes a request. As there no
longer is a default request for this app, makeDefaultForApps()
will never be called with a request for it, and the UID ranges
will never be removed.

This change applies an emergency fix with some side effects
when setting a new preference. This is acceptable, but should
ideally be fixed ; see TODO in the code for details.

Test: FrameworksNetTests
Test: TODO : Need a unit test for this
Change-Id: Iac3f55af5d00d174460e1d4cdd31f581835dbaa6
2021-03-04 22:08:09 +09:00
Treehugger Robot
69508ee6db Merge changes Ie8d98359,I4d5cadfd
* changes:
  Fix a bug in RequestReassignment#toString
  Cleanup some of the PANS code
2021-03-04 12:39:04 +00:00
Lucas Lin
0292235a96 Merge "Use public API Network#getNetId() to get netid" 2021-03-04 11:05:55 +00:00
Nathalie Le Clair
da70abc9e1 Merge changes Ie0a7ec38,I5199dc85
* changes:
  Handle messages in standby for DeviceDiscoveryAction
  Prevent periodic actions from starting twice
2021-03-04 11:01:12 +00:00
Treehugger Robot
78a488cd10 Merge "Remove unused errorMessage" 2021-03-04 06:03:56 +00:00
Treehugger Robot
12acf15141 Merge "Remove @hide CollectionUtils in QosCallbackTracker" 2021-03-04 04:22:18 +00:00
Aaron Huang
e32c7c482e Merge "Remove PersistableBundle(Bundle) usage from ConnectivityService" 2021-03-04 03:50:50 +00:00
Paul Hu
1297f90193 Merge "Replace ConnectivityManager hidden symbols on framework" 2021-03-04 03:07:08 +00:00
Remi NGUYEN VAN
9c16d8e25d Merge "Add Build.IS_DEBUGGABLE to public API" 2021-03-04 03:02:56 +00:00
Sudheer Shanka
ae0fa6d359 Merge "Add new network process capability." 2021-03-04 03:02:49 +00:00
Treehugger Robot
c0b0157d3e Merge "Use Log instead of Slog in QosCallbackAgentConnection" 2021-03-04 02:58:37 +00:00
Treehugger Robot
e486d38855 Merge "Address comments on aosp/1612040." 2021-03-04 02:04:36 +00:00
Frank Li
9e79e9d99a Merge "[CS05]Remove the hidden API usage of MetricsLogger" 2021-03-04 01:34:53 +00:00
Junyu Lai
7563c45083 Merge "[FUI19] Migrate ConnectivityService to use NetworkStatsManager" 2021-03-04 01:24:57 +00:00
Haibo Huang
1c9baa3191 Remove unused errorMessage
Change-Id: If799737a69545bf6789213ce3f4dd6c724352213
2021-03-03 16:43:48 -08:00
Ruslan Tkhakokhov
48054e5cf4 Merge "Add B&R as owners for LocalTransport package" 2021-03-03 23:39:40 +00:00
Haibo Huang
c8379556c0 Merge "[bit] Use new jsoncpp API" 2021-03-03 22:34:58 +00:00
Haibo Huang
39f4db5ea0 [bit] Use new jsoncpp API
Reader / StyledWriter are deprecated upstream

Bug: 170642246
Change-Id: Ia2dcd3a817209e6821ecdd7c7f8094ec74bae44a
2021-03-03 22:17:10 +00:00
Sunil Ravi
bb57bf925a Merge "WiFi: Define permissions for set/clear country code API" 2021-03-03 21:50:21 +00:00
Xin Li
1af6a12e98 Merge "Merge RQ2A.210305.007" 2021-03-03 21:41:39 +00:00
Jeff Sharkey
eeb577dc44 Merge "Add OWNERS file for UsageStats unit tests." 2021-03-03 21:32:24 +00:00
Ruslan Tkhakokhov
8a535c3c9b Add B&R as owners for LocalTransport package
The package is primarily used and maintained by B&R.

Bug: n/a
Test: n/a
Change-Id: I207b1f78c11b1fa8fcdc870fcee953f948e660f8
2021-03-03 20:39:20 +00:00
Jakub Pawlowski
d806639032 Merge "Fix comment typo in PeriodicAdvertisingParameters" 2021-03-03 18:45:54 +00:00
Jakub Pawlowski
5629c959bf Fix comment typo in PeriodicAdvertisingParameters
Bug: 176967118
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
Change-Id: I1777ca23ba6f395eeb2ec98b970ccbf920661663
2021-03-03 18:45:45 +00:00
Sarah Chin
08b9f41364 Merge "APIs for 5G slicing" 2021-03-03 18:42:20 +00:00
Patrick Baumann
8ee2b99d71 Merge "Parcel queriesProviders in ParsingPackageImpl" 2021-03-03 18:19:56 +00:00
Yan Yan
b9fdfa8270 Merge "Use VERSION_CODES.S instead of VERSION_CODES.R + 1" 2021-03-03 18:04:52 +00:00
Brad Ebinger
4d183b882d Merge "Move illegal state detection in stub classes to warning" 2021-03-03 17:45:49 +00:00
Sunil Ravi
063cf92aa8 WiFi: Define permissions for set/clear country code API
Added new signature permission for calling country code APIs.

Bug: 168743500
Test: Cts tests
Change-Id: Idb4f5627f5ef45b054a5a80ecfa0ae691bfec021
2021-03-03 17:31:10 +00:00
James Mattis
1258b5fec3 Merge "Adding additional docs for OemNetworkPreferences" 2021-03-03 17:25:01 +00:00
Xin Li
e085f87400 Merge RQ2A.210305.007
Bug: 180401296
Merged-In: I2958205678f4340e96ce6e845718e994a0231afc
Change-Id: I9f591a70330cf80de4139570caa0ca8b0af4cc3c
2021-03-03 09:12:09 -08:00
Varun Shah
0ef490024e Add OWNERS file for UsageStats unit tests.
Bug: n/a
Test: n/a
Change-Id: Iab4b0153c4e7bff94fb6a6d02b6439e3d6151820
2021-03-03 17:08:47 +00:00
Treehugger Robot
10eb5d0faf Merge "[FUI18] Expose notifyNetworkStatus as system API" 2021-03-03 15:49:06 +00:00
junyulai
c5bfa330bf [FUI19] Migrate ConnectivityService to use NetworkStatsManager
Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: Iaefd99f87ae96bc9d97d139bcd92a3fe8de917d2
2021-03-03 20:01:51 +08:00
junyulai
33b44da527 [FUI18] Expose notifyNetworkStatus as system API
Test: m -j doc-comment-check-docs
Bug: 174123988
Merged-In: I11d4c9ab24de87fb2ad120e3787b78b73133e874
Change-Id: I11d4c9ab24de87fb2ad120e3787b78b73133e874
  (cherry-picked from ag/13749978)
2021-03-03 20:01:46 +08:00
lifr
e4a6c677ba [CS05]Remove the hidden API usage of MetricsLogger
Legacy metrics are unused and deprecated, so they are being removed.
Therefore, delete the usage of the hidden MetricsLogger API.

Bug: 157966864
Test: atest CtsNetTestCases
      atest CaptivePortalTest
      atest ConnectivityServiceTest
Change-Id: I51241f5d50ec580015882c84dd917b015c700c7c
2021-03-03 10:17:52 +00:00
Abhijeet Kaur
ddd2a13c38 Merge "Update mount values to be consistent with IVold.aidl" 2021-03-03 10:09:46 +00:00
Yi Kong
453966a20b Merge "profcollect: Update binder method names" 2021-03-03 08:16:51 +00:00
Treehugger Robot
ad1bbc487c Merge "Additional metadata keys for Fast Pair" 2021-03-03 08:15:22 +00:00
Treehugger Robot
15b5b58a7c Merge "Extend timeout for receiving broadcasts" 2021-03-03 07:52:41 +00:00
Aaron Huang
121267c6d1 Remove PersistableBundle(Bundle) usage from ConnectivityService
Because the constuctor PersistableBundle(Bundle) is a hidden
API which is not visible to connectivity mainline module.
Currently, EVENT_NETWORK_TESTED and EVENT_DATA_STALL_SUSPECTED
are two events sent by ConnectivityService so they can build a
PersistableBundle directly and send PersistableBundle instead of
setting Bundle in the data field of the Message.

For EVENT_NETWORK_TESTED, add a new PersistableBundle member in
ConnectivityReportEvent so that the PersistableBundle can be
passed with ConnectivityReportEvent.

For EVENT_DATA_STALL_SUSPECTED, create a Pair<Long, PersistableBundle>
and put this in .obj of the Message, then the PersistableBundle can be
sent with timestampMillis together.

Bug: 177865050
Test: FrameworksNetTests
Change-Id: Ia2220f33f000e7c9439d97617cc08014dc4478a3
2021-03-03 15:43:30 +08:00
daren.liao
a2dbb68546 Handle messages in standby for DeviceDiscoveryAction
The modification of HdmiCecStandbyModeHandler is for processing
DeviceDiscoveryAction on quiescent boot, where the power status
is POWER_STATUS_STANDBY.

Without the modification,<Device vendor ID> and <Report power status>
are not passed to DeviceDiscoveryAction, and CEC framework cannot
establish device information correctly.

Bug: 174982925

Change-Id: Ie0a7ec3892d5f0a97d192b184454c9bde9f92a09
2021-03-03 06:41:54 +00:00
Daren Liao
cf48b9c899 Prevent periodic actions from starting twice
Check if HotplugDetectAction and PowerStatusMonitorAction exists
before starting them

Bug: 174982925

Change-Id: I5199dc85a15fa3fd5ac5b962eb29d73d2bda6440
2021-03-03 14:32:57 +08:00
Remi NGUYEN VAN
992369f32d Extend timeout for receiving broadcasts
The test is currently flaky as broadcasts can take a long time
to be delivered, often more than 500ms.
Extend the timeout for broadcasts to 30s.

Historically the test would wait for broadcasts for at most 500ms,
but not verify that they were received before proceeding. This was
fixed recently by adding an assertion, but the assertion needs to
give enough time for the broadcast to be received.

Bug: 173331190
Change-Id: I0760f3418c635aa4d68de5aefdb7120a9d3e930b
Test: atest FrameworksNetTests
2021-03-03 06:26:16 +00:00
Benedict Wong
a3fab46d7b Merge changes Ib439bde4,I5bc0fe94,I72abf1e2,Id1813bcb
* changes:
  Call setUnderlyingNetwork to complete VCN MOBIKE
  Rename isRunning to isQuitting, and flip all booleans
  Notify Vcn of VcnGatewayConnection quits
  Allow NETWORK_LOST disconnections to retry
2021-03-03 06:02:20 +00:00
Lorenzo Colitti
eee631bc63 Address comments on aosp/1612040.
Bug: 174123988
Test: atest FrameworksNetTests
Change-Id: I550fe428d640aab6264aface21fbafb1fd268bff
2021-03-03 14:39:09 +09:00
Lorenzo Colitti
8c93a76901 Merge changes Idfb5e149,Ia52b24c5
* changes:
  Stop using NetworkState internally in ConnectivityService.
  Isolate an ad-hoc legacy API codepath.
2021-03-03 05:35:28 +00:00
Chalard Jean
0e2d1fdb31 Fix a bug in RequestReassignment#toString
This fixes a small bug in debug code where the wrong
request would be displayed for RequestReassignment#toString.

Test: manual
Change-Id: Ie8d983593e67082eb818ef65bd8708e97596bce2
2021-03-03 14:24:13 +09:00