Commit Graph

54 Commits

Author SHA1 Message Date
Bonian Chen
5c71853bd9 [Settings] Expand scrollable area of Wifi calling UI
1. Replace InstrumentedDialogFragment by SettingsPreferenceFragment.
   Enable the capability of shirnking the size of title.
2. Move switch bar into Preference.
   Enlarge scrollable area within this UI page.

Bug: 224661026
Test: local
Change-Id: I6e0a491721e9f93858c389593b2bb891f6fa8f8d
2022-05-13 09:18:32 +08:00
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
Bonian Chen
8a892271da [Settings] Refactor Wifi Calling description text
Refactor the display of description text when no wifi calling options available.
Enhancement:
1. These text need to align the style with the summary part of the wifi
calling options.
2. These text need to be scrollable in order to see full description.
3. The link within text need to be clickable.

Bug: 204844012
Test: local
Change-Id: I60f339bf4adf50236d80176669a557c77f0d97ca
2021-11-30 13:55:55 +00:00
Bonian Chen
a81acf8a26 [Settings] Remove space before WiFiCalling description
Align the description part to upper left corner of the description area.

Bug: 191525963
Test: local
Change-Id: I8bbe6c653c51b8ca43d936e50166f0f8bfb1acdc
2021-11-19 13:13:53 +08:00
Zoey Chen
2d5641f17b [Settings] 1. Add configChange for WFC Activity to cover the changes of rotation and screen size am: 6cf16b0aa9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16145006

Change-Id: Idea7f177ee4897c20bd7faf773a34e79976f2376
2021-11-12 08:43:51 +00:00
Zoey Chen
6cf16b0aa9 [Settings] 1. Add configChange for WFC Activity to cover the changes of rotation and screen size
2. register split rule for MobileNetworkActivity

Bug: 204508876
Test: manual
Change-Id: Iff3dae41293e79b274d2928cb51efea46fb45dd4
2021-11-12 15:22:43 +08:00
Treehugger Robot
15c0678ca8 Merge "[Settings] backport missing CL" am: a8ee80e95a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1836333

Change-Id: I09f384d8d7073270d4bf460e91a52021a69e3e19
2021-09-24 10:24:31 +00:00
Bonian Chen
dc3c1e8a4b [Settings] backport missing CL
aosp/1258356 got missing when merging several CLs of refactor code in
aosp/1281915.

Bug: 186543910
Test: local
Change-Id: I34287b22fec4da660c7b44b5953eb16591cfb2d7
2021-09-24 15:45:30 +08:00
Bonian Chen
d6f54ed90b Revert "[Settings] Convert to getSystemService(Class<T>)"
Revert submission 1645152-getSystemService(Class<T>)

Reason for revert: Fix JUnit test failure
Reverted Changes:
I1b4812044:[Settings] Convert to getSystemService(Class<T>)
I278951c24:[Settings] Support getSystemService(Class<T>)

Change-Id: I864a40f82ba9cb4170900ac0c1d77f781b17341f
2021-03-31 09:37:03 +00:00
Bonian Chen
234b698fb2 Revert "[Settings] Support getSystemService(Class<T>)"
This reverts commit d5ccde31a8.

Reason for revert: failure on test cases

Change-Id: I0a179a6ebb5ef1dec566ce6e8facd5f3b82d7c8a
2021-03-30 00:51:15 +00:00
Bonian Chen
d5ccde31a8 [Settings] Support getSystemService(Class<T>)
Add getSystemService(Class<T>) to align the capability with framework
part.

This is a back port from aosp/1639943, aosp/1645152 and aosp/1648047

Bug: 179640862
Test: local
Change-Id: I035db55a71f94000ca35f8d71f03c19208423c73
2021-03-24 00:59:46 +08:00
Bonian Chen
db6c47756d [Settings] Convert to getSystemService(Class<T>)
Change to getSystemService(Class<T>) to align the capability with framework
part.

Bug: 179640862
Test: local
Change-Id: I1b4812044fc4876bec6645570049a60f9470dbbd
2021-03-22 06:20:19 +00:00
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
Stanley Wang
86cc0579f3 Replace the SwitchBar with MainSwitch.
- Update wi-fi calling switch.
- Update the switches in Accessibility

