Commit Graph

23 Commits

Author SHA1 Message Date
Chaohui Wang
2901125674 Fix flicker in SIM card page
Before fix, the DefaultSubscriptionController will set an empty summary
before data is ready.

Not set the summary before data is ready to fix.

Also fix the ignored tests.

Fix: 277301125
Test: Manual on Mobile Settings
Test: Unit test
Change-Id: I07d964b9f9ce21f8f168cb775eea188e48172c5d
2023-05-08 19:07:28 +08:00
Chaohui Wang
ab8a130674 Clean up DefaultSubscriptionController.getSummary
Which is always overridden by subclass after Change
I7d29b58ca5476ae0bb6fe2e04fecb96164cb1ada

This is a no op.

Bug: 277301125
Test: Manually with Mobile Settings
Test: Unit test
Change-Id: Ifa5928e1026b18c33f2bdd51fdcba267249dcee5
2023-05-08 18:56:06 +08:00
Zoey Chen
cf88640701 [Settings] Remove the intent receiver due to the register exception
Bug: 274899027
Test: atest SystemUIMicrobenchmark:android.platform.test.scenario.sysui.quicksettings
Change-Id: Ia19b91cfd1073f22180cc9679025447b4d5fecd9
2023-03-29 04:57:08 +00:00
Zoey Chen
5c4d79154e [Settings] The receiver should be registered with all clients instead of
the client which init the repository

Bug: 274748033
Test: local test
Change-Id: I9981d39f5407f02684585354d1fc0de0bd8b0873
2023-03-22 16:36:59 +00:00
Zoey Chen
db02f10b07 [Settings] update the db list when back to UI
Bug: 271524675
Test: local test
Change-Id: I26c7d64e6f040c62c9efb1438efe328f5744fa02
2023-03-20 09:08:34 +00:00
Zoey Chen
5645c092a9 [Settings] 1.Clean up unnecessary callback 2. register listener and
manager by subId

Bug: 269742364
Test: manual
Change-Id: Id536dedb200385dc6de5697848f8a68f2302351f
2023-02-18 07:28:56 +00:00
Zoey Chen
4fab96ffe5 [Settings] Do not insert subInfo repeatedly
Bug: 264322977
Test: manual
Change-Id: If1e9144c9d682befe5bccd3fa506ad82e2807b09
2023-01-19 20:25:35 +00:00
Zoey Chen
64330a235a [Settings] Apply the SettingsDataService to the SIM page, calls/smscontroller
Calls/SmsDefaultSubscriptionController

Bug: 257197354
Test: atest DefaultSubscriptionControllerTest
Change-Id: I67cb2d3aa5ef3c6751d90b96db27a062071c8113
2022-11-21 06:39:12 +00:00
Chaohui Wang
866b79c245 Clean up lifecycle in MobileNetworkSettings
To avoid double registering, which prevent potential issues and could
improve latency.

Since DashboardFragment already supported register lifecycle
automatically for the controllers bound by XML which implements
androidx.lifecycle.Lifecycle, so doing a cleanup to prevent register
lifecycle event manually (doubling).

Bug: 149338098
Test: temporarily add logging to make sure the lifecycle method is
      called and only called once
Change-Id: I4dbc36414991ef6b599be61aa77ff0dc8c52468c
2022-05-25 13:46:55 +08:00
Chaohui Wang
2e34038233 Fix crash for DefaultSubscriptionController
setSummaryProvider() is used instead of setSummary() in
Ia24d88817c99db7ed3fc264dbc9c10e0a09d8a39, but there is still a place
using the setSummary(), mixing these two will lead to crash.

Change it to setSummaryProvider() to prevent crash.

Fix: 233295254
Fix: 233712251
Test: manual
Change-Id: I4627545711b848009c3bd7179f0368ff82e62697
2022-05-24 16:51:51 +00:00
Chaohui Wang
02eb0aa980 Fix crash when operator name contains %
Currently, cannot use ListPreference.setSummary() when the summary
contains user generated string, because ListPreference.getSummary() is
using String.format() to format the summary when the summary is set by
ListPreference.setSummary().

Use preference.setSummaryProvider() instead, which is recommended for
ListPreference.

Fix: 233295254
Test: manual
Change-Id: Ia24d88817c99db7ed3fc264dbc9c10e0a09d8a39
2022-05-23 19:02:20 +08:00
Zoey Chen
e714654c94 [Provider Model] Internal cleanup - remove Provider Model flag and deprecated legacy UI part.3
Test: atest DefaultSubscriptionControllerTest, NetworkProviderSettingsTest
Bug: 197066557
Change-Id: I7d29b58ca5476ae0bb6fe2e04fecb96164cb1ada
2021-11-17 13:09:48 +00:00
Zoey Chen
95bcd7cb23 [Settings] Fix RTL issue of Calls and SMS
Screenshot: https://screenshot.googleplex.com/9BqEh99vz7xp2g4.png

