Commit Graph

69 Commits

Author SHA1 Message Date
rambowang
796f631ff8 Clean up 24Q3 aconfig flag reset_mobile_network_settings
Bug: 271921464
Test: m -j
Flag: EXEMPT flag clean up
Change-Id: I13f9cf25263c1465860272d5891554088e174474
2024-10-11 16:20:43 +00:00
tomhsu
cadeeecd22 Fix no option after mobile network was reseted.
- When reseting mobile network, subscription info will also be reset.
   It has a racing bewteen showing the UI and udpating the subscription
   info.

 - Register a receiver to receive subscription change to dynamically
   update the UI

Flag: EXEMPT bugfix
Bug: 362382003
Test: Manual test.
Change-Id: I16811503685a6b82eee5ecf3fa725255d356a765
2024-09-18 04:40:32 +00:00
Rambo Wang
dd7d18ec8a Turn off RILD reset in Reset Network Settings Flow
The CL temporarily removes RILD reset in the flow and plans to bring it back when a more reliable solution is available.

Resetting RID in the flow may cause device failure to camp on the default cellular network.

The interface used to reset RILD in the flow was designed for telephony process silent restart feature. The implementation doesn't  work well together with other reset options (e.g. nvResetConfig).

Bug: 356272264
Test: Execute feature test plan, including regression test
Flag: com.android.internal.telephony.flags.reset_mobile_network_settings
Change-Id: I955bcb0b151f27dc73c03a580c0144bea9e3bfa3
2024-08-23 15:17:21 +00:00
Chaohui Wang
b70c805717 Fix unable to erase eSIM
Before this change,
- eSIM will be erased twice, one with result callback and one without
  result callback.
- During reset, ResetNetworkConfirm could interrupted by subscription
  invalid event, which happens during reset.

After this change,
- eSIM will be erased only once, result callback is registered
  separately.
- Explicit exit the page when reset finish, and ignore the subscription
  invalid event after reset started.

Bug: 328293508
Flag: EXEMPT bug fix
Test: manual - dry run the reset
Test: ResetNetworkConfirmTest
Change-Id: I51395a556b1c8775192d5897a87f13046c042578
2024-06-26 11:02:56 +08:00
Rafael Higuera Silva
1d307afd95 Merge "Extract and fix logic for showing rac dialog." into 24D1-dev am: 958b737fcc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27072479

Change-Id: I9f5c4c8dea3c7aebc73b5121d6ace7aca22c1dfc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-25 19:07:24 +00:00
Rafael Higuera Silva
36d99e8b09 Extract and fix logic for showing rac dialog.
Added tests to make sure the logic makes sense.

Bug: 335745726
Test: make, manual, atest SubscriptionUtilRoboTest, atest SubscriptionUtilTest, atest ResetNetworkTest
Change-Id: I7092f2747f1ca1f9ef4dc99275a916b9e24d8b28
2024-04-25 01:34:47 +00:00
Rafael Higuera Silva
363535192d Add new warning dialogue when user is Resetting mobile network settings.
If the user is reseting mobile network settings and have all these
conditions:
- No Wi-fi
- Has check to delete all eSIMs
- Has a least one RAC sim carrier
Then show the warning dialogue.

Test: make, manually test, atest SubSettingLauncherTest, atest ResetNetworkTest,  atest SubscriptionUtilTest
Bug: 328649510
Merged-In: I47d9b868b649b259d5e4008ec742317d2cb7cf51
Change-Id: I47d9b868b649b259d5e4008ec742317d2cb7cf51
(cherry picked from commit 147cc19b53)
2024-04-05 21:39:13 +00:00
Rafael Higuera Silva
147cc19b53 Add new warning dialogue when user is Resetting mobile network settings.
If the user is reseting mobile network settings and have all these
conditions:
- No Wi-fi
- Has check to delete all eSIMs
- Has a least one RAC sim carrier
Then show the warning dialogue.

