Commit Graph

7821 Commits

Author SHA1 Message Date
Paul Hu
2dd1f14da1 Merge "Fix hasUseBackgroundNetworksPermission issue." am: bc582ab167 am: c4ca8c9877
am: 92079abc2d

Change-Id: I8a1575dedd6e3b7a8b60ee2ffd475d790aec55c4
2019-11-25 10:35:55 -08:00
Lucas Lin
a1265ce930 Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" am: acac9a269b am: e00efe4c24
am: 7e76a7bdb8

Change-Id: I9539e73842040e3a38a64c4b4863adfe32c893e9
2019-11-25 10:33:04 -08:00
paulhu
41de1e2c41 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" am: ac53988b48 am: 3f83cdb6f5
am: 9c674d1f37

Change-Id: I0d50f6bccc9fb18a54865b45a7e8d1eaff01ea9e
2019-11-25 08:23:23 -08:00
Chalard Jean
13aa1adc42 Merge changes I195d894e,I7069c111 am: ff8b7b351b am: f4cc54739a
am: 19bd6b4cb6

Change-Id: I3a8926f3b444f19b6db200c361ce348da25dbcb8
2019-11-25 07:20:17 -08:00
Aaron Huang
26477ec272 Merge "Expose IpConfiguration and ProxyInfo APIs" am: 1e6d453bc6 am: 2eb55c5f81
am: 0b9d4e8360

Change-Id: Iebd6cdd25f61a2255f1e17984bafda4c79a7d518
2019-11-25 07:16:49 -08:00
Paul Hu
92079abc2d Merge "Fix hasUseBackgroundNetworksPermission issue." am: bc582ab167
am: c4ca8c9877

Change-Id: I8b03c9e23ffc9ff46264d6307fb841a7eda76a76
2019-11-25 06:18:10 -08:00
Lucas Lin
7e76a7bdb8 Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" am: acac9a269b
am: e00efe4c24

Change-Id: I0cb5a78a4f95ad5f5668b6bee5394877f640a2d0
2019-11-25 06:08:58 -08:00
Paul Hu
c4ca8c9877 Merge "Fix hasUseBackgroundNetworksPermission issue."
am: bc582ab167

Change-Id: I6f378dcbbecb9848d02112b2d33c5a0f2d5c9d1f
2019-11-25 06:05:32 -08:00
Lucas Lin
e00efe4c24 Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN"
am: acac9a269b

Change-Id: I2df410b6ceb0f9a28ee0f171bb2ff7cadd4cdefb
2019-11-25 05:56:29 -08:00
Paul Hu
bc582ab167 Merge "Fix hasUseBackgroundNetworksPermission issue." 2019-11-25 08:41:05 +00:00
Lucas Lin
acac9a269b Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" 2019-11-25 08:14:09 +00:00
paulhu
9c674d1f37 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" am: ac53988b48
am: 3f83cdb6f5

Change-Id: I14ef8eaa83b3df3b032556504a23e6b17f02435d
2019-11-24 07:37:03 -08:00
paulhu
3f83cdb6f5 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService"
am: ac53988b48

Change-Id: Ic4e26e2dcf6c68dcae9a840a3119283118e45193
2019-11-24 07:31:36 -08:00
Treehugger Robot
ac53988b48 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" 2019-11-24 15:21:43 +00:00
paulhu
121b2fb600 Fix hasUseBackgroundNetworksPermission issue.
PermissionMonitor#hasUseBackgroundNetworksPermission only uses
the first package name of the uid for checking permission.
This is incorrect since each package declared different
permissions. So using the mApps which already checked both
network and using restricted network permissions. If uid is in
the mApps list that means uid has one of permission at least.

Bug: 135897744
Test: atest FrameworksNetTests
Change-Id: I3500a03ce06b5b822311ad0c67b606ce4039216a
2019-11-24 22:27:32 +08:00
Chalard Jean
19bd6b4cb6 Merge changes I195d894e,I7069c111 am: ff8b7b351b
am: f4cc54739a

Change-Id: Ia75369ad6b360644392766296542efa4a5fdf0ce
2019-11-22 06:33:34 -08:00
Chalard Jean
f4cc54739a Merge changes I195d894e,I7069c111
am: ff8b7b351b

Change-Id: I8e41058df03284ca677bf67930c5702d7d6c63bb
2019-11-22 06:27:42 -08:00
Chalard Jean
ff8b7b351b Merge changes I195d894e,I7069c111
* changes:
  [NS A10] Cleanup
  [NS A09] Always rematch all networks to requests
2019-11-22 14:08:09 +00:00
Aaron Huang
0b9d4e8360 Merge "Expose IpConfiguration and ProxyInfo APIs" am: 1e6d453bc6
am: 2eb55c5f81

