Commit Graph

10743 Commits

Author SHA1 Message Date
TreeHugger Robot
efd521d2b5 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours am: 12d5c16a87 -s ours am: ab53da358e -s ours am: 9176934506 -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

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

Change-Id: Ice0925112fbe3503ca968dd0ae397a89f8c520f9
2020-09-10 01:59:15 +00:00
TreeHugger Robot
9176934506 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours am: 12d5c16a87 -s ours am: ab53da358e -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

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

Change-Id: Ie0d62c79853bc017102ad95acc1a5190182a92c7
2020-09-10 01:43:19 +00:00
TreeHugger Robot
ab53da358e [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours am: 12d5c16a87 -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

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

Change-Id: I553eead2b24367b09f4888ea8a687c48cd2bf9da
2020-09-10 01:14:38 +00:00
TreeHugger Robot
12d5c16a87 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours am: 2dbc78ee39 -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

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

Change-Id: I90bb0d837e4ac6c3acc834653bc1f758d62e1a08
2020-09-10 00:46:56 +00:00
TreeHugger Robot
2dbc78ee39 [automerger skipped] Merge "[CS] Add an option to block sensitive network specifier" into pi-dev am: 9c70259e2b -s ours
am skip reason: Change-Id If08d312ff814bdde1147518f923199e6349503d5 with SHA-1 c069b066d3 is in history

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

Change-Id: I58327bb904244e5f962c27b7c8facdfeae8a758d
2020-09-10 00:27:47 +00:00
Etan Cohen
9aaf663dda [CS] Add an option to block sensitive network specifier
Network specifiers are used for 2 purposes:

- As part of network requests to specify more information on the type
  of requested networks.
- On network agents to specify information about their networks.

The network specifiers of the requests and agents are matched to each
other. However, the agent network specifier may contain sensitive
information which we do not want forwarded to any app.

This CL adds an option to strip out this agent network specifier before
the network capabilities are forwarded to the app.

Bug: 161853197
Bug: 161370134
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: I38ed3ff88532ef522ab167c88d87e6e82295ffc5
Merged-In: If08d312ff814bdde1147518f923199e6349503d5
2020-09-07 00:37:33 +00:00
Xin Li
02a7ee4541 [automerger skipped] Merge RP1A.200720.011 am: 383cdb1c99 -s ours am: 930f94115d -s ours
am skip reason: Change-Id Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c with SHA-1 b89c6d94c5 is in history

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

Change-Id: Ic485b269579ca470e4b74ee434f1b35110a0ab75
2020-09-02 23:36:34 +00:00
Xin Li
930f94115d [automerger skipped] Merge RP1A.200720.011 am: 383cdb1c99 -s ours
am skip reason: Change-Id Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c with SHA-1 b89c6d94c5 is in history

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

Change-Id: I735e135e519708d0e1ab07504944ad1dcdfcccbc
2020-09-02 23:16:43 +00:00
Xin Li
9d55e46862 [automerger skipped] Merge "Mark RP1A.200720.001 as merged" into stage-aosp-master am: 5cc3fc4908 -s ours am: 1461832820 -s ours
am skip reason: Change-Id I608df7327b8366fd365b11c6bdff9ed28fde99b0 with SHA-1 98a01b7fad is in history

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

Change-Id: Ibe18c1e4bb2fffb65add10a48b8a72fde60a2e2b
2020-09-02 19:37:31 +00:00
Xin Li
383cdb1c99 Merge RP1A.200720.011
Bug: 167588565
Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c
Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7
2020-09-02 12:34:37 -07:00
Xin Li
1461832820 [automerger skipped] Merge "Mark RP1A.200720.001 as merged" into stage-aosp-master am: 5cc3fc4908 -s ours
am skip reason: Change-Id I608df7327b8366fd365b11c6bdff9ed28fde99b0 with SHA-1 98a01b7fad is in history

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

Change-Id: Ie4932da5ffa8bc042a930b01a18d1ff1ce1abc90
2020-09-02 19:15:20 +00:00
Xin Li
9fbf46da7d Mark RP1A.200720.001 as merged
Bug: 167588565
Merged-In: I608df7327b8366fd365b11c6bdff9ed28fde99b0
Change-Id: Ie293ab2bcba5f778a7cac8476e226dc7c15e000f
2020-09-02 11:44:54 -07:00
Xin Li
9ad1a5fb1a [automerger skipped] Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master am: ff2ffe48ac -s ours am: 210f4c7e70 -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: Icebcb9092d11694141d0d6a0c47c9f8378f5b03a
2020-09-01 21:46:39 +00:00
Xin Li
210f4c7e70 [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
4037c36d47 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
Junyu Lai
c1d0f670f5 Merge "Notify the keepalive is stopped after the slot has been released" am: 09a0f57f87 am: b5e1feccbe am: d1804f87dc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1112851

Change-Id: I846ad59dba08f17a01700378a2cdbb931629b283
2020-08-28 11:45:51 +00:00
Junyu Lai
d1804f87dc Merge "Notify the keepalive is stopped after the slot has been released" am: 09a0f57f87 am: b5e1feccbe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1112851

Change-Id: Icdd61fb39ebd14963f4ec6e591b3a245e6b999b2
2020-08-28 11:09:43 +00:00
Junyu Lai
09a0f57f87 Merge "Notify the keepalive is stopped after the slot has been released" 2020-08-28 10:12:44 +00:00
Treehugger Robot
0c3b9562fd [automerger skipped] Merge "Skip RAT type listener registration if IMSI is not available" am: 1e9c48bfec am: a2f81d1442 am: b54db4b9fa -s ours
am skip reason: Change-Id I408379b3c432d9e62e0837d6b4f6551cc7838e29 with SHA-1 675f67cbb2 is in history

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

Change-Id: Iff9fe875b4e12d837e5fe52f956ff0f13d3c6ce3
2020-08-25 21:09:22 +00:00
Treehugger Robot
b54db4b9fa Merge "Skip RAT type listener registration if IMSI is not available" am: 1e9c48bfec am: a2f81d1442
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
a2f81d1442 Merge "Skip RAT type listener registration if IMSI is not available" am: 1e9c48bfec
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
1e9c48bfec Merge "Skip RAT type listener registration if IMSI is not available" 2020-08-25 19:55:09 +00:00
junyulai
8c91a5f6cf 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
1b1eff1bc2 Merge "Skip RAT type listener registration if IMSI is not available" into rvc-d1-dev am: 5403c7646a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12406769

Change-Id: Ia10dc546e107e9c1fc249766c2bcfc5856ce1bd2
2020-08-23 13:18:49 +00:00
Paul Hu
d001d445d5 Merge "Revert "[RFPM03] Check permission by uid."" am: 0925015de5 am: b2982a0643 am: ab51b37a2b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404654

Change-Id: Ie7ac76d52a1bc8e58fc660a86a5f30ab7f2a25b4
2020-08-20 09:06:22 +00:00
Paul Hu
a370cac809 Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" am: bddd412feb am: 9f33dbb509 am: 9ea57d25d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404653

Change-Id: I159f2052d27ad2c923c4463f161fbb3358eb1bb2
2020-08-20 09:05:53 +00:00
Paul Hu
ab51b37a2b Merge "Revert "[RFPM03] Check permission by uid."" am: 0925015de5 am: b2982a0643
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404654

Change-Id: I393e91873923d7b6601d4e8c863cca6986f66f23
2020-08-20 08:52:04 +00:00
Paul Hu
9ea57d25d8 Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" am: bddd412feb am: 9f33dbb509
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404653

Change-Id: Ifa19cb8fce8dca66ac5f4ecc7737c1c095b7b35b
2020-08-20 08:51:45 +00:00
Paul Hu
b2982a0643 Merge "Revert "[RFPM03] Check permission by uid."" am: 0925015de5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404654

Change-Id: I51b37f8e717123a2725ade859d5b9dcff19ef484
2020-08-20 08:33:41 +00:00
Paul Hu
9f33dbb509 Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" am: bddd412feb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404653

Change-Id: I35fe76f9cfedf0619f64023e9111d9a50cc3c41c
2020-08-20 08:27:16 +00:00
Paul Hu
0925015de5 Merge "Revert "[RFPM03] Check permission by uid."" 2020-08-20 08:24:30 +00:00
Paul Hu
bddd412feb Merge "Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"" 2020-08-20 08:14:48 +00:00
Paul Hu
a484db66e9 Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" am: 324af52c7a am: 701cd3908e am: 99653eada1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404652

Change-Id: I148fd645e30d866073a883550628f4013569af3c
2020-08-20 07:45:15 +00:00
Paul Hu
99653eada1 Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" am: 324af52c7a am: 701cd3908e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404652

Change-Id: I9edf5bfaa9cbc037e87f5781ba07a2c87932f3aa
2020-08-20 07:04:43 +00:00
Paul Hu
701cd3908e Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" am: 324af52c7a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404652

Change-Id: I8cef4a21aa8fd1923334c2a99e4ff2e864f516a5
2020-08-20 06:44:04 +00:00
Paul Hu
324af52c7a Merge "Revert "[RFPM05] Add UidNetdPermissionInfo class"" 2020-08-20 06:25:06 +00:00
Paul Hu
fe640c8708 Revert "[RFPM03] Check permission by uid."
This reverts commit f1e343c1c3.

Reason for revert: Regression in SW.  Bug:162499840

Change-Id: Ic93e762e41a728f66e200e5bc8e40ebe4c7b44f7
2020-08-20 06:23:16 +00:00
Paul Hu
e573ac006d Revert "[RFPM04] Adjust hasRestrictedNetworkPermission method"
This reverts commit bfa9f182b0.

Reason for revert: Regression in SW.  Bug:162499840

Change-Id: I96bf28ffc9f2d8f3838cb6d2dac16f89a70177ed
2020-08-20 06:23:00 +00:00
Paul Hu
9e986a8e98 Revert "[RFPM05] Add UidNetdPermissionInfo class"
This reverts commit fbc1f34c22.

Reason for revert: Regression in SW.  Bug:162499840

Change-Id: I0e846efcc4fc06b53d97b2007e0d8e8f97c6ac10
2020-08-20 03:10:08 +00:00
junyulai
72d2bd016b Notify the keepalive is stopped after the slot has been released
Currently, the callbacks of stopping were fired when stop procedure
is started, because the upper layer apps only care about the reason
of stopping instead of stopping result. Thus, there is no need to
wait for the result comes back. However, this behavior generates
races if apps want to re-start keepalive immediately since the
resources are not released yet.

Fix: 134891441
Fix: 140305589
Test: atest com.android.server.ConnectivityServiceTest#testPacketKeepalives \
      --rerun-until-failure 1000

Change-Id: I987776a9211a50e964c4675b747bc10e203750f1
2020-08-20 11:00:08 +08:00
junyulai
675f67cbb2 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-19 09:53:20 +00:00
Chalard Jean
bda6506a01 Merge "Rename Kotlin util files to not include the Kt suffix" am: 6a8da60a32 am: 97cda73a1c am: 97c4e1a647
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I6d7b924f9c0e8722400611cec31b4bf4222548ad
2020-08-13 04:43:45 +00:00
Chalard Jean
97c4e1a647 Merge "Rename Kotlin util files to not include the Kt suffix" am: 6a8da60a32 am: 97cda73a1c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I6362695120ea8669e1da84bb686e886b85efd6a3
2020-08-13 04:26:11 +00:00
Chalard Jean
97cda73a1c Merge "Rename Kotlin util files to not include the Kt suffix" am: 6a8da60a32
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350084

Change-Id: I7e1f015c21d54591a1a25b5fa461e751bc707509
2020-08-13 04:09:27 +00:00
Chalard Jean
6a8da60a32 Merge "Rename Kotlin util files to not include the Kt suffix" 2020-08-13 03:52:47 +00:00
Chiachang Wang
3db81f877e Merge "Update language to comply with Android's inclusive language guidance" am: 64f9851e3a am: 6afddeb044 am: 148be57009
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156

Change-Id: Ib078acdf9210f7c80b5cdb50ae5b860aea2a5626
2020-08-12 10:28:50 +00:00
Chiachang Wang
148be57009 Merge "Update language to comply with Android's inclusive language guidance" am: 64f9851e3a am: 6afddeb044
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156

Change-Id: Ibe13b2dad841e2ade2762558d1c3978a89cb825d
2020-08-12 10:10:11 +00:00
Chiachang Wang
6afddeb044 Merge "Update language to comply with Android's inclusive language guidance" am: 64f9851e3a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1379156

Change-Id: Iecf8601b2f9e286cefca0675476d0892436d5e5b
2020-08-12 09:52:30 +00:00
Chiachang Wang
64f9851e3a Merge "Update language to comply with Android's inclusive language guidance" 2020-08-12 09:30:11 +00:00
Paul Hu
f00246ed26 Merge "[RFPM05] Add UidNetdPermissionInfo class" am: 255bf95e97 am: 1cc0664651 am: e09d3ece31
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322556

Change-Id: I6992464abf1f79bde4da0b0ac6e9d13619ef485d
2020-08-12 07:11:46 +00:00