Test: make, manually test, atest SubSettingLauncherTest, atest ResetNetworkTest,  atest SubscriptionUtilTest
Bug: 328649510
Change-Id: I47d9b868b649b259d5e4008ec742317d2cb7cf51
2024-04-01 23:07:05 +00:00
Tomasz Wasilczyk
b27c9b507b Fix crash on potentially missing EuiccManager
Bug: 310710841
Test: it builds
Change-Id: I9d2c88091a34a4e4e118fd1bd8d95c724c52e77e
2024-03-08 18:41:25 +00:00
Sunny Shao
bee65b4109 Merge "Revert^2 "Nullability Annotations replacement"" into main 2024-01-10 08:35:06 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Rambo Wang
4c384506d5 Reset telephony stack during Reset Mobile Network flow
This CL introduces two more steps to restart Phone process and RILD
during the Reset mobile network flow by the help of the
TelephonyContentProvider which has been used by Pixel Adaptive
Connectivity Services ("SCONE") for a while.

The additional reset options can resolve issues like resources leak
and internal state stuck, effectively recover telephony stack into
fresh state.

The reset options are performed in the background and have no impact
on UX of the reset flow.

Bug: 271921464
Test: ResetNetworkOperationBuilderTest
Test: Feature test with both flag on and off
Change-Id: If09d20d79e908dd43f3f654fb7cca7f713b7f03a
2024-01-05 03:53:21 +00:00
Sunny Shao
946f52b2a1 Merge "Revert "Nullability Annotations replacement"" into main 2023-12-29 03:18:24 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
rambowang
41ba9dc658 Support reset IMS stack in Reset Mobile Network flow
Reset the IMS stack for the specified subscription
with the help of API TelephonyManager#resetIms.

Bug: 271921464
Test: ResetNetworkOperationBuilderTest
Change-Id: I61575f18bcc300f362000dc7f4257b9d794b6b69
2023-12-22 10:33:46 -06:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Bonian Chen
8d43fd9a35 [Settings] Change network reset into reset mobile network
Replace reset network into Reset mobile network settings

Bug: 260034791
Test: local and auto
Change-Id: I9547f266c1586073fd2b96f35cc9df8861b0a105
2022-12-15 15:44:08 +00:00
Bonian Chen
7d507964e6 Merge "[Settings] Enable ActivityResultLauncher for keyguard" am: d1e0b46a44 am: a0baef444d am: 5d2afa168a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2313406

Change-Id: Ib998f0407156c5f16aed4b0a977ec8f85e048560
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 15:46:37 +00:00
Bonian Chen
d1e0b46a44 Merge "[Settings] Enable ActivityResultLauncher for keyguard" 2022-11-24 14:25:17 +00:00
Bonian Chen
845426e9e5 Merge "[Settings] Code refactor" am: b60b759dac am: 61ed679576 am: e9e7cdf914
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2311309

Change-Id: I05dcb1af5e6d6e515ebaa81641df57883a88c36e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 05:16:23 +00:00
Bonian Chen
e76bcc5388 [Settings] Code refactor
Wrap reset options into an Object, for better supporting

Bug: 260034791
Test: auto testing
Change-Id: I98cc12440414077b600bba0b5598c887608419cc
2022-11-23 12:52:55 +00:00
Bonian Chen
b5921fade9 [Settings] Enable ActivityResultLauncher for keyguard
Enable the support of ActivityResultLauncher for keyguard.

Bug: 260034791
Test: local
Change-Id: I0643241d7b79ba0ac4cd2314a126f33eb6557cc0
2022-11-23 12:48:34 +00:00
Bonian Chen
3b7d0d2e17 Revert "[Settings] configuration for hidding SIM remove UI"
Revert submission 2299468-settings_without_siminfo

Reason for revert: Fix build breakage
Reverted Changes:
I3d6ecec14:[Settings] configuration for hidding SIM settings ...
I8f0c1d53c:[Settings] configuration for hidding SIM remove UI...
I1b88f0f70:[Settings] configuration for hidding SIM notificat...
Ibe22c3ba3:[Settings] configuration for hidding SIM provider ...
Id5ea14ca8:[Settings] configuration for hidding SIM related U...
I70be07dbc:[Settings] configuration for hidding SIM lock UI

Log of breakage:
https://android-build.googleplex.com/builds/submitted/9318826/full-eng/latest/view/logs/build_error.log

