343780 Commits

Author SHA1 Message Date
Xiangyu/Malcolm Chen
71793be6bb Merge "Added network service interface" 2018-01-24 19:13:58 +00:00
Jack Yu
d5f1de19f4 Added network service interface
The interface for mobile network service. This is the base class
for vendor or first party data service provider to implement
the network service for cellular or IWLAN network support.

Test: Manual
bug: 64132030
Change-Id: Ia358cbb18fc6d15dcc45c75f14b7c952f899e101
2018-01-24 19:13:45 +00:00
Jack Yu
a299bf25af Added slot id in the internal API
For multiple clients, only one binder will be returned
by the system. Given this fact we need to add slot id into
the internal API to distinguish between requests from different
slots.

Test: Manual
Bug: 64132030
Change-Id: I0272eebf6e4413ecc6b4a2b33b87e259cd2afaa5
2018-01-24 10:57:15 -08:00
Benedict Wong
475fe28c50 Merge "Add tunnel-mode calls to netd in IpSecService" 2018-01-24 18:10:55 +00:00
Treehugger Robot
0aafefb113 Merge "BT-HFP: Update Bluetooth headset state handler to Multi-HFP" 2018-01-24 18:03:21 +00:00
Holly Jiuyu Sun
0ee6dfee1a Revert "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager.""
This reverts commit 5c9dcc0e7202884b3a4a54c28f30854f377fde29.

Reason for revert: The original failure was not caused by this CL and this CL does not depend on the broken one.

Change-Id: Ia60e21f634d8f307f1cf5a3992cb38de04c5f443
2018-01-24 17:57:39 +00:00
Jack He
8dd33941a4 BT-HFP: Update Bluetooth headset state handler to Multi-HFP
* When multiple headset devices are connected at the same time, at most one
  device can be used for SCO audio at any time. This device is called
  Active Device and is indicated by either
  BluetoothHeadset.getActiveDevice() or
  BluetoothHeadset.ACTIVE_DEVICE_CHANGED intent. It can also be set
  through BluetoothHeadset.setActiveDevice(BluetoothDevice) internal API.
* This change let AudioService to listen to ACTIVE_DEVICE_CHANGED intent
  instead of CONNECTION_STATE_CHANGED intent since it is the active
  device that AudioService cares about, not the list of connected
  devices.
* Everytime a new active device is set, AudioService will treat the old
  one (if not null) as disconnected and call disconnection methods in
  audio framework and the new active device is regarded as newly
  connected and connection methods will be called by AudioService.
* When disconnectHeadset() is called, active device will be set to null

Bug: 71875419
Test: compile, connect multiple HFP devices and switch active device
      among them
Change-Id: I148cca079d36a2dfc6a46b8d42ba69821c9c6de3
2018-01-24 16:27:15 +00:00
Eric Schwarzenbach
c584d2772d Merge "Add PhysicalChannelConfig." 2018-01-24 16:17:53 +00:00
David Srbecky
3bb32503d4 Add dalvik.vm.minidebuginfo property for ART
The property enables generation of mini-debug-info for JIT.

Change-Id: I1cfce8b1b463d9e45bbe823c285c1639653bb1b5
2018-01-24 15:54:27 +00:00
David Brazdil
7c48e0e074 Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps
For now, system apps will be exempt from hidden API access checks.
Pass the appropriate flag to dexopt.

Test: manual
Bug: 64382372
Bug: 72305689
Merged-In: I5676ffa3a5ba680bf5f6bab0b62f0acf4a933097
Change-Id: Idc3067d2c6040f15fe0f051090ba45efe591ebae
2018-01-24 14:12:33 +00:00
Nicolas Geoffray
1f568c14ac Merge "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager."" 2018-01-24 10:44:10 +00:00
Benoit Lamarche
4152497b4b Merge "Fail when there is an ASM error" 2018-01-24 09:59:28 +00:00
Nicolas Geoffray
5c9dcc0e72 Revert "Add getUiccSlots() and switchSlots() in TelephonyManager."
AOSP build broken.

