Commit Graph

2367 Commits

Author SHA1 Message Date
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
Manish Singh
aa91f1db3a Merge "Reset Private Space settings on new space creation" into main 2023-11-15 13:55:12 +00:00
Manish Singh
7a556b851c Reset Private Space settings on new space creation
Also added PrivateSpaceMaintainerTest

Bug: 310217645
Test: atest PrivateSpaceMaintainerTest
Test: atest HidePrivateSpaceControllerTest
Test: manual
Change-Id: Ic1096fd652d23ae6aa9da1421017c08f6bc480aa
2023-11-15 12:54:20 +00:00
Peiyong Lin
714490851f Merge "Unconditionally enable ANGLE developer option UI." into main 2023-11-15 01:38:35 +00:00
josephpv
30e841ce75 Add One Lock settings inside private space settings page
This includes below changes:
1. Add new sub settings page in Private Space settings with option to
   swithch between private profile lock and device screen lock
2. Call Private profile lock setup when swithcing to private lock from
   screen lock.
3. Preference to change private lock when a separate Private lock is set

Bug: 308862923
Test: atest UseOneLockPreferenceControllerTest,
PrivateSpaceLockControllerTest

Change-Id: I0a6d8c7dfbd0ffea19db03ffd6dfe7aa520c9684
2023-11-14 21:27:10 +00:00
Chaohui Wang
9e0bd18686 Fix restriction to configure Calls & SMS
Restriction UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS is added.

Fix: 278062379
Test: manual - apply restriction no_config_mobile_networks
Test: unit test
Change-Id: I87bf2269359bbceb989fa10524d55dd7ceb55de1
2023-11-14 09:48:52 +00:00
Jacky Wang
e4761149f3 Add cancel button to Erase all data (factory reset)
Bug: 300634367
Test: unit test & manual test
Change-Id: I860955291b27ea1f7c748ac746b91153224eacb7
2023-11-10 13:32:00 +08:00
Chaohui Wang
d8b21d7846 Avoid unnecessary Html.fromHtml()
Check if string contains html tag, before call Html.fromHtml()

Fix: 308681068
Test: atest SubscriptionsPreferenceControllerTest
Test: atest ProviderModelSliceHelperTest NetworkProviderWorkerTest
Test: manual - on Internet page
Change-Id: Id914689f2861a8c997d18afd03ecfdf47b91c631
2023-11-09 11:10:43 +00:00
Chaohui Wang
478ab50c01 Prevent Erase SIM during call
By collecting call state and only enable preference when idle.

Fix: 298893271
Test: manual - on Mobile Settings during call
Test: unit tests
Change-Id: Ifd567a6b68a3efbb0b42bfa0233f7c54eca07ae1
2023-11-08 03:08:56 +00:00
josephpv
380ac9a48e Adds Google account login during private space setup
This has the following changes:
1. On profile creation starts intent to add google account to the private profile for Pixel only devices.
2. On accout sign in failed show an error screen with message to try again.
3. Moves the lock setup fragment from private to main user which now calls the helper Activity as a private user which helps to setup lock. This activity can now also be called from the planned Secondary Auth settings page to set up private profile lock.
4. On set up complete use SHOW_WORK_APPS intent as a workaroud to start launcher.

Bug: 308397617
Test: Manual setup
Change-Id: I19b95375409f015b2a5d30fdad766c2f6baa634b
2023-11-03 13:50:55 +00:00
Zoey Chen
748cf7d747 Merge "Revert "[Regional Preference] Need to remove the metrics by the metrics concil"" into main 2023-11-02 12:19:58 +00:00
Treehugger Robot
12755950a9 Merge "Revert "[Regional Preference] Need to remove the metrics by the metrics concil"" into main 2023-11-02 08:12:08 +00:00
Joshua Mccloskey
ff69c0ca2d Merge "Rear Fingerprint Enrollment" into main 2023-11-01 21:10:47 +00:00
Zoey Chen
026dfe0aa0 Revert "[Regional Preference] Need to remove the metrics by the metrics concil"
This reverts commit ae32c8e8a5.

Reason for revert: <Add metrics>

Change-Id: I85631130b975df18e7f4f6056bae7f13cf56008f
2023-11-01 07:52:57 +00:00
Zoey Chen
291564a337 Revert "[Regional Preference] Need to remove the metrics by the metrics concil"
This reverts commit abe3265390.

Reason for revert: <Add metrics>

Change-Id: I483978ffc4f2df9035b664674912836d0711b9c6
2023-11-01 07:41:06 +00:00
Chaohui Wang
fe10785679 Merge "Check MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED" into main 2023-10-31 07:15:44 +00:00