Commit Graph

276 Commits

Author SHA1 Message Date
Owner Cleanup Bot
b22cebe941 Merge "[owners] Remove bonianchen@google.com from src/com/android/settings/sim/OWNERS" into main am: f16b9f85a1 am: 1a2021fe66
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3499870

Change-Id: I56dd62f3b24da922af1292bfdf47868c111bda8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-21 12:10:18 -08:00
Owner Cleanup Bot
833acfe497 [owners] Remove bonianchen@google.com from src/com/android/settings/sim/OWNERS
This suggested change is automatically generated based on group
memberships and affiliations.

Please approve this change and vote the highest CR. This will keep the OWNERs
file tidy.  We ask that you do not ignore this change and approve it
unless you know a reason the OWNER should remain.  It can always be
reverted if needed.

If this change is in error, vote the lowest CR value (i.e. reject the CL)
and the bot will abandon it.

See the owner's recent review activity for context:
https://android-review.googlesource.com/q/bonianchen@google.com

To report an issue, file a bug in the Infra>Codereview component.

Change-Id: I4c8726b26469e9f8f986b2e54fe0a8edea21f246
2025-02-18 15:12:57 -08:00
Hakjun Choi
3f5cf60cc7 Clean up aconfig flag oem_enabled_satellite_flag
Bug: 374994012
Test: atest SubscriptionInfoListViewModelTest
Test: manual test in live network
FLAG: EXEMPT flag clean up
Change-Id: Ib9f9f692658df13aad45f2e889a48f2bffed9ed4
2025-02-03 09:16:48 +00:00
songferngwang
2575e89c8a Waiting for the psim subscriptionInfo ready
When the pSIM is inserted for the first time, this subscriptionInfo arrives late.
It causes the sim onboarding is closed.
We add the timer to wait the psim's subscriptionInfo.

Bug: 377171470
Flag: EXEMPT bugfix
Test: insert the psim and showing the sim onboarding flow.
Change-Id: Ib50c28d1bb1372fb822b3cf10cfa3fb22c457b3b
2024-12-13 10:51:56 +00:00
songferngwang
178befee5e Skip the notification when the userId is not main
Fix: 381585049
Test: atest SimSelectNotificationTest
Flag: EXEMPT bugfix

Change-Id: I9a08a1c28948051cbf5a316b8cc5c676f25ff8cc
2024-12-03 10:17:33 +00:00
songferngwang
ed5e803c87 Hide the enabling mobile data
Since the framework behavior was changed after the enabling mobile data dialog was implemented.
Bug: 368450590
Test: manully test the dialog.

Change-Id: I08e0e1b9643781e52f6a9d4fa2c0eccf0feb7901
2024-09-27 08:47:52 +00:00
songferngwang
6960464557 remove the DSDS dialog
If the sim onboarding on, then sim should use the sim onboarding flow.

Bug: 362289792
Test: manual test
Flag: EXEMPT bugfix
Change-Id: Ibe22309db9dea5737de5ad351825a046599e6744
2024-09-23 10:42:36 +00:00
songferngwang
b6be744bc6 Modify the preferredSimDialogFragment
After the telephony flag resetPrimarySimDefaultValues on, the telephony
set the preferred default subscription to remaining sim. Therefore, here
can ask whether the user uses [remaining SIM] for mobile data or not

Bug: 349783684
Test: remove the sim card, and settings show "use mobile data" dialog
Flag: EXEMPT bugfix
Change-Id: I5e3399e777bf1e8ef7998074082e55635eb23eb4
2024-08-23 09:24:21 +00:00
songferngwang
c537bfa8cb Remove the new task for mobile network page starts the sim onboarding
Bug: 349695880
Test: manually test
Flag: EXEMPT bugfix
Change-Id: Id5f35a9311da5e47f0417a45feadb1d1a0a2e35d
2024-08-13 04:41:13 +00:00
SongFerng Wang
b21b629021 Merge "Fix SmartForwardingActivity crash at screen rotation" into main am: 14393a5f06 am: bce8fc79e8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2855525

Change-Id: I0406d14725638b6c3da33e0c7b115c1692725b67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-19 06:12:12 +00:00
SongFerng Wang
bce8fc79e8 Merge "Fix SmartForwardingActivity crash at screen rotation" into main am: 14393a5f06
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2855525

