Commit Graph

219 Commits

Author SHA1 Message Date
Jack Yu
aeb9d72bac Cleaned up the deprecated APIs
Bug: 270094276
Test: Basic phone funcationality tests
Change-Id: If58b250be461aa05ec3e55390fe73142676b283d
2023-02-21 15:01:23 -08:00
Aswin Sankar
ff8f96c0be Attempt cross-SIM enablement when auto data switch enabled
- For devices that have opted in with overlay config, enabling a 2nd SIM
and modifying 'Switch mobile data automatically' will update cross-SIM
calling enablement.
- These updates will be logged as settings events.

Bug: 260266794
Test: Live tests for cross-SIM calling across both subs.
Change-Id: I64d25ca406877ca5f061064e0a3b23f54c125638
2023-02-14 00:42:58 +00:00
Ling Ma
d6b117fcdf Add dialog for enable auto data switch
When user activate multi-SIM and suitable to enable auto data switch,
prompt the user when a dialog following choosing default data sub.

UX: https://docs.google.com/presentation/d/1G6bcPoJUW-YcBzpQXAQLecY3nu69rLlCLQBfpAvVD7c/edit?resourcekey=0-qPkfUNLQ2Wfz2pq3V_6MZA#slide=id.g1c25e24318e_0_0

Test: manual verified the dialog buttons following simListDialog +
specific dialog

Bug: 260659244
Change-Id: Ib35f2d08093c2dd79036034bbfe0efaaa0be3162
2023-01-12 15:24:40 -08:00
Zoey Chen
eeaf2a0125 [Settings] Provision status checking of eSIM in dialog fragment
Bug: 262679983
Bug: 257120311
Test: manual
Change-Id: Idc78741e445b5d6448e2288f2a1bc6c79e34bf4b
2022-12-19 18:08:15 +00:00
Bonian Chen
3ac629f04e [Settings] Try to reduce the time pending on BroadcastReceiver
This is not a design which could resolve the issue, but try to improve
it through reducing the time blocking on BroadcastReceiver and reducing
the happening of ANR.

Bug: 262209170
Test: local and auto
Change-Id: Idec4da3d1deaffb121a5c7a73aeb84b4b0331374
2022-12-14 10:06:12 +00:00
Bonian Chen
5ced0af08b [Settings] Remove some warning message
Replace startActivity by startActivityAsUser(UserHandle.SYSTEM)
to reduce some warning log created for SIM detection.

Bug: 260806431
Test: local, auto test
Change-Id: Ib571bf9db922ec27d2229e8a283768c12ba61430
2022-11-30 07:39:16 +00:00
SongFerngWang
eece0b0420 The page id SettingsEnums.DIALOG_PREFERRED_SIM_PICKER is duplicated
Bug: 260072136
Test: build pass
Change-Id: I683c3227d3138dea8699d7dd5a130cb02b1ceff8
2022-11-24 23:17:21 +08:00
Jack Yu
f4982a080b Add getSubscriptionId API
The old getSubId or getSubscriptionIds return multiple sub ids
per slot index, which is not possible in today's implementation
because the slot index here refers to the logical slot index,
which is also known as phone id, or the logical modem index. In
today's telephony, one logical phone can only have one
subscription at one time, so does the modem.

Bug: 239607619
Test: Manual
Change-Id: I0a43d33daf523e6f0bea054c8965281bafbbcaa4
2022-11-20 12:21:05 -08:00
Bonian Chen
504e71c284 [Settings] configuration for hidding SIM notification UI
Hide SIM notification UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I07d9ddeb96ca590decf28126ce97fba4c1783304
2022-10-20 10:11:11 +00:00
Treehugger Robot
1a0c26dd7e Merge "Crash in PreferredSimDialogFragment" am: a512817aba am: 42cc405781 am: a4915b26f4 am: 140d335571
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2207096

Change-Id: I3b2652dfe7abb46558109033328de07011cd0594
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 13:59:59 +00:00
Pingzhi Wang
77ce80d6cb Crash in PreferredSimDialogFragment
NullPointerException when removing physical SIM card

