Commit Graph

2525 Commits

Author SHA1 Message Date
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
android-build-team Robot
83ab94e48d Snap for 6690197 from 3affbe4d9f964d5ac060e265f331cafe2a4798a9 to rvc-release
Change-Id: Iff50afbc6d986908a3a16c7c79d1c8aa9a7af3ce
2020-07-18 01:02:10 +00:00
Aaron Huang
8bb88d4126 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: 28ced6a6ca am: 251d68487e am: b841abe371
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: I9d141616f0efb16874488489f5c382a5eb7f6048
2020-07-17 06:18:09 +00:00
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
Automerger Merge Worker
ef3cbbc2c9 Merge changes from topic "am-79f86a8dcf76422daca2ee482cf222f3" into rvc-d1-dev-plus-aosp
* changes:
  Merge changes I7d98ab42,I8753e681 into rvc-dev am: 7368ed7d03 am: 8c4224a070
  [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: fba76f64a6 am: 2537d34c56 -s ours
2020-07-17 04:19:57 +00:00
junyulai
6539daafc1 [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: fba76f64a6 -s ours am: db8c524876 -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: I02095d84ee19167ca7e254e977e1e38ba7ba87f0
2020-07-17 04:19:45 +00:00
junyulai
e145b12398 [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: fba76f64a6 am: 2537d34c56 -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: I5e06da5cbb80d02e8d216d63c9c9c0f96a11fc6c
2020-07-17 04:19:23 +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
junyulai
2537d34c56 Attribute data usage to virtual RAT type for 5G non-standalone mode am: fba76f64a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12166464

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

Change-Id: I828f3f4f4f81d9a43c403d0a6a6b6f4e2bc1b654
2020-07-16 12:21:14 +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
e03153276d Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: 56df7e2c1a am: 69b5a78282
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: I76f64267c5cbe4516602f8526d6f8fee452c46bb
2020-07-10 05:51:55 +00: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
ce0762faa5 Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93 am: b2cd1cf130 am: d3dda13a8c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203

Change-Id: I845221848bb00355db98f0aa5a4341641e3ceec7
2020-07-10 03:21:43 +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
d70d9d6c2e Merge "ITetheredInterfaceCallback is a oneway interface" am: d29edf9d83 am: 91a7404270 am: 53bd5d206e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1354662

Change-Id: If18f53d5b6e74ecbe4b4bab4b88c4ddaa99075db
2020-07-03 09:58:29 +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
android-build-team Robot
6d08451867 Make change and version bump to r_aml_300802400 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: If743b76583bc895f11674e468792c0da1b958121
2020-06-23 03:17:14 +00:00
android-build-team Robot
30eac99496 Snap for 6617762 from 7bf84ecb6a5ae5833891a6b90a221ed99294e6bb to rvc-release
Change-Id: I2601dfb3a00cd1fe368ae543efec586de69fba64
2020-06-23 01:07:43 +00:00
Michael Groover
709eec20bd Merge "Update docs for methods that require subscriberId" into rvc-dev am: 3e045d41e1 am: c356bf7394
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932150

Change-Id: I008b859286a4c3153fcf147b6984301aaffc90fd
2020-06-22 19:43:58 +00:00
Michael Groover
c5e3617d83 Merge "Update docs for methods that require subscriberId" into rvc-dev am: 3e045d41e1 am: 4e232b3775
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932150

Change-Id: I6046d622c7d87d246afb670cd57983c612f5c3ab
2020-06-22 19:39:42 +00:00
Michael Groover
4e232b3775 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: I310f0ac101c670b251a3cbf07408d3d7033d72c5
2020-06-22 19:31:46 +00:00
Michael Groover
56169afda7 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: If66a3a8f31b4f7a2d3e8c9a627dfe33270126361
2020-06-22 19:31:40 +00: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
15156482c4 Merge "Address comments from aosp/1298476" am: 72b4ffad5c am: eb276cb5b3 am: e9d35cc556
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340040

Change-Id: I8557b955af2d28122054df5236a38543523909f4
2020-06-18 10:49:25 +00: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
17f6c1ba40 Merge "Dynamically enable/disable watch for RAT type changes" am: 04baaeb973 am: abc4648d47 am: eb1a7159b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574

Change-Id: I5e607bb44b2e97c01da9f9dcc0e89687bd08130f
2020-06-18 04:23:10 +00: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
d471d2ab2b [automerger skipped] Merge "Add unit test for NetworkStatsSubscriptionsMonitor" am: ad9a0e7713 am: 4535e1ddca -s ours am: 2d1e20a07b -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: I2058092be5426269fc93e209517a0d01c2fab1ec
2020-06-17 09:34:01 +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
Aaron Huang
e436804466 Dynamically enable/disable watch for RAT type changes
Add ContentObserver to observe the status of
NETSTATS_COMBINE_SUBTYPE_ENABLED to determine that
NetworkStatsSubscriptionsMonitor start or stop
monitoring data usage per RAT type changes.

Bug: 154080515
Test: atest NetworkStatsServiceTest#testDynamicWatchForNetworkRatTypeChanges
Change-Id: I272d589633c9186b45753228b05aa0b40b7c7b89
2020-06-17 17:09:10 +09:00
Aaron Huang
86bb429959 Add unit test for NetworkStatsSubscriptionsMonitor
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
(copy from ag/11788484 but getActiveAndHiddenSubscriptionIdList() since it's renamed
in internal)
Change-Id: Ia162f36efe96d90b2f6f70190d9fa855bba34484
Merged-In: I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91
2020-06-15 07:05:19 +00:00
android-build-team Robot
da8a65a11b Snap for 6586393 from a840c1f3ea1e9c3cde2ee985212f80864ff1e8d7 to rvc-release
Change-Id: I2ee507de15484671c09c996a38d5a0a47564658e
2020-06-13 01:09:12 +00:00