Commit Graph

385984 Commits

Author SHA1 Message Date
Elliott Hughes
4e696020ff Merge "Move off ZipString and over to std::string/std::string_view as appropriate."
am: 93903b798d

Change-Id: I4fb159bf7204f34a87be65c8496de18a14c9b2ca
2019-06-18 11:18:03 -07:00
Nathan Harold
08698af50e Merge "Use TM SubId in getDataState and getDataActivity"
am: 28a7b5974d

Change-Id: Ic207e1c86fd7f776e54417d90fc90c353d23b502
2019-06-18 11:10:51 -07:00
Elliott Hughes
93903b798d Merge "Move off ZipString and over to std::string/std::string_view as appropriate." 2019-06-18 17:53:31 +00:00
Nathan Harold
28a7b5974d Merge "Use TM SubId in getDataState and getDataActivity" 2019-06-18 17:44:15 +00:00
Neil Fuller
c80913eea8 Merge "Remove unnecessary usage of deprecated Time class"
am: 39b253ff6c

Change-Id: Ida6d63d920ac21fb05ba789f45656478dae07c4a
2019-06-18 08:20:03 -07:00
Neil Fuller
39b253ff6c Merge "Remove unnecessary usage of deprecated Time class" 2019-06-18 14:56:51 +00:00
Neil Fuller
e25cc6b0e7 Merge "Add a basic benchmark for android.text.format.Time"
am: 9038c7231d

Change-Id: I618089b6e8d2cbfbf477b0fa79fd0ca9ce982ddb
2019-06-18 07:16:29 -07:00
Neil Fuller
9038c7231d Merge "Add a basic benchmark for android.text.format.Time" 2019-06-18 14:00:38 +00:00
Frank Li
0592abbce1 Merge "Refine the proto dns_resolver.proto"
am: 257719b2d5

Change-Id: Idfe00a6714ca64ea1850b1c333d8b54afa3723f1
2019-06-18 05:09:23 -07:00
Frank Li
257719b2d5 Merge "Refine the proto dns_resolver.proto" 2019-06-18 11:54:12 +00:00
Paul Hu
f97246a87c Merge "Add SocketUtils CTS tests"
am: 6aff608375

Change-Id: I2a297b78ebaa2347d351ddd81fc35f68994ad93a
2019-06-18 04:05:26 -07:00
Paul Hu
6aff608375 Merge "Add SocketUtils CTS tests" 2019-06-18 10:46:30 +00:00
Neil Fuller
06af75d673 Remove unnecessary usage of deprecated Time class
Remove unnecessary usage of the deprecated Time class.

Bug: 16550209
Test: build / boot / treehugger
Merged-In: I8221a4303b075afe8e8243863915313e4a81b6e4
Change-Id: I8221a4303b075afe8e8243863915313e4a81b6e4
2019-06-18 09:42:18 +01:00
Jack Yu
fbcd558697 Merge "Fixed incorrect merge service state"
am: 30b14a9d70

Change-Id: I2e9c8c15b0b224ebdff1d8bec2fa63721558ecd6
2019-06-17 22:58:05 -07:00
Jack Yu
df9fb2aae8 Merge "Fixed tethering failed when device is on CBRS"
am: fa9c857b21

Change-Id: I1b17dc5f092f9a2480c2143c0594c18334f6071d
2019-06-17 22:55:39 -07:00
Jack Yu
30b14a9d70 Merge "Fixed incorrect merge service state" 2019-06-18 05:25:35 +00:00
Jack Yu
fa9c857b21 Merge "Fixed tethering failed when device is on CBRS" 2019-06-18 05:24:58 +00:00
Nathan Harold
b2ab846cf4 Use TM SubId in getDataState and getDataActivity
-Update getDataState() API to use the SubId specified
 by the TelephonyManager instance.

-Update the getDataActivity() API to use the SubId
 specified by the TelephonyManager instance.

Bug: 135205433
Test: manual (automated test is infeasible)
Change-Id: Icf27eab40b1f979892123dc4185db2a138c1ffc2
2019-06-17 18:29:09 -07:00
Jack Yu
807a82b3aa Fixed tethering failed when device is on CBRS
Fixed by using the correct sub id for CBRS subscription

Bug: 133852860
Test: Manual
Merged-In: If01e17becce9684556345eb76512f617b9a9278c
Change-Id: If01e17becce9684556345eb76512f617b9a9278c
(cherry picked from commit a952d2018b)
2019-06-17 18:29:09 -07:00
Hunter Knepshield
741e0f13f3 Merge "do not print phone number which is considered as pii"
am: 84b311d3a2

