Commit Graph

3399 Commits

Author SHA1 Message Date
David Liu
b42e77308c Merge "Migrate Adaptive Connectivity" into main 2024-10-23 17:47:48 +00:00
David Liu
b415befd53 Migrate Adaptive Connectivity
Add the skeleton of the Adaptive Connectivity

Bug: 368359961
Test: atest AdaptiveConnectivityScreenTest
Flag: com.android.settings.flags.catalyst_adaptive_connectivity
Change-Id: I45aa92635780230c8b89205cd13b7d968438e424
2024-10-23 14:52:48 +00:00
Treehugger Robot
633e8dcd92 Merge "[Catalyst] Internet screen migration" into main 2024-10-23 10:23:46 +00:00
Jason Chiu
2cf3e627ce [Catalyst] Internet screen migration
- Add a flag for the migration
- Add the skeleton of the screen

Test: atest NetworkProviderScreenTest
Bug: 372733639
Flag: com.android.settings.flags.catalyst_internet_settings
Change-Id: Ia007b06501ef16e85df3e2f58536e8488d27bb3f
2024-10-23 15:34:39 +08:00
SongFerng Wang
bca26d6151 Merge "Add the condition to hide the MMS messages preference" into main 2024-10-23 03:43:36 +00:00
Treehugger Robot
7f076bb3c4 Merge "Fix force close for updating UI after activity destroyed." into main am: c3ea626cd3 am: 5c3479b265
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3316490

Change-Id: Ifa9536dd3bc78759b0d74b8c588fea86a60e3d16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-22 10:32:37 +00:00
songferngwang
8f6145c143 Add the condition to hide the MMS messages preference
If the carrier config KEY_MMS_MMS_ENABLED_BOOL is false, then the
settings hide the MMS messages preference

Test: atest MmsMessagePreferenceControllerTest
Bug: 371965435
Flag: EXEMPT bugfix
Change-Id: I93479bba28120f7b6cc5449f4a8277945d308e40
2024-10-22 10:28:13 +00:00
hoffc
a9002d157c Fix force close for updating UI after activity destroyed.
If activity is finishing or destroyed, getting activity context will return null results in settings app force close.

Do not call scan callback if network select activity is finishing or destroyed.

Test: build pass and run NetworkSelectSettingsTest unit test pass.

Bug: 372123288
Change-Id: I28307490c75fe04d54dcf1637f33f4b9ba1fe635
2024-10-22 06:25:37 +00:00
Pechetty Sravani (xWF)
0123edbb75 Merge "Revert "Fix force close for updating UI after activity destroyed."" into main am: 0583090e98 am: 4e2320c2c0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3313692

Change-Id: I12a6c6cde4d177b4935e9c1f69e2e4d53e2981d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-21 10:39:50 +00:00
Treehugger Robot
0dbc16d2e0 Merge "Make NetworkProviderSettings extend RestrictedDashboardFragment" into main 2024-10-21 10:21:02 +00:00
Jason Chiu
8189b40067 Make NetworkProviderSettings extend RestrictedDashboardFragment
RestrictedSettingsFragment is deprecated and no longer supported. To be
compatible with catalyst, change the super class to
RestrictedDashboardFragment.

Bug: 372733639
Test: atest NetworkProviderSettingsTest, manual tests with user restrictions
Flag: EXEMPT N/A
Change-Id: I02b08363dadd5739a1d348f099d439b9f82ffb18
2024-10-21 09:11:16 +00:00
Pechetty Sravani (xWF)
bd44c86041 Revert "Fix force close for updating UI after activity destroyed."
This reverts commit 2545f06558.

Reason for revert: DroidMonitor created revert due  to b/374650528.Will be verified through ABTD for standard investigation.

Change-Id: Ifa3f061b7954dc2b5780b768fefb9358c597fdc0
2024-10-21 06:18:31 +00:00
Treehugger Robot
ffcd548694 Merge "Fix force close for updating UI after activity destroyed." into main am: b083196e76 am: bc05a87483
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3298551