Bug: 71914112

This reverts commit 2f87d7b2ee5097eae4e2a62858fbe221dac857f6.

Change-Id: I53537a6da7616fe6dbbb79927b32720bbeaf1f69
2018-01-24 09:11:40 +00:00
Benedict Wong
0fe58a93df Add tunnel-mode calls to netd in IpSecService
Adds calls to relevant netd methods in IpSecService, enabling Tunnel
mode functionality.

Bug: 63588681
Test: Compiles, passing CTS + unit tests
Change-Id: I6deb68584cddb03f21bd76370d4ef69cadc1bf16
2018-01-24 08:19:55 +00:00
Benedict Wong
f811dff3bc Merge "Add TunnelInterface API and KernelResourceRecords" 2018-01-24 07:25:04 +00:00
Benedict Wong
8149f6eb6c Add TunnelInterface API and KernelResourceRecords
This change adds one KernelResourceRecord type (TunnelInterfaceRecord),
and adds methods for the creation of TunnelInterfaces, as well as the
application of Transforms to the given TunnelInterfaces

As part of the generation of ikeys/okeys, a ReserveKeyTracker manages a
java bitset to avoid collisions and reserve/release keys.

Bug: 63588681
Test: Compiles, CTS, unit tests all pass on AOSP_marlin
Change-Id: I9e9b6455e27073acd4491eae666aa966b3b10e0f
2018-01-24 07:24:27 +00:00
Eric Schwarzenbach
5c6b3a3557 Add PhysicalChannelConfig.
Adds a field to PhoneStateListener to listen for changes to the
PhysicalChannelConfig list.

Bug: 72117533
Test: make
Change-Id: I353a4b90354d54948bce75968fb5fe1803efd093
2018-01-23 23:08:56 -08:00
Benedict Wong
73f79ceae9 Merge "Add xfrm mark in IpSecConfig" 2018-01-24 05:53:29 +00:00
Holly Jiuyu Sun
8fd5b7e1c3 Merge "Add getUiccSlots() and switchSlots() in TelephonyManager." 2018-01-24 05:08:19 +00:00
Cassie Han
eb9452a08d Merge "Move android.provider.Telephony.SECRET_CODE to Telephony.Intents." 2018-01-24 04:55:32 +00:00
Chalard Jean
6568170b32 Merge changes I3b16caad,Iaf5ea7ab,I09a94042,I69a39039,I35300309, ...
* changes:
  Let network requests see VPNs.
  Move constants into a new file.
  Make sure listen requests from VPN apps see their own networks
  Add a test for new UID checking code.
  Remove UID_RANGES_ADDED and REMOVED.
  Move VPN allowed UIDs into NetworkCapabilities.
  Pre-import to remove a conflict.
2018-01-24 04:09:44 +00:00
Treehugger Robot
6e03224697 Merge changes from topic "bpfStats"
* changes:
  Use /proc/net/dev to get stats summary
  Add bpf support for NetworkStatsFactory
  Add BPF support for NetworkStatsService
2018-01-24 04:08:29 +00:00
Holly Jiuyu Sun
a85291bfcf Merge "Add cardId in EuiccCardManager API." 2018-01-24 04:06:40 +00:00
Benedict Wong
d056f32bd9 Merge "Expose applyTunnelModeTransform as a system API" 2018-01-24 01:42:30 +00:00
Holly Jiuyu Sun
c2779f56fb Add cardId in EuiccCardManager API.
Removed getEid() API.

Bug: 38206971
Test: test on phone
Change-Id: I7e484f889a780900acd3a05a96fbbc632e1ec682
2018-01-23 17:11:30 -08:00
Holly Jiuyu Sun
2378a2ca0b Merge "Make getIEuiccContronller() protected and non-static for CTS." 2018-01-24 01:09:44 +00:00
Jeremy Klein
45a9b5dbbc Add scan interval and window lengths to Settings.Global.
This will enable running experiments to determine the
effects on battery life of changing these values.