Change-Id: Ieb6ffb8c2f479ffcc30d60440df649618074e420
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-19 05:55:14 +00:00
SongFerng Wang
14393a5f06 Merge "Fix SmartForwardingActivity crash at screen rotation" into main 2024-07-19 05:41:40 +00:00
Tom Hsu
0168d94464 Merge "Fix network can't handle simultaneously SS request for both subs" into main am: f20f297cfa am: 72541b8b19
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2643178

Change-Id: I478fb01ec9f956c040e08e6c3ae2fa475dc7fd3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-17 07:28:19 +00:00
Tom Hsu
72541b8b19 Merge "Fix network can't handle simultaneously SS request for both subs" into main am: f20f297cfa
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2643178

Change-Id: Id6f676ba5fe1ae096c6b3ed0ed75a00e2c1d92e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-07-17 07:13:32 +00:00
Tom Hsu
f20f297cfa Merge "Fix network can't handle simultaneously SS request for both subs" into main 2024-07-17 06:56:04 +00:00
songferngwang
f554e16f45 Add more condition to avoid to open the SimOnboardingActivity
when the user inserts the psim, showing the sim onboarding for the user to setup the sim switching or the default data subscription in DSDS.
Will show dialog for below cases.
1. the psim slot is not active.
2. there are one or more active sim.

Bug: 348524643
Test: verify the UI
Flag: EXEMPT bugfix
Change-Id: I3c782fa2486fde25ac15a69b48ba2f07f90572bd
2024-06-26 10:48:32 +00:00
tomhsu
b4108cb17e Prevent crash when fragment lifecycle is after onStop
Fix: 325059602
Test: build pass
Change-Id: Ie132b4fd6b6c7df8c0fe188e0eb238f562fd4d6e
2024-06-14 06:02:14 +00:00
songferngwang
6ab74ab24c Show sim onboarding for user when insert psim
When the user inserts the psim, showing the sim onboarding for the user
to setup the sim switching or the default data subscription.

Bug: 336488573
Test: verify UI
Change-Id: I1faab0a3166efab3f1fd82d6a69ab4d33b624556
2024-05-15 12:14:37 +00:00
songferngwang
137b5e503c Avoid to show sim onboarding during the SUW
Bug: 339154888
Test: build pass
Change-Id: Ic0c5b22284a046d76cb1d07e5f6928d1e4c71d2d
2024-05-07 08:39:21 +00:00
songferngwang
5f3fc72bd4 Show sim onboarding for user when insert sim and no DDS
When the user remove the sim and then insert it back, the DDS may
be -1. If the DDS is -1, then the mobile data can not be turned on.

Show the sim onboarding for user for this case, the user can update
DDS by the flow.

Bug: 336380853
Test: verified UI
Change-Id: I7fd086cb08917f2cac2c1252585687179a2a2f93
2024-05-06 10:16:47 +00:00
Samuel Huang
a94bfd4a47 Merge "Ignore ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED event if satellite session is started" into 24D1-dev am: fea80bf236
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27071155

Change-Id: Idcbc71555ddbebbd28553530ca8ddd6e364635ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-26 03:22:25 +00:00
Samuel Huang
faa640e8fc Ignore ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED event if satellite session is started
When satellite session is started, we need to suppress the 'Choose SIM for mobile data' and 'Update preferred SIM' dialogs to prevent user turn on SIM.

Bug: 334139957
Test: atest, manual
Change-Id: Id56a98f3d1cfd38875173a643c992393d3dbeec8
2024-04-25 13:34:43 +00:00
Thomas Nguyen
f6f2f6135d Disable SIM On/Off operation when device is in a Satellite session am: c6005fb22a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27073216

Change-Id: I529d0a86739891873c205b3ff9eff065e50ed201
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-24 21:56:40 +00:00
Thomas Nguyen
c6005fb22a Disable SIM On/Off operation when device is in a Satellite session
Bug: 330585109
Test: SatelliteManagerTestOnMockService SatelliteSessionControllerTest SatelliteControllerTest
Manual test with demo and real mode

Change-Id: Iade6426981f76a0b9b71828e0c86d3088c3e974e
2024-04-24 16:35:13 +00:00
Chaohui Wang
111e0bfb5a Return when dialog is null
Fix: 329035830
Test: presubmit
Change-Id: I908a051d68f3cb336a0715ca95b0d5fe687e814c
2024-04-23 14:34:47 +08:00
Hyunho Shin
74aecaf6bc Merge "When the transfer status is CONVERTED, the menu on the pSIM is greyed out." into main 2024-04-19 16:43:50 +00:00
songferngwang
aecc940987 Using the new sim ui when user insert psim
When device has two active esim and the user insert psim, the settings
will popup the dailog to ask user select the two sim card.
Now, there is the new sim UI, so it should show the new one.