Change-Id: I005b4589f5077a40a47bd58bb2d05c6c358b48fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-21 04:55:18 +00:00
Chaohui Wang
95dc9fc7d8 Merge "Redirect to new APN edit page" into main 2024-10-21 01:14:25 +00:00
Jason Chiu
8b66033c96 Merge "[Catalyst] SIMs screen migration" into main 2024-10-18 10:19:47 +00:00
Jason Chiu
af1e8f7353 [Catalyst] SIMs screen migration
- Add a flag for the migration
- Add the skeleton of the screen

Test: atest MobileNetworkListScreenTest
Bug: 368355368
Flag: com.android.settings.flags.catalyst_mobile_network_list
Change-Id: I9d5d57b78d8f2c7d2bc6fd02e402fcdaf5b97bdf
2024-10-18 16:22:08 +08:00
Chaohui Wang
d0d3879fa4 Redirect to new APN edit page
Bug: 374226933
Flag: EXEMPT clean up
Test: am start -a android.intent.action.INSERT
          -d content://telephony/carriers --ei sub_id 2
Test: am start -a android.intent.action.EDIT
          -d content://telephony/carriers/208 --ei sub_id 2
Change-Id: I1c5e3a271e1dc85930d73b5b56b3e655821c858b
2024-10-18 15:45:17 +08:00
Jason Chiu
ae5f82d36b Move the annotation right before String
Fix: 374015480
Test: build
Flag: EXEMPT N/A
Change-Id: Id4eb78319b10f63a0a8959643b63ed9a598f24af
2024-10-17 15:02:58 +08:00
Jacky Wang
9b62ec9616 Provide icon for catalyst screens
Bug: 335132588
Flag: EXEMPT N/A
Test: Manual
Change-Id: I520529c3bf4a7db01889d08683f55b0efb21eae4
2024-10-17 07:38:24 +08:00
Chaohui Wang
a088e4c6c5 Clean up getNetworkTypeFromRaf()
And also getRafFromNetworkType()

Use the version in android.telephony.RadioAccessFamily instead.

Bug: 373771849
Flag: EXEMPT refactor
Test: manual - on sims settings
Test: unit tests
Change-Id: I09a3d6a4cdfb9844a92ad8f0507b03b08ce91f27
2024-10-16 14:23:55 +08:00
Jason Chiu
9c9c0a3d94 [Catalyst] Network and Intenet screen migration
- Add a flag for the migration
- Add the skeleton of the screen

Test: atest NetworkDashboardScreenTest
Bug: 368355361
Flag: com.android.settings.flags.catalyst_network_provider_and_internet_screen
Change-Id: I37622d318f2a52a7c60c9fa965b94fd135ce0b60
2024-10-15 18:32:31 +08:00
yomna
f309500281 Handle IllegalStateExceptions in CellularSecurityPreferenceController
Bug: b/354833801, b/369941495, b/371447524, b/371689932
Flag: EXEMPT bug fix
Test: m
Change-Id: Ic21021016dcfe7fcc9cf2314117ab0e3cc84757e
2024-10-09 00:22:49 +00:00
hoffc
2545f06558 Fix force close for updating UI after activity destroyed.
If activity is finishing or destroyed, getting activity context will return null results in settings app force close.

Directly return if network select activity is finishing or destroyed when handling network scan callback.

Bug: 372123288
Change-Id: Ia8c89569761b66da58cafd0140ceda29ac7d678c
2024-10-08 17:29:45 +08:00
SongFerng Wang
27d969bb48 Refactor the getCurrentCarrierNameForDisplay
Bug: 370884447
Change-Id: I4abfbd520297e5c000984fcd5b6a2ad4db9a35e9
Test: NA
Flag: EXEMPT bugfix
2024-10-07 07:34:12 +00:00
Hakjun Choi
20f3fa9846 Merge "Hide extra information link when it is empty" into main 2024-10-04 13:20:06 +00:00
Hakjun Choi
c2c2722771 Hide extra information link when it is empty
Extra information may be or may not be provided as this is given from the Carriers, therefore it is needed to hide when there is no given URL string

Bug: 360265682
Flag: EXEMPT bugfix
Test: manually test when extra information is valid and when extra information is empty
      https://b.corp.google.com/issues/360265682#comment2 for UI test
result

