Commit Graph

2382 Commits

Author SHA1 Message Date
SongFerngWang
c6eba747db [Sim UI enhancement] remove the "Tap to show info"
Bug: 318310357
Bug: 298898436
Bug: 298891941

Test: atest PhoneNumberPreferenceControllerTest
atest ImeiInfoPreferenceControllerTest
atest SimEidPreferenceControllerTest

Change-Id: Iadd82173b55b8f66409c1ff056dd4c323d6dcc35
2024-01-31 11:14:38 +00:00
SongFerngWang
8535539582 [Sim UI enhancement] MobileNetworkSettings UI enhancement
- Add the phone number
- Add the mobile network(SPN)
- Add the IMEI
- Add the EID
- Remove the mobile data
- Remove the Auto data switch
- Remove the calls and SMS default subscription

Bug: 318310357
Bug: 298898436
Bug: 298891941

Test: atest MobileNetworkEidPreferenceControllerTest
atest MobileNetworkImeiPreferenceControllerTest
atest MobileNetworkPhoneNumberPreferenceControllerTest
atest MobileNetworkSpnPreferenceControllerTest
atest MobileDataPreferenceControllerTest
atest MobileNetworkSettingsTest

Change-Id: Ie2767056dd04d1131390e3a03d6d82d56fe5b2dc
2024-01-31 07:45:28 +00:00
Chun-Ku Lin
1d1b9e451f Move the default shortcut types in a separate utility method.
Bug: 322701168
Test: atest
Flag: N/A (Strict mechanical refactors, no behavior change)
Change-Id: I1beb36e5aeeec0f303228b57baf034a000a72b75
2024-01-29 02:17:49 +00:00
Chun-Ku Lin
5a921fffb7 Merge "Save the user preferred shortcut on Edit A11yShortcut screen" into main 2024-01-28 11:17:10 +00:00
Chun-Ku Lin
f9ae13a73d Save the user preferred shortcut on Edit A11yShortcut screen
We saved the user preferred shortcut in the a11y feature's detail page.
Since now the Edit A11yShortcut screen is a standalone screen, we might
want to keep the existing behavior to update the user preferred shortcut
types when the edit screen is shown or when the shortcut settings are
updated.

Bug: 300302098
Test: atest
Test: manual
    - Go to an a11y feature page and open the Edit shortcut screen
    - Remove all selected shortcut option
    - Select volume key shortcut option, and deselect volume key
      shortcut option
    - Go to home page and close the Settings app
    - Go to the same a11y feature page and click on the shortcut toggle
    - Expect the volume key shortcut is turned on
Flag: ACONFIG
com.android.settings.accessibility.edit_shortcuts_in_full_screen
TRUNKFOOD

Change-Id: I2c92ec56d6e45317406f3a4b8ef8f076c398df7f
2024-01-28 00:21:31 +00:00
Hakjun Choi
833714434a Remove unnecessary term 'all' from the API name
getAllSatellitePlmnsForCarrier > getSatellitePlmnsForCarrier
The word 'all' is unnecessary here, it's already implied by PLMN being a plural.

Bug: 320462244
Test: atest SatelliteManagerTet, NetworkSelectSettingsTest
Change-Id: Idb6439176be55a787f27f298c211deef6900c7f9
2024-01-27 20:56:41 +00:00
Kyle Zhang
65f7a75f28 Merge "Add test ForceL3FallbackPreferenceControllerTest" into main 2024-01-24 18:21:23 +00:00
SongFerngWang
533e045598 Using new API setDataEnabledForReason for setDataEnabled
Bug: 318310357
Bug: 298898436
Bug: 298891941
Test: atest MobileNetworkUtilsTest
Change-Id: I30b56247370ebaa5896bec3205ddce3e5c92c7d0
2024-01-24 04:46:53 +00:00
Kyle Zhang
bd942cf0d3 Add test ForceL3FallbackPreferenceControllerTest
Bug: 301669353
Test: atest -c ForceL3FallbackPreferenceControllerTest
Change-Id: I182388fa67ac408a2fcf16a6b9599d0971c895d0
2024-01-24 02:46:14 +00:00
Ling Ma
9c3ad34d6e 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: Ib5ccc841029a32ae9cf25d7a65b156e363d6b139
2024-01-20 05:28:14 +00:00
Becca Hughes
87117b0183 Merge "Add buttons for new settings design" into main 2024-01-19 22:05:14 +00:00
Becca Hughes
782fcb9bd5 Add buttons for new settings design
This adds a new class called PrimaryProviderPreference
which is responsible for laying out the old cog view if
the feature is disabled and the new button view if it
is enabled.

