Commit Graph

636 Commits

Author SHA1 Message Date
TreeHugger Robot
c30cd79f35 Merge "[Provider Model] Airplane mode slice design change" into sc-dev 2021-02-05 09:56:46 +00:00
Weng Su
6a5c02a5bb [Provider Model] Airplane mode slice design change
- Change title text:
  WiFi enabled: Turn off networks
  WiFi disabled: Turn on networks

- Add end icon with colorAccent

- The title text color changed is not included this CL.

- Screenshot
  https://screenshot.googleplex.com/44yYKphdem87UnU

Bug: 178719303
Test: manual test
atest -c AirplaneSafeNetworksSliceTest

Change-Id: I27ec111c3c9d4e228010b1495a9d0c7956ba5d74
2021-02-05 16:45:30 +08:00
Weng Su
7a62ab1fff [Provider Model] Internet Panel - Airplane mode is on
- Add "Airplane mode is on" to sub-title
  - Set the header layout to CENTER_HORIZONTAL if it's no icon

- Hide "Settings" button

- Screenshot
  https://screenshot.googleplex.com/6m5dFVZu7ar4nKW

Bug: 178717651
Test: manual test
atest InternetConnectivityPanelTest \
      PanelFragmentTest \
      ProviderModelSliceTest

Change-Id: I899a817fd99415e9cad608aa4deac1e45365696a
2021-02-04 18:48:34 +08:00
Jeremy Goldman
9e949b1920 Unique display name util uses available, rather than active, subscriptions.
Test: atest -c SettingsUnitTest
Bug: 178560175
Change-Id: Ief035cf3de3ac03fe348095f36bfb78a41f93d2c
(cherry picked from commit c14e3b3115)
Merged-In: Ief035cf3de3ac03fe348095f36bfb78a41f93d2c
2021-02-04 03:15:41 +00:00
Hall Liu
3717d5feda Merge "Rename setMobileDataPolicyEnabledStatus" into sc-dev 2021-02-03 19:54:14 +00:00
TreeHugger Robot
aa172787de Merge "WifiCallingPreferenceControllerTest migrated to junit" into sc-dev 2021-02-03 15:47:31 +00:00
SongFerngWang
6ac2e7e04b WifiCallingPreferenceControllerTest migrated to junit
Bug: 179246773
Test: atest -c WifiCallingPreferenceControllerTest
Change-Id: I9a097db77f71b31d8c92d5596ecf1794fe61a042
2021-02-03 22:11:56 +08:00
Hall Liu
68931a6911 Rename setMobileDataPolicyEnabledStatus
Rename to setMobileDataPolicyEnabled per API council comments

Fixes: 171804465
Test: atest TelephonyManagerTest
Change-Id: Ib9ff4ee01e2af4d3fd368afffa36226100f11e2d
2021-02-02 12:36:14 -08:00
TreeHugger Robot
b40e5dc89d Merge "[Provider Model] Fix InternetPreferenceControllerTest failed issue." into sc-dev 2021-02-01 17:00:04 +00:00
Weng Su
5cf4cf2660 [Provider Model] Fix InternetPreferenceControllerTest failed issue.
- Bypass system resource

Bug: 179016907
Test: manual test
- atest InternetPreferenceControllerTest
Change-Id: I860eb3173f112a7d3f820701afb1a96a06d4a296
2021-02-01 14:37:38 +00:00
Jeremy Goldman
ba8f1ad06f Merge "SubscriptionUtil checks that SubscriptionInfo is null before accessing." into sc-dev 2021-02-01 08:16:42 +00:00
Weng Su
548569e3eb Merge "[Provider Model] Fix Internet preference crash" into sc-dev 2021-02-01 06:12:11 +00:00
Jeremy Goldman
3dd2878437 SubscriptionUtil checks that SubscriptionInfo is null before accessing.
Test: atest -c SubscriptionUtilTest
Bug: 178707680
Change-Id: I03938405929c3307460107671bbe695ee5e0f6e9
2021-02-01 05:01:49 +00:00
TreeHugger Robot
e7515466ea Merge "The UI is not immediately updated" into sc-dev 2021-01-29 07:56:42 +00:00
SongFerngWang
c0b8f62b57 The UI is not immediately updated
Solution: Add Data Connection State listener by PhoneStateListener.