Fix: 178673860
Fix: 177968565
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Id10e6a110f418ea500a2eaf3c54752bef4f36507
2021-02-23 16:21:52 +08:00
Bonian Chen
5042276cf7 [Settings] Refactor of Wifi Calling part
Refactor of Wifi Calling to avoid accessing hidden APIs.
This includes the following cherry-picks on the corresponding files:
I455685eb26df69d929ff3ed3c26ce84aa5f6b1f8
I1a67db80b114a438afda7d45af90e54af38703c3
Idd4935a6d8ceed77c15e90f96781014d1940a427
Ia5179ee1a23f054899bc74c796542bae40cdc8d5
I57c91a095fc4d454d92e8d78e0b647b4f098c6a3
I8a09264f83b9fc4fce3f79ec3aeb6ae757b004e4
I68462368669b81e10d09bbb93e74e23ea9a1f446
I9c54eb63a0df3fde38965ee7e2ae46cc1b7efd47
I0d5dcfc33b0bddacf059d1fb9af559646e32e68a
I45977c850977be84c0dc1f6461e68a1941efc1a2
I46c047359257ddd5cb3e331add4856b01c5c9739
I35246811d3e01d0b2ca197e9a1ed7081691cd982

Bug: 140542283
Test: build pass
Change-Id: I2cddeefb7cc5f1b2060e572a73560f7cd6204d0b
2020-04-09 01:35:07 +00:00
Revathy Sivalingam
4e00cbcb2b Make URLs in Wi-Fi Calling help description clickable
Make URLs in Wi-Fi Calling help description clickable. This enables
carriers to add a link in the description that takes the user to a web
page with further information about Wi-Fi Calling.

Bug: 151326849
Test: manual
Change-Id: Icc66faa07105607a36b0d964ffc8ac5aafacb734
2020-03-13 15:51:03 +01: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
Pooja Jain
812f8e9065 IMS: Grey out Wifi calling option when either sub is having call.
The WifiCallingSettingsForSub was not checking for call state reported
by telephony manager, hence, when call was on other sub, the option was not
getting greyed out.
Use the TelephonyManager API to fetch callstate.

Test: Manual

Bug: 130706399
Change-Id: Ib4b0e1191c83e23377ccf8ed013252728ef9dd95
2019-11-25 12:10:03 +05:30
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
Brad Ebinger
ac4a495fc2 Merge "Fix issue that user can't edit WFC mode for SIM2" am: d2727d5d9f
am: c91d33798b

Change-Id: Icb3bd924f9e8e3e2e82845ab85ef25c2e38e13dc
2019-04-10 17:33:20 -07:00
Brad Ebinger
d2727d5d9f Merge "Fix issue that user can't edit WFC mode for SIM2" 2019-04-10 21:57:56 +00:00
Hall Liu
7e2c23aa0d Merge "Base implementation of WFC disclaimer UI" 2019-03-16 00:23:23 +00:00
manabu, shimoda
8498436a96 Base implementation of WFC disclaimer UI
Test: manual - Check that no error occurred when changing the wifi
calling settings to turn on.
Test: auto - Passed WifiCallingSettingsForSubTest,
WifiCallingDisclaimerFragmentTest and DisclaimerItemListAdapterTest.
Bug: 67872298

Change-Id: I789f530d3e16baa6e56feaa4269f6696976f747e
Merged-In: I789f530d3e16baa6e56feaa4269f6696976f747e
2019-03-15 22:57:36 +00:00
manabu, shimoda
9fae73915c Base implementation of WFC disclaimer UI
Test: manual - Check that no error occurred when changing the wifi
calling settings to turn on.
Test: auto - Passed WifiCallingSettingsForSubTest,
WifiCallingDisclaimerFragmentTest and DisclaimerItemListAdapterTest.
Bug: 67872298