Screenshots:
https://hsv.googleplex.com/5109836204212224
https://hsv.googleplex.com/5574754636398592
https://hsv.googleplex.com/6737135727017984

Change-Id: I1ad0c59a4afc5be3694b499f66bbd7306dfbee69
Test: Manual test with flag on + off & unit tests
Bug: 300979487
2024-01-19 19:42:14 +00:00
Johannes Gallmann
d28730e07a Merge "Change predictive back system animations flag to runtime flag" into main 2024-01-17 10:55:24 +00:00
Johannes Gallmann
161f280616 Change predictive back system animations flag to runtime flag
Bug: 320510464
Flag: ACONFIG com.android.systemui.predictive_back_system_anims DISABLED
Test: presubmit
Change-Id: I591133ce8d4c85c7c056b66f1c21ce8d0c40960e
2024-01-16 19:25:10 +00:00
Wu Ahan
a9913cb74c Add SfpsRestToUnlockFeature to FingerprintFeatureProvider
Bug: 296179618
Test: manually
Test: SettingsUnitTests
Change-Id: I452610e2c2b36f56dc4ade1cea1a15fdc088211f
2024-01-16 02:15:33 +00:00
Hakjun Choi
6a29eb7b15 Merge "Filter out satellite plmn when in SAT mode" into main 2024-01-12 22:11:48 +00:00
josephpv
099ae32943 Add auto lock preference inside private space settings
This includes below changes
- Adds perference for Auto Lock settings inside private space settings page.
- Feaure is behind flag
android.multiuser.support_autolock_for_private_space

Screenshots:
go/ss/ZCaYGWMDdH8bQNz.png
go/ss/AxnD8DviiT5hhkW.png
go/ss/9TMYmacyiVhyexB.png
go/ss/6SzhkGfTbDYVUVE.png

Bug: 312893140
Test: atest AutoLockPreferenceControllerTest, atest AutoLockPreferenceControllerTest

Change-Id: I95beb9d71c709002e17307e612c60b2f5087290b
2024-01-12 19:12:30 +00:00
Becca Hughes
42bcdcfdfd Merge "Make provider icon sizes consistent" into main 2024-01-12 17:23:03 +00:00
Becca Hughes
7dca691308 Make provider icon sizes consistent
Fixes an issue where the icons under "additional providers"
are not the same size. Also, fixes the unit tests for
CredentialManagerPreferenceController.

https://hsv.googleplex.com/4797855484084224

Test: unit tests and manual on device tests
Bug: 278772478
Change-Id: I88d8694189a7529ccc2d92bf1b74bb5bf2268f46
2024-01-12 16:19:47 +00:00
Hakjun Choi
197a10a0a9 Filter out satellite plmn when in SAT mode
[SAT-070] : PLMNs associated with SAT MODE, as specified in SAT-008, should not be displayed or selectable in Manual Selection/Network Operator Menu

Bug: 316264277
Test: Manual test with pixel in live network
Test: atest NetworkSelectSettingsTest

Change-Id: Ic100772c97fa1ab18d7e63b654e397d8a80eda8a
2024-01-11 07:14:30 +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
Chaohui Wang
df5c4f69a8 Fix DataUsageSummaryPreferenceController ANR
By off load data loading to background.

Fix: 295260929
Test: manual - on Mobile Settings
Test: unit test
Change-Id: Ib2ef19301b1e97af8a7f3861829779c3b70da4a4
2024-01-05 16:07:28 +08:00
Treehugger Robot
e8d26737a6 Merge "Reset telephony stack during Reset Mobile Network flow" into main 2024-01-05 04:49:29 +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
Chaohui Wang
7cbfc40681 Migrate NetworkOperatorPreference to Kotlin
Bug: 293845605
Test: manual - with SIM Settings
Test: unit test
Change-Id: I5c21085a4ec9c2f53f93867813ba298690f161ff
2024-01-04 13:02:31 +08:00
Chaohui Wang
e3b527a2bf Refactor CellInfoUtil
Unify and simplify the logic, and add unit test.