Change-Id: Iff8873febf767d8a3dc7cd42385699656c3a40d4
2019-06-17 17:26:47 -07:00
Jack Yu
e089e39454 Fixed incorrect merge service state
The existing logic for merging service state when device is on
IWLAN does not work properly on AP-assisted mode devices. Fixed
by copying the IWLAN preferred flag into IMS service state so
it can get the correct data RAT for AP-assisted mode devices.

Bug: 134706530
Test: WFC manual tests
Merged-In: Ic18934adb870a0114c913855cdb68e0ef33caa79
Change-Id: Ic18934adb870a0114c913855cdb68e0ef33caa79
(cherry picked from commit 5e640ac80e)
2019-06-17 17:16:13 -07:00
Treehugger Robot
84b311d3a2 Merge "do not print phone number which is considered as pii" 2019-06-17 23:33:41 +00:00
Elliott Hughes
a65cae9e7f Move off ZipString and over to std::string/std::string_view as appropriate.
(Cherrypick to AOSP master, resolving merge conflicts.)

Bug: http://b/129068177
Test: treehugger
Change-Id: Ib46761d89772d3a3c655a39df573fd305c117d19
Merged-In: Ib46761d89772d3a3c655a39df573fd305c117d19
2019-06-17 16:05:19 -07:00
Hunter Knepshield
286ca032c2 do not print phone number which is considered as pii
do not print phonenumber in subscriptionInfo

Bug: 133191331
Change-Id: Ibdc4689f41a8dac162b617d6972bb72b3dd86e4e
Merged-In: Ibdc4689f41a8dac162b617d6972bb72b3dd86e4e
2019-06-17 14:19:46 -07:00
Neil Fuller
8dcdc1dd43 Add a basic benchmark for android.text.format.Time
Add a benchmark to demonstrate performance tradeoffs between
alternatives for android.text.format.Time. This can be extended later
as needed for other Time usecases.

Executable with:
vogar --mode app_process --benchmark core/tests/benchmarks/src/android/text/format/AndroidTimeVsOthersBenchmark.java