Change-Id: Icf7f06e6af8580d0e84382a2598be75e321cf657
2024-10-04 10:17:47 +00:00
songferngwang
8e6bc6f289 VideoCalling UI adds the init value
Bug: 367696228
Test: atest VideoCallingPreferenceControllerTest
Flag: EXEMPT bugfix
Change-Id: I1a1de9e3174a9211be619c96c104607f831b51a2
2024-10-03 14:29:05 +00:00
Tomasz Wasilczyk
c25a0b8f9d Merge "Add support for ApnSetting.TYPE_OEM_PAID and OEM_PRIVATE" into main 2024-09-27 21:35:52 +00:00
Chaohui Wang
9969334647 Fix Can't Able to Click Sims
The root cause is SubscriptionManager.OnSubscriptionsChangedListener
.onSubscriptionsChanged() not invoked in some cases.

Even the SubscriptionManager.addOnSubscriptionsChangedListener's doc
says the onSubscriptionsChanged() method will also be invoked once
initially when calling it, there still case that the
onSubscriptionsChanged() method is not invoked initially.
For example, when the onSubscriptionsChanged event never happens before,
on a device never ever has any subscriptions.

Adding a .onStart { emit(Unit) } to fix.

Also make the subscriptionsChangedFlow() a shared flow to mitigate the
extra emit cost.

Bug: 369276595
Flag: EXEMPT bug fix
Test: manual - factory reset & no any sim
Test: atest SubscriptionRepositoryTest
Change-Id: Ic32a5666f14373926b5dfedb5dedadb4369acfc7
2024-09-26 13:29:47 +08:00
Tomasz Wasilczyk
322f3cf496 Add support for ApnSetting.TYPE_OEM_PAID and OEM_PRIVATE
Bug: 366194627
Test: m
Test: manually add oem_paid APN to telephony.db and verify if shows up
      in APN editor
Flag: com.android.internal.telephony.flags.oem_paid_private
Change-Id: Ida8f6f5712f49caa3172119c547b7ee17e41c12e
2024-09-25 20:05:22 -07:00
Chaohui Wang
4ded4ac038 Check canEnterMobileNetworkPage
When startSimOnboardingActivity, so we enforce the
no_config_mobile_networks when insert psim.

Fix: 366370519
Flag: EXEMPT bug fix
Test: manual - set no_config_mobile_networks and insert psim
Change-Id: I0d4e85262924cc55a035ebeb2038ae08c0052ef6
2024-09-23 12:09:00 +08:00
Chaohui Wang
73fb290969 Check DISALLOW_CONFIG_MOBILE_NETWORKS when search
If disallowed, not show mobile related search results.

Bug: 358238959
Flag: EXEMPT bug fix
Test: manual - search Mobile Settings
Test: atest MobileNetworkSettingsSearchIndexTest
Change-Id: I79b984f41f09dd9612bcd0c9942089756d5d365d
2024-09-23 11:17:55 +08:00
Treehugger Robot
4f6b56277c Merge "Fix crash when phone process has problem." into main 2024-09-19 13:04:54 +00:00
tomhsu
56ff329900 Fix crash when phone process has problem.
- Phone process may not exist in some situation. It shall catch the
   exception to avoid Settings crash.

Flag: EXEMPT bugfix
fix: 365669913
Test: build pass
Change-Id: I2b95f46b8887a9c8416fb4a5724537ad27e86850
2024-09-19 11:37:02 +00:00
Chaohui Wang
777a179bd6 Create MobileNetworkSummaryRepository
For MobileNetworkSummaryController to use, so it no longer use
MobileNetworkRepository.

Fix: 366097262
Flag: EXEMPT refactor
Test: manual - on Network & internet
Test: atest MobileNetworkSummaryRepositoryTest
Change-Id: I8a9d52af8e230fc407a4339c27f73ef79d512b24
2024-09-18 13:07:50 +08:00
Chaohui Wang
958639b79c Merge "Create SimRepository" into main 2024-09-13 02:40:52 +00:00
Chaohui Wang
a6db1aabb6 Create SimRepository
Which unifies whether we should sim settings on some related pages.