Bug: 71765044
Test: Just adding a key value here. This is basically a no-op.
Change-Id: I33a0b2da6e793ef508d020a3c2d321d5553c3fb1
2018-01-23 16:17:22 -08:00
Xiangyu/Malcolm Chen
afd65d9d1c Merge "Add TransportType in AccessNetworkConstants.java" 2018-01-23 23:39:10 +00:00
Holly Jiuyu Sun
2f87d7b2ee Add getUiccSlots() and switchSlots() in TelephonyManager.
Bug: 71914112
Test: test on phone
Change-Id: Ib7e9e40e5ecda48bdcd1f332dc7d6c422c08d942
2018-01-23 15:26:34 -08:00
Benedict Wong
e0d448f31e Expose applyTunnelModeTransform as a system API
Simple change to expose systemAPI for applyTunnelModeTransform

Bug: 36033193
Test: All CTS, unit tests passing
Change-Id: I2d857c048bc0dc80c3949387f946b1f5adf0527e
2018-01-23 23:25:54 +00:00
nharold
fb24180fe0 Merge changes from topic "signal-strength-cleanup"
* changes:
  Fix getAsuLevel returns "99" in Lte and TdScdma.
  Cleanup SignalStrength Parcel
2018-01-23 23:23:48 +00:00
Cassie
866f494dc2 Move android.provider.Telephony.SECRET_CODE to Telephony.Intents.
Bug: 69616728
Test: Basic telephony sanity
Change-Id: Ia053f9be082ceb139a284598ee2398a25daa7e08
2018-01-23 15:06:53 -08:00
Treehugger Robot
7d441c9b27 Merge "Combined flags of data service requests into one reason param" 2018-01-23 19:43:25 +00:00
Holly Jiuyu Sun
2c2c711a1d Make getIEuiccContronller() protected and non-static for CTS.
Test: test on phone
Change-Id: I706a0a9e064a0f2f91674cb2ff38a5929eaaf627
2018-01-23 10:35:37 -08:00
yifan.bai
5c40d8914d Fix getAsuLevel returns "99" in Lte and TdScdma.
GetAsuLevel method judges valid signal by
getLteLevel/getTdScdmaLevel. However, level is
SIGNAL_STRENGTH_NONE_OR_UNKNOWN does not mean not in
Lte/TdScdma.
For example, if mLteRsrp is in (threshRsrp[1],
threshRsrp[0]], getLteLevel would return
SIGNAL_STRENGTH_NONE_OR_UNKNOWN. But this only
means Lte signal is very weak, and ASU should be
(mLteRsrp + 140) not "99" (3GPP 27.007 Sec 8.69).

Bug: 72116430
Test: Build
Change-Id: If930c3e3d23a9af7b2e51e3560cc28607a6328c0
2018-01-23 18:32:22 +00:00
Nathan Harold
9becf4b334 Cleanup SignalStrength Parcel
Clean up the SignalStrength parcel. This CL
removes redundant constructors, simplifies the
overall initialization process, and stratifies
the components of the parcel into 2 separate
parts: the strength values from RIL, and the
config values provided by the platform.

Bug: 72116430
Test: runtest frameworks-telephony
Change-Id: Id7d2339362270b3911e96094275e1e545d6b581c
2018-01-23 18:25:44 +00:00
Malcolm Chen
8949cc2d1a Add TransportType in AccessNetworkConstants.java
Bug: 64132030
Test: build
Change-Id: I916a0b889110195d23b2a531308171cf4ea74f0c
2018-01-23 10:20:16 -08:00
Treehugger Robot
572f65fb58 Merge "Use the correct value for Process.WEBVIEW_ZYGOTE_UID." 2018-01-23 18:14:00 +00:00
Benedict Wong
0a1dd194aa Merge "Add checks to ensure SPIs are not reused" 2018-01-23 18:00:06 +00:00
Treehugger Robot
cdc0a084d1 Merge "Added new slot status related broadcast." 2018-01-23 18:00:00 +00:00
Lorenzo Colitti
df984fae26 Merge changes from topic "multipath-datausage-backport"
* changes:
  Support passing a template to NetworkStatsManager queries.
  Add metered, roaming, and defaultNetwork info to NetworkTemplate.
  Unbreak frameworks-net tests broken by missing libutilscallstack.
  Disable IpConnectivityMetricsTest.
  Add the defaultNetwork element to the netstats.proto.
  Add getDefaultNetwork to the NetworkStats public API.