Bug: 178350321
Test: atest NetworkProviderWorkerTest
Change-Id: I692209035332bfd463537988f4e3ce166414031e
(cherry picked from commit 59958e663d)
Merged-In: I692209035332bfd463537988f4e3ce166414031e
2021-01-29 06:52:11 +00:00
Weng Su
fc3a51ed3f [Provider Model] Fix Internet preference crash
- Post on main thread for UI update

- Add NPE checking

Bug: 178670562
Test: manual test
- atest InternetPreferenceControllerTest

Change-Id: I6c37f7dc19f9f9bbc75b36415a47aa1366dc5f5e
2021-01-29 12:57:36 +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
tom hsu
ba845f7fe4 Avoid wrong telephonymanager with wrong sub id.
When initialized SimStatusDialogController, also create TelephonyManager
with sub id.

Bug: 174171839
Test: Manual test passed, see b/174171839#25
Change-Id: I6bd6975e39c75884252b9d0bcd9d5548dbdfe6d5
2021-01-28 06:26:21 +00:00
Weng Su
ca8a3d7e64 [Provider Model] Add connected ethernet network to internet panel
- Show the connected ethernet network to first item of internet panel

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

Bug: 176796623
Test: manual test
- atest NetworkProviderWorkerTest \
        ProviderModelSliceTest

Change-Id: I423a7951f403bf86c288da52fc342520fd24f466
2021-01-25 14:46:37 +00:00
Weng Su
e9d44254c7 Merge "[Provider Model] Add connected ethernet network preference" 2021-01-25 14:46:05 +00:00
Jeremy Goldman
09f43be1c6 Merge "SubscriptionsPreferenceController shows the unique sim description." 2021-01-25 09:03:40 +00:00
Weng Su
c7003e95a3 [Provider Model] Add connected ethernet network preference
- Show the preference if connected to ethernet network

- Hide the preference if not connected to ethernet network

- Screenshot:
  https://screenshot.googleplex.com/5ZkZXnTr9Hcfsyt

Bug: 176796623
Test: manual test
- atest ConnectedEthernetNetworkControllerTest
- make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: I0f062eb2ee4898976f5e7a1c3f2c4061b60a3126
2021-01-25 07:31:52 +00:00
SongFerng Wang
11501a0bc2 Merge "Replace allowedNetworkTypes with allowedNetworkTypesForReason" 2021-01-23 07:41:11 +00:00
Jeremy Goldman
9d87cd9126 SubscriptionsPreferenceController shows the unique sim description.
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionsPreferenceControllerTest
Change-Id: I041536fe0148087a068c6000383b382b0ff4e17c
2021-01-22 07:02:52 +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
SongFerngWang
60c4163244 Replace allowedNetworkTypes with allowedNetworkTypesForReason
- Replace getAllowedNetworkTypes with
getallowedNetworkTypesForReason(ALLOWED_NETWORK_TYPES_REASON_CARRIER)
- Replace "Settings.Global.PREFERRED_NETWORK_MODE" with
"getAllowedNetworkTypesForReason(USER)"
- Move EnabledNetworkModePreferenceControllerTest from robotests to unit
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT
- Rename PreferredNetworkModeContentObserver to AllowedNetworkTypesListener
Bug: 161434786
Test: build pass.
(PASS)atest CdmaSystemSelectPreferenceControllerTest
(PASS)atest PreferredNetworkModePreferenceControllerTest
(PASS)atest AllowedNetworkTypesListenerTest
(PASS)atest EnabledNetworkModePreferenceControllerTest
(PASS)atest MobileNetworkUtilsTest