Before this change, we check SubscriptionUtil.isSimHardwareVisible()
and / or Utils.isWifiOnly().

After this change, we unified logic to,
canChangeSimSettings() =
  packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) &&
    userManager.isAdminUser

Fix: 365924140
Flag: EXEMPT bug fix
Test: manual - check Network & internet
Test: unit tests
Change-Id: Ibf83237e3d0088f78c96a1b39ee8f1e3a9c756ea
2024-09-12 08:59:26 +00:00
Chaohui Wang
ced86bf56d Create selectableSubscriptionInfoListFlow
Which can be used in MobileNetworkSummaryController in the future.

Bug: 366097262
Flag: EXEMPT refactor
Test: manual - check Network & internet
Test: unit tests
Change-Id: Ia74af993646c2e1d53817f1e9f8ac3ef0b8fa97a
2024-09-12 11:43:05 +08:00
Chaohui Wang
9b118faa3e Merge "Create NrRepository" into main 2024-09-10 03:36:02 +00:00
SongFerng Wang
83a80dd7c1 Merge "Fix the DSDS dialog status" into main 2024-09-06 07:39:25 +00:00
Weng Su
99cd495d5b Launch Wi-Fi details for connected Wi-Fi network
- Since the posspoint Wi-Fi entry can be connected even if the entry is not saved

- Allow to launch Wi-Fi details when the entry is connected but not saved

Bug: 363151879
Flag: EXEMPT bugfix
Test: Manual testing
atest -c NetworkProviderSettingsTest

Change-Id: I004b8a33bdd07cb92e167039949919f255c5303e
2024-09-06 07:42:15 +08:00
songferngwang
74a76a8067 Fix the DSDS dialog status
To avoid the dsds dialog status to reset.

Bug: 364668360
Test: verify enabling DSDS mode
Flag: EXEMPT bugfix
Change-Id: I80a8abd896856740fad1f98de50c79034a4cc602
2024-09-05 18:35:27 +00:00
Chaohui Wang
9179ad5fc2 Create NrRepository
To unify the isNrAvailable logic.

Bug: 358000881
Flag: EXEMPT refactor
Test: manual - on mobile settings
Test: atest NrRepositoryTest
Change-Id: I60fed4be10f0cc7b8b1a942abd598e82c53d1473
2024-09-05 15:56:43 +08:00
SongFerng Wang
1ffafd365e Merge "Update error dialog text for SIM switching" into main 2024-09-04 08:39:31 +00:00
Chaohui Wang
b12a4d30ad Settings search for Data warning & limit
Bug: 358238959
Flag: EXEMPT bug fix
Test: manual - search data warning
Change-Id: Ifc29b8979a5ba523e930b0c3a59fcb3d9ab99571
2024-09-04 02:33:23 +00:00
SongFerng Wang
43392fe071 Update error dialog text for SIM switching
The error dialog text for SIM switching is not accurate.
This CL updates the error dialog text for SIM switching.

Bug: 363265948
Change-Id: I8b0348fc791cc4d4ce84e1b33f1fe99fb4e03ed7
Test: NA
Flag: EXEMPT bugfix
2024-09-03 10:48:48 +00:00
Chaohui Wang
355ee0a1ee Refine CrossSimCalling updating
Currently, this setting depends on whether wifi calling is supported,
since wifi calling could takes some time to provision after sim is
turned on, this state could be wrong when set cross sim calling.

Use wifiCallingReadyFlow() to retrieve the latest state, and update
setting when state changes.

Fix: 352736998
Fix: 348529996
Flag: EXEMPT bug fix
Test: manual - by turn on / off sim
Change-Id: Id4b099e0c5d7cf47b007f37e6f278d1c46e58659
2024-09-02 17:58:17 +08:00
Chaohui Wang
e9136c7817 Merge "New isSubscriptionVisibleFlow" into main 2024-09-02 05:04:08 +00:00
Treehugger Robot
50ae8d3cc7 Merge "Fix WifiCallingPreferenceController crash" into main 2024-09-02 04:33:21 +00:00
Chaohui Wang
08319b18d6 Merge "Use simSpecificCarrierId for new apn" into main 2024-09-02 02:54:35 +00:00