Commit Graph

23 Commits

Author SHA1 Message Date
Zoey Chen
b8a639f8fd [Settings] Use TelephonyManasger.registerTelephonyCallback instead of TelephonyManager.listen
Bug: 175270951
Test: make and atest
Change-Id: I15e1a199e6a34914db97055bfea9392c5bbdc9c6
2021-03-12 19:27:05 +08:00
Zoey Chen
fa2417aaac [Provider Model] Implement Wi-Fi callings in Calls & SMS
NetworkProviderWifiCallingPreferenceController is a catrgory of WFC.

It will add NetworkProviderWifiCallingGroup for SIMs which is WFC enabled dynamically.

Implement the current WFC logic: WifiCallingPreferenceController, for Provider Model

Diff with WifiCallingPreferenceController
https://diff.googleplex.com/#key=nzCL6Ybrkr19

Screenshot of Provider Model:
https://screenshot.googleplex.com/BCXxdo4iNh6M3tH.png

Screenshot of current WifiCallingPreferenceController:
https://screenshot.googleplex.com/BsBE3A5YRs6arw9.png

Doc: https://docs.google.com/presentation/d/1azrZVS54pxM2lt9LkZHtFh_6W3fyDw_kTTPVQ_mJCi4/edit#slide=id.g9c7123c172_0_448

Bug: 172053880
Test: manual & atest -c NetworkProviderWifiCallingPreferenceControllerTest & atest -c NetworkProviderWifiCallingForSubTest
Change-Id: I6f4b4a257bc5e94be3090445ccabbcb261a03730
2020-11-20 12:54:40 +08:00
Zoey Chen
3abe48ef38 [Provider Model] Add new API to detect
1. current connection is mobile data
 - remove the SubscriptionsPreferenceController#activeNetworkIsCellular() and move into MobileNetworkUtils
2. isProviderModel API
 - Add it in Util for Provider Model
3. isWiFiCallingEnabled
 - remove WifiCallingPreferenceController#isWifiCallingEnabled() and move into MobileNetworkUtils
4. Add nes test case for MobileNetworkUtils

Bug: 171873895
Test: atest -c MobileNetworkUtilsTest
Change-Id: I4bfdf0537fe07d064d6c0ba4a2c44b4a4f158d91
2020-11-13 18:01:10 +08:00
Taesu Lee
99637baab2 Avoid unexpected state changes for enhanced preferences
Assigning current call state to mCallState right before registering
PhoneStateListener so that the preferences have correct state before
first onCallStateChanged() by initial registration even.

Bug: 166307650
Test: Check the preferences state when onStop() -> onStart()

Change-Id: I861a687497ba4da7a845540fd92ae2b865392d60
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-09-11 14:36:26 +09:00
Bonian Chen
0f47147543 [Settings] To avoid from crash when callback
Callback from SubscriptionManager and PhoneStateListner may comes in
under the case of Preference not available.

Bug: 141833767
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest
Change-Id: I50b83b4488d272f6482bde5f09b57d59e6fc27a3
2020-04-21 15:02:14 +08:00
Jason Chiu
1766b3c01d Fix indexing error of mobile related controllers
There were several errors in indexing mobile related sliceable
controllers, which led them not able to display on Panel and as inline
controls in search result.

It's because indexing mechanism is running in a worker thread and trying
to construct each controller instance, but the failed controllers'
constructors need to initilize something in the main thread.

- Give the main looper to the classes which only can be initialized in
  the main thread to fix the indexing.
- Guard null pointer exception in SlicesIndexer after fixing the
  indexing.
- Use onStart/onStop in AirplaneModePreferenceController to start/stop
  listener.

Fixes: 149720345
Test: robotest
Change-Id: Ibe5a8d6cc713eeddf26eceaabc05e6d1faa45507
2020-04-10 10:56:31 +00:00
Bonian Chen
a8f14cb11e [Settings] Apply ImsQueryProvisioningStat to WFC
1. Code refactor
2. Apply ImsQueryProvisioningStat class to WFC's use case

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest
Change-Id: I8a09264f83b9fc4fce3f79ec3aeb6ae757b004e4
2020-02-05 16:55:17 +08:00
Bonian Chen
f63c6f9e4b [Settings] add WifiCallingQueryImsState for IMS
1. Code refactor
2. Introduce WifiCallingQueryImsState for user enable/disable configuration

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest
Change-Id: Ib337d6418fcc89f81b15b8cb464d03dccc583756
2020-01-21 17:02:01 +08:00
Malcolm Chen
26e5dbdbfd Mainline: remove usage of hiddepn API SubscriptionManager#getPhoneId
Bug: 140908357
Test: build
Change-Id: Idaa206c7659717a269738c0121a31d957f7d90d0
2019-12-16 11:43:00 -08:00
Torbjorn Eklund
4f44b44168 Consider subId when loading Wfc string resources
Consider subId when loading string resources in screen
WifiCallingSettingsForSub and Wi-Fi Calling slice.

This ensures that correct string resources is loaded in multi sim
scenario when operators are using customized strings.

Bug: 129893058
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiCallingPreferenceController
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiCallingSliceHelper
Change-Id: Ia5b763d4b59f7e738cb741b778bb859884a85198
2019-11-27 14:35:07 +01:00
Bonian Chen
cacf047daa [Settings] Fix conflict of AOSP merge on wifi call
Merge for fixing conflict of Ib4b0e1191c83e23377ccf8ed013252728ef9dd95

