Commit Graph

10893 Commits

Author SHA1 Message Date
Peter Wang
1cd92f18b3 Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and guard with permission" am: c80aabbd2e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1260749

Change-Id: I43a19b479d4c77bb19af31381e7d998527bc068a
2020-07-31 09:04:43 +00:00
Peter Wang
c80aabbd2e Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and guard with permission" 2020-07-31 08:43:44 +00:00
Chalard Jean
dcaa22ecae Merge "Move utils from network stack to libs." am: 21be4fabb5 am: 64573a945a am: f438cf39b7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083

Change-Id: I56d148261c5fe94264ff0a68e87020329d06b857
2020-07-31 01:12:13 +00:00
Chalard Jean
f438cf39b7 Merge "Move utils from network stack to libs." am: 21be4fabb5 am: 64573a945a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083

Change-Id: Ia163bc416e16ce56fc96855c1111a9905b712843
2020-07-31 01:09:46 +00:00
Chalard Jean
64573a945a Merge "Move utils from network stack to libs." am: 21be4fabb5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083

Change-Id: I846dae9b7e36ddf6360bb946cc07beb8c44a34a5
2020-07-31 00:53:12 +00:00
Chalard Jean
3b7591e1f5 Move utils from network stack to libs.
This package is using some common utilities from
a library that used to live in the network stack.
A better home for these utilities is frameworks/libs,
so this topic moves the files ther and also changes
the package of some utilities.

See aosp/1350222 and aosp/1350182 for a detailed
description of the specific files that moved.

Test: checkbuild
Change-Id: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
2020-07-29 21:15:48 +09:00
paulhu
de5b46c10b [RFPM04] Adjust hasRestrictedNetworkPermission method
There are two parts in hasRestrictedNetworkPermission method.
One is carryover package check and one is uid permission
check. Seperate carryover package check part to another method
to be clearer the usage of hasRestrictedNetworkPermission method.

Bug: 132784544
Test: atest FrameworksNetTests
Change-Id: Iab0609fcaa52acb0dfcb31ca957f22bfe8d62392
2020-07-29 14:14:27 +08:00
Paul Hu
e2524b7a56 Merge "[RFPM03] Check permission by uid." am: 563de5b8c7 am: 77cba9c18e am: 8fdd2ff899
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375

Change-Id: I35df9a8bb721f1303f351dbb115b09e911ea9a69
2020-07-29 06:13:35 +00:00
Paul Hu
8fdd2ff899 Merge "[RFPM03] Check permission by uid." am: 563de5b8c7 am: 77cba9c18e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375

Change-Id: I80406643e4797b1e269b4f7c5711339371fa533b
2020-07-29 05:53:25 +00:00
Paul Hu
77cba9c18e Merge "[RFPM03] Check permission by uid." am: 563de5b8c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375

Change-Id: I520b5d271d6d5214653ebaaeb5d6713c191b911d
2020-07-29 05:47:15 +00:00
Paul Hu
563de5b8c7 Merge "[RFPM03] Check permission by uid." 2020-07-29 05:41:32 +00:00
android-build-team Robot
0fd54d2324 Merge cherrypicks of [12257241, 12257478, 12257643, 12257707, 12257297, 12257742, 12257668, 12257743, 12257513, 12257278, 12257279, 12257514, 12257644, 12257669, 12257670, 12257671] into rvc-release
Change-Id: I3669363c1b98ac139f341e0bd898cbbff15cb061
2020-07-29 04:05:49 +00:00
Lorenzo Colitti
1c9c0c1514 Set the NetworkInfo subtype to 0.
For non-telephony networks, this was always set to 0 before R.
In R, it is currently set to the same value as the network type.
This is incorrect because the two have different namespaces.
or example, currently, any network of type WIFI (==1) will have
a subtype of NETWORK_TYPE_GPRS (==1). Similarly, all ETHERNET
networks will have subtype NETWORK_TYPE_1XRTT, all VPN networks
will have a subtype of NETWORK_TYPE_TD_SCDMA, etd.

Bug: 161653721
Test: builds, boots
Change-Id: I07e111c1762e0021c931cefc27f193f78578748b
(cherry picked from commit a40ff70cad00a6c298e07c2c38e95d58074a7157)
2020-07-29 04:04:42 +00:00
Junyu Lai
cfbe1d0634 Merge "Gracefully handle integer overflows." am: cdb1f03144 am: fe6c5793ce am: ca54fa5a5c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217

Change-Id: I9cde0d9e70b389b91bde9b3384f82887259c9c74
2020-07-29 02:14:58 +00:00
Junyu Lai
ca54fa5a5c Merge "Gracefully handle integer overflows." am: cdb1f03144 am: fe6c5793ce
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
fe6c5793ce Merge "Gracefully handle integer overflows." am: cdb1f03144
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217

Change-Id: I779298886cfaef330b433fea6009860682df35bd
2020-07-29 01:37:48 +00:00
Junyu Lai
cdb1f03144 Merge "Gracefully handle integer overflows." 2020-07-29 01:19:07 +00:00
Lorenzo Colitti
e6c5f398cf Set the NetworkInfo subtype to 0. am: fd43392b25 am: fddfe676fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12246826

Change-Id: I6b8d22c0bf3a19f8c661e67454f80ae55f466842
2020-07-28 18:28:43 +00:00
Lorenzo Colitti
5ec34c4b87 Set the NetworkInfo subtype to 0. am: fd43392b25 am: 7309c46403
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12246826

Change-Id: I8a54c8fa4c51d74f6e8b1dc98dad71208f4e3836
2020-07-28 18:27:25 +00:00
Lorenzo Colitti
fddfe676fd Set the NetworkInfo subtype to 0. am: fd43392b25
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12246826

