Commit Graph

7370 Commits

Author SHA1 Message Date
Paul Hu
6b16c42b64 Merge "Add SocketUtils CTS tests" am: c534d8ba36 am: f97246a87c am: f1ecafec13
am: 90f0cad875

Change-Id: I36252fdf516cf4a9d4506b615cdb38f5413739e5
2019-06-18 04:26:29 -07:00
Paul Hu
90f0cad875 Merge "Add SocketUtils CTS tests" am: c534d8ba36 am: f97246a87c
am: f1ecafec13

Change-Id: I36fb368217ff50319ae6f853f0d22cfc79541b40
2019-06-18 04:19:31 -07:00
Paul Hu
f1ecafec13 Merge "Add SocketUtils CTS tests" am: c534d8ba36
am: f97246a87c

Change-Id: I11e638a2fab004979298708a5c75bb7c2f208f67
2019-06-18 04:12:27 -07:00
Paul Hu
c534d8ba36 Merge "Add SocketUtils CTS tests" 2019-06-18 10:46:30 +00:00
Chalard Jean
8ce0736fd3 Merge "[automerger skipped] Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev am: 2ae76cdbe8 -s ours am: 4f9407b6e9 -s ours
am: 2f7b97e9b5 -s ours
am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 6eb4a5893b is in history

Change-Id: I5a32e2f718871d43e02b07f7c5ae8eca0c1cb44a
2019-06-17 23:55:17 -07:00
Chalard Jean
efe37f22f6 [automerger skipped] Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev am: 2ae76cdbe8 am: 5fa9d376ea -s ours
am: 0853c50f94 -s ours
am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 6eb4a5893b is in history

Change-Id: Ida933ad5a9fec92e61696f0433ffe71d46a1fd4e
2019-06-17 23:53:12 -07:00
Android Build Merger (Role)
2f7b97e9b5 Merge "[automerger skipped] Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev am: 2ae76cdbe8 -s ours am: 4f9407b6e9 -s ours am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 6eb4a5893b is in history" into qt-r1-dev-plus-aosp 2019-06-18 06:47:03 +00:00
Chalard Jean
1b56ee8e25 [automerger skipped] Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev am: 2ae76cdbe8 -s ours
am: 4f9407b6e9 -s ours
am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 6eb4a5893b is in history

Change-Id: I45912237edf2f485e6e747c7b4878eb440096f18
2019-06-17 23:46:20 -07:00
Chalard Jean
0853c50f94 [automerger skipped] Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev am: 2ae76cdbe8
am: 5fa9d376ea -s ours
am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 6eb4a5893b is in history

Change-Id: Icb639762f04fbae7129a1962548dfd0da200e886
2019-06-17 23:45:18 -07:00
Chalard Jean
4f9407b6e9 [automerger skipped] Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev
am: 2ae76cdbe8 -s ours
am skip reason: change_id I56c86b0c1912064d5a642991df32d2cefb6a8d5b with SHA1 6eb4a5893b is in history

Change-Id: Ib3b27436b44e678f026ce5026abf23db2f50a4cf
2019-06-17 23:35:11 -07:00
Chalard Jean
d47182e342 Remove the <= P restriction for WIFI_P2P
This is still sent in an intent.

Bug: 131764329
Fixes: 131764329
Merged-In: I56c86b0c1912064d5a642991df32d2cefb6a8d5b
Change-Id: I64b9d632be97dc51e6085162371bb8c19f410258
(cherry picked from commit e546cb0bd16b7359feeb3c46ba52e64cf91ae4d3)
2019-06-18 06:15:58 +00:00
Varun Anand
b8d1eff294 Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459 am: 2d731828cb am: 48f59a0fdf am: dd947a4fd1
am: d01416edfc

Change-Id: I8415a7c91158cce99e91e6054ed4f40e44563b89
2019-06-17 10:59:29 -07:00
Varun Anand
d01416edfc Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459 am: 2d731828cb am: 48f59a0fdf
am: dd947a4fd1

Change-Id: I16884eef6e2b8d64031363cfb4adacc4a0a9ead7
2019-06-17 10:43:22 -07:00
Varun Anand
dd947a4fd1 Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459 am: 2d731828cb
am: 48f59a0fdf