Bug: 293845605
Test: manual - on Mobile Settings
Test: unit test
Change-Id: I5467b92baa8e47fbd400c7a21fd39fd5ec90ed3a
2024-01-03 13:41:45 +08:00
Chaohui Wang
355144675a Fix ANR in WifiCallingPreferenceController.getAvailabilityStatus
Move the following to background thread to avoid block main thread,
- MobileNetworkUtils.isWifiCallingEnabled(mContext, mSubId, null)
- MobileNetworkUtils.buildPhoneAccountConfigureIntent()
- getSummaryForWfcMode()
- Call State

Since WifiCallingPreferenceController no longer calculate availability
in getAvailabilityStatus(), also update the
CallingPreferenceCategoryController accordingly.

Also introduce ImsMmTelRepository for split business logic for easy
testing.

Fix: 292401934
Test: manual - on Mobile Settings
Test: unit test
Change-Id: If92e2c8f6e137e40b83e578294c03c1b917eef8e
2023-12-29 17:16:49 +08: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
Chaohui Wang
851996d01c Clean up ServiceStateStatus
And LifecycleCallback*, which is no longer used.

Bug: 299068234
Test: m Settings
Change-Id: I29ce5609db2a4b249477da1bcbb0502fa04902fa
2023-12-28 16:58:42 +08:00
Chaohui Wang
2ec3840987 Improve AutoSelectPreferenceController
Deprecate ServiceStateStatus (which could produce wrong value),
and replaced with serviceStateFlow.

Fix: 299068234
Test: manual - turn auto select off and on
Test: unit test
Change-Id: I42fe160500c68cc9ee0fe383121f64146ddbb7f2
2023-12-28 16:58:42 +08:00
SongFerng Wang
4ee6d84eb4 Merge "Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete" into main 2023-12-26 06:47:44 +00:00
Rambo Wang
5e27df82ee Merge "Support reset IMS stack in Reset Mobile Network flow" into main 2023-12-22 18:19:37 +00:00
Graciela Putri
c9660627ea Merge "[3/n] Pre-select fullscreen option if overridden" into main 2023-12-22 16:45:02 +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
Graciela Wissen Putri
480d523a0c [3/n] Pre-select fullscreen option if overridden
Settings > Apps > Aspect ratio (experimental)

Pre-select the fullscreen option if all are true:
- device manufacturer has overridden app to fullscreen
- app has not opted out of orientation override
- app has not opted out of user's fullscreen option
- user has not set any aspect ratio (USER_MIN_ASPECT_RATIO_UNSET)

"App default" will have a new value of USER_MIN_ASPECT_RATIO_APP_DEFAULT
if device manufacturer has overridden app to fullscreen, which will
behave the same as USER_MIN_ASPECT_RATIO_UNSET without the
device-applied fullscreen override.

Bug: 310816437
Test: atest UserAspectRatioDetailsTest
      atest UserAspectRatioManagerTest
      atest UserAspectRatioAppPreferenceTest
Change-Id: I6be634bb4369292687b865ce30d902540419183c
2023-12-22 13:15:56 +00:00
SongFerng Wang
ba2a86ad9f Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete
Sometime modem can't return the GET_SIM_STATUS immediately, so that the settings send the sim switching too early after simSlotMapping.

Bug: 291733084
Change-Id: If547c8b02020bc86c83915334e29945176a4ee9f
Test: tester will test it manually.
2023-12-22 05:57:53 +00:00
Chaohui Wang
28b85b5810 Refresh "Choose network" summary when service state changes
This summary display service connection state, which should be refreshed
when service state changes.