Change-Id: I789f530d3e16baa6e56feaa4269f6696976f747e
2019-03-14 14:58:20 -07:00
Fan Zhang
2014d16e46 Fix robotests
Fixes: 128536554
Test: rerun robotests
Change-Id: Ife81f9d161fc416a63a9b2f04ce2ae4f9a1e74db
2019-03-13 14:31:43 -07:00
Hall Liu
13e02af2ad Merge "Add description for Wi-Fi calling mode" 2019-03-12 20:49:21 +00:00
Kazuya Ohshiro
eb57875f64 Add description for Wi-Fi calling mode
Replace the view of dialog with custom view that adds description
as summary.

Test: manual
Bug: 34793636
Change-Id: If9792b0a35c59c1260176b4b2c62107861de73b5
Merged-In: If9792b0a35c59c1260176b4b2c62107861de73b5
2019-03-12 01:42:09 +00:00
Hall Liu
843290ccb8 Merge "Add description for Wi-Fi calling mode" 2019-03-12 01:40:43 +00:00
Kazuya Ohshiro
c449048ac1 Add description for Wi-Fi calling mode
Replace the view of dialog with custom view that adds description
as summary.

Test: manual
Bug: 34793636
Change-Id: If9792b0a35c59c1260176b4b2c62107861de73b5
2019-03-11 13:21:51 -07:00
Kitta Koutarou
478e1232a0 WFC roaming mode setting can not be used with a fixed value
WFC roaming mode setting can not be used with a fixed value because it
is changed as WFC home mode changes if
KEY_EDITABLE_WFC_ROAMING_MODE_BOOL is false.

To solve this issue, separate the WFC mode setting of home and roaming.
These can switch behavior by new carrier config
KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL.

Test: manual - Checked that WFC roaming mode is hidden if new config is
true.
Test: manual - Checked that WFC roaming mode is also changed when
change the WFC home mode if new config is true.
Test: auto - Passed WifiCallingSettingsForSubTest.
Bug: 79666081

Merged-In: Ib2363c5d50f5231cc89f287d760ca8728b02b249
Change-Id: Ib2363c5d50f5231cc89f287d760ca8728b02b249
2019-03-06 23:38:11 +00:00
Kitta Koutarou
994d27a2a5 WFC roaming mode setting can not be used with a fixed value
WFC roaming mode setting can not be used with a fixed value because it
is changed as WFC home mode changes if
KEY_EDITABLE_WFC_ROAMING_MODE_BOOL is false.

To solve this issue, separate the WFC mode setting of home and roaming.
These can switch behavior by new carrier config
KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL.

Test: manual - Checked that WFC roaming mode is hidden if new config is
true.
Test: manual - Checked that WFC roaming mode is also changed when
change the WFC home mode if new config is true.
Test: auto - Passed WifiCallingSettingsForSubTest.
Bug: 79666081

Change-Id: Ib2363c5d50f5231cc89f287d760ca8728b02b249
2019-03-06 09:49:25 -08:00
Youming Ye
5b3ee7afaa Merge "Fix issue that the wifi calling text cannot be customized based on sim" 2019-02-22 21:53:12 +00:00
tmfang
8b414c9a14 Fix some test cases fail
Test: robo test
Fixes: 125599276
Change-Id: I4b1b15f69ff3021e4330bed49ac95ea871b98e92
2019-02-22 17:37:04 +08:00
Wenting Xiong
82aa55bcda Fix issue that the wifi calling text cannot be customized based on sim
Some carriers have requirements that the wifi calling text should be
customizable. However, the resources for the wifi calling text are
not obtained based on sim. So it cannot be customized per sim for multi
sim device. To solve this issue, obtain the resources with specified
sim.

Test: manual - Checked that the wifi calling text could be customized
based on sim.
Bug: 117257109

Change-Id: I6b3f6b06c9cc984ee6a68a19ae317b5d1d4e48e2
Merged-In: I6b3f6b06c9cc984ee6a68a19ae317b5d1d4e48e2
2019-02-22 01:57:44 +00:00
Youming Ye
da9e92c4f7 Merge "Fix issue that the wifi calling text cannot be customized based on sim" 2019-02-22 01:55:59 +00:00
Torbjorn Eklund
73ffcf4999 Close Wi-Fi Calling screen if provisioning status changes to disallow
Starts to listen for provisioning changes in Wi-Fi Calling screen and
closes the screen if the Wi-Fi Calling provisioning status changes to
disallow.