Change-Id: I960e94b03b29282ae2b03f78a19ed2692bd88e05
2019-06-17 10:33:53 -07:00
Varun Anand
2d731828cb Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459
* changes:
  Remove VPN info arrays from NetworkStats(Observer|Recorder)
  NetworkStatsFactory: Take VPNs into account for network/battery stats
  Remove duplicate line in clat_simple test file
  Remove unused lastStats parameter
  Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
2019-06-17 15:56:24 +00:00
Chalard Jean
e0fbf3fe88 Merge "Remove the <= P restriction for WIFI_P2P" am: ea24a290bd am: bb754c9c8d am: 0d00b3cfd2
am: 1552a79f96

Change-Id: I78bc539eb0504473f67914414b8bf062dee093b4
2019-06-17 08:43:32 -07:00
Chalard Jean
1552a79f96 Merge "Remove the <= P restriction for WIFI_P2P" am: ea24a290bd am: bb754c9c8d
am: 0d00b3cfd2

Change-Id: I56e16f7a29f20e4ebbbcef2228fc2935b41df564
2019-06-17 08:28:25 -07:00
Chalard Jean
0d00b3cfd2 Merge "Remove the <= P restriction for WIFI_P2P" am: ea24a290bd
am: bb754c9c8d

Change-Id: I14f5865249740587d550ac31b59883f4a87fd4a1
2019-06-17 08:20:18 -07:00
Treehugger Robot
ea24a290bd Merge "Remove the <= P restriction for WIFI_P2P" 2019-06-17 14:58:21 +00:00
Chalard Jean
6ea987f302 Merge "[automerger skipped] Merge changes I80bebcd0,I35f3718f into qt-dev am: 08793a3b64 am: a63b604929 -s ours
am: f3a9c9809d -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 1e3b152eca is in history

Change-Id: Ibb2e2d45f5ace7a4e738daf79ff2947631133068
2019-06-17 07:39:36 -07:00
Chalard Jean
cfe5346331 [automerger skipped] Merge changes I80bebcd0,I35f3718f into qt-dev am: 08793a3b64 -s ours am: cf5d7c17a1 -s ours
am: 06a902d375 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 1e3b152eca is in history

Change-Id: I64703d9686828c7073299e00804b6942ac7ae018
2019-06-17 07:37:49 -07:00
Android Build Merger (Role)
f3a9c9809d Merge "[automerger skipped] Merge changes I80bebcd0,I35f3718f into qt-dev am: 08793a3b64 am: a63b604929 -s ours am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 1e3b152eca is in history" into qt-r1-dev-plus-aosp 2019-06-17 14:31:27 +00:00
Chalard Jean
25b656790d [automerger skipped] Merge changes I80bebcd0,I35f3718f into qt-dev am: 08793a3b64
am: a63b604929 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 1e3b152eca is in history

Change-Id: Idbcfe381f246a6d9c7e9ef3c51150f6f2a065230
2019-06-17 07:29:56 -07:00
Chalard Jean
06a902d375 [automerger skipped] Merge changes I80bebcd0,I35f3718f into qt-dev am: 08793a3b64 -s ours
am: cf5d7c17a1 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 1e3b152eca is in history

Change-Id: Iad5f4f152115dd4cbb31dbe7e37b3aea0b6ce071
2019-06-17 07:29:54 -07:00
Chalard Jean
cf5d7c17a1 [automerger skipped] Merge changes I80bebcd0,I35f3718f into qt-dev
am: 08793a3b64 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 1e3b152eca is in history

Change-Id: I9094b83959e1f75f90edac095060240c129b73b0
2019-06-17 07:21:50 -07:00
Chalard Jean
342c3394d0 Simplification of code to prevent a Log.wtf in expected cases.
This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.

Bug: 135043192
Test: atest FrameworksNetTests
Merged-In: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
Change-Id: I80bebcd04c277f6e4b0665fe1253b2309e3bc535
(cherry picked from commit e1f5759319a4559b3cf89029449878dc56f92bb7)
2019-06-17 13:16:46 +00:00
Chalard Jean
57aa680f18 Merge "Simplification of code to prevent a Log.wtf in expected cases." am: 3ef0c36587 am: fbc68b975a am: 8d69c6dca3
am: 1c44f05067