Change-Id: I2b981569ad11cf70a558c1952cc2e077464328d8
2021-01-20 08:23:08 +00:00
Jeremy Goldman
67c75ac102 Helper function to return the unique name for subscription info
Many classes within Settings have access to the subscription info, rather
than only having access to the subscription id. For these classes, it is
more convenient to have a helper method where the whole subscription
info can be passed in, rather than having to call the
getSubscriptionId() helper method in so many locations within the
telephony settings codebase.

Bug: 150370656
Bug: 148303118
Test: atest -c SubscriptionUtilTest
Change-Id: I181960933ab8610d5572b7a7d6671fab8c1dbd22
2021-01-19 09:30:14 +00:00
SongFerng Wang
8ee28c1baa Merge changes I79b4c3d4,Icc8a7793
* changes:
  [Provider mode] Carrier item display network type on slice.
  The provider model slice carrier toggle is broke.
2021-01-19 05:55:17 +00:00
SongFerngWang
c14eefb125 [Provider mode] Carrier item display network type on slice.
Bug: 176871752
Test: (PASS)atest NetworkProviderWorkerTest
(PASS)atest ProviderModelSliceTest
(PASS)atest ProviderModelSliceHelperTest

Change-Id: I79b4c3d45a52f0be0c058044f1d79a7056386193
2021-01-19 12:23:22 +08:00
SongFerngWang
f3b25cc7cb The provider model slice carrier toggle is broke.
The slice doesn't upload subId for TelephonyManager and
the listeners.

Bug: 177385874
Test: (PASS)atest NetworkProviderWorkerTest
(PASS)atest ProviderModelSliceTest
(PASS)atest ProviderModelSliceHelperTest

Change-Id: Icc8a7793204de2e2eadd0454edf50e466821b8f9
2021-01-19 11:58:58 +08:00
Bonian Chen
23ee815ef5 Merge "[Settings] Remaining part of Cross SIM calling (backup calling)" 2021-01-18 14:13:14 +00:00
Bonian Chen
26552500f6 [Settings] Remaining part of Cross SIM calling (backup calling)
1. Change the wording
2. Add a list of summary within Calls and SMSs UI

Bug: 174012397
Test: manual
Change-Id: I6dde0cea9c1386029377b3ea2682ed8b977f9427
2021-01-18 20:41:39 +08:00
Weng Su
99dbb43f0c [Provider Model] Connect carrier network issue fix
- Need to check if the data is enabled on the second SIM in the case of
dual SIM.

Bug: 177411771
Test: manual test
Change-Id: Ieead7a4550628d5380b8d0150cfd7a67c47980ca
2021-01-18 07:59:50 +00:00
Tom Hsu
7c8e8eb6c2 Merge "[Provider mode] Display network type on mobile data preference." 2021-01-15 19:47:17 +00:00
tom hsu
b392d43fff [Provider mode] Display network type on mobile data preference.
Connect to 5G mobile network
  - https://screenshot.googleplex.com/8RziSbSjstMaFiK
 Connect to Wi-Fi
  - https://screenshot.googleplex.com/6ND3DFFsnLKSQRd

Bug: 176141828
Test: Manual test passed.
Test: Atest passed

Change-Id: I69b8ce0c1f5a16f0ff492be0b4ab26166a51bdc3
2021-01-16 01:56:39 +08:00
Weng Su
7686bf26dc Merge "[Provider Model] View airplane mode networks button" 2021-01-15 08:32:59 +00:00
Weng Su
ee414fdc81 [Provider Model] View airplane mode networks button
- Airplane mode message
  - WiFi Disable: “Airplane mode is on”
  - WiFi Enabled: “Viewing airplane mode networks”

- “View airplane mode networks” button
  - WiFi Disable: “View airplane mode networks”
  - WiFi Enabled: hide button

- Screenshot
  https://screenshot.googleplex.com/7PuKwaJMLpiDdKh

