Commit Graph

17 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
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
319cc7bc1c [Settings] Add ImsQueryProvisioningStat for VT
1. Code refactor
2. Add ImsQueryProvisioningStat class for VT's use case

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
Change-Id: I40ec5df00d02e71cb8ae78d4f81c71c5e354515a
2020-02-03 14:26:11 +08:00
Bonian Chen
e8771c9ceb [Settings] replace isNonTtyOrTtyOnVolteEnabled() and isVtEnabledByUser() in VT
1. Code refactor
2. Replace ImsManager#isNonTtyOrTtyOnVolteEnabled() by combination of
   TelecomManager#getCurrentTtyMode() and
   ImsMmTelManager#isTtyOverVolteEnabled()
3. Replace ImsManager#isVtEnabledByUser() by
ImsMmTelManager#isVtSettingEnabled()

Bug: 140542283
Test: m RunSettingsRoboTests -j
ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Change-Id: I731c086cfea4330424b042bbf473b3cf77696a8c
2020-01-21 16:13:48 +00:00
Bonian Chen
1407d80f4c [Settings] add VtQueryImsState for IMS
1. Code refactor
2. Introduce VtQueryImsState and VolteQueryImsState for user enable/disable configuration

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
Change-Id: I72ec009a8808875fef144a24486b94ef4a7fd35c
2020-01-21 20:10:47 +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
Bonian Chen
21361e1f84 [Settings] Refactor PhoneStateListener
Remove Looper and update of mSubId

Bug: 144542981
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingPreferenceControllerTest

Change-Id: Ie6ae5b5914322644f2655e585b03a6b685bbc84a
2019-11-15 16:01:51 +08:00
Bonian Chen
65817204e6 [Settings] Replace VT and VOLTE provisioning API
Replace isVtProvisionedOnDevice() and isVolteProvisionedOnDevice()
by android.telephony.ims.ProvisioningManager.

Bug: 140542283
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gLteSliceHelper
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceController

Change-Id: Ie92794b794a6b9f2d9e161ca5f328cd9fa01064a
2019-11-14 18:24:55 +08:00
Bonian Chen
31367d7a72 [Settings] Replace getSimCount() API
Change design of monitor change in Settings.Global.MOBILE_DATA and
Settings.Global.DATA_ROAMING in order to avoid from accessing
getSimCount().

Bug: 144251589
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=RoamingPreferenceControllerTest
make RunSettingsRoboTests -j ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Change-Id: I965a0c07c7c9ef5897b33809bae6a7921977db18
2019-11-11 15:27:30 +08:00
Josh Hou
c101faeb2b 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
2019-10-24 18:25:37 +08:00
Stanley Wang
9cbca4bcee Fix can't find the search result by input "4G Calling"
Add indexable raw data for type 4G_CALLING or ADVANCED_CALL and
set the volte to non-indexable if current type is not volte.

Fixes: 137155154
Test: manual

Change-Id: I0992f9fb95e0b1cc23fb4f38f356ee0569f3b5b1
2019-09-19 19:21:16 +08: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
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
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