Commit Graph

9 Commits

Author SHA1 Message Date
Michael Groover
911f7e7aa9 Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting T or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the T release.

Bug: 161145287
Test: Build
Change-Id: Ie97372efebd8258d9a4c503771d55109a85e6ae9
2021-12-09 20:34:02 -08:00
Weng Su
627efc46a2 [Provider Model] Show carrier network to internet preference
- If the connected network is the merged carrier Wi-Fi, then show
carrier network to internet prefernce.

Bug: 191091045
Test: manual test
atest -c InternetUpdaterTest

Change-Id: Iad3869f086ea0a4d0607691c6709ee12567831c7
2021-06-23 15:55:24 +08:00
Weng Su
88cafbaa24 [Provider Model] Fix settings crash issue
- The GlobalSettingsChangeListener needs to be closed after the life
cycle is destroyed

Bug: 185756174
Bug: 186404332
Bug: 186591527
Test: manual test
atest -c InternetUpdaterTest

Change-Id: I9fbad3b303055c6c7a61ccad8efe69cefef56c58
2021-05-06 05:53:41 +08:00
Weng Su
439cc64b1c [Provider Model] Move the Internet unavailable Wi-Fi down
- Check the Wifi network have both INTERNET and VALIDATED capabilities
to achieve effective network access

- Move the Internet unavailable Wi-Fi down to the top of Wi-Fi list

- Don't paint color for the Internet unavailable Wi-Fi

- Screenshot:
  https://screenshot.googleplex.com/w82kbALssdTZmg4

Bug: 178457619
Bug: 178926547
Bug: 178978070
Test: manual test on device
atest -c InternetUpdaterTest \
         NetworkProviderWorkerTest \
         ProviderModelSliceTest

Change-Id: Idf04e556ab5a87abc5bc96d1934f5e8fd91fbfaa
2021-03-26 23:24:14 +08:00
Chiachang Wang
3157509885 Remove hidden @Transport usage
NetworkCapabilities is moving to connectivity mainline module.
The hidden methods and constants accesses are not allowed
anymore for Settings, so remove the usage.

Bug: 172183305
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.network.InternetUpdaterTest
Change-Id: I3adec99748451f32698ac19bfeaeb9db43282e3e
2021-03-19 21:03:25 +08:00
Weng Su
6a0ef56917 [Provider Model] Adjust slice title and subtitle
- Show "Airplane mode" title when airplane mode is enabled

- Remove "Airplane mode is on" subtitle

- Show "Wi-Fi is turned on" subtitle when both airplane mode and Wi-Fi
is enabled

- Remove the function related to isApmNetworksAvailable()

- Screenshot:
  https://screenshot.googleplex.com/6X9nzmXRCUfw4Lp
  https://screenshot.googleplex.com/6jQryMjU2yDDpmM

Bug: 181858434
Test: manual test
atest -c InternetConnectivityPanelTest \
         InternetPreferenceControllerTest \
         InternetUpdaterTest

Change-Id: I84e5d4c60ed91d58443b27c35286a84bf72ac173
2021-03-10 22:34:35 +08:00
Weng Su
f1489b51a3 [Provider Model] Show connected networks in APM/APM networks
- Separate APM and APM network types from other Internet types because
they can coexist at the same time.

- Show no internet icon in airplane-mode networks.

- Show connected non-carrier(Wi-Fi) network in airplane-mode networks.

- Show connected Ethernet network when airplane mode on.

- Screenshot:
  https://screenshot.googleplex.com/cr3eWNLMEuJ8zvP
  https://screenshot.googleplex.com/6DiMqKBBnBoxxhN

Bug: 180778141
Bug: 180778839
Bug: 179106406
Test: manual test
atest -c ConnectedEthernetNetworkControllerTest \
         InternetConnectivityPanelTest \
         InternetPreferenceControllerTest \
         InternetUpdaterTest

Change-Id: I861d5ce879facbb61dfdc5b7be943662d55bdcca
2021-03-02 02:59:11 +08:00
Weng Su
28172b61c8 [Provider Model] Dynamically update the Internet Panel title
- Change from "Internet" to "Airplane mode networks"

- Screenshot:
  https://screenshot.googleplex.com/gk3RBcjPsXq5NTk

Bug: 176803442
Test: manual test
- atest InternetConnectivityPanelTest
- make RunSettingsRoboTests ROBOTEST_FILTER=PanelFragmentTest

Change-Id: Ifb2c24434e480861fc7c3eaece683d49eb99013e
2021-01-28 11:00:08 +00:00
Weng Su
46837dc4d5 [Provider Model] Update internet preference icon and summary
- Airplane mode icon/summary

- Airplane mode networks icon/summary

- Wi-Fi network connected icon/SSID

- Cellular network connected icon/carrier-name

- Ethernet network connected icon/summary

- Screenshot:
  https://screenshot.googleplex.com/AzhCEX2HjwYUMtJ
  https://screenshot.googleplex.com/9BRfQLMW4UvHqqq
  https://screenshot.googleplex.com/5jdi8oEjMPUURdT

Bug: 176796623
Test: manual test
- atest -c InternetUpdaterTest \
           InternetPreferenceControllerTest

Change-Id: Icc8944dabdac597f12b67cffa72cb0be02d9671d
2021-01-21 17:24:10 +08:00