Bug: 177155647
Test: manual test
- atest ViewAirplaneModeNetworksLayoutPreferenceControllerTest
- make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: I3222cb04a66d07681709cc95b729b5ecdf999298
2021-01-15 07:10:57 +00:00
Jeremy Goldman
5a75bf7828 Merge "Utility to compute a single subscription's unique display name." 2021-01-15 02:27:53 +00:00
SongFerng Wang
985bb16057 Merge "Provider model: add string for airplane mode" 2021-01-15 02:15:49 +00:00
Stanley Wang
b87ddba6cd Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.

Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui

Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
2021-01-14 22:48:31 +08:00
SongFerngWang
b114e490d5 Provider model: add string for airplane mode
Bug: 177399563
Test: build PASS and verify the slice's airplane screen.
(PASS)atest NetworkProviderWorkerTest
(PASS)atest ProviderModelSliceTest
(PASS)atest ProviderModelSliceHelperTest

Change-Id: I9f212b8c2c66bf8af32936fca92c46fe86a9b3ef
2021-01-14 12:47:26 +00:00
Jeremy Goldman
3c334cc47f Utility to compute a single subscription's unique display name.
Bug: 150370656
Bug: 148303118
Test: atest -c SubscriptionUtilTest
Change-Id: Id4600dbf038117129c62331f9e00b7035af1c0fd
2021-01-13 22:03:03 +08:00
Jeremy Goldman
3c3ce5ea66 Merge "Return mapping of subscription id to unique display name." 2021-01-13 12:04:54 +00:00
Jeremy Goldman
2fb7e1bbc4 Return mapping of subscription id to unique display name.
Fallback 1: if display names are the same, use the last 4 digits of a
phone number
Fallback 2: if the phone number cannot be displayed or the last 4 digits
are identical, fallback to use the subscription id

This function depends on DeviceInfoUtils for the phone number
formatting. Because DeviceInfoUtils is within SettingsLib, this function
(at least for now) is located within the Settings codebase itself.

go/unique-sub-display-names

Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionUtilTest
Change-Id: Id3e26254d4b193c13506df52fb59e97643df7a32
2021-01-13 16:18:00 +08:00
Weng Su
b9c865b704 Add Hotspot WPA3 Settings
- Add WPA3 SAE security types
  - "WPA3-Personal"
  - "WPA2/WPA3-Personal"

- Verify valid WPA3 password

- Enable QR code scanner for Hotspot WPA3

- Avoid null point exception when settings keyword searching

- Screenshot
  https://screenshot.googleplex.com/B6u54wh8w35Xnyf
  https://screenshot.googleplex.com/8hWHHUTb6UaS9vB

Bug: 167968488
Test: manual test
- atest WifiTetherSecurityPreferenceControllerTest
- atest WifiUtilsTest

Change-Id: I2992040498f8add107a4cce70a92c1c6ee6ab805
2021-01-10 08:38:39 +00:00
TreeHugger Robot
66363d707f Merge "[Provider Model] Replace WiFi panel to Internet panel" 2021-01-08 03:57:19 +00:00
Julia Reynolds
60633f6253 Merge "Allow notification filtering per listener." 2021-01-08 03:14:52 +00:00
Steven Liu
70a74e1313 Fix the unit test failure of WifiPickerTrackerHelperTest
Bug: 176945457
Test: atest SettingsUnitTests
Change-Id: I25ab3d57c8bf09effcd8aa82a316f64f33d2237a
2021-01-07 08:53:31 -08:00
Julia Reynolds
eb2b36a5e2 Allow notification filtering per listener.
Test: atest
Bug: 173052211
Change-Id: I54c740e9755f18339c59aad4f1f5aecd8c734892
2021-01-07 10:01:08 -05:00
Weng Su
c33f69673a [Provider Model] Replace WiFi panel to Internet panel
- Replace the android.settings.panel.action.WIFI panel
  - Provider Model Disable: Wifi panel
  - Provider Model Enabled: Internet panel

Bug: 172707942
Test: manual test
- adb shell am start -a android.settings.panel.action.WIFI
- atest PanelFeatureProviderImplTest

Change-Id: I9f111e96385452b586971d4c28988b564d4e25f4
2021-01-07 11:55:28 +00:00