Bug: 260055628
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I5c52b841955f5be41ce861aca740147061fc7d3f
2022-11-22 11:59:15 +00:00
Bonian Chen
889c81f77a Merge "[Settings] configuration for hidding SIM remove UI" 2022-11-22 08:51:53 +00:00
Bonian Chen
eb6eb053e8 Merge "[Settings] Code Refactor" am: bafd49d604 am: c31caafb5a am: 81e86e8d5d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: Ib0d6763f9994c3a8094472b5967ad304e11dcc66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 13:03:29 +00:00
Bonian Chen
81e86e8d5d Merge "[Settings] Code Refactor" am: bafd49d604 am: c31caafb5a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: I8dbda9c6b40fb8207b81b30e89e464eea87a06bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 12:31:54 +00:00
Bonian Chen
e1f641a130 [Settings] Code Refactor
Adjust code structure for maintainance.

Bug: 259611847
Test: auto test
Change-Id: I6710aa814441c0858c712f416ffddde44081d4d1
2022-11-18 08:36:53 +00:00
Bonian Chen
e1a0637c3a [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I8f0c1d53c4fe6e30280f2b7ae8f694cd27056e36
2022-11-14 10:19:27 +00:00
Bonian Chen
f6114d3f83 [Settings][Back port] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I866b2dd566ffa9953f2a83aa3dcb32440390898a
2022-10-28 09:48:46 +00:00
Bonian Chen
69f6e76f2c [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
2022-10-20 09:59:01 +00:00
SongFerngWang
5a4df243f0 Fix the NullPointException
The subscriptionInfo.getCarrierName may be a null, so adding the null
checking.

Bug: 236064286
Test: build pass
Change-Id: I8f6f5ac725d6dd552ac2626725e44f52dcbf6c32
2022-06-16 10:46:07 +08: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
Bonian Chen
0da056b2dd [Settings] Close reset network confirm dialog when SIM removed
When SIM removed, the network reset confirm UI no longer represents
the wordings which presented to the user.

Proceed on resetting will only reset APN on removed SIM and
lead to some side effect if user inserted a new SIM while
keeping displaying the confirmation dialog.

With this situation, close the confirmation dialog is current
decision in design. And the UI which prior to the confirm UI
also need to be updated to avoid from user accessing that
removed SIM.

Bug: 171070050
Test: manual
Change-Id: I338835ca98593f95d98bafa70f12b177c43bf91a
2020-12-16 02:35:26 +00:00
Edgar Wang
21f8cb3a44 Refactor Reset options Settings
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I94969f6903d047b9bc41b1e8c14096c92c460b38
2020-08-04 23:33:50 +08:00
Kevin Chyn
b13bc50542 1/n: Make ChooseLockSettingsHelper into a builder
The multitude of slightly different launchConfirmationActivity(*)
methods are a big unsustainable pyramid. It's too difficult to
read, too difficult to track which clients are interested in which
parameters, and too difficult to add new parameters, since we need to

1) Read through all of them and find one that's the closest
2) Try not to affect other callers, so potentially add yet another
3) Modify the internal paths, which all basically call each other
   until it reaches the biggest launchConfirmationActivity which
   has ALL of the parameters

This change should have no behavioral change.

Note: CredentialStorage doesn't need returnCredentials anymore as of
      ag/6073449

Test: make -j56 RunSettingsRoboTests
Test: Manually traced code paths for each invocation. A few hidden
      dependencies (such as explicitly setting challenge=0 with
      hasChallenge=true) were found. Left them the way they were in
      case they were intended
Test: Enroll face, fingerprint
Test: Enable developer options
Test: Change to PIN, Pattern, Password, then back to PIN (so each
      type requests confirmation)
Test: adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL,
      authenticate
Test: adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL
      (shows confirm credential screen)
Fixes: 138453993

Change-Id: Ic82ef3c3ac2e14d624281921f2d816bcdacbd82b
2020-07-24 11:13:13 -07:00
tom hsu
a381196b8b Remove reference of Phoneconstants for SUBSCRIPTION_KEY
- use SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX instead of it