Bug: 244622300
Test: Manual
Change-Id: Ie32c4d07e4c77a0460265a47501e332ae62e17e4
2022-09-05 11:29:42 +02:00
Bonian Chen
188ccde75b [Settings] Additional route for dismiss activity dialog
Previous design dismiss an activity dialog through Intent would lead to a pair of creating and finishing activity. The task switch during the creating and finishing may introduce some side effect to the other apps.

This change tried to add additional route to avoid from dismiss through Intent
but sending an async close request to that specific dialog (if available).

Bug: 236956105
Test: local, auto testing
Change-Id: I0a7e0e9826a301f2aa0ca34f40b5570f0e384b4f
2022-08-23 06:13:46 +00:00
SongFerngWang
8514ff65eb [Setting crash] The dialog is null
Add the null protection.

Bug: 235267673
Test: build pass
Change-Id: Ib9308d152ddc233354d89166b8d79fcec81d8c19
2022-06-08 08:32:05 +00:00
SongFerngWang
18f10bb8b1 [MEP] The removale slot can read the esim card
Revert the wrong logic for removale slot part at ag/18579901,
the removable slot can read the esim card.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
2022-05-27 16:44:52 +08:00
SongFerngWang
948f512098 Changing the condition since the esim may be removable
The condition whether the slot is esim slot should use getIsEuicc
api since the esim may be removable.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
2022-05-26 10:54:39 +08:00
SongFerngWang
c389149ff3 stop show preferred SIM card dialog during sim switch
Bug: 227169390
Test: manually test
Change-Id: I242402e49b267c8cd61a85a46367c778d2d8bbf8
2022-05-10 11:54:44 +08:00
Chaohui Wang
91fd88a519 Fix first item not a11y focusable in SimListDialog
The root cause is there is a logic to get LayoutParams from parent, but
set to child, which cause some chaos.

This dialog can be started with
`adb shell am start -n com.android.settings/.sim.SimDialogActivity --ei
dialog_type 0`

Bug: 227418839
Test: manual test when Talkback enabled
Change-Id: Ia1014dea49cb5cf372afe5bb50972277309c7f63
2022-05-01 09:28:20 +08:00
SongFerng Wang
cdb08ee92a Merge "[MEP] The condition of "null point check" is wrong" into tm-dev 2022-03-03 12:36:59 +00:00
SongFerng Wang
9ca62b2290 Merge "Fix the settings crash when SimDialogActivity is null" into tm-dev 2022-03-03 12:36:43 +00:00
SongFerngWang
e90d80cc52 [MEP] The subscriptionInfo's getSimSlotIndex is logical slotId
1. The subscriptionInfo's getSimSlotIndex is logical slotId. The code
   should compare it with uiccSlotMapping.getLogicalSlotIndex()
2. Rename the parameters for the readability.
3. The mobile network selection dialog did not be closed after user clicked.

Bug: 219951253
Test: manual test.
Change-Id: I7fef78547f4e6283791cd15a03275eaefeb50e3c
(cherry picked from commit 181f8179f1)
2022-03-03 09:31:47 +00:00
SongFerngWang
ce8232d0a4 [MEP] The condition of "null point check" is wrong
The condition of "null point check" is wrong at the
SimSlotChangeHandler.

Bug: 222035986
Test: Build pass. maunal test.
Change-Id: I1b81faf082163643c1d17eae2f66d75b450288fe
(cherry picked from commit f64b2c09c0)
2022-03-03 09:18:53 +00:00
SongFerngWang
a3b98f5d04 Fix the settings crash when SimDialogActivity is null
The PreferredSimDialogFragment did updateDialog after SimDialogActivity
was finished. It caused the settings crash. This is similar to b/184899699

Bug: 220803944
Test: build pass
Change-Id: I9a5964400a63053e362632944b9e7aa8ec1bbea8
(cherry picked from commit 70bf76a436)
2022-03-03 09:18:39 +00:00
SongFerngWang
c747455196 [MEP] Inserting a pSIM while user has 2 esims, showing the MEP dialog
Inserting a pSIM while user has 2 esims already active,
the UI shows MEP dialog

