Commit Graph

1373 Commits

Author SHA1 Message Date
David Liu
6ff8643e82 Add Tapjacking Protection for all screens extends StorageWizardBase in Settings.
Add/remove the SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS flag into/from all screens extends StorageWizardBase with lifecycle.

Bug: 255305175

Test: manual test with make RunSettingsRoboTests
Change-Id: I7ed9e2bf9bbebf6cd6b7e76ad47a6d4155eb2eb2
2023-05-03 21:11:35 +00:00
Chaohui Wang
8470122ad1 Fix ImeiInfoPreferenceControllerTest
For test case updatePreference_simSlotWithoutSim_notSetEnabled,
mSecondSimPreference is a mock, instead of check the default value of
isEnabled(), verify it's setEnabled() not called.

Fix: 279880808
Test: RobolectricTest
Change-Id: I72064820754e053def46bdbf10317189c7ac608f
2023-04-28 15:53:44 +08:00
Chaohui Wang
3cdad40840 Fix EID dialog related issues
Fix the following issues,
- After eid dialog dismissed, enter other page and back will trigger
  eid dialog again
- After screen rotation, dialog content disappeared

Fix: 277871671
Test: Manual
Change-Id: Ibd0ffb182cf69ea40e4b3fe0e8e840931d705df6
2023-04-23 15:49:52 +08:00
Zoey Chen
76bb350c73 [Settings] Do not set text if the fragment is not attached
Bug: 273415166
Test: loacl test
Change-Id: I5298727359191d8ce9c4526279faa4e8a3c1df43
2023-03-17 18:14:49 +00:00
Bonian Chen
ad209be4af [Settings] EID should be read out as phone number
EID need to support TTS.

Bug: 270517566
Test: local

Change-Id: I630e94cca8d240595546897ac17ae6c59366c84a
2023-02-23 08:45:25 +00:00
Bonian Chen
535b518ac9 [Settings] IMEI should be enabled regardless existance of SIM
Force IMEI fields always enabled.

Bug: 266877869
Test: auto

Change-Id: Ic164b3c171fd673cfb02d9973d4c210585198707
2023-02-15 10:16:36 +00:00
Bonian Chen
6d225b22f1 Merge "[Settings] Unified the source of phone number" 2023-02-13 12:38:14 +00:00
Bonian Chen
c9ace54b03 [Settings] Unified the source of phone number
Route UI access to phone number into a unified util class within
Settings app.

Bug: 265940535
Test: local

Change-Id: Ic747b0044217101d9a6a1e2cd6e59bbdbcd88021
2023-02-13 04:57:18 +00:00
Bonian Chen
eeee2d0d78 [Settings] Device without EID crash settings UI
Device without EID should hide the UI, and avoid from null pointer
exception.

Bug: 268104585
Test: local

Change-Id: I3e0016dbbae11d089de534b3fc383611719d7cbe
2023-02-08 06:21:57 +00:00
Bonian Chen
211920bc7c [Settings] Fix about phone crash no leave
Avoid from crash when LifecycleOwnerLiveData reports null during
destroy.

Bug: 267513122
Test: local

Change-Id: Ie541b0e5b81aa14bd064087c5343716b6bc066a3
2023-02-02 06:10:55 +00:00
Bonian Chen
5f9b1084c3 [Settings] Avoid from accessing LifecycleOwner when not available
Only access LifecycleOwner when available.

Bug: 266872811
Test: local

Change-Id: Id575a71e20e79f8efadb49af128c1a43c058acdd
2023-01-31 08:41:52 +00:00
Bonian Chen
7a714456fd [Settings] Support of Primary IMEI feature
Present primary IMEI information when there're multiple.

Bug: 260188417
Test: local

Change-Id: I7817fed506f8fc4fabd94f004c9a74b2fab25e10
2023-01-06 13:22:18 +00:00
Bonian Chen
25b403500f [Settings] Remove EID from SimStatusDialog
Remove EID field.

Bug: 260540995
Test: local
Change-Id: I0da91b6e0f21d11aa9ba1660e759b532eb7b7c35
2022-12-28 04:58:55 +00:00
XingHai Lu
7f919a3c1b Merge "Cleanup some plurals in Settings Change <one> to <1> in string res file, and update related java files. Test: Update, existing test still pass. bug: 199230342" 2022-12-23 02:34:31 +00:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00
Bonian Chen
dda58d5255 [Settings] Present EID in About phone page
Present EID within about phone page.

Bug: 260540995
Test: local

Change-Id: If5f512c1da6b4b3b1adc1d13dbe11226b7ecad41
2022-12-21 17:39:28 +00:00
Bonian Chen
ecbb3a2933 Merge "[Settings] Code Refactor for performance" 2022-12-21 09:43:12 +00:00
Bonian Chen
af8f04c3d1 [Settings] Code Refactor for performance
Reduce number of SubscriptionManager API queries.