Test: make
Test: m RunSettingsRoboTests
Change-Id: Ic635b11c995077ebf1e143d9562b100d7730fe52
2020-01-14 15:31:02 +08:00
changbetty
ebe36cf96c [Mainline] To use @SystemApi to replace non-formal APIs for mainline
- getResourcesForSubId(Context, int, boolean)
      - @SystemApi getResourcesForSubId(Context, int)
    - isUsableSubIdValue(int subId)
      - public isUsableSubscriptionId(int subId)

Bug: 147206736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ResetNetworkTest
      make RunSettingsRoboTests ROBOTEST_FILTER=ResetNetworkConfirmTest
      make RunSettingsRoboTests ROBOTEST_FILTER=CellularFallbackPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiCallingSettingsForSubTest

Change-Id: I1a67db80b114a438afda7d45af90e54af38703c3
2020-01-08 22:06:26 +08:00
Bonian Chen
1247771b88 [Settings] Adopting public API
Replace SubscriptionManager#getActiveSubscriptionInfoList(true) by
SubscriptionManager#getActiveSubscriptionInfoList() since they're
equivalent.

Bug: 146312766
Test: build pass
Change-Id: Iab8a141277e0199f75a3419527e15d63669224fc
2019-12-16 06:35:43 +00:00
Taesu Lee
39e4fbb746 Fix to show eUICC preference in eng build
DEVELOPMENT_SETTINGS_ENABLED is not set before entering Developer
options in settings app even if it is in eng build. To show eUICC
preference in eng build, uses isDevelopmentSettingsEnabled() instead.

Test: Manual and make RunSettingsRoboTests

Change-Id: Ia1f46fad94bc62ca48dcfef7cd5d6188766aa380
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-09-06 16:11:39 +09:00
Andrew Sapperstein
88930e373e Update eSIM deletion strings.
Adds some conditional behavior for the confirmation screens.
When the erase eSIM option is visible and checked, shows alternate string.

Fixes: 126262481
Fixes: 118751918
Test: visual inspection & make -j RunSettingsRoboTests
Change-Id: I40f983b03ad470d785bf104e645dbc92e7897d2d
2019-03-22 13:03:25 -07:00
Hunter Knepshield
e8e86e631a [Strings + layout] Minor changes for eSIM erase.
1. String changes (uniform on both screens now)
2. Minor non-functional layout changes (margin is uniform now)

Reset everything: https://screenshot.googleplex.com/OZsvOt36CZf
Reset networks: https://screenshot.googleplex.com/in0vdOAeF7u

Change-Id: I92d068c3731f6915c8d393d94ac8c25a3c8ed773
Fix: 119120504
Test: on device
2019-03-14 15:14:35 -07: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
Malcolm Chen
14dde50c3a Don't show hidden Cellular subscription in Settings.
Replace getActiveSubscriptionInfoList() with
getActiveSubscriptionInfoList(true) so that settings will not show
hidden subscriptions to the user in various pages.

Bug: 121396526
Test: manual
Change-Id: I717999fed7d3a5a037914239694bef52df7c6207
2019-01-16 00:21:30 -08:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
arangelov
9308154090 Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog.
Bug: 64893948
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest -j40 RunSettingsRoboTests
Change-Id: I9308d8d86a3789b8f2c92b9f4f20cf00cce71d14
2018-03-05 17:35:48 +00:00
Fan Zhang
7cf99f5f12 Migrate more settings to use SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
2018-02-18 21:10:03 -08:00
Doris Ling
72489725c6 Change superclass to InstrumentedFragment.
- for fragments that do not implement the preference screen, change them
to inherit from InstrumentedFragment instead.

Change-Id: I791c2634024bd2c248efea955be5c680180d735c
Fixes: 68277111
Test: make RunSettingsRoboTests
2018-02-02 13:41:16 -08:00
Qingxi Li
0caad2f3ba Add checkbox for erase esim under network reset screen
This CL add a checkbox letting user decide when they reset the network
configurations under System > Reset options > Reset Wi-Fi, mobile &
Bluetooth, whether they want to reset eSIM together or not. If the user
choose to reset eSIM togather, EuiccManager#eraseSubscriptions will be
called and all the eSIM profiles will be removed.

Bug: 62961867
Test: E2E & make RunSettingsRoboTests
Change-Id: I533756b12c0474e8e58cc6fe60a38c119365cee2
2018-01-19 14:26:50 -08:00
Doris Ling
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -08:00