Results from an aosp/master taimen:

    Experiment selection:
      Benchmark Methods:   [toMillis_androidIucUtil, toMillis_androidTime, toMillis_javaTime, toMillis_javaUtil]
      Instruments:   [runtime]
      User parameters:   {}
      Virtual machines:  [app_process]
      Selection type:    Full cartesian product
    This selection yields 4 experiments.
    Trial Report (1 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidIucUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=6341.29, 1st qu.=6341.29, median=6341.29, mean=6341.29, 3rd qu.=6341.29, max=6341.29
    Trial Report (2 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=12310.21, 1st qu.=12310.21, median=12310.21, mean=12310.21, 3rd qu.=12310.21, max=12310.21
    Trial Report (3 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=1029.36, 1st qu.=1029.36, median=1029.36, mean=1029.36, 3rd qu.=1029.36, max=1029.36
    Trial Report (4 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=10142.66, 1st qu.=10142.66, median=10142.66, mean=10142.66, 3rd qu.=10142.66, max=10142.66
    Collected 4 measurements from:
      1 instrument(s)
      1 virtual machine(s)
      4 benchmark(s)

Note: When not cycling the time zone ID the results are different, but
java.time still comes out ahead.

    Trial Report (1 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidIucUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=6583.57, 1st qu.=6583.57, median=6583.57, mean=6583.57, 3rd qu.=6583.57, max=6583.57
    Trial Report (2 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_androidTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=4653.01, 1st qu.=4653.01, median=4653.01, mean=4653.01, 3rd qu.=4653.01, max=4653.01
    Trial Report (3 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaTime, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=1095.20, 1st qu.=1095.20, median=1095.20, mean=1095.20, 3rd qu.=1095.20, max=1095.20
    Trial Report (4 of 4):
      Experiment {instrument=runtime, benchmarkMethod=toMillis_javaUtil, vm=app_process, parameters={}}
      Results:
        runtime(ns): min=2825.56, 1st qu.=2825.56, median=2825.56, mean=2825.56, 3rd qu.=2825.56, max=2825.56

Bug: 16550209
Test: see above
Change-Id: I8f1dffb083db00c2ea4cef40fd5cc2f4acab7a89
2019-06-17 19:04:37 +01:00
Varun Anand
48f59a0fdf Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459
am: f4c10e8bc2

Change-Id: I7e95ac0a027295ca1377d00db9d3aa009e1bab10
2019-06-17 10:22:09 -07:00
Varun Anand
f4c10e8bc2 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
bb754c9c8d Merge "Remove the <= P restriction for WIFI_P2P"
am: 4e8973e9a8

Change-Id: I78a209c907277be462e7a278a4b5f7f014c30f67
2019-06-17 08:11:11 -07:00
Treehugger Robot
4e8973e9a8 Merge "Remove the <= P restriction for WIFI_P2P" 2019-06-17 14:58:21 +00:00
Chalard Jean
fbc68b975a Merge "Simplification of code to prevent a Log.wtf in expected cases."
am: f54483b6ef

Change-Id: Ia35b3f095a626436b989862281c0f13074818752
2019-06-17 04:04:29 -07:00
Chalard Jean
2253ff94e3 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
f54483b6ef Merge "Simplification of code to prevent a Log.wtf in expected cases." 2019-06-17 10:37:50 +00:00
Chalard Jean
a1f7931360 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
Benedict Wong
833603caab 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
9fbbdebc61 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
b59cff5251 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
Nicolas Geoffray
5127a760db Merge "Print the fd that isn't whitelisted."
am: cf8db35738

Change-Id: If533954450e094e8b14267dbd6a6f863ae7d4e3c
2019-06-14 06:38:10 -07:00
Nicolas Geoffray
cf8db35738 Merge "Print the fd that isn't whitelisted." 2019-06-14 13:26:42 +00:00
Nicolas Geoffray
983f8a5d9c Print the fd that isn't whitelisted.
Helps diagnosing issues.

Test: boots

(cherry picked from commit a83cad6ac5)

Change-Id: I85eb5ea0e29a101ad0d4227e782778f51f614ea0
Merged-In: I6fb4d40b28233a07e679dda91978a4bdec6c2a24
2019-06-14 13:38:01 +01:00
lifr
ad9beccd2a Refine the proto dns_resolver.proto
1. refine the enum type Transport
   The name of 1st enum value is TRANSPORT_UNKNOWN
2. remove the wrong character "CR"

Bug: 133111380
Test: ./out/host/linux-x86/bin/statsd_testdrive 116
Change-Id: I49ce1d77d8fc6a48fc8cc99cde028a3c2a4158e7
2019-06-14 17:36:40 +08:00
Nicolas Geoffray
e21b8c9b57 Merge "Pass to the runtime the primary zygote option."
am: c9bcf869db

Change-Id: I9cf0f5ba04d84de5056304b41a95af1b50ff1fca
2019-06-14 01:24:57 -07:00
Nicolas Geoffray
c9bcf869db Merge "Pass to the runtime the primary zygote option." 2019-06-14 08:14:24 +00:00
paulhu
8b400032ac 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
Chienyuan
2235a8778b Merge "Declare STATE_AUDIO_CONNECTED in right place"
am: 8fdfd917d1

Change-Id: Ia5164a15d93e52babeafbdaadff87b28e751b9e5
2019-06-14 00:24:29 -07:00
Heemin Seog
9d59a75463 Merge "Change factoryReset to succeed for Settings"
am: 3b056773f1

Change-Id: I714a8e46fb948b66d10efe15c536a625e67e9d2c
2019-06-14 00:14:30 -07:00
Treehugger Robot
8fdfd917d1 Merge "Declare STATE_AUDIO_CONNECTED in right place" 2019-06-14 07:12:26 +00:00
Treehugger Robot
3b056773f1 Merge "Change factoryReset to succeed for Settings" 2019-06-14 07:02:17 +00:00
Taesu Lee
05d08d1a1e Merge "Assume successful delivery if no Message Status"
am: 94deb1ca38

Change-Id: I106db1010a847a23f5e007c65a677bde5562f56e
2019-06-13 16:48:42 -07:00
Treehugger Robot
94deb1ca38 Merge "Assume successful delivery if no Message Status" 2019-06-13 23:32:09 +00:00
Amit Mahajan
6b0aed2ed7 Merge changes I44dc66f9,I72ee7af9
am: cb7c0be8fb

Change-Id: I6d92a16455441f38a2f63c553ce28c9ebdbf0b15
2019-06-13 16:16:06 -07:00