Change-Id: I80bebcd04c277f6e4b0665fe1253b2309e3bc535
2019-06-17 04:42:04 -07:00
Chalard Jean
1c44f05067 Merge "Simplification of code to prevent a Log.wtf in expected cases." am: 3ef0c36587 am: fbc68b975a
am: 8d69c6dca3

Change-Id: I846943dc91ef3cb6dc7516ba38dc93fb8a80bb88
2019-06-17 04:34:32 -07:00
Chalard Jean
8d69c6dca3 Merge "Simplification of code to prevent a Log.wtf in expected cases." am: 3ef0c36587
am: fbc68b975a

Change-Id: I5f5fa22468c8db09e4eeb3d446220b4ebc396d98
2019-06-17 04:24:08 -07:00
Chalard Jean
6eb4a5893b Remove the <= P restriction for WIFI_P2P
This is still sent in an intent.

Bug: 975059
Change-Id: I56c86b0c1912064d5a642991df32d2cefb6a8d5b
2019-06-17 19:46:34 +09:00
Chalard Jean
3ef0c36587 Merge "Simplification of code to prevent a Log.wtf in expected cases." 2019-06-17 10:37:50 +00:00
Chalard Jean
1e3b152eca Simplification of code to prevent a Log.wtf in expected cases.
This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.

Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
2019-06-17 18:01:35 +09:00
Xiao Ma
9e42768f01 Merge "Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev am: 0cb53125b1 am: bfbb0f7ef9" into qt-r1-dev-plus-aosp
am: b78839e095

Change-Id: Id29b439f342ee0ef090376135f479e23ee2c0ba5
2019-06-16 21:33:06 -07:00
Xiao Ma
b187ae7c7a Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev am: 0cb53125b1 am: adbde27464
am: 0bac5c866c

Change-Id: Ie4936d48f4a3638f69e909dfc5a61ac848d5ac12
2019-06-16 21:31:11 -07:00
Android Build Merger (Role)
b78839e095 Merge "Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev am: 0cb53125b1 am: bfbb0f7ef9" into qt-r1-dev-plus-aosp 2019-06-17 04:23:02 +00:00
Xiao Ma
20c4d224e9 Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev am: 0cb53125b1
am: bfbb0f7ef9

Change-Id: Ib4aa84f745ae26865a94325c8ba8bf8e5d6f9189
2019-06-16 21:22:17 -07:00
Xiao Ma
0bac5c866c Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev am: 0cb53125b1
am: adbde27464

Change-Id: Id2fb47805befac50c0428eca30ffe93590686c01
2019-06-16 21:21:21 -07:00
Xiao Ma
adbde27464 Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev
am: 0cb53125b1

Change-Id: I42959ec5d1194851294e007e6e3d872678a85b6d
2019-06-16 21:15:04 -07:00
Chiachang Wang
77c880ad94 Suppress the wtf log for notifications that are expected
PARTIAL and NO_INTERNET may happen in the real world for
those transport types that provide internet. These two
notification types should be reasonable notificaitons, not a
terrible failure as the log. For Q, it may be too risky to
display more notifications with other information instead of
SSID. Thus, suppress the wtf log for these two notifications.

Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: I35f3718fa93b403858587d918f0bc596f6c92f3e
Merged-In: I91b92249dc7905aadbc59df50c3bc6da30a8590e
Merged-In: Ia1c2a765b0fb0cc8d440c02533bdc15774a5a3ef
(cherry picked from commit ed0a54bd07ea1c9072459bafeaf796eaa4dad4c5)
2019-06-17 02:09:27 +00:00
TreeHugger Robot
0cb53125b1 Merge "Restore the Private DNS settings to default mode upon network resets." into qt-dev 2019-06-17 01:08:00 +00:00
Benedict Wong
255eebc51e Remove VPN info arrays from NetworkStats(Observer|Recorder)
This change removes the now-unused VPN arrays in the network stats
observer and recorder classes. These are always null values in every
call site.

Bug: 113122541
Bug: 120145746
Bug: 129264869
Bug: 134244752
Test: FrameworksNetTest passing
Test: Manual tests show data usage fixes maintained.
Change-Id: Ieb8645acc400fdaeb0df7092c5369b96f9f35af9
2019-06-14 11:41:31 -07:00
Benedict Wong
b98e069317 NetworkStatsFactory: Take VPNs into account for network/battery stats
This change fixes detailed UID stats to ensure network and battery stats
both take VPNs into account. NetworkStatsFactory is being made aware of
VPNs enabled, and the full set of underlying networks present.