Bug: 218451733
Test: manual test. To fake the MEP condition, and then checking the UI
Change-Id: I48fa3d483873315d7e05b39369085c48af779522
2022-02-09 16:06:18 +08:00
SongFerngWang
4d0749febd [MEP] Refactor SlotSidecar API for all of sim page.
remove the SlotSidecar's run() and using new run() with port id
information.

Bug: 218439715
Test: manual test for UI
Change-Id: I81479a0c514f2b8f58b9167b31d357f017732482
2022-02-08 17:40:12 +08:00
SongFerngWang
04eec0382c Lost code for setting the list as visible
the ag/16710087 lost the code.

Bug: 216233391
Test: manual test: check the UI
make RunSettingsRoboTests ROBOTEST_FILTER=SimListDialogFragmentTest (PASS)

Change-Id: If6ad5422a820627873e58b144e7b65a8b0130def
2022-01-27 10:18:00 +00:00
SongFerngWang
f2a8008ae3 The list does not follow the UX dialog design doc in alert dialog.
Please refer the comment#1 at bug and there are change below
- the divider is 4dp
- the item's radius is different in the list.

Bug: 216233391
Test: manual test: check the UI
make RunSettingsRoboTests ROBOTEST_FILTER=SimListDialogFragmentTest (PASS)

Change-Id: I758d60202fcf477aeb49014e60b949e7ad08c082
2022-01-26 12:49:59 +08:00
SongFerngWang
43ebe68063 Refine the mobile data selection UI
-Adding the margin for bottom at dialog
-Modify the text color of summay in the list at dialog when device is
dark mode.

Bug: 212396431
Test: build pass and check the dialog UI.
Change-Id: I1ec587fd9d64ad67bbf3479c7931c0a901f572cf
2021-12-29 14:31:13 +08:00
SongFerngWang
b5766e4422 The carrier name is wrong in the dialog
The condition is wrong, should use the subId.

Bug: 212195309
Test: build pass. manual test the dialog.
Change-Id: I894c78fccab511f26bf779638cac1f18a07a86c4
2021-12-28 16:39:11 +08:00
SongFerng Wang
fdfb0bcf44 Merge changes I5c6ad4b3,Icb00b3fc
* changes:
  [MEP] renew the default data selection UI
  [MEP] renew the sim confirm dialog UI
2021-12-21 15:53:21 +00:00
SongFerngWang
be8f279f2c [MEP] renew the default data selection UI
- renew the default Data/Call/SMS selection

Bug: 199902896
Test: build pass and local UI test
Change-Id: I5c6ad4b35d38112d5e88330a3fc9638be533bc94
2021-12-21 16:34:30 +08:00
Zoey Chen
6978a90e88 [Settings] Remove MobileNetworkActivity
- remove the component name when launching the intent, using the action intent to replace.

- remove MobileNetworkActivity and rename SubscriptionSettingsActivity as MobileNetworkActivity.

Bug: 210593601
Test: atest
Change-Id: Icb7adaf9f7c7dfe01ff5c133aee8387c1663546c
2021-12-16 13:30:25 +08:00
Zoey Chen
2c1fe3ca47 [Settings] Remove the legacy 2-pane registration
Test: atest
Bug: 209606859
Change-Id: Ia1788cdfd9a9e4c6bfeb25be1257f82900867114
2021-12-14 12:32:34 +08:00
SongFerngWang
22ab05b420 switch SIM refactor to support MEP
To create new dialog for MEP. It is a simple UI for testing,
not the final version.

Bug: 199902896
Test: local build pass.
Change-Id: Ief4299e775c0758e4b886d5eff13bd482f8c8ab3
2021-12-10 09:30:30 +08:00
SongFerngWang
1e0e9021ac switch SIM refactor to support MEP
1. Using new telephony API and doing the code refactor
2. To support multi esim profiles case