Bug: 189300799
Test: make
Change-Id: I022253efbe0ea25f11d5ac6c2b3b0fcd1d9f54aa
(cherry picked from commit 54bd206fbc)
Merged-In: I022253efbe0ea25f11d5ac6c2b3b0fcd1d9f54aa
2021-08-12 13:47:21 +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
Zoey Chen
cda7efb94d [Provider Model] Implement Calls & SMS controller
Screenshot of Provider Model:
Single SIM:
https://screenshot.googleplex.com/4pGBU7XK55CwJ7o.png
Dual SIM:
https://screenshot.googleplex.com/bXaFjsfGkgyHoYF.png

Screenshot of current: https://screenshot.googleplex.com/BtCgYmnpvT97SQs.png

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

New controller: NetworkProviderCallsSmsController

Bug: 172053880
Test: manual
Change-Id: I86e9fc71d2b8562d838c5b5c6bd9c443656e2624
2020-11-20 15:43:04 +08:00
Taesu Lee
50ef14540d Add the extra "Ask every time" if supported only
Test: manual

Change-Id: Ie4bb150db41f1e654ea427a605050afbb57114cf
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-10-13 10:13:50 +09:00
Bonian Chen
ce0f3c66a0 [Settings] Avoid crash for VoIP account displayed as default voice
When displaying VoIP account in Default voice account UI within
mobile network configuration, some null pointer checking need to
applied due to this is no longer a real account bind to SIM card.

Bug: 157334667
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DefaultSubscriptionControllerTest
Change-Id: I3927362676c867ac245f16e1d00ea953b21ec1d4
2020-05-28 18:17:42 +08:00
Bonian Chen
2a7767ee26 [Settings] Adopt TelephonyBasePreferenceController
Adopt TelephonyBasePreferenceController for better support on multi-SIM
environment.

Bug: 143996139
Test: make RunSettingsRoboTests -j
ROBOTEST_FILTER=DefaultSubscriptionControllerTest
Test: make RunSettingsRoboTests -j
ROBOTEST_FILTER=DisableSimFooterPreferenceControllerTest

Change-Id: I8a9c6efa927be1cb4a7ab4ebe816dcad9f20bd70
2020-05-04 11:23:11 +08:00
Bonian Chen
e17e302c9e [Settings] Sync summary of call preference with dialer
Replacing the display of summary part within Settings' calls preference
by VoIP account when configured calling account settings within Dialer.

The click behavior for calls preference remain unchanged, due to this is
the configuration for subscription (instead of for all kinds of
accounts).

Bug: 136277187
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=DefaultSubscriptionControllerTest
Change-Id: Iaa5fa1f3efe7ba2463caa0b450077f885d42b1c8
2020-04-27 08:53:18 +00:00
Antony Sargent
22b827db55 Fix Calls/SMS default SIM selector
In cases where a SIM is initially disabled, even after you turn it on
the ListPreference's for selecting the default SIM for Calls and SMS
weren't working because the preference change listener wasn't getting
registered. This CL fixes that for these controllers by always
registering a change listener whenever we make the preference visible.

Fixes: 134472294
Bug: 135142209
Test: make RunSettingsRoboTests
Change-Id: Ia9362b7f26309bdbd6c5e8140fb606b28e2b34d8
2019-06-13 23:24:34 +00:00
Antony Sargent
4646fe8e63 Use active instead of available subscriptions in 2 places
In a couple of places we were showing DSDS UI using the list of
*available* subscriptions instead of the list of *active* ones. This
difference is relevant for instance if you have multiple eSIM profiles -
in typical hardware only one of those can be active at one time. This CL
fixes that problem in two places:

1) The header at the top of the Network & internet page

2) The ListPreference's on the mobile network detail page for selecting
   the default subscription for Calls / SMS.

Fixes: 129673046
Test: make RunSettingsRoboTests
Change-Id: I891c856bdd4516286fcee1067684d9161ceaca80
2019-04-08 16:22:55 -07:00
Antony Sargent
ed5c2a1b10 Don't allow CBRS subscriptions to be set as default for Calls/SMS
CBRS subscriptions (also known as "opportunistic" in the code base) are
data-only and it should not be possible to try to set them as the
default for Calls or SMS.

Fixes: 125855327
Test: make RunSettingsRoboTests
Change-Id: Ie20ef21ccc7b27315089f6a61cceb6e1512ec373
2019-04-05 16:48:53 -07:00
Antony Sargent
ff484e11e9 Add default calls/SMS subscription prefs to mobile details page
This adds prefs to the the details page for mobile network subscriptions
that appear in multi-SIM mode. They show which subscription is set as
the default for calls and SMS respectively, and let the user change what
the default is for each. They can be set to either a specific
subscription, or set to "Ask every time".

Bug: 122670283
Test: make RunSettingsRoboTests
Change-Id: Id2b23e4b5c3d1b5c04b5766e73fc8202c05d8f75
2019-01-22 16:59:14 -08:00