Change-Id: I9ef7325d73b1df9b1a3eb32e419e4cd1caeb7729
2019-11-22 01:47:14 -08:00
Aaron Huang
2eb55c5f81 Merge "Expose IpConfiguration and ProxyInfo APIs"
am: 1e6d453bc6

Change-Id: I7fa9b282ca87f0c442e267acb8424f6aeed5d3a0
2019-11-22 01:40:49 -08:00
Aaron Huang
1e6d453bc6 Merge "Expose IpConfiguration and ProxyInfo APIs" 2019-11-22 09:25:16 +00:00
lucaslin
78bfa8c92d Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN
NetworkNotificationManager will only get the first transport
type from the NetworkCapabilities of network, and if the device
connects to a VPN and its underlying network is wifi, then the
first finding transport type will be TRANSPORT_WIFI. So, if the
private DNS is broken when device connected to VPN,
NetworkNotificationManager will try to get the SSID for the
title of notification but failed. For this kind of case, the
title of PRIVATE_DNS_BROKEN notification will show
"null has no internet access".

Bug: 143340533
Test: 1. Build pass.
      2. Connect to VPN and let private DNS to be broken, check
      title of PRIVATE_DNS_BROKEN notification.
      3. atest FrameworksNetTests

Change-Id: I1ed018cc8774d4fce4b94854f8e8703a28818463
2019-11-22 12:46:32 +08:00
Chalard Jean
7fa1f100d2 Merge "Cut the dependency to APN constants" am: b3c04f00fc am: ec0f7aaaf3
am: d021be89fb

Change-Id: I71f8a944fcb8b3d8199296aef67251b50abe6172
2019-11-21 05:00:52 -08:00
Chalard Jean
d021be89fb Merge "Cut the dependency to APN constants" am: b3c04f00fc
am: ec0f7aaaf3

Change-Id: I97f01b82916e66673339bef437d80927e78282ee
2019-11-21 04:52:31 -08:00
Chalard Jean
ec0f7aaaf3 Merge "Cut the dependency to APN constants"
am: b3c04f00fc

Change-Id: I140f294e0b044c66b925ae5c8ae6f2859c694753
2019-11-21 04:45:07 -08:00
Chalard Jean
b3c04f00fc Merge "Cut the dependency to APN constants" 2019-11-21 12:37:33 +00:00
Chalard Jean
815dff894b Merge changes I52f70756,Icc621f0a am: 2513c4cd2b am: 7422e8d4fa
am: 49e7dcb844

Change-Id: I7cfd5d6ba67a61ade33cb036250f598811a05b06
2019-11-21 01:03:56 -08:00
Chalard Jean
49e7dcb844 Merge changes I52f70756,Icc621f0a am: 2513c4cd2b
am: 7422e8d4fa

Change-Id: I1549ecd1361ee299073127e64108313872ed51b4
2019-11-21 00:56:08 -08:00
Chalard Jean
7422e8d4fa Merge changes I52f70756,Icc621f0a
am: 2513c4cd2b

Change-Id: Idd877fbaaec711e379e3387efb5810e14508f2a1
2019-11-21 00:48:38 -08:00
Chalard Jean
2513c4cd2b Merge changes I52f70756,Icc621f0a
* changes:
  [NS A08] Tiny refactoring
  [NS A07] Move the last side effects out of the decision loop.
2019-11-21 08:32:35 +00:00
Chalard Jean
1f42df12dc Cut the dependency to APN constants
With Telephony moving to Mainline these constants are not accessible
any more, and should not be made public. As they are only used by
a deprecated method that can only be called by apps with a target
SDK < M and only for one of the features it used to handle, copying
the constants until this method is completely removed is the simplest
way to go.

Test: FrameworksNetTests
Bug: 144454341
Change-Id: Iea18c8d2f2c8a40f04db9383d3f74b917267ba25
2019-11-21 14:48:00 +09:00
Meng Wang
e9adcc943e Merge "Use TelephonyManager instead of ITelephony Binder" am: 33046223a2 am: eb1e692b65
am: 21f23c28dc

Change-Id: I52c56a08092297b45b57f37f258f38ef5d93b393
2019-11-20 20:59:54 -08:00
Meng Wang
21f23c28dc Merge "Use TelephonyManager instead of ITelephony Binder" am: 33046223a2
am: eb1e692b65

Change-Id: Iba67484246e81361ed540592558371cd7f2352c6
2019-11-20 20:51:54 -08:00
Meng Wang
eb1e692b65 Merge "Use TelephonyManager instead of ITelephony Binder"
am: 33046223a2