Bug: 199902896
Test: local build pass.
Change-Id: I8580022793e5c3fc14159f14b406f864353477f8
2021-12-08 18:35:33 +08:00
Sandeep Jawalkar
8bd3afc334 Merge "eSIM deprecated API test Refactoring" 2021-11-16 16:46:04 +00:00
sandeepjs
40ffe69a3e eSIM deprecated API test Refactoring
Test: build
Bug: 159354974
Change-Id: Iedeb90f186ab9f82894e2fecef86d339c8989542
2021-11-15 05:44:54 +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
Calvin Pan
216315523b Merge "Disable smart forwarding based on subid" into sc-qpr1-dev 2021-09-17 01:33:05 +00:00
Calvin Pan
e32a2abc16 Disable smart forwarding based on subid
Smart forwrading did not specify the subid when disabling feature, which
caused always dsiabled on default subid.

Bug: 194112447
Test: Enable/disable smart forwarding
Change-Id: Id900500f065c32b326ca6dfc39482f913fb9b8ff
2021-09-15 17:57:09 +08:00
Bonian Chen
94253d725e [Settings] Avoid from floating overlay when displaying SIM selection UI
Avoid from floating overlay when displaying SIM selection UI, which
could avoid from security issue.

Bug: 195667589
Test: local
Change-Id: I8db76005f2c3ad6cc94d68703b2b1647d81371f5
(cherry picked from commit 1cc61672ef)
2021-08-30 06:53:50 +00:00
Calvin Pan
3bf80c66ff Remove unnecessary condition
The call forward timer is only valid for the CF_REASON_NO_REPLY reason,
and it will be 0 in other cases. Remove the condition to prevent disable
processing not working.

Bug: 194112447
Test: Build pass
Change-Id: I824a61383b595284ee5694fcd31e58e2379997fb
2021-08-12 14:05:37 +00:00
Peter Wang
3b03d484fb Use ICU style for choose_sim_text to handle special cases in RU
Bug: 185406678
Test: Build
Change-Id: I43bf77b0b09ae4c2bb8b3acf976d996854a80866
2021-06-15 18:27:34 -07:00
Peter Wang
d79015628a Use BC theme for ChooseSimActivity
Uploading for beccamilman@

Bug: 190430469
Test: Local
Change-Id: If762380040f64266b34b1d62658010b80e8c0405
2021-06-10 19:27:46 -07:00
Jeremy Goldman
09a185dbca Store whether the Dialog was previously dismissed
The dialog can be dismissed by either the framework automatically (i.e.
when the screen is rotated) or when the subscriptions change.

If both of these things happen while the class is not deleted, then
dismiss() will be called twice and there will be a crash

Bug: 184899699
Test: atest -c SettingsUnitTests
Change-Id: Ibaef59696feb566664a424f65f806396f02497e8
2021-05-13 14:42:26 +08:00
Peter Wang
6e61073864 Change DSDS dialog confirm text from "Continue" to "Yes"
Bug: 131169645
Bug: 184769109
Test: N/A
Change-Id: Ide709c83459ec955739daa0f23167aa72a5665a9
2021-04-14 13:43:26 -07: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
Janis Danisevskis
5cef487b4b resolve merge conflicts of d42d9a41f6 to sc-dev
Change-Id: Ifa6a4af09d7cd45773a8c057416ab90fac23061e
2021-03-17 19:09:29 +00:00
Bonian Chen
203f0fe89d [Settings] Code refactor - remove unused import lines
Remove some unused import lines within source code based on
https://source.android.com/setup/contribute/code-style

Bug: 182867979
Test: build pass
Change-Id: I76dbcfa9e5b435b2838401dfee15b12f472d07d0
2021-03-16 10:24:24 +00:00
Treehugger Robot
4357b14563 Merge "Add OWNERS" am: f69f3ed7dc am: 5e85b6b2a9 am: 181abccf09
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1580364

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51c83010ba124a058173dbeec07465b243a366e4
2021-02-25 16:36:25 +00:00