Commit Graph

1347 Commits

Author SHA1 Message Date
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
Bonian Chen
5f5bcf56ca Merge "[Settings] align the long press behavior on secondary sim" am: 90dcc7c5c1
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2261204

Change-Id: Icece91f8119388bbf7bca7129b9f077bc0c857a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 08:32:33 +00:00
Bonian Chen
7364b9bbe3 [Settings] align the long press behavior on secondary sim
Within Settings app, long press allows user to copy status/summary part
when it comes to first SIM.

This is a commit to enable the same feature on the second sim.

Test: local
Change-Id: I58d9cf9cbba213196536781d41b9ec81c0142960
2022-10-19 01:47:11 +00:00
Michael Groover
6ce57b67fb Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting U or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the U release.

Bug: 234659204
Test: Build
Change-Id: I8fbcf69575d829f26e02d661498d69f5fc8740d0
2022-10-11 17:26:02 -05:00
Arc Wang
f474582ada Merge "Fix USB OTG hot plug out nndexOutOfBoundsException" am: 6626e50dd8 am: 99cb9d91f1 am: 9f04b02571 am: 9a2052945a am: 7b7c62d78a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2222981

Change-Id: I7b06e7905c0556428bf0453e7a7e8d35013a8b11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-28 04:54:48 +00:00
Arc Wang
7b7c62d78a Merge "Fix USB OTG hot plug out nndexOutOfBoundsException" am: 6626e50dd8 am: 99cb9d91f1 am: 9f04b02571 am: 9a2052945a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2222981

Change-Id: I69f24f5a63070e84af70bd050dca789ef34b16ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-28 04:26:01 +00:00
Arc Wang
6626e50dd8 Merge "Fix USB OTG hot plug out nndexOutOfBoundsException" 2022-09-28 01:22:51 +00:00
ot904699
aa76620073 Fix USB OTG hot plug out nndexOutOfBoundsException
Open Settings, then open Storage , plug in USB OTG with Disk, select Disk, open Files, play a video, press the back key, hot plug out USB OTG, the IndexOutOfBoundsException will happen

The root cause is when received the onVolumeStateChanged in StorageEventListener in StorageDashboardFragment, the volumeInfo
status is VolumeInfo.STATE_UNMOUNTED or VolumeInfo.STATE_EJECTING, mSelectedStorageEntry set to changedStorageEntry, cause the fail.

This is a fix for CL 225095144 bug.

Bug: 247737688
Test: Manual

Change-Id: I9535c49d65c42a8dfa8ccf4e271ae973d944d4b9
2022-09-26 08:15:48 +00:00
Treehugger Robot
eff730475e Merge "Settings: Protect sensitive data on the about phone" am: 4d5951c6ef am: 61d8dee2a0 am: 41e0e6fea7 am: 984e74a32e am: 5d95b855dc
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2146259

Change-Id: I147a3065c4b214508b325c02e95da68ad22fec0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 10:57:12 +00:00
Treehugger Robot
5d95b855dc Merge "Settings: Protect sensitive data on the about phone" am: 4d5951c6ef am: 61d8dee2a0 am: 41e0e6fea7 am: 984e74a32e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2146259

Change-Id: Ib32baeda6471ed9a8a2e5aa2cd84088505c1f7ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 10:26:46 +00:00
Daniel Sandler
4592c110e0 Merge "Launch the platform easter egg in a new task." into tm-qpr-dev am: e43bf3cd9d am: ba81fe61cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20003711

Change-Id: I76b538e6df566b1cbd9f6f36e9813e71768bb0f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 00:30:19 +00:00
Daniel Sandler
ba81fe61cf Merge "Launch the platform easter egg in a new task." into tm-qpr-dev am: e43bf3cd9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20003711