Fix: 313026209
Test: manual - on Mobile Settings
Test: unit test
Change-Id: I6ca2f89e05f21460a7db055f037919b6ebd19182
2023-12-20 16:19:08 +08: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
josephpv
0b7d46746c Add Biometrics settings inside private space One Lock settings
This includes below changes:
- Add Biometrics preferernce in Private Space One Lock settings page
- Face and Fingerprint enrolment for Private profile
- Feature is behind flag android.multiuser.enable_biometrics_to_unlock_private_space

Screenshots:
go/ss/9cWZRAuvGGW7gMm.png
go/ss/B3NoFbL3KbpSzeN.png
go/ss/7xH3DLi9d6Lu2mR.png
go/ss/8WBEgKychWpduXg.png
go/ss/8pmPGshd9aiPvVC.png
go/ss/AFPBPbiaBBvTj3p.png
go/ss/3fE4XKLLUdP8LmF.png

Bug: 308862923
Test: atest CombinedBiometricStatusUtilsTest, atest FaceFingerprintUnlockControllerTest
Change-Id: I1853107a4df4fc97db53c97524c6d44a4f554e37
2023-12-19 18:57:10 +00:00
Matías Hernández
907b47105b Tag Zen operations from Settings as coming from the user
Bug: 308670715
Test: atest ApprovalPreferenceControllerTest
Change-Id: Id118f867e84f3d742db6b12eab0f34df1357d178
2023-12-18 13:32:32 +01:00
josephpv
d2d3453f81 Update USER_SETUP_COMPLETE setting after starting private space
On setting USER_SETUP_COMPLETE for private profile device is reapplied
to the profile

Bug: 311348071
Test: Verified device theme color is applied to profile
Change-Id: I25f3013aaf6cfc6925d858b461c1f2c6beb534f6
2023-12-13 14:31:47 +00:00
josephpv
242ae4fbcc Lock Private space at the end of PS setup.
This change is to call UserManager requestQuietModeEnabled() API at the
end of PS setup to enable quitemode for private space.

Bug: 313652502
Test: atest PrivateSpaceMaintainerTest
Verify Private space is locked state after private space setup completion.

Change-Id: I1d863f6d51ffa4bb58318696603905d35c3109b6
2023-12-11 20:43:59 +00:00
Johannes Gallmann
af96028267 Add predictive back aconfig flag
Bug: 309545085
Flag: ACONFIG com.android.window.flags.predictive_back_system_animations DISABLED
Test: atest BackAnimationPreferenceControllerTest; Manual, i.e. building and verifying correct behaviour for different flag configurations
Change-Id: I3f478dc23bbfeb1f13cae64f3d04b3210841731d
2023-12-08 13:37:25 +00:00
Weng Su
129ff9b8fe Fine-tune launch time in Network & Internet settings
- Avoid creating WifiPickerTracker if Hotspot network feature is not enabled

Fix: 312905628
Test: unit test
atest -c InternetPreferenceControllerTest

Change-Id: I5818698ce06244aa7660e90a5f2fd372a3a221bf
2023-11-28 06:51:39 +08:00
Chaohui Wang
a39905eabd Clean up unused MobilePlanPreferenceController
Which can improve the latency of "Network & internet" page.

Bug: 311604902
Test: manual - on "Network & internet" page
Change-Id: If306e93491402278ede4f20591296765b30bde37
2023-11-24 23:55:14 +08:00
Weng Su
203931d038 Show Hotspot network in Network & internet settings
- Show Hotspot icons

- Show getAlternateSummary instead of original getSummary

Fix: 308187592
Test: unit test
atest -c InternetPreferenceControllerTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a9ea40dc71362b372c5adc89b82dbe2024253688)
Merged-In: I8afe54edebc904c9ec936f5851a33c6c20f13e29
Change-Id: I8afe54edebc904c9ec936f5851a33c6c20f13e29
2023-11-22 09:58:07 +00:00
Zoey Chen
a76af961b2 [Regional Preference] Remove string from metrics
Bug: 296544040
Test: atest NumberingSystemItemControllerTest
Change-Id: I1e1dd678011a15bc22b167ddd12651a22f62dea9
2023-11-21 06:19:01 +00:00
Chaohui Wang
1a2bf18eae Merge "Fix restriction to configure Calls & SMS" into main 2023-11-16 03:32:37 +00:00