This prevents the Wi-Fi Calling screen from being kept open if the Wi-Fi
Calling provisioning status is changed to disallow while the Wi-Fi
Calling screen is open.

Bug: 119389855
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiCallingSettingsForSubTest
Merged-In: I2af91c3734274f0aea942a8bb894d6f4ce295354
Change-Id: I2af91c3734274f0aea942a8bb894d6f4ce295354
2019-02-13 00:11:30 +00:00
Torbjorn Eklund
69dbf4bf84 Close Wi-Fi Calling screen if provisioning status changes to disallow
Starts to listen for provisioning changes in Wi-Fi Calling screen and
closes the screen if the Wi-Fi Calling provisioning status changes to
disallow.

This prevents the Wi-Fi Calling screen from being kept open if the Wi-Fi
Calling provisioning status is changed to disallow while the Wi-Fi
Calling screen is open.

Bug: 119389855
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiCallingSettingsForSubTest
Change-Id: I2af91c3734274f0aea942a8bb894d6f4ce295354
2019-02-12 15:49:12 -08:00
Wenting Xiong
af5c05392b Fix issue that the wifi calling text cannot be customized based on sim
Some carriers have requirements that the wifi calling text should be
customizable. However, the resources for the wifi calling text are
not obtained based on sim. So it cannot be customized per sim for multi
sim device. To solve this issue, obtain the resources with specified
sim.

Test: manual - Checked that the wifi calling text could be customized
based on sim.
Bug: 117257109

Change-Id: I6b3f6b06c9cc984ee6a68a19ae317b5d1d4e48e2
2019-02-06 13:16:12 -08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Clown SHEN
98ce7a1a7d Merge "Launch WfcActivation with subscription ID" am: bd57f94a4c am: 74fe4a9177
am: 4f2055500a

Change-Id: I326052d639276b89859770fbe110a73f80c4a9fc
2018-11-06 23:39:50 -08:00
clownshen
95f8c6e96a Launch WfcActivation with subscription ID
For multi SIM project, need to have subscription ID information in the
intent for launching WFC activation activity.

Bug: 112826472
Test: manual test
Change-Id: I9f470c014054efa612c87ff16e574fc9fd286b3d
2018-10-31 13:28:09 +08:00
xian
f32a8a955a Fix issue that user can't edit WFC mode for SIM2
User can't edit WFC mode for SIM2 even if KEY_EDITABLE_WFC_MODE_BOOL for
SIM2 is true. Because WifiCallingSettingsForSub uses subId from
PhoneStateListener. But subId of PhoneStateListener is always default
subId. So, it gets wrong carrier config values.

To fix the problem, WifiCallingSettingsForSub uses its subId.

Bug: 117193148
Test: manual - Checked that WFC preference enable/disable state change
according to the current SIM
Change-Id: I6c8f5c1009c118ae9ca9b6e690d18e11600705eb
2018-10-03 04:57:42 +00:00
Fan Zhang
de117046ad DO NOT MERGE Import clean up.
Reordered all imports according to Android codestyle.

Test: rebuild
Change-Id: I750f01f70f2114d51838bf652833aebdc4065c98
2018-09-04 13:54:46 -07:00
Aurimas Liutikas
03fcde338b Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
(cherry picked from commit b1af85d155)
2018-08-28 16:35:52 -07: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
Aurimas Liutikas
b1af85d155 Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
2018-08-28 11:48:56 -07:00
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
Xiangyu/Malcolm Chen
0f07f45494 Merge "Fix bug of phoneListener always listens to default subId in WFC." 2018-07-13 00:09:12 +00:00
Malcolm Chen
c68e6b3d90 Fix bug of phoneListener always listens to default subId in WFC.
In WiFi calling settings, although each WifiCallingSettingsForSub
instance has its mSubId, the mPhoneStateListener always listens to
state of default subId, which is incorrect. This is to fix that.

Bug: 109787945
Test: In DSDS device, open WFC settings. Make phone call using default
voice phone, and check that WFC setting tab of the other phone is
not greyed out.
Change-Id: I126047c6099bf156b40e0145aa55df0fdf8ef882
2018-07-12 22:32:20 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00