Change-Id: Ida8cd0788ae34f4861fbcb958163b5074258c6ac
2020-07-28 18:05:15 +00:00
Lorenzo Colitti
7309c46403 Set the NetworkInfo subtype to 0. am: fd43392b25
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12246826

Change-Id: If570350574c5113763bb86943a27b9330db6b9ad
2020-07-28 18:05:12 +00:00
Chiachang Wang
0005a7413f Merge "Update language to comply with Android's inclusive language guidance" am: f702025bdf am: ef723b7617 am: 6d70190fcd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373160

Change-Id: I2efddd398c4d7cf4d65f1c76c399a3a07a843889
2020-07-28 11:31:06 +00:00
Chiachang Wang
6d70190fcd Merge "Update language to comply with Android's inclusive language guidance" am: f702025bdf am: ef723b7617
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
ef723b7617 Merge "Update language to comply with Android's inclusive language guidance" am: f702025bdf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373160

Change-Id: Ifcb4682d75b8df577281030c58b61eff53e6ae20
2020-07-28 11:04:20 +00:00
Chiachang Wang
f702025bdf Merge "Update language to comply with Android's inclusive language guidance" 2020-07-28 10:51:53 +00:00
paulhu
8adb39a688 [RFPM03] Check permission by uid.
PermissionMonitor check permission by each package name but only
update the uid permission to netd. It's better to check
permission by uid directly. Thus, use
ActivityManager#checkUidPermission to check permissions for each
uid.

Bug: 132784544
Test: atest FrameworksNetTests
Change-Id: I057d34383b4dc408b2773e4c6b146774ba0c5eb2
2020-07-28 18:23:38 +08:00
Lorenzo Colitti
fd43392b25 Set the NetworkInfo subtype to 0.
For non-telephony networks, this was always set to 0 before R.
In R, it is currently set to the same value as the network type.
This is incorrect because the two have different namespaces.
or example, currently, any network of type WIFI (==1) will have
a subtype of NETWORK_TYPE_GPRS (==1). Similarly, all ETHERNET
networks will have subtype NETWORK_TYPE_1XRTT, all VPN networks
will have a subtype of NETWORK_TYPE_TD_SCDMA, etd.

Bug: 161653721
Test: builds, boots
Change-Id: I07e111c1762e0021c931cefc27f193f78578748b
2020-07-28 09:20:19 +00:00
Chiachang Wang
3b9549f408 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
e55ab87e5d 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
71d4b636fc Snap for 6690197 from 3affbe4d9f964d5ac060e265f331cafe2a4798a9 to rvc-release
Change-Id: Iff50afbc6d986908a3a16c7c79d1c8aa9a7af3ce
2020-07-18 01:02:10 +00:00
Aaron Huang
030846ecd6 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: c36f17d32e am: 5463bbece5 am: 8f98e732a0
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
8f98e732a0 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: c36f17d32e am: 5463bbece5
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
5463bbece5 Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" am: c36f17d32e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1146757

Change-Id: Ib3e7b1ff5c2fbe3fd9a049b58faf26a6c355ad8f
2020-07-17 05:53:43 +00:00
Aaron Huang
c36f17d32e Merge "Remove ProxyInfo(String) and update callers to use ProxyInfo(Uri)" 2020-07-17 05:40:31 +00:00
Automerger Merge Worker
cb2b9ee0b5 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: 2774832382 am: 478dc7584e -s ours
2020-07-17 04:19:57 +00:00
junyulai
f430bda314 [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: 2774832382 -s ours am: fbb36e7d8e -s ours
am skip reason: Change-Id I8753e68140c0993773017c9a49bd8a666a364071 with SHA-1 c3e3a1d0ef 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
98ae85ba43 [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: 2774832382 am: 478dc7584e -s ours
am skip reason: Change-Id I8753e68140c0993773017c9a49bd8a666a364071 with SHA-1 c3e3a1d0ef 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
fbb36e7d8e [automerger skipped] Attribute data usage to virtual RAT type for 5G non-standalone mode am: 2774832382 -s ours
am skip reason: Change-Id I8753e68140c0993773017c9a49bd8a666a364071 with SHA-1 c3e3a1d0ef 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
478dc7584e Attribute data usage to virtual RAT type for 5G non-standalone mode am: 2774832382
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
fc30f807e6 Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 0ac564e673 am: 0c55907a0a am: dc4c9d51a1
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
dc4c9d51a1 Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 0ac564e673 am: 0c55907a0a
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
0c55907a0a Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 0ac564e673
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364497

Change-Id: I74242ad8ffae7aa7bcf0562eee577d7f66747f09
2020-07-16 11:57:03 +00:00
Treehugger Robot
0ac564e673 Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" 2020-07-16 11:43:51 +00:00
junyulai
c3e3a1d0ef 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
1041764067 [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
2774832382 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
android-build-team Robot
496f13110b Snap for 6671561 from 8b1105702aca8f6120405365a8c1a7a15583d08c to rvc-release
Change-Id: Ibbe825c9795ee3a27d3423c2fd9fc378f8179603
2020-07-11 01:08:22 +00:00
Treehugger Robot
086c1718ec Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: ce769a0d8e am: a3d509537c
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
a3d509537c Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: ce769a0d8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: If052329128326fba72ff27c024a2c6652b7bb1ef
2020-07-10 05:41:05 +00:00
Treehugger Robot
ce769a0d8e Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157

Change-Id: I0b5da0e4e20cbd2dd5856b04d1f1ddfe3323b10b
2020-07-10 05:26:41 +00:00