Bug: 335780975
Test: verify UI
Change-Id: I298d488d467c447d6f8d91d86383708a4d1f70c9
2024-04-19 07:44:22 +00:00
Samuel Huang
316e7bf3e6 Disable SIM On/Off operation when device is in Satellite Enabled Mode
Cherry-picking ag/26965536 into the 24D1-dev branch caused conflicts. Therefore, manually create this CL to migrate the MobileNetworkSwitchController to Kotlin and utilize Compose.

Bug: 315928920
Test: atest, manual
Change-Id: I215b5a4615a3b3da6fc160f76c85c814210cc3ef
Merged-In: I7aaaf43b4c449129197e7cc92565d274ffdd2d8c
2024-04-16 09:52:00 +00:00
Samuel Huang
cbf5154291 Disable SIM On/Off operation when device is in Satellite Enabled Mode
Bug: 315928920
Test: atest, manual
Change-Id: I7aaaf43b4c449129197e7cc92565d274ffdd2d8c
2024-04-15 12:31:17 +00:00
Hyunho
477b291b5d When the transfer status is CONVERTED, the menu on the pSIM is greyed out.
UX update for converted pSIMs.

Bug: 326896614
Test: manual test

Change-Id: I68ca181ec16c839ed8dc5dba3f8dc75aba09ab5b
2024-04-12 03:29:35 +00:00
Samuel Huang
ba03a22317 Avoid SIM card on/off dialog pop-up if satellite is enabled am: f2ed0ec752
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26847152

Change-Id: Ifb4f85972f29370d51a8c6363fa8efd63e6dead5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 07:36:48 +00:00
Samuel Huang
f2ed0ec752 Avoid SIM card on/off dialog pop-up if satellite is enabled
In order to support Satellite SOS, device will have two modems, one for TN, one for NTN(satellite).

When device switches to satellite mode, PSS only disables TN eSIM (and not TN PSIM). Since NTN image only supports eSIM, there is no need to disable TN PSIM before switching to NTN image. Somehow device is seeing that TN PSIM is available and is showing the user to enable it. So we need to handle it by not showing this dialog during satellite mode enabled.

Bug: 330585109
Test: atest, manual
Change-Id: I9781b7e1cef8f7f10e7ecdbb23ca729da4d06eba
2024-04-11 05:20:53 +00:00
Yuchen Dong
64f4619d68 Fix SmartForwardingActivity crash at screen rotation
When SmartForwardingActivity attempts to set the Toolbar to ActionBar
in #onCreate, an llegalStateException is thrown. This is because
SmartForwardingFragment sets the default action bar by window decor to
ActionBar first by updating the title in #onCreatePreferences.
This occurs in cases where SmartForwardingFragment is created in the
process of being SmartForwardingActivity created, such as when rotating
SmartForwardingActivity.

Use getActivity()#setTitle instead of getActionBar()#setTitle.

Test: manual
Bug: 314232525
Change-Id: I041d62605ba666ecce041086854e675d9b19ac45
2024-04-01 16:19:22 +09:00
songferngwang
be3008e09d Add log for setDataEnabledForReason
To know who change the mobile data

Bug: 331843727
Test: NA Adding log only
Change-Id: I3ef5662102761541cd3e0e4662e0acab07c71937
2024-03-29 09:06:34 +00:00
songferngwang
b8d87d1add Modify the condition for hide Dds confirmed dialog
Bug: 318310357
Bug: 298898436
Bug: 298891941
Test: manual test and verify the UI.
Change-Id: I68df36b457ea7479cd6a561f9c2b3c968e14fe44
2024-02-29 07:07:24 +00:00
songferngwang
f1ea484425 SIM Onboarding flow completed
- Add the setup flow for switching sim and rename and setup primary sim
  items
- Add the bottom sheet and progress dialog.
Bug: 318310357
Bug: 298898436
Bug: 298891941
Test: build pass. Will upload another cl for testing