2018-01-23 15:22:18 +00:00
Chalard Jean
dda156ab0c Let network requests see VPNs.
Test: runtest frameworks-net
Test: also tested with VPN app
Test: also cts passing
Change-Id: I3b16caad7787c3c1f2921ca1583815c89efbadc5
2018-01-23 21:38:00 +09:00
Chalard Jean
918a68b3ca Move constants into a new file.
Also audit all constants, make some private, annotate some
with @VisibleForTesting.

Test: runtest framework && cts
Change-Id: Iaf5ea7abd36fd8d544dcc84654f6cb529196d654
2018-01-23 21:38:00 +09:00
Chalard Jean
f474fc3ac1 Make sure listen requests from VPN apps see their own networks
Test: runtest frameworks-net
Test: CTS pass, including with the next patch which is what this
      actually matters for

Change-Id: I09a94042acbefa24ab884f95326e30d6ab280b82
2018-01-23 21:38:00 +09:00
Chalard Jean
0b214afb58 Add a test for new UID checking code.
Test: manual, this is a new test and it passes
Change-Id: I69a39039647ec05f970700e36c5f1e1e6e110f4a
2018-01-23 21:38:00 +09:00
Chalard Jean
f213ca1345 Remove UID_RANGES_ADDED and REMOVED.
Test: runtest frameworks-net
Test: also tested with VPN app
Test: also cts passing
Change-Id: I3530030996daeba05a8f2fffc5c6e21ed62e3f40
2018-01-23 21:38:00 +09:00
Chalard Jean
ecacd5e00b Move VPN allowed UIDs into NetworkCapabilities.
Test: runtest frameworks-net
Test: also new specific tests for this new code
Test: also tested with VPN app
Test: also cts passing
Change-Id: If0311bae2bf99dedac959febadecf4f92f3064b8
2018-01-23 21:38:00 +09:00
Chalard Jean
ce1a9d8fd7 Pre-import to remove a conflict.
Test: compiles and passes checkstyle
Change-Id: I1ffdd88e6268fee0cf88992420ab21eb42928957
2018-01-23 21:38:00 +09:00
Lorenzo Colitti
d15c937f97 Support passing a template to NetworkStatsManager queries.
Currently, NetworkStatsManager queries and callbacks only allow
selecting network traffic based on network identifiers:
networkType, subscriptionId and networkId.  The code ends up
converting these into a template under the hood.

Now that templates can express more fine-grained queries (e.g.,
select only roaming traffic, or select only traffic that's not
on the default network) add a hidden method to pass in a
template. This should have no security implications, as all the
access controls are performed in NetworkStatsService.

Bug: 35142602
Test: android.app.usage.cts.NetworkUsageStatsTest passes
Change-Id: Iab4afa26b34544299d2a9c501c1b0feb470e90a9
Merged-In: Iab4afa26b34544299d2a9c501c1b0feb470e90a9
2018-01-23 18:38:48 +09:00
Lorenzo Colitti
0f9bce6883 Add metered, roaming, and defaultNetwork info to NetworkTemplate.
This will allow data usage clients to query for and receive
callbacks on data usage matching these conditions.

Bug: 35142602
Test: atest FrameworksNetTests
Change-Id: I4d985a2734eeab7ee454c09cc2098b6b3c671c23
Merged-In: I4d985a2734eeab7ee454c09cc2098b6b3c671c23
2018-01-23 18:38:48 +09:00