Commit Graph

7837 Commits

Author SHA1 Message Date
markchien
c70070914f [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
2019-11-29 07:05:21 +00:00
Hugo Benichi
3d23d352ca Merge "BitUtils: support packing/unpacking negative long values" am: cd46b46d51 am: c9b854f5be
am: af06575aef

Change-Id: Iaa8c4084f0754781ea3e6a0a9202d9e102d5f074
2019-11-27 07:58:33 -08:00
Hugo Benichi
af06575aef Merge "BitUtils: support packing/unpacking negative long values" am: cd46b46d51
am: c9b854f5be

Change-Id: If85ad67169295e8725d654966c4d0f42439f10c4
2019-11-27 07:52:49 -08:00
Hugo Benichi
c9b854f5be Merge "BitUtils: support packing/unpacking negative long values"
am: cd46b46d51

Change-Id: Ibd0c4756fb0f888a506111bb2f33c60debe33d57
2019-11-27 07:46:56 -08:00
Treehugger Robot
cd46b46d51 Merge "BitUtils: support packing/unpacking negative long values" 2019-11-27 15:34:46 +00:00
Hugo Benichi
31270734a2 BitUtils: support packing/unpacking negative long values
Bug: None
Test: Compiled. New unit tests.
Change-Id: Ia543285e206b0bbc7d64458da10e68a951f9eec1
2019-11-27 11:00:32 +09:00
Chiachang Wang
ac0bc78aed Merge "Refactor based on new NetworkMonitor" am: 4a41fe8072 am: 02bec631c5
am: 4a30d55644

Change-Id: I7b5bb41d2e5d99a81565506a4274a38156e3afc2
2019-11-26 04:15:47 -08:00
Chiachang Wang
4a30d55644 Merge "Refactor based on new NetworkMonitor" am: 4a41fe8072
am: 02bec631c5

Change-Id: I631487e6ccc500dd921ec04fa82713f35523dce8
2019-11-26 04:10:13 -08:00
Chiachang Wang
02bec631c5 Merge "Refactor based on new NetworkMonitor"
am: 4a41fe8072

Change-Id: I6f2f42dee11b2ee3db9e52817cd7aa871539aaed
2019-11-26 04:03:47 -08:00
Chiachang Wang
4a41fe8072 Merge "Refactor based on new NetworkMonitor" 2019-11-26 10:52:33 +00:00
Chiachang Wang
bfb1ab4b02 Refactor based on new NetworkMonitor
Bug: 130325409
Test: atest NetworkStackIntegrationTests
Change-Id: I4426be339cb9990c05b3f4fb5666bd70bcd0f78e
2019-11-26 09:10:45 +08:00
Chalard Jean
646171fe03 Merge "[NS A11] Small refactor" am: a8e2afde61 am: 22391f5092
am: 758e340c84

Change-Id: I9130f7d348b53333188de759fb9529b74be63323
2019-11-25 10:38:23 -08:00
Paul Hu
f988293d3c Merge "Fix hasUseBackgroundNetworksPermission issue." am: 0a6f03873a am: d47085c444
am: 36872f15f5

Change-Id: I8a1575dedd6e3b7a8b60ee2ffd475d790aec55c4
2019-11-25 10:35:55 -08:00
Lucas Lin
b0450caf3f Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" am: fc8c834040 am: 22ba258b99
am: 61fcd4126f

Change-Id: I9539e73842040e3a38a64c4b4863adfe32c893e9
2019-11-25 10:33:04 -08:00
paulhu
ace8807b44 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" am: 5d6da8de07 am: 9717a198bb
am: 97e1cdb105

Change-Id: I0d50f6bccc9fb18a54865b45a7e8d1eaff01ea9e
2019-11-25 08:23:23 -08:00
Chalard Jean
6aaf2bc277 Merge changes I195d894e,I7069c111 am: 3d59a27d1c am: cc64d36d32
am: 6e40e5fa0b

Change-Id: I3a8926f3b444f19b6db200c361ce348da25dbcb8
2019-11-25 07:20:17 -08:00
Aaron Huang
402cea9bfd Merge "Expose IpConfiguration and ProxyInfo APIs" am: c2df0b68c4 am: 10481a8f5f
am: d91e5a5ccb

Change-Id: Iebd6cdd25f61a2255f1e17984bafda4c79a7d518
2019-11-25 07:16:49 -08:00
Chalard Jean
758e340c84 Merge "[NS A11] Small refactor" am: a8e2afde61
am: 22391f5092

Change-Id: Ib593282845cca1bbd3a2b36a2049914fc73cbbd1
2019-11-25 06:22:26 -08:00
Paul Hu
36872f15f5 Merge "Fix hasUseBackgroundNetworksPermission issue." am: 0a6f03873a
am: d47085c444

Change-Id: I8b03c9e23ffc9ff46264d6307fb841a7eda76a76
2019-11-25 06:18:10 -08:00
Chalard Jean
22391f5092 Merge "[NS A11] Small refactor"
am: a8e2afde61

Change-Id: I317e6b99a51ddb0a3e49b08c595eb42f4edad1e9
2019-11-25 06:09:17 -08:00
Lucas Lin
61fcd4126f Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" am: fc8c834040
am: 22ba258b99

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

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

Change-Id: I2df410b6ceb0f9a28ee0f171bb2ff7cadd4cdefb
2019-11-25 05:56:29 -08:00
Chalard Jean
a8e2afde61 Merge "[NS A11] Small refactor" 2019-11-25 08:55:19 +00:00
Paul Hu
0a6f03873a Merge "Fix hasUseBackgroundNetworksPermission issue." 2019-11-25 08:41:05 +00:00
Lucas Lin
fc8c834040 Merge "Fix title of PRIVATE_DNS_BROKEN notification when connecting VPN" 2019-11-25 08:14:09 +00:00
paulhu
97e1cdb105 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" am: 5d6da8de07
am: 9717a198bb

Change-Id: I14ef8eaa83b3df3b032556504a23e6b17f02435d
2019-11-24 07:37:03 -08:00
paulhu
9717a198bb Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService"
am: 5d6da8de07

Change-Id: Ic4e26e2dcf6c68dcae9a840a3119283118e45193
2019-11-24 07:31:36 -08:00
Treehugger Robot
5d6da8de07 Merge "Adjust PermissionMonitor#startMonitoring in ConnectivityService" 2019-11-24 15:21:43 +00:00
paulhu
9b2c01a7f0 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
6e40e5fa0b Merge changes I195d894e,I7069c111 am: 3d59a27d1c
am: cc64d36d32

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

Change-Id: I8e41058df03284ca677bf67930c5702d7d6c63bb
2019-11-22 06:27:42 -08:00
Chalard Jean
3d59a27d1c 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
d91e5a5ccb Merge "Expose IpConfiguration and ProxyInfo APIs" am: c2df0b68c4
am: 10481a8f5f

Change-Id: I9ef7325d73b1df9b1a3eb32e419e4cd1caeb7729
2019-11-22 01:47:14 -08:00
Aaron Huang
10481a8f5f Merge "Expose IpConfiguration and ProxyInfo APIs"
am: c2df0b68c4

Change-Id: I7fa9b282ca87f0c442e267acb8424f6aeed5d3a0
2019-11-22 01:40:49 -08:00
Aaron Huang
c2df0b68c4 Merge "Expose IpConfiguration and ProxyInfo APIs" 2019-11-22 09:25:16 +00:00
lucaslin
784ca66669 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
ca7e22fea5 Merge "Cut the dependency to APN constants" am: f1df59afe3 am: ca757d6635
am: 832da6e8c4

Change-Id: I71f8a944fcb8b3d8199296aef67251b50abe6172
2019-11-21 05:00:52 -08:00
Chalard Jean
832da6e8c4 Merge "Cut the dependency to APN constants" am: f1df59afe3
am: ca757d6635

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

Change-Id: I140f294e0b044c66b925ae5c8ae6f2859c694753
2019-11-21 04:45:07 -08:00
Chalard Jean
f1df59afe3 Merge "Cut the dependency to APN constants" 2019-11-21 12:37:33 +00:00
Chalard Jean
7eb4a341be Merge changes I52f70756,Icc621f0a am: 3701fcd817 am: 41e584fa48
am: f9cc6e88e6

Change-Id: I7cfd5d6ba67a61ade33cb036250f598811a05b06
2019-11-21 01:03:56 -08:00
Chalard Jean
f9cc6e88e6 Merge changes I52f70756,Icc621f0a am: 3701fcd817
am: 41e584fa48

Change-Id: I1549ecd1361ee299073127e64108313872ed51b4
2019-11-21 00:56:08 -08:00
Chalard Jean
41e584fa48 Merge changes I52f70756,Icc621f0a
am: 3701fcd817

Change-Id: Idd877fbaaec711e379e3387efb5810e14508f2a1
2019-11-21 00:48:38 -08:00
Chalard Jean
3701fcd817 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
afaed1a5e0 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
0f7c764ef0 Merge "Use TelephonyManager instead of ITelephony Binder" am: 138728da9a am: 565782e413
am: 1e9a9a3d4f

Change-Id: I52c56a08092297b45b57f37f258f38ef5d93b393
2019-11-20 20:59:54 -08:00
Meng Wang
1e9a9a3d4f Merge "Use TelephonyManager instead of ITelephony Binder" am: 138728da9a
am: 565782e413

Change-Id: Iba67484246e81361ed540592558371cd7f2352c6
2019-11-20 20:51:54 -08:00
Meng Wang
565782e413 Merge "Use TelephonyManager instead of ITelephony Binder"
am: 138728da9a

Change-Id: I6172adeb2489abede44555b17340a6e58e23fafe
2019-11-20 20:44:19 -08:00
Meng Wang
138728da9a Merge "Use TelephonyManager instead of ITelephony Binder" 2019-11-21 04:36:10 +00:00