Change-Id: I794c118911d6d2fa47ff9190a6108fc1e3d0f11c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 23:22:53 +00:00
Dan Sandler
5eeb6c3792 Launch the platform easter egg in a new task.
This ensures that when PlatLogoActivity is launched on a
large-screen device, it properly takes over the full screen
(and doesn't hide the status bar for Settings!).

Bug: 243407943
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FirmwareVersionDetailPreferenceControllerTest
Change-Id: Icf10aa43e5b4a27a2fa98ea41b5a9e9cf659e895
2022-09-20 20:10:17 -04:00
Sayak Dutta
5e168a5e7d Merge "Fix following three issues in SD Card UX" into tm-qpr-dev am: f57f988349
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19967364

Change-Id: I17bafb783c166f5681326c3fbb0a8f2040c62a19
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-18 06:21:10 +00:00
Sayak Dutta
b85ee281c2 Merge "Fix following three issues in SD Card UX" 2022-09-18 05:57:51 +00:00
althafvly
ed95f35423 Settings: Protect sensitive data on the about phone
- Hide some personal info like phone number and IMEI.
- IMEI shows on a tap, so why not.
- Avoid showing this in screenshot/screenrecord

Co-authored-by: El Dainosor <eldainosor@gmail.com>
Change-Id: I45b7898da440c36045aec64a0a86fb804116cd9d
2022-09-17 13:48:02 +00:00
Sayak Dutta
4c36d4903d Fix following three issues in SD Card UX
1) Link should not work if up-events happen outside the target region
2) Activity should retain it's last state on changing configuration
3) Improve color contrast for "Format card" button

Bug: 246485658
Bug: 246681292
Bug: 246871051

Change-Id: Iebc87e35a3f8496a33a43d906b7faba05d95fe6c
2022-09-15 16:09:18 +00:00
Sayak Dutta
43147377fb Fix following three issues in SD Card UX
1) Link should not work if up-events happen outside the target region
2) Activity should retain it's last state on changing configuration
3) Improve color contrast for "Format card" button

Bug: 246485658
Bug: 246681292
Bug: 246871051

Change-Id: Iebc87e35a3f8496a33a43d906b7faba05d95fe6c
2022-09-15 16:08:59 +00:00
Stanley Wang
0e482f0bac Merge "Send pre-index intent when developer options changed" 2022-09-15 06:38:50 +00:00
Stanley Wang
9a325cee1f Fix the problem that sim2 can not copy imei
Set the CopyingEnabled value to true.

Fix: 239327568
Test: manually test and review UI
Change-Id: Id0025588aa4a93ec06f976c2569404627883c25a
2022-09-13 18:55:07 +08:00
Stanley Wang
0b72d620a3 Send pre-index intent when developer options changed
Bug: 244521263
Test: manually test and review UI
Change-Id: I410dcc8ac8a9e131357a3e186e17b0d6363ad247
2022-09-08 17:00:24 +08:00
Sayak Dutta
3985485b3a Merge "Update back FooterButton visibility for navigation instead of back button" into tm-qpr-dev am: af11c676a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19682757

Change-Id: Iae792a3cb815612047ffb2c14fee3c40a19653d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-23 20:22:51 +00:00
Sayak Dutta
05b7cb0225 Merge "Revamp SD card UX" into tm-qpr-dev am: e66ae3f9db
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19673917

Change-Id: I589676bfca185db1bbefbe804e9512b72142676d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 06:33:54 +00:00
sayakiitg
9521748a77 Update back FooterButton visibility for navigation instead of back button
Bug: 201252175
Change-Id: I6c99b1173bd8ef90b89dedc49745fdb2bcf11318
(cherry picked from commit 40e436ff3b).
Merged-In: I6c99b1173bd8ef90b89dedc49745fdb2bcf11318
2022-08-22 06:31:38 +00:00
sayakiitg
efdedcdc15 Revamp SD card UX
Improve the SD card setup flow so that each formatting option is provided in a separate screen with clear description and illustration.Also make sure that guest users do not have any access to formatting options.

Test: Manual testing on Pixel Device
Screenshot1: https://screenshot.googleplex.com/WJwyxFkBtbSfZmN.png
Screenshot2: https://screenshot.googleplex.com/3oBcrrgRsKTxNPC.png

Bug: 201252175
Change-Id: I77df55c40fd99cabcfc6128084be035bb5b19531

Change-Id: I757abc6076fcc8f467d8faed9f090bcdd5774ff3
(cherry picked from commit 9b432d54a6)
Merged-In: I757abc6076fcc8f467d8faed9f090bcdd5774ff3
2022-08-19 19:07:40 +00:00
sayakiitg
40e436ff3b Update back FooterButton visibility for navigation instead of back button
Bug: 201252175
Change-Id: I6c99b1173bd8ef90b89dedc49745fdb2bcf11318
2022-08-04 06:23:24 +00:00
Arc Wang
79042f2d28 Merge "Crash happens if back button is pressed during "Format as Portable"" am: 671fa153e8 am: 6945e70c02 am: c80890c7dd am: 85768c5916 am: ee4c9b6a11
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147940

Change-Id: Icfbb8218dcba3ad95d6d0ba8f9995c4cceb53f65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 04:49:01 +00:00