Commit Graph

416 Commits

Author SHA1 Message Date
Chaohui Wang
ec59cd0c8b Move mobile data logic into MobileDataRepository
Bug: 347224962
Flag: EXEMPT refactor
Test: manual on Mobile Settings
Test: unit
Change-Id: I2b54f9e6c4addafd31d7d96f2a44870cd54fe185
2024-06-20 11:49:06 +08:00
SongFerng Wang
0cc20946c8 Merge "Add metricsCategory for dualsim and apnEdit" into main 2024-06-14 09:25:47 +00:00
songferngwang
d4e467ed4a Add metricsCategory for dualsim and apnEdit
Bug: 347091697
Test: Build pass
Change-Id: I783a45269112d91d79c00af41c0052ba488603d2
2024-06-13 23:00:29 +00:00
Chaohui Wang
2717f70ac0 InternetPreferenceController V2 (3/n)
Add DataSubscriptionRepository, when cellular connection,
show the active subscription name.

Bug: 339884322
Flag: com.android.settings.flags.internet_preference_controller_v2
Test: manual - on Internet
Test: unit test
Change-Id: If2a3e7f8df1b1ed89bc760ec5165182b3e9b64a8
2024-06-12 15:33:38 +08:00
Tom Hsu
c417d19839 Merge "Avoid to save result of blank input." into main 2024-06-06 08:43:37 +00:00
tomhsu
6be77d05cb Avoid to save result of blank input.
- Disable "Save" button if no input or only space chars.

fix: 335763360
Test: Manual test
Test: atest pass
Change-Id: Ied5f98ec0ce7d1f38f626211cb9f465781781cd8
2024-06-06 07:27:04 +00:00
Chaohui Wang
3362e5d14a Refactor PrintSettings (1/n)
Add PrintRepository for display Print services.

Bug: 320076351
Flag: com.android.settings.flags.refactor_print_settings
Test: manual
Test: unit test
Change-Id: I1ea52508d504161675eeffeb3ec077caa641cb2c
2024-06-05 13:14:08 +00:00
Chaohui Wang
f557b1f45b Merge "Move logic about hide system / root UID apps" into main 2024-06-05 04:00:16 +00:00
SongFerng Wang
ded1c459b0 Merge "To hide the mobile data when there is no active sim" into main 2024-05-30 10:59:32 +00:00
songferngwang
b48ec2f772 To hide the mobile data when there is no active sim
Bug: 343633243
Test: verified the UI
Change-Id: I77055a9c1cdb7e94c0339f4255b4799b7b6e02ac
2024-05-30 09:24:25 +00:00
Chaohui Wang
1bfea5d472 Check if ECBMode when deactivate SIM card
If in ECBMode, start ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS to show a
dialog instead.

This align with the current airplane mode switch.

Fix: 191943857
Test: adb shell cmd phone emergency-callback-mode
Test: unit test
Change-Id: Icf646cd76990d621121b4367ec0fd02a3880b85c
2024-05-30 16:37:51 +08:00
Chaohui Wang
942622575a Disable "Reset app preference" during call
Reset app preference will dismiss all the notification, disable
"Reset app preference" during call so in call notification not get
dismissed.

Fix: 342627537
Test: manual - try "Reset app preference" during call
Change-Id: Ida9961ca30dc80c05d4de5bc9faac3203967f3d3
2024-05-30 05:44:14 +00:00
Tom Hsu
49abe4c03d Merge "Fix when edittext only has space and cause name look like blank" into main 2024-05-29 05:08:07 +00:00
tomhsu
d5556c59e9 Fix when edittext only has space and cause name look like blank
fix: 335763360
Test: Manual test. see b/335763360#comment14
Test: atest passed
Change-Id: I9ebae13039d7b78b7acfea545a89d3096aa82c31
2024-05-29 03:42:35 +00:00
SongFerng Wang
b462f9fa11 Merge "The pages of sim onboarding flow is wrong." into main 2024-05-28 19:58:55 +00:00
songferngwang
98efa51681 The pages of sim onboarding flow is wrong.
Switch from SS mode to DSDS mode, the esim status will use the last
status. It causes the condition of page selection is wrong.

Bug: 342972402
Test: atest SimOnboardingPageProviderTest
Change-Id: I8bb0b5f2802ec24f10467bac179ce54d13a9755e
2024-05-28 08:47:23 +00:00
Chaohui Wang
59a28a244c Setup backup calling for new UI
Backup calling new handles by CrossSimCallingViewModel.
CrossSimCallingViewModel keep monitoring the active SIMs, and setup
backup calling if needed.

Fix: 340444839
Test: manual - SIMs
Test: manual - Mobile Settings
Test: unit test
Change-Id: I0a3451f1e8c3984b2348cf628fb1d91ce7aaecec
2024-05-27 15:16:33 +08:00
Amith Yamasani
5953a3386c Merge "Add a source parameter for resrictions logging" into main 2024-05-23 18:54:49 +00:00
Amith Yamasani
8b37c093b7 Add a source parameter for resrictions logging
Modify existing callers to use the new parameter