Bug: 144960427
Test: build pass
Change-Id: I2979a9a2ee1bc690486e25b7d470cf905cf02d17
Merged-In: Idb063bdab3d3b11c348804c1c0ecb268cca3068e
2019-11-22 20:38:13 +00:00
Josh Hou
e2cdd74174 Fix ViLTE is not available when WiFi Calling is disabled
Bug: 141831293
Test: 1. Set carrier config carrier_wfc_ims_available_bool to false,
then verify Wi-Fi calling option is not shown.
      2. Set carrier config carrier_vt_available_bool to false, then
      verify video calling option is not shown.
      3. Set both carrier_wfc_ims_available_bool and
      carrier_vt_available_bool to false, then verify calling category
      is not shown.

Change-Id: Ibec13fbeb5acf1d62342286687b2ba969beb4e14
Merged-In: Ibec13fbeb5acf1d62342286687b2ba969beb4e14
2019-10-28 11:12:49 +00:00
Youming Ye
b7923f5a3f Check the missing useHomeWfMode case
Bug: 133812904
Test: Build
Change-Id: If89c67c0595808a1339517c6084f1d1e23f5974b
Merged-In: If89c67c0595808a1339517c6084f1d1e23f5974b
2019-07-31 16:38:32 -07:00
Lei Yu
41bb2cb6a8 Handle null intent in WifiCallingPreferenceController
When intent is null, we will hide wifi calling preference however
its listener might still triggered with null intent.

This CL update controller so it can handle this event inside listener
callback.

Fixes: 135095929
Test: RunSettingsRoboTests
Change-Id: I4c5aba03871f11a2d9f9b4da329c2c2655ff9adb
2019-06-13 14:47:56 -07:00
Brad Ebinger
5caefbff3f Resolve the SIM call manager per subId
The SIM call manager used to be resolved based
on what the default voice subscription ID was.
This caused settings to be displayed for the
incorrect subscription. A new API has been added
that allows settings to query the SIM call manager
per subId.

Test: manual, unit testing
Bug: 131627085
Change-Id: I7699508429f7df7a138c24c4c7a6e9f1148b84da
2019-05-07 21:45:05 +00:00
Antony Sargent
02db2ef9b6 Go to the correct subscription in WifiCallingSettings
For subscriptions that support wifi calling, we have a preference on the
mobile network details page which leads to a Wifi Calling page. That
page already supports the concept of multiple subscriptions with a
header strip containing a tab for each subscription that supports wifi
calling. However, we were not necessarily selecting the *correct* tab
when going to this page. So you might be viewing the mobile network
details for subscription B and click on "Wifi Calling", only to land on
the page with the tab for subscription A selected.

This CL fixes the problem by adding an extra with the current
subscription id to the Preference's intent in
WifiCallingPreferenceController, and then reads that extra in
WifiCallingSettings and uses it to select the appropriate tab.

Fixes: 117135894
Test: make RunSettingsRoboTests
Change-Id: I3aec30072712247d14fe0fb6b61207535f9e981c
2019-04-09 16:08:04 -07:00
jackqdyulei
c833ee74ca Customized Wifi calling text
This only fixed in old page from aosp/777974. We need to migrate
it to new preference controller

Fixes: 117257109
Test: Manual
Change-Id: I257be10d7cc1fc4a91ee0df404dd69b4d2ee8ae2
(cherry picked from commit acacaf44d3)
2019-04-04 17:15:59 +00:00
Youming Ye
f9c68dc980 Check wfc roaming config when read
Bug: 127913488
Test: Build
Change-Id: I0a3e8d3f4bc0590f12085f5963892a1d8278efdc
2019-03-27 10:23:15 -07:00
jackqdyulei
5d3ead749a Update search for mobile network
Continue work from ag/5991582:
1. Add search support for CDMA/GSM related preference
2. Update func getAvailabilityStatus, inside it should get all
related manager from subId, rather than default one in controller.

Bug: 117843601
Bug: 77276236
Test: RunSettingsRoboTests

Change-Id: Id72505a512269bdc5adb02e806d38ac367ce9f07
2019-02-12 17:43:54 -08:00
jackqdyulei
e6d7d3b1e7 Update search for mobile network settings
This CL make all mobile related preferences support:
1. If subId is manually set, check visibility by subId
2. If not, try find whether there is one active subId meets requirement.
If so, isAvailable() will return true to enable search.

Bug: 77276236
Test: RunSettingsRoboTests
Change-Id: I24e2d2f5e882284ba8e997b844caee7722b6b07d
2019-02-08 16:23:11 -08:00
Stanley Wang
242502e5a9 Fix WiFi calling option is showing in search result regardless the carrier supports VoWiFi or not
Change Availability Status to UNSUPPORTED_ON_DEVICE when device doesn't
support VoWiFi.

Change-Id: I8ac501cf7442f1cd7d41f61d2db912d82a9e8c25
Fixes: 120806624
Test: manual and robotests
2019-01-03 13:11:25 +08:00
jackqdyulei
2aae67a061 Rename a bunch of mobile network files
1. Make them have "MobileNetwork" prefix
2. Also update WifiCallingPreference to remove its category
if it is invisible

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I25871d579d6495e902e5583030889942ed2506a8
2018-10-30 16:28:56 -07:00
jackqdyulei
3d7e38bc57 Refactor wifi calling and video calling
Also add a Callback for 4gLte to notify update to video calling
preference controller

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I0b5009733251162327f02ccfae8b10ae56b961bc
2018-10-22 13:02:32 -07:00