Change-Id: I6172adeb2489abede44555b17340a6e58e23fafe
2019-11-20 20:44:19 -08:00
Meng Wang
33046223a2 Merge "Use TelephonyManager instead of ITelephony Binder" 2019-11-21 04:36:10 +00:00
Chalard Jean
48a1e1fcbb Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ... am: e2427502f1 am: 1a9849efbc
am: f599a82e31

Change-Id: Ia1b3c12a96df2774bc780e58d1c6748e1f61e180
2019-11-20 20:28:29 -08:00
Chalard Jean
f599a82e31 Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ... am: e2427502f1
am: 1a9849efbc

Change-Id: I11a181c4e378a41718843489a1ca286ddad2755d
2019-11-20 20:16:46 -08:00
Chalard Jean
1a9849efbc Merge changes I493b969c,I7b759425,I60fe318a,Ie4ae6a97,I2379e47b, ...
am: e2427502f1

Change-Id: Ic5b59cb5e23feaf7aac0075f16afa3da94d3628c
2019-11-20 20:08:51 -08:00
Meng Wang
91311c0033 Use TelephonyManager instead of ITelephony Binder
Bug: 140908357
Test: make
Change-Id: If3be915329cc27c560af3fd71a903984a626aca8
2019-11-20 10:05:33 -08:00
Chalard Jean
10d53ec99a Merge "Rename waitForConnectivityBroadcast" am: eb6a236187 am: 4073f980bf
am: c16dd33261

Change-Id: I9c3197407c99bb209700364686ee64d6ccb07a06
2019-11-20 06:21:12 -08:00
Chalard Jean
c16dd33261 Merge "Rename waitForConnectivityBroadcast" am: eb6a236187
am: 4073f980bf

Change-Id: If7012f1f602a7290283d38dd61f309dc303a1c1b
2019-11-20 06:12:16 -08:00
Chalard Jean
4073f980bf Merge "Rename waitForConnectivityBroadcast"
am: eb6a236187

Change-Id: I10ecb001c2654de1636e639ac52c719f03e007a4
2019-11-20 06:04:45 -08:00
Aaron Huang
a523b44d11 Expose IpConfiguration and ProxyInfo APIs
Moving IpConfiguration methods to system API
for mainline support.

Public copy constructors of ProxyInfo and add
buildPacProxy(Uri, int) to create a new proxy
properties.

Bug: 139268426
Bug: 135998869
Test: atest android.net.cts
      atest android.net.wifi.cts
      atest FrameworksNetTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I07bcd2a34a222ea2b3cf0d8b497f051011c41c2c
2019-11-20 20:07:05 +08:00
Chalard Jean
a03df69114 [NS A10] Cleanup
Reap networks after all networks have been rematched.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I195d894e702f1c738ea25596704ea73a3ae55031
2019-11-20 20:42:41 +09:00
Chalard Jean
6090209bc1 [NS A09] Always rematch all networks to requests
This is a regression in performance but it is necessary for
the sake of refactoring ; when the refactoring is over, the
performance will be improved back.

Test: ConnectivityServiceTest
Change-Id: I7069c11193dccb7dce6af65cfb731c0f4ad93629
2019-11-20 20:42:40 +09:00
Chalard Jean
3a990e150b [NS A08] Tiny refactoring
Test: ConnectivityServiceTest
Change-Id: I52f70756003cef61b450e9c1e9e57dc70f3091d5
2019-11-20 20:32:57 +09:00
Chalard Jean
f791454420 [NS A06] Move more side effects out of the decision loop
This is a no-op.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I493b969c278097a289a1ef689ca268606227ae79
2019-11-20 20:32:57 +09:00
Chalard Jean
962d7fa543 [NS A07] Move the last side effects out of the decision loop.
This is a no-op. Reviewers : please scrutinize this for behavior
changes.

Test: ConnectivityServiceTest
Change-Id: Icc621f0a64a72dae0192843e6b6587ec4e31ea4d
2019-11-20 20:32:57 +09:00
Chalard Jean
b1d1cb83fe [NS A05] Move some side effects out of the network decision loop
This moves the side effects done by the decision loop when a
network stops satisfying a request to outside the decision loop.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I7b7594250d5c04362c699e065d30a1181effed09
2019-11-20 20:32:57 +09:00
Chalard Jean
9fe3ecafc4 [NS A04] Store changes in rematchNetworkAndRequests in a map
This is a preliminary change to move the code that chooses what
network gets assigned to what request out of ConnectivityService.

By storing the list of changes first, it becomes possible to move
the changes with side-effects to a later part of the code, after
the decisions have been made. This move is implemented in a later
change.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I60fe318a8eabf13d1c07b144367ca92cf07e734e
2019-11-20 20:32:56 +09:00