Bug: 341112680
Test: statsd_testdrive 866
      Manually change battery restriction level for an app
Flag: android.app.app_restrictions_api
Change-Id: I66f23341b90f96eb3091b94ab6db512570988643
2024-05-22 16:15:29 +00:00
Chaohui Wang
162796b6fe Merge "Create AppForceStopRepository" into main 2024-05-22 05:53:39 +00:00
Chaohui Wang
e5c231f8a9 Move logic about hide system / root UID apps
Same logic moved to super class.

Bug: 340413642
Test: manual - on toggle permission pages
Change-Id: I5c2796c69f9481255551c3aa191738875cf003f3
2024-05-21 05:42:21 +00:00
Chaohui Wang
e0d86be017 Fix default mode for AlarmsAndRemindersAppList am: 83aeb45f3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27391745

Change-Id: Ib16f3abadd2428f090ff9f28c9ea5045f64897be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-21 05:35:34 +00:00
Chaohui Wang
83aeb45f3c Fix default mode for AlarmsAndRemindersAppList
When app ops permission's app ops mode is default, should check if
permission is grant.

Fix: 339846642
Test: manual - on AlarmsAndRemindersAppList
Test: unit test
Change-Id: Ia0f05211f5774637304502ead79dd98a1cf89886
2024-05-21 03:37:47 +00:00
Chaohui Wang
7a8d8fd091 Reapply "Migrate AppOps"
This reverts commit 19b01bd68b.

Bug: 341016088
Test: manual - on Special app access
Change-Id: I000274ae9c725f848e1c8910120ba886fcc5be95
Merged-In: I000274ae9c725f848e1c8910120ba886fcc5be95
2024-05-21 03:20:04 +00:00
Faye Yan
a7065f4d36 Revert "Add Voice activation apps into Settings->Apps->Special a..."
Revert submission 25108596-va-special-access

Reason for revert: voice activation is not going in V

Reverted changes: /q/submissionid:25108596-va-special-access

Bug: 306447565
Bug: 393727896

Test: presubmit

Change-Id: I4977e7d543cb800fc9fb6962bba3afebb9480dcc
Merged-In: I4977e7d543cb800fc9fb6962bba3afebb9480dcc
2024-05-20 11:56:48 +08:00
Faye Yan
f6b5904511 Revert "Add Voice activation apps into Settings->Apps->Specific app->AppInfo->Voice activation apps"
This reverts commit 7f2fbc2e4c.

Reason for revert: voice activation is not going in V

Test: manual - on Special app access
Change-Id: Idfabfd48f45d2ace7de9f8498181f281ad0358a1
Merged-In: Idfabfd48f45d2ace7de9f8498181f281ad0358a1
2024-05-20 11:56:47 +08:00
Chaohui Wang
fb48926fe8 Reapply "Migrate AppOps"
This reverts commit 19b01bd68b.

Bug: 339846642
Test: manual - on Special app access
Change-Id: I000274ae9c725f848e1c8910120ba886fcc5be95
2024-05-20 10:39:30 +08:00
ELIYAZ MOMIN
67c0cd96d9 Revert "Migrate AppOps" am: 19b01bd68b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27382787

Change-Id: Iaa26113d70e2ee8792aa75bc625b2c68bc50f81d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 14:52:17 +00:00
ELIYAZ MOMIN
19b01bd68b Revert "Migrate AppOps"
Revert submission 27392016-cherrypick-AppOpsController-AppOps-w48m53c1or

Reason for revert: <Potential culprit for b/341210811- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Reverted changes: /q/submissionid:27392016-cherrypick-AppOpsController-AppOps-w48m53c1or

Change-Id: Ib9813a48170f4ef38de9eee811c677ad75f5401e
2024-05-17 10:48:57 +00:00
Chaohui Wang
d5d70536e8 Migrate AppOps am: 4573df2aaf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27378716

Change-Id: I2f099b8dd3c205f1eb467b3fc3d03a19cc978b74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 06:31:51 +00:00
Chaohui Wang
4573df2aaf Migrate AppOps
Bug: 339846642
Test: manual - on Special app access
Change-Id: I988bdf85036478d8e6d87a3b5a1a46a35df38422
2024-05-17 02:57:31 +00:00
Song Chun Fan
4c02f29871 Merge "[Install-unknown-apps] Hide apps of system or root UID" into main 2024-05-14 03:04:13 +00:00
Chaohui Wang
298b738171 Create AppForceStopRepository
Use Intent.ACTION_QUERY_PACKAGE_RESTART for more accurate app state.

