Commit Graph

17 Commits

Author SHA1 Message Date
Yanting Yang
96127fe621 Remove sub-text from slice builder
We would like to remove all sub-text from Settings Search. But slice
view does not support API to configure the sub-text visibility.
Therefore, the only way is to remove the sub-text from slices directly.

Since Settings slices are also invoked by other apps, we can not
directly remove the sub-text.

Finally, we decide to check the caller's uid. If it comes from Settings
Search, we will return the slice without the sub-text.

Bug: 143118037
Test: visual, robotests
Change-Id: Iac72f1683a2c930592634e0599058890d86f669d
2020-04-28 14:15:16 +08:00
Bonian Chen
ced9489549 [Settings] Code refactor for Wifi calling IMS API
Replacing logics of
ImsManager#isWfcEnabledByPlatform() &
MobileNetworkUtils#isWfcProvisionedOnDevice()
into WifiCallingQueryImsState#isWifiCallingProvisioned().

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSliceHelperTest
Change-Id: I68462368669b81e10d09bbb93e74e23ea9a1f446
2020-02-10 00:56:51 +08:00
Bonian Chen
c4413a850f [Settings] replace isNonTtyOrTtyOnVolteEnabled() and isWfcEnabledByUser() in WFC
1. Code refactor
2. Replace ImsManager#isNonTtyOrTtyOnVolteEnabled() by combination of
   TelecomManager#getCurrentTtyMode() and
   ImsMmTelManager#isTtyOverVolteEnabled()
3. Replace ImsManager#isWfcEnabledByUser() by
ImsMmTelManager#isVoWiFiSettingEnabled()

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSettingsForSubTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSliceHelperTest
Change-Id: I57c91a095fc4d454d92e8d78e0b647b4f098c6a3
2020-01-22 00:24:16 +08:00
Bonian Chen
a498eae245 [Settings] apply WifiCallingQueryImsState
1. Code refactor
2. Apply WifiCallingQueryImsState to more WifiCalling classes

Bug: 140542283
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSettingsForSubTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=WifiCallingSliceHelperTest
Change-Id: Idd4935a6d8ceed77c15e90f96781014d1940a427
2020-01-21 19:33:16 +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
Raff Tsai
626c6e0b17 Replace SliceAction deprecated method
- Replace new SliceAction with SliceAction.createDeeplink() or
SliceAction.create()

Test: make RunSettingsRoboTests
Change-Id: Ied34469d2220d8220a2dcc6c2fb4d32dd9cd9b8c
Fixes: 119879284
2018-12-01 06:21:01 +08:00
Fan Zhang
53f75f0df9 Move all custom slice uris to a registry class.
Change-Id: I192320f95ac81d14c8891ce2531d603912e59f56
Fixes: 119776308
Test: robotests
2018-11-29 16:41:21 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Jason Monk
fee23c456a Follow slice API finalization
Test: build
Change-Id: I5671b180a949d5038f9a73caf84a6d266ef90cfa
2018-08-09 17:03:33 -07:00
Fan Zhang
176ccd0c35 Clean up: fix incorrect @VisibleForTesting imports
Test: rebuild and robotests
Change-Id: I33d7ee1c0622c01f592920baaf01d44ad19d9a13
2018-07-13 13:08:53 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Naina Nalluri
6b1869351a Add Wifi calling Preference slice and other cleanup
WifiCallingPreference Slice Provider:
  1. If Wifi calling is not enabled - display message to user
     to enable Wifi calling
  2. Else if Wifi preference is not editable - return a null
     Slice
  3. Else provide a slice with rows - first row giving current pref
     information, followed by preference items (in each row).
     wifi_only is displayed only when it is allowed to display it.
     Each row with preference item has specific intent action.
WifiCallingPreference Slice BroadcastReceiver:
   1. If only Wifi calling is enabled & Wifi preference is editable &
      there is a change in current value modify wifi pref setting
   2. And Ask to re-query the slice in one second to display
      updated settings if 1 is valid or display appropriate message.
Clean-up:
   1. Return null instead of non-actionable slices.
   2. Use getText to get string resources.
   3. Remove unnecessary extra variables.

Bug: 79548264
Test: Use support-slices-demos-debug.apk to test on device
Change-Id: I186f19be2007c2331eaf6195e70b4a9c635adf9e
2018-06-01 11:02:59 -07:00
Matthew Fritze
417693021e Return null when setting can't be changed.
If a Slice cannot be changed, return null instead of
an error slice.

Bug: 80155832
Test: robotestst
Change-Id: Ib94136c449c6d9c1911f89833bba62fd2263daa4
2018-05-22 20:17:10 -07:00
Matthew Fritze
6feddd6954 Add Wifi Slice
Add a custom Wifi Slice to the Settings Slice Provider.
It needs a custom Slice because of the complicated listener logic
in the MasterSwitchPreferenceController, which makes it hard to
work-in synchronous set/get logic.

The one-off Slice requires extra changes, including:
- Including it in getDescendants
- Handling changes to wifi by the framework

This is the first change that uses SettingsLib's broadcast relay,
which allows settings to (un)register IntentFilters to a Uri,
allowing Settings Slices affected by the framework (quicksettings,
connectivity related, volume, etc) to be updated without action
on the Slice.

Bug: 70622039
Bug: 67997332
Test: robotests
Change-Id: Ibfe4736beecb833e3f6bb871b2eb5228a5fd3a34
2018-05-17 10:16:55 -07:00
Naina Nalluri
6885d85a7c Add Slices for WifiCalling
Add Slices for WifiCalling
WifiCalling Slice Provider:
  1. If there is no activation needed or if the Wifi calling
     is currently turned on - provide the slice to toggle the
     value
  2. Else display appropriate message with further instructions
WifiCalling Slice Broadcast Receiver:
  1. If the action is turning off wifi or if there is no
     activation needed. Change the setting with ImsManager.
  2. And Ask to requery the slice in one second to display
     updated settings if 1 is valid or display appropriate message

Bug: 63731862
Bug: 78192106
Test: Use support-slices-demos-debug.apk to test on device
Test: Robotests
Change-Id: I29e1822fd24ebcff575fa48ad93f84ed91bf4d87
2018-05-14 10:19:15 -07:00