343875 Commits

Author SHA1 Message Date
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
Lorenzo Colitti
f7fab104f9 Unbreak frameworks-net tests broken by missing libutilscallstack.
Test: atest FrameworksNetTest shows fewer failures
Change-Id: Ic6f2bc18e80d91226d8d49e047e3997ffc45e45a
Merged-In: Ic6f2bc18e80d91226d8d49e047e3997ffc45e45a
2018-01-23 18:38:48 +09:00
Lorenzo Colitti
b7a479c293 Disable IpConnectivityMetricsTest.
This test has been failing for a while, and we are do not have
bandwidth to fix it during the next week.

Test: make -j64 FrameworksNetTests RUN_ERROR_PRONE=true
Test: atest FrameworksNetTests:IpConnectivityMetricsTest
Test: runtest -x frameworks/base/tests/net/java/com/android/server/connectivity/IpConnectivityMetricsTest.java
Change-Id: I59d73c1773e160a726996f3ab4ad20312decc127
Merged-In: I59d73c1773e160a726996f3ab4ad20312decc127
2018-01-23 18:38:48 +09:00
Lorenzo Colitti
9781f785bc Add the defaultNetwork element to the netstats.proto.
This is in its own commit because AOSP has diverged from internal
master.

Bug: 35142602
Test: builds, boots
Change-Id: I75fc85b961bc919e3d6c2adce6d6861c6f2c8379
Merged-In: I75fc85b961bc919e3d6c2adce6d6861c6f2c8379
2018-01-23 18:38:48 +09:00
Lorenzo Colitti
d5876bc438 Add getDefaultNetwork to the NetworkStats public API.
This allows an app using the public API to know whether the
traffic in a particular bucket was on the default network
(i.e., the network was selected by the system), or not (i.e.,
the network was selected by the app).

Bug: 35142602
Test: builds, boots
Test: added coverage to NetworkUsageStatsTest CTS test, still passes
Change-Id: I9f6669908fa119743b9c0aa0c31a03e5ebafa7db
Merged-In: I9f6669908fa119743b9c0aa0c31a03e5ebafa7db
2018-01-23 18:28:07 +09:00
Chenbo Feng
93afbf258f Use /proc/net/dev to get stats summary
If the qtaguid proc file is no longer exist, the device is running new
eBPF module to do traffic accounting. So the NetworkStatsFactory need to
use the proc/net/dev interface to get the per interface traffic stats
summary. Also, adding a test to verify the helper function work properly

Bug: 30950746
Test: run NetworkStatsFactoryTest
Change-Id: Ia36808bf02f1637dd41a3e7c50917b91b1a77524
2018-01-23 00:35:02 -08:00
Chenbo Feng
828f1b45fb Add bpf support for NetworkStatsFactory
Add the native method used to read the detail information of network
stats from bpf maps. The native method of NetworkStatsFactory should
choose the correct implementation to get the stats detail depending on
the kernel version. Currently the bpf result is printed as a reference
and the actual behavior of NetworkStatsFactory should not change.

Test: NetworkStatsFactory related cts test should not fail.
Bug: 30950746
Change-Id: I4715a23559b5b2306bd556cea0431f0ed172a993
2018-01-23 00:34:53 -08:00
Chenbo Feng
aedd6a3bdc Add BPF support for NetworkStatsService
Add the native implementation for NetworkStatsService to read the
uidStatsMap and tagStatsMap to get the network traffic information.
Currently the implementation only try to get the data from bpf for a
reference but the final value returned is still from old xt_qtaguid
module. So the result will not be effected. The bpf implementation is
depending on libbpf inside netd.

Bug: 30950746
Test: CtsNetTestCases -t android.net.cts.TrafficStatsTest

Change-Id: Ia85e4d4d602f6bd536739d89085e6dc37ad82e15
2018-01-22 23:25:11 -08:00
Benedict Wong
e6b42773e8 Add checks to ensure SPIs are not reused
This change adds an additional check in CheckIpsecConfig to prevent
users from using the same SPI twice. This allows for a more granular
error message.

Bug: 70642141
Test: Tests added in IpSecServiceParameterizedTest
Change-Id: I9621fb05c6b162bd8ae8db4ac1e64feaa9d0ac73
2018-01-22 21:09:47 -08:00