Fix: 340150349
Test: manual - on App info
Test: unit test
Change-Id: I1fb634b3fbee200f2251afa37ef2cba88ff58fe0
2024-05-13 19:21:39 +08:00
Chaohui Wang
b63ed17b94 Merge "Use DataUsageFormatter to format app data usage" into main 2024-05-13 08:06:38 +00:00
Chaohui Wang
7ca1ceb722 Use DataUsageFormatter to format app data usage
Use the new unitsContentDescription from Formatter.formatBytes()

Fix: 318780411
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I55079c83db2e46a48f49f746f2371825ec0bb029
2024-05-13 12:41:27 +08:00
Chaohui Wang
881c19480a Fix isSubscriptionEnabledFlow crash
When INVALID_SUBSCRIPTION_ID.

Fix: 338014486
Test: unit test
Change-Id: I97b5f005fb99473c2712f9643704a35cfaeecfac
2024-05-13 11:25:46 +08:00
Chaohui Wang
8c507e871b Catch exception in telephonyRepository.isDataEnabledFlow
And migrate BillingCycleRepository to use it.

Fix: 339197552
Test: manual - on data usage
Test: unit test
Change-Id: Ieac295f37fdbf75d184d66ea11f170652af3ec5f
2024-05-09 15:49:26 +00:00
Song Chun Fan
f6bbda8984 [Install-unknown-apps] Hide apps of system or root UID
This also reverts ag/27176160, which handled apps like Settings but missed pre23 apps. A better solution would be hide apps that are of system or root UID.

BUG: 338066634
Test: manual

Change-Id: Ia1c3f50dd7c5edb718c695737db589ef55173682
2024-05-08 19:24:01 +00:00
songferngwang
d3c336a58f To correct the DDS when the user turn on mobile data
If there is only one sim and the DDS is -1, when the user turns
on the mobile data, the settings should correct the dds and set the
mobile data on.

Bug: 339382631
Test: Verify UI
Change-Id: Ib0304dc1370a0d76310da2ce6ce0de12bfb275d8
2024-05-08 11:50:31 +00:00
Treehugger Robot
ecfed70bb3 Merge "[Install-unknown-apps] not include all the apps that have OP_REQUEST_INSTALL_PACKAGES granted" into main 2024-05-07 06:21:55 +00:00
SongFerng Wang
ceda48c70c Merge "Add the OtherSection for NetworkCellularGroupProvider" into main 2024-05-07 04:58:28 +00:00
songferngwang
8b2305acd4 Add the OtherSection for NetworkCellularGroupProvider
Bug: 338914255
Test: Verified the SIMs UI
Change-Id: I49d5e4126e43054b5d147de15d35805d1e445c38
2024-05-06 10:16:02 +00:00
Chaohui Wang
5058a7f3b5 Adjust padding on SIM onboarding screens
Fix: 330899892
Test: visual - on Sim Onboarding Page
Change-Id: I2f09d8fc20ad9c51bb5d8c9fae703433a7f87ed8
2024-05-06 03:09:02 +00:00
Song Chun Fan
ba39bd6edd [Install-unknown-apps] not include all the apps that have OP_REQUEST_INSTALL_PACKAGES granted
Due to a recent change in AppOpsService, apps that share system_uid have all the appops granted. However, we don't want them to be listed under "Install unknown apps" if they don't explicitly declare the permission usage of REQUEST_INSTALL_PACKAGES in their manifest. This CL fixes that.

Change-Id: I025bc17c335093ae5d3b15a3bef67d659c8f790f
BUG: 338066634
BUG: 336677341
FIXES: 338066634
Test: manual by checking the Settings page
2024-05-03 21:48:16 +00:00
Chaohui Wang
377a7a3054 Check isActivationChangeableFlow in SimPreference
Fix: 336209156
Test: manual - SimPreference
Change-Id: I8745e05dbab9701b9c046137fe76d98880a7b20a
2024-05-01 14:15:36 +00:00
SongFerng Wang
07c7cd6702 Correct the wording of mobile data summary
Bug: 337035270
Change-Id: Idc65508e8d4f68376fdfdba873ad049362445ac2
Test: verify the wording
2024-04-30 07:28:09 +00:00
Ivan Chiang
dade97f27c Merge "Add the different summary for the app store details" into main 2024-04-29 04:26:18 +00:00
Manish Singh
544fa52e1a Merge "Don't show uninstall for all users" into main 2024-04-25 09:30:05 +00:00
Ivan Chiang
6afb9ece62 Add the different summary for the app store details
When the initiating package is different from the installing package,
show the different summary. E.g WebApk

Test: atest AppInstallerInfoPreferenceTest
Bug: 329140383
Change-Id: Icd5559bce06c059844269d70926b3c0b39589edb
2024-04-25 02:41:33 +00:00
Treehugger Robot
5ef0fe533e Merge "Prevent blank sim label showing on screen." into main 2024-04-24 05:14:03 +00:00