Change-Id: Ie9680f0a67afe453c1449c0f2b59e98fd627e215
2024-02-06 10:56:59 +00:00
Ling Ma
ae8b9b5fe2 Wrap subManager creation with createForAllProfiles
Since U, a sub can be associated with a particular profile, and thus in V we enforce filtering on the caller and only show the subs that are associated with the caller.
However, in some cases the caller indeed needs to see all subs regardless of its association, e.g. sysUI. Therefore, a param isForAllProfile is added to indicate whether the caller intends to see all subs.

Bug: 296076674
Test: voice call + data browsing
Flag: ACONFIG com.android.internal.telephony.flags.enforce_subscription_user_filter
 DEVELOPMENT
Change-Id: I88e29b445a11f36e1a3db80368bb9e46ef06eac3
2024-01-22 22:14:08 +00:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
Hakjun Choi
aa911b312b Changed API name from 'isNtn()' to 'isOnlyNonTerrestrialNetwork()' and updated related methods and variables according to API Council recommendations.
isNtn() -> isOnlyNonTerrestrialNetwork()
No changes in logic.

Bug: 301620244
Test: PreferredSimDialogFragmentTest SimListDialogFragmentTest
Change-Id: I2b64262ed4d9f81f830f76b10a2174ad1e1d649f
2023-10-04 08:23:30 +00:00
Jayachandran C
544d7697a9 [Settings] Hide satellite eSIM from users
Bug: 302044287
Test: Manually verified by forcing the eSIM profile to be NTN
Change-Id: Iba4e42778bdf072ceaecc35a2245ea737e552e5c
2023-09-26 06:24:46 +00:00
Charlotte Lu
9540e60083 Java crash - AID_SYSTEM_USER - SimListDialogFragment.updateDialog - java.lang.NullPointerException.
This error may be because onCreateDialog did not initialize mSubscriptions correctly, causing it to be null.
java.lang.RuntimeException: java.lang.NullPointerException at com.android.settings.sim.SimListDialogFragment.updateDialog.

Fix: 194175217
Test: Manual Test
Change-Id: I761fed847441c6061ea4690658f06b9c2021bcee
2023-08-18 05:48:35 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
SongFerng Wang
a4cac90c1d Merge "Avoid the exception when UI shows the fragment" into udc-qpr-dev am: a94cfc7b76
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24098950

Change-Id: Iba6b9d6b453c7e0289fd4ad81391483084fab0e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 16:21:01 +00:00
SongFerngWang
e1b4b7fc7d Avoid the exception when UI shows the fragment
Bug: 290145058
Test: build pass.
Change-Id: Ic8d084cc98c3d0094d816e43fed57fb10446462d
2023-07-17 16:40:17 +08:00
Yaqing Lu
8887011b87 Fix network can't handle simultaneously SS request for both subs
When disabling Smart forwarding, the SS requests for both subs will be
sent simultaneously, but sometimes network can't handle both SS
requests from both subs causing call forwarding settings to not be
changed without any notification to user.

Send the next SS request after completing the previous request same as
enabling Smart forwarding.

Test: manual
Bug: 289326844
Change-Id: I4869fa200d3fbb70ba1b6b46cc491ea45299f412
2023-06-29 07:30:53 +00:00
SongFerng Wang
7f29649aa9 Merge "Remove the owner" am: 286344d539 am: 448c8b61a8 am: 61ef9024c8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2623772

Change-Id: I278260f1a36ed24fd1ca2d53ffc7ff2431fd1005
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 07:54:48 +00:00
SongFerngWang
f405dadcf2 Remove the owner
Bug: 286964921
Test: build pass
Change-Id: I4daf629e8cb994753dca36a811f0d25685df6928
2023-06-13 15:10:46 +08:00
Weng Su
25d259e3e2 Restrict SimDialogActivity
- Restrict UI if user is a guest

- Restrict UI if user has DISALLOW_CONFIG_MOBILE_NETWORKS

Bug: 262242946
Bug: 271849181
Test: manual test
atest -c SimDialogActivityTest

Change-Id: I227400aa71880895d8356f3d2961cb610ad2a357
2023-05-29 07:03:19 +00:00
Chaohui Wang
394cec3c77 Fix ANR of SimSlotChangeService
The JobService.onStartJob() is run on main thread, should return in time
instead of wait for job complete, otherwise will cause ANR.

Not wait the job finish, and call jobFinished() when finished to fix
this issue.

Fix: 277031144
Test: Manual check with log that onStartJob() is returned in time
Test: Manual check with log that job is not run in main thread
Change-Id: I1e83363ca87a29fb9424100bf99b3f2d212fd9d0
2023-05-08 20:32:57 +08:00