Bug: 260540995
Test: local and auto
Change-Id: Ib05660d9ade7f352a7cc82d4065974aec396714a
2022-12-21 01:45:40 +00:00
Edgar Wang
8ee8602c68 Add metric for About phone > Device name > confrim dialog
Change-Id: Idbc15e8f42a183177a3cfa946c974d1ebd4d4f3c
BUG: 260072149
Test: rebuild
2022-12-19 05:41:24 +00:00
Bonian Chen
b7480f6713 Merge "[Settings] Add QR code for EID and enable text copy" 2022-12-12 12:50:51 +00:00
Bonian Chen
6a383db74b [Settings] Add QR code for EID and enable text copy
1. Add QR code for EID (when available)
2. Enable text copy

Bug: 260540995
Test: local
Change-Id: Iba7eace2ca3142a065219a3e65371af52df1511c
2022-12-12 12:50:28 +00:00
Bonian Chen
8138e44fde [Settings] Support search of each Sim slot status within about phone
Support searching of each SIM slot status within about phone page.

Bug: 260540995
Test: auto and local
Change-Id: If905fc595af566665fb1077a5ce11a967f7487aa
2022-12-09 09:26:11 +00:00
Bonian Chen
09b0edbdee [Settings] Code refactor
1. Adjust test case for improving testing performance
2. Some code refactor for avoiding from NullPointerException

Bug: 260540995
Test: auto and local
Change-Id: I18bd474304194137166c3c03ff828abdcd58473e
2022-12-08 07:17:13 +00:00
Bonian Chen
854eb4947a [Settings] Code refactor for performance
Perform query in the background thread to reduce the time required for
rendering UI.

Bug: 260540995
Test: local
Change-Id: I4286553b44b51752ae64a9bb2ce5656fe7e9b4e8
2022-12-07 06:28:44 +00:00
Bonian Chen
09bd704c45 [Settings] Code refactor - SIM slot UI preference key
Avoid from controlling Preference key separately in different places.

Bug: 261374879
Test: local & auto
Change-Id: I0a777c3f2511a25e8f619deba964bc343183c3cc
2022-12-06 05:12:19 +00:00
Bonian Chen
967bc7b044 [Settings] Code refactor - apply BasePreferenceController
Apply BasePreferenceController for better compatible with existing
softawre architecture.

Bug: 260540995
Test: local
Change-Id: I6d69ff878a062299b4d8478f6c0341b37a28532d
2022-12-02 17:23:38 +00:00
Bonian Chen
bfacd938f6 [Settings] Code refactor
Create PreferenceController for each of the Preference presented on
screen, which allows SettingsFragment better control the behavior of
Preference.

Bug: 260540995
Test: auto and local test
Change-Id: Iadd9c10fb353d6304d61e65687a505c71a53179a
2022-11-30 23:42:35 +00:00
Tetiana Meronyk
7eadcb9b20 Merge "Remove system user from displaying in Storage Settings in HSUM" 2022-11-30 12:51:22 +00:00
Tetiana Meronyk
db6b029287 Remove system user from displaying in Storage Settings in HSUM
Bug: 259525664
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.deviceinfo.storage.NonCurrentUserControllerTest"
Change-Id: I9425a9becdb89588da4a917c0ba9401d6b354238
2022-11-25 00:24:30 +00:00
Arc Wang
d132199429 Add page id enum for storage settings
- Add SettingsEnums.SETTINGS_STORAGE_CATEGORY_WORK

Bug: 260052338
Test: compilation
Change-Id: Ib3e30410c2e2f6367be8ac26cd63cdf16caef70e
2022-11-24 14:27:04 +08:00
Arc Wang
08d0f0439c Add page id enum for storage settings
- Add SettingsEnums.PRIVATE_VOLUME_FORGET
- Add SettingsEnums.PRIVATE_VOLUME_FORMAT
- Add SettingsEnums.PRIVATE_VOLUME_UNMOUNT
- Add SettingsEnums.PUBLIC_VOLUME_SETTINGS

Bug: 260051818
Test: compilation
Change-Id: If6188eb1de1e17702007d9d87c52b811972d5f7d
2022-11-23 06:22:28 +00:00
Arc Wang
bc736f3861 Merge "Should not show loading animation after size loading complete" 2022-11-20 02:25:40 +00:00
Arc Wang
ccf4fa052a Should not show loading animation after size loading complete
SettingsPreferenceFragment#setLoading(boolean loading, boolean animate)
shows loading animation when 'animate' parameter is true.

This change sets 'animate' parameter false to fix this issue.

