Commit Graph

2290 Commits

Author SHA1 Message Date
Xin Li
60c68b25d9 [automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master am: ff2ffe48ac -s ours
am skip reason: Change-Id I3d92a6de21a938f6b352ec26dc23420c0fe02b27 with SHA-1 d2d3a20624 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12484850

Change-Id: I6fee791ed4a4939ab3f24b66f779a20124d0c63d
2020-09-01 20:37:03 +00:00
Xin Li
8399e3d5eb Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Treehugger Robot
0f61b833d5 Merge "Skip RAT type listener registration if IMSI is not available" am: ebae7edd37 am: 445d5093c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1409907

Change-Id: I34de6bc6dd862f8042489f60f4b6be76af7c961e
2020-08-25 20:49:04 +00:00
Treehugger Robot
445d5093c6 Merge "Skip RAT type listener registration if IMSI is not available" am: ebae7edd37
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1409907

Change-Id: Ie24dee18456ee0741dbcd9330664398f0492c644
2020-08-25 20:27:30 +00:00
Treehugger Robot
ebae7edd37 Merge "Skip RAT type listener registration if IMSI is not available" 2020-08-25 19:55:09 +00:00
junyulai
a40b5dad28 Skip RAT type listener registration if IMSI is not available
Currently, if SIM is inserted but IMSI is not available, such
as SIM PIN locked state. Information of such SIM will still
be available but IMSI is not. Which makes
NetworkStatsSubscriptionMonitor failed to store IMSI locally
for later RAT type query. Hence, NETWORK_TYPE_UNKNOWN is
always returned for such SIM.

Skip the registration until the IMSI is available. This is safe
since there will be another onSubscriptionsChanged event when
that happens.

Test: enable SIM PIN and manually test
Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdUnavailable
Test: ./out/host/linux-x86/bin/statsd_testdrive 10082
Bug: 160941101
Merged-In: I408379b3c432d9e62e0837d6b4f6551cc7838e29
Change-Id: I408379b3c432d9e62e0837d6b4f6551cc7838e29
(cherry-picked from ag/12400327)
2020-08-25 18:03:38 +08:00
Treehugger Robot
ca4235f9a6 Merge changes I0faeda20,I726e74f5 am: c6a61f9eee am: 2c3d87e23c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1397954

Change-Id: Ifa30f9611612523077a2b0c1c919e5035f5cd8e0
2020-08-20 04:06:51 +00:00
junyulai
2ec09ea15b [automerger skipped] Add getAllCollapsedRatTypes to NetworkTemplate am: 199f353a9e am: ea11e8a174 -s ours
am skip reason: Change-Id I726e74f5c63a6ed456cb13ea259b58c7a33bec76 with SHA-1 eba72cd4ef is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1397953

Change-Id: I36cacaf70c7a067fc93d01d0f2c89a90cc2694ae
2020-08-20 04:06:47 +00:00
Treehugger Robot
2c3d87e23c Merge changes I0faeda20,I726e74f5 am: c6a61f9eee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1397954

Change-Id: I2adf488439c8aecf2d3dac2438b848bbdc868a21
2020-08-20 03:56:13 +00:00
junyulai
ea11e8a174 Add getAllCollapsedRatTypes to NetworkTemplate am: 199f353a9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1397953

Change-Id: I4bfdd2dcc7bd6b1e15248d7ef855fc40db018c4a
2020-08-20 03:56:10 +00:00
Treehugger Robot
c6a61f9eee Merge changes I0faeda20,I726e74f5
* changes:
  Add 5G NSA to collapsed RAT types list
  Add getAllCollapsedRatTypes to NetworkTemplate
2020-08-20 03:44:07 +00:00
junyulai
fd139892de Add 5G NSA to collapsed RAT types list
Currently, getAllCollapsedRatTypes is used to retrieve
all RAT types which will be recorded into NetworkStatsService.
However, there is a missing part that 5G NSA virtual RAT type
is not added into this list. This makes callers such as statsd
do not aware of 5G NSA RAT type and missed to collect data
usage of it.

Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Test: adb shell cmd stats pull-source 10082
Test: ./out/host/linux-x86/bin/statsd_testdrive 10082
Test: atest UidAtomTests#testMobileBytesTransfer \
      UidAtomTests#testMobileBytesTransferByFgBg \
      UidAtomTests#testDataUsageBytesTransfer
Bug: 163021464
Change-Id: I0faeda20f0506a48ac1131b234c5fc40d95dfbe0
Merged-In: I0faeda20f0506a48ac1131b234c5fc40d95dfbe0
(cherry-picked from ag/12355984)
2020-08-12 10:12:48 +00:00
Chiachang Wang
e15e314aad Merge "Update language to comply with Android's inclusive language guidance" am: 2dd299c5db am: 0e7aefd000
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156

Change-Id: Ibe13b2dad841e2ade2762558d1c3978a89cb825d
2020-08-12 10:10:11 +00:00
junyulai
199f353a9e Add getAllCollapsedRatTypes to NetworkTemplate
This is a partial cherry-pick of ag/10293594

Test: TH
Bug: 129082217

Merged-In: I726e74f5c63a6ed456cb13ea259b58c7a33bec76
Change-Id: I726e74f5c63a6ed456cb13ea259b58c7a33bec76
2020-08-12 18:01:13 +08:00
Chiachang Wang
2fea4a758b Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code
for reference.

Bug: 161896447
Test: m ; atest FrameworkNetTests
Change-Id: Ib6b4c9526992c31e05e82be80e2b9b86bc0b57ef
2020-08-12 12:23:59 +08:00
Peter Wang
86383582b4 [automerger skipped] Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and guard with permission" am: b6ff6f6c2c am: 4b6112a42c -s ours
am skip reason: Change-Id I7f3b1f5170e032336d9b39b322c49e2b92573586 with SHA-1 ceba2adbbd is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1260749

Change-Id: I1e06f6cdb0e69e06cf94a543eec83478dabeda14
2020-07-31 09:34:47 +00:00
Peter Wang
b6ff6f6c2c Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and guard with permission" 2020-07-31 08:43:44 +00:00
Chiachang Wang
1aafac2782 Merge "Update language to comply with Android's inclusive language guidance" am: ae5caa0013 am: 36a22f06b1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1375618

Change-Id: I8426e89337e60c48ad20677e835d36622d41ed91
2020-07-30 03:17:44 +00:00
Chiachang Wang
ae5caa0013 Merge "Update language to comply with Android's inclusive language guidance" 2020-07-30 02:49:44 +00:00
Chiachang Wang
893335012c Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code
for reference.

Test: m ; atest TetheringTests
Bug: 161896447
Change-Id: Idc58697c72fb00896bee00185fefc50c1a24dd35
2020-07-29 12:05:04 +08:00
Junyu Lai
efbd79c600 Merge "Gracefully handle integer overflows." am: 0e0b61e92e am: aeddf47458
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217

Change-Id: I0bba17d0367ebf4e1c868a8cc7471366bc7a4408
2020-07-29 01:55:23 +00:00
Junyu Lai
0e0b61e92e Merge "Gracefully handle integer overflows." 2020-07-29 01:19:07 +00:00
Chiachang Wang
0defe35efb Merge "Update language to comply with Android's inclusive language guidance" am: 2ad3ca40cb am: 55c0d6e638
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373160

Change-Id: I9318abb0233e7b8847466914724eeaae769ea9c8
2020-07-28 11:19:47 +00:00
Chiachang Wang
2ad3ca40cb Merge "Update language to comply with Android's inclusive language guidance" 2020-07-28 10:51:53 +00:00
Chiachang Wang
06defe000d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code
for reference.

Bug: 161896447
Test: m
Change-Id: I6c3c03c0c2d1302af6d5245486823c13a3432900
2020-07-28 15:36:30 +08:00
Pavan Kumar M
fc5b6cb326 Gracefully handle integer overflows.
Avoid recording negative data by doing integer-based
math as much as possible, but switch to double-based
math if we detect that we'd end up causing an overflow.

Test :

    - Builds, Boots
    - High data throughput scenarios
    - NetworkStatsHistoryTest, NetworkStatsCollectionTest,
      NetworkStatsTest

Bug: 119527458
Change-Id: I55d4aa649bea3ae201ad513074ff2b71cb918dad
2020-07-28 11:36:49 +05:30
Aaron Huang
b841abe371 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: 28ced6a6ca am: 251d68487e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: If60a348768c507153c1a9038953b2f6c29fc8f03
2020-07-17 06:05:38 +00:00
Aaron Huang
28ced6a6ca Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" 2020-07-17 05:40:31 +00:00
junyulai
db8c524876 [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: fba76f64a6 -s ours
am skip reason: Change-Id I8753e68140c0993773017c9a49bd8a666a364071 with SHA-1 3e1d718c12 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12166464

Change-Id: I7e48e1b94107d84a1b828b005437ad2e24a92850
2020-07-17 04:03:35 +00:00
Treehugger Robot
747d3fd8b5 Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: e36ce3a88b am: 416911a122
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364497

Change-Id: Idef0dd6e0e0486b76c0067540e580d444e97d6a0
2020-07-16 12:09:04 +00:00
Treehugger Robot
e36ce3a88b Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" 2020-07-16 11:43:51 +00:00
junyulai
3e1d718c12 Attribute data usage to virtual RAT type for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
Merged-In: I8753e68140c0993773017c9a49bd8a666a364071
(cherry-picked from ag/12167624)
2020-07-16 18:22:09 +08:00
Peter Wang
171598cb7c [Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and
guard with permission

Bug: 150878235
Fix: 150878235
Test: Build
Change-Id: I7f3b1f5170e032336d9b39b322c49e2b92573586
Merged-In: I7f3b1f5170e032336d9b39b322c49e2b92573586
2020-07-16 02:01:06 -07:00
junyulai
fba76f64a6 Attribute data usage to virtual RAT type for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
Merged-In: I8753e68140c0993773017c9a49bd8a666a364071
(cherry-picked from ag/12167624)
2020-07-16 15:33:35 +08:00
Treehugger Robot
69b5a78282 Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: 56df7e2c1a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: If052329128326fba72ff27c024a2c6652b7bb1ef
2020-07-10 05:41:05 +00:00
Junyu Lai
491d1837e9 Revert "Attribute data usage to 5G for 5G non-standalone mode"
This reverts commit 7e5b9894a4.

Reason for revert: Revert and wait for the design is settled down.

Change-Id: I10fdfc37d6456678de1886698cd6ad08bf8aa810
2020-07-10 03:43:19 +00:00
Junyu Lai
d3dda13a8c Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93 am: b2cd1cf130
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203

Change-Id: I860b0226157ee31f0488d6b2252ae157e86dc5eb
2020-07-10 03:10:15 +00:00
junyulai
7e5b9894a4 Attribute data usage to 5G for 5G non-standalone mode
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498

Change-Id: I563df14500caeb3602b381479afaf5163ad8e6a1
2020-07-09 16:56:54 +08:00
Aaron Huang
59fc483921 Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)
Update all callers to use ProxyInfo(Uri) and remove ProxyInfo(String).

Bug: 160557668
Test: build pass
      atest FrameworksNetTests

Change-Id: I4c980764c8839c48acf03208bb68cd53eb910121
2020-07-06 11:59:27 +00:00
Treehugger Robot
53bd5d206e Merge "ITetheredInterfaceCallback is a oneway interface" am: d29edf9d83 am: 91a7404270
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354662

Change-Id: Id0aae634967288a68cc80d0de79a42ab09c06a59
2020-07-03 09:43:09 +00:00
Robin Lee
d8c0131468 ITetheredInterfaceCallback is a oneway interface
This is sent from the system server, and the system server doesn't like
being blocked by apps.

Change-Id: I603be3038831974baf1dc392ff0d062e9db91b63
Test: atest CtsTetheringTest
Bug: 160389275
2020-07-02 17:59:28 +02:00
Michael Groover
c356bf7394 Merge "Update docs for methods that require subscriberId" into rvc-dev am: 3e045d41e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932150

Change-Id: I627d3015c0e2cad832a8fd9926fc2079241bd9cd
2020-06-22 19:31:31 +00:00
Michael Groover
3e045d41e1 Merge "Update docs for methods that require subscriberId" into rvc-dev 2020-06-22 19:30:10 +00:00
Michael Groover
3dae8b1b41 Update docs for methods that require subscriberId
In Android 10 additional restrictions were required to access the
subscriberId. The NetworkStatsManager has several methods that accept
a subscriberId of the mobile network for which usage should be queried.
This commit updates the docs for these methods to reference the new
access restrictions and offer null as an option to obtain the usage
for all mobile networks.

Fixes: 157871064
Test: m docs
Change-Id: I95c730c9418fced6312eb3ba4e0d69e6299f3ded
2020-06-19 19:48:07 -07:00
Aaron Huang
e9d35cc556 Merge "Address comments from aosp/1298476" am: 72b4ffad5c am: eb276cb5b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340040

Change-Id: I7b119758ac7cd65defdec77692957287af17566d
2020-06-18 10:47:47 +00:00
Aaron Huang
72b4ffad5c Merge "Address comments from aosp/1298476" 2020-06-18 10:18:57 +00:00
Aaron Huang
cf854996a6 Address comments from aosp/1298476
This patch addresses the followings,
- Pass Looper to NetworkStatsSubscriptionsMonitor constructor
- Replace Looper with TestLooper in unit test
- Assert fail if result of condition check is not expected.

Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
      atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
Change-Id: Ibcaba2b38af80cc0ec9a4e428a3b3a1538bc4325
2020-06-18 15:05:19 +08:00
Aaron Huang
eb1a7159b0 Merge "Dynamically enable/disable watch for RAT type changes" am: 04baaeb973 am: abc4648d47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574

Change-Id: I5a96774ad2104a6b03c9abab2b105b97195edea8
2020-06-18 04:22:21 +00:00
Aaron Huang
04baaeb973 Merge "Dynamically enable/disable watch for RAT type changes" 2020-06-18 03:51:51 +00:00
Aaron Huang
2d1e20a07b [automerger skipped] Merge "Add unit test for NetworkStatsSubscriptionsMonitor" am: ad9a0e7713 am: 4535e1ddca -s ours
am skip reason: Change-Id I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91 with SHA-1 da12e7f732 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1298476

Change-Id: I11b25c0832d6959e77bbabbfce53cdedce922279
2020-06-17 09:21:52 +00:00