Since traffic can only be migrated over a NetworkStats delta, NSF
maintains a NetworkStats snapshot across all UIDs/ifaces/tags.

This snapshot gets updated whenever NSF records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or NetworkStatsService's
getDetailedUidStats() method being called.

This change widens the scope of the existing mPersistentSnapshot lock,
renaming it to mPersistentDataLock, and ensures that TUN migrations are
not done in parallel. Additionally, mVpnInfos is updated via
pointer-swapping, to reduce the scope of the mPersistentDataLock.

The safety of this change is predicated on:
1. NetworkStatsFactory lock not held, so services cannot deadlock through
the cyclical lock.

2. The broadening of the scope of the lock in NetworkStatsFactory has no
threading implications, as it is always the last (leaf node) lock held,
and therefore is impossible to have lock inversion.

Additionally, to ensure VPNs work with 464xlat, the VPN info passed to
the NetworkStatsFactory includes all underlying interfaces, instead of
only passing the first one.

This (partially) re-applies changes from:
aosp/972848: Add one more test for VPN usage stats.
aosp/972847: Addressing comments for http://ag/7700679.
aosp/885338: NetworkStatsService: Fix getDetailedUidStats to take VPNs
             into account.
Co-developed with: Varun Anand <vaanand@google.com>

Bug: 113122541
Bug: 120145746
Bug: 129264869
Bug: 134244752
Test: FrameworksNetTest passing
Test: Manual tests show data usage fixes maintained.
Change-Id: I6466ec1411fc5ed6954125d27d353b6cd1be719e
2019-06-14 11:41:31 -07:00
Benedict Wong
de27c6d055 Remove duplicate line in clat_simple test file
This change removes a redundant line in the xt_qtaguid_with_clat test
file.

Bug: 134244752
Test: FrameworksNetTest passing
Change-Id: I87deb82ba960102b617ab27362e8c5899fa478f8
2019-06-14 11:16:03 -07:00
Heemin Seog
d6bb517577 Merge "Change factoryReset to succeed for Settings" am: 67322170b5 am: 9d59a75463 am: 86ee3e922d
am: 6f44822682

Change-Id: Ib8361625c9d0ef00f6cbbb6e35b5167ce8d7dcd6
2019-06-14 00:39:39 -07:00
paulhu
635d4ca3f0 Add SocketUtils CTS tests
Test APIs below:
makeNetlinkSocketAddress(int, int)
makePacketSocketAddress(short, int)
makePacketSocketAddress(int, byte[])
closeSocket(java.io.FileDescriptor)

Bug:129200596
Test: atest FrameworksNetTests
      atest CtsNetTestCases --instant

Change-Id: I395360161123d8b712b6c2cf3251b8144641350e
2019-06-14 15:33:52 +08:00
Heemin Seog
6f44822682 Merge "Change factoryReset to succeed for Settings" am: 67322170b5 am: 9d59a75463
am: 86ee3e922d

Change-Id: I5b826a4744cd4dfc8848ab6cd8313307d537d68b
2019-06-14 00:31:38 -07:00
Heemin Seog
86ee3e922d Merge "Change factoryReset to succeed for Settings" am: 67322170b5
am: 9d59a75463

Change-Id: I9b7ce285fc205255dd9e2e0fa71afd0f8392d243
2019-06-14 00:25:17 -07:00
Treehugger Robot
67322170b5 Merge "Change factoryReset to succeed for Settings" 2019-06-14 07:02:17 +00:00
Lorenzo Colitti
6f2385bbca Merge "Change factoryReset to succeed for Settings" into qt-dev am: a86fb41d68 am: 5015d9fa86
am: 84bd2bc63e

Change-Id: I6537cc1b37184c0db27ff9e93a3b55f38292b2be
2019-06-13 22:46:03 -07:00
Lorenzo Colitti
e0266ba227 Merge "Change factoryReset to succeed for Settings" into qt-dev am: a86fb41d68 am: 2d2d35427c
am: b1e757ebb8

Change-Id: I75b0f141421ff0eec3e9d62daf953600a8173186
2019-06-13 22:34:04 -07:00