Bug: 254003456
Test: manual visual
      Settings -> Storage -> Free up space -> back
      then see if loading animation shows.
Change-Id: Ic804bcf950a9c57297ccefd6e942edea0b792a3b
2022-11-18 17:34:00 +08:00
Sayak Dutta
e274c85474 Merge "Modify call to Header function of Glif Layout to disable autosize" into tm-qpr-dev am: 03ed8c0477 am: 3765a09a58
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20472167

Change-Id: Ic88e98b23b7724e99eb322b446e901d27bcb97fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 06:47:33 +00:00
Sayak Dutta
3765a09a58 Merge "Modify call to Header function of Glif Layout to disable autosize" into tm-qpr-dev am: 03ed8c0477
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20472167

Change-Id: I580b3e0944fe2d232a11e73a7e349c6564debd48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 06:19:40 +00:00
Arc Wang
6bd49c4f6d Merge "Fix can't access SD card from work profile" 2022-11-16 06:15:05 +00:00
Sayak Dutta
e4445a6e86 Modify call to Header function of Glif Layout to disable autosize
Bug: 245483008

Change-Id: I117e11f40764bf599bfa655755107342252ca891
2022-11-15 08:24:30 +00:00
Arc Wang
32785eb260 Fix can't access SD card from work profile
It may not be reasonable to access SD card from
work profile launched File apps. This change
hides 'Files' Preference for SD card in Storage
Settings.

Bug: 238386355
Test: manual visual
      Settings -> Storage -> SD card -> Work profile
Change-Id: Ibdbba930335cb4690a93fa6218b2991e13a3eca6
2022-11-14 22:21:16 +08:00
TreeHugger Robot
6fc971363b Merge "Add unaudited exported flag to exposed runtime receivers" 2022-11-04 08:13:28 +00:00
Bonian Chen
bf55048799 [Settings][Back port] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Merged-In: I8d7ddd18861a696830da39f040dfb14b9ed46726
Merged-In: I45b7898da440c36045aec64a0a86fb804116cd9d
Change-Id: I709a8007362b09dbb1ec1bd5d32c68d23ed0cfa9
(cherry picked from commit 2b048b22f0)
2022-11-04 07:06:23 +00:00
Bonian Chen
525529c137 Merge "[Settings][Back port] configuration for hidding SIM related UI" into tm-qpr-dev-plus-aosp 2022-10-31 15:49:21 +00:00
Arc Wang
c932da4b79 Fix Storage Settings summary jank
When switching dark theme, Settings homepage is re-created
and storage summary will be calculated in worker thread and
then be displayed after a short time.

Use cache to display the summary before latest summary is available.

Bug: 255459774
Test: manual visual
      Switch Dark theme and observe Storage settings summary.
Change-Id: I88c7190758a8bdf3a1a24137b9638ca3fb839887
2022-10-31 10:58:44 +00:00
Stanley Wang
1be259b75a Merge "Send pre-index intent when developer options changed" into tm-qpr-dev am: 18dd9b2307
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20307418

Change-Id: I2fbed4ebb333ef8a489dadc24147367754d50384
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 11:19:08 +00:00
Bonian Chen
2b048b22f0 [Settings][Back port] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Merged-In: I8d7ddd18861a696830da39f040dfb14b9ed46726
Change-Id: I709a8007362b09dbb1ec1bd5d32c68d23ed0cfa9
2022-10-28 09:49:21 +00:00
Stanley Wang
c0458b8a15 Send pre-index intent when developer options changed
Bug: 244521263
Test: manually test and review UI
Change-Id: I410dcc8ac8a9e131357a3e186e17b0d6363ad247
(cherry picked from commit 0b72d620a3)
2022-10-28 07:34:44 +00:00
Bonian Chen
a4aca19f8f Merge "[Settings] configuration for hidding SIM related UI" 2022-10-21 13:29:18 +00:00
Bonian Chen
5dae24208b [Settings] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Change-Id: I8d7ddd18861a696830da39f040dfb14b9ed46726
2022-10-21 09:21:59 +00:00
Tetiana Meronyk
9183d06d41 Merge "Show other users in storage settings" 2022-10-20 16:20:41 +00:00
Tetiana Meronyk
5c0bb75de8 Show other users in storage settings
Bug: 232969364
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.deviceinfo.storage.NonCurrentUserControllerTest"
Change-Id: I8d933bec8f12faa971684939b722cfae957f4953
2022-10-19 10:44:06 +00:00
Bonian Chen
99698c344c Merge "[Settings] align the long press behavior on secondary sim" am: 90dcc7c5c1 am: 5f5bcf56ca am: 6b6287111f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2261204

Change-Id: I65b87ec068d0b5ce0948937604f71ccb4ba6e6ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 09:50:23 +00:00