Commit Graph

14 Commits

Author SHA1 Message Date
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
Omer Ozer
e148ee7877 Add factory reset intent to the settings app.
Bug: 302016478
Test: local
Change-Id: I784395931b32746cb45a447b330ea8d57c17b2fe
2023-10-24 23:59:33 +00:00
Wentao Wang
f11e1666bf Merge "Separate the demo user factory reset option with admin user factory reset option." into udc-qpr-dev am: 38f12abb75 am: 0d3ae3ed32
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24677431

Change-Id: Ie89643b620ee82e4f30ab98ca466f54bd68b8067
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-13 13:53:24 +00:00
Wentao Wang
a44e75d6ed Separate the demo user factory reset option with admin user factory reset option.
A security vulnerability was discovered by Android security. b/292548775 Within a short period of time after the device reboot, the user could enter the settings page and factory reset the device. Android Enterprise suggests to add DISALLOW_FACTORY_RESET user restriction to the device.

However, DISALLOW_FACTORY_RESET will be enabled on all Android users, including both the admin user and the demo user. The existing behavior in Android settings is that once the user restriction is set, factory reset button will be greyed out, which makes the factory reset functionality in demo user go away.

In demo user, the factory reset command will be forwarded to the current active device owner. So in this change, we separate the button for admin user and the button for demo user.

In demo user, the button is still visible when the restriction is set.

And in admin user, the button will be greyed out as expected.

Once this change is in, then Pixel Retail Demo could set the user restriction properly and rely on its internal logic to do factory reset. If other applications are trying to do the factory reset, it will be denied by OS.

BUG: 292548775
Change-Id: I9d2d47bb29bc2c1e05058b246908768cd2f95990
2023-09-13 11:47:11 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Bonian Chen
69f6e76f2c [Settings] configuration for hidding SIM remove UI
Hide SIM remove UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
2022-10-20 09:59:01 +00:00
Edgar Wang
080e77e2b3 Merge "Adjust profile category padding in factory reset page." into tm-dev am: 1098684b19 am: 3661a62e80 am: 602c65616e am: 517b855b28
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18090789

Change-Id: Iec04a226d3dfd0e347dca6ef2e063bb340f381f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 10:55:01 +00:00
Edgar Wang
0e92c7e777 Adjust profile category padding in factory reset page.
This page usd SetupWizard them, so we should not set paddingStart

Bug: 223514471
Test: visual verify
Change-Id: I3a02be7534c6571c8d6735c5592ad4230a7c9e9e
2022-05-02 13:39:28 +08:00
Eric Biggers
8c25415736 MainClear: remove obsolete check for multi-volume FDE
It is never the case that '!isExternalStorageEmulated() &&
!isExternalStorageRemovable() && isExtStorageEncrypted()', so stop
checking for this.

It's easy to see that even just the last part, isExtStorageEncrypted(),
is never true, since it checks whether the property "vold.decrypt" is
non-empty.  That system property was only set on devices that used FDE
(Full Disk Encryption), and FDE support was removed in Android T.

Moreover, the full condition of '!emulated && !removable && FDE'
actually checked for devices that used multi-volume FDE, which
apparently was never actually used, and was removed 8 years ago by vold
commit 87999173dd79 (http://ag/423222).  This is consistent with the
fact that this code was added 11 years ago by commit 2a32192329
(http://ag/134210), when probably this feature was still planned.

Bug: 208476087
Change-Id: I4c2b5c9aed8812367a70d0dd1bbcc94008fec529
2022-04-25 23:15:31 +00:00
kholoud mohamed
90afe190e8 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
(cherry picked from commit de78149c16)
Merged-In: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-25 11:38:34 +00:00
kholoud mohamed
de78149c16 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-17 17:37:45 +00:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
Mill Chen
1e607904c3 Update UI for factory reset flow
After applying a collapsing toolbar in the Settings app, the factory
reset screen is not displayed correctly. This is because
1) the factory reset page should not essentially have a toolbar since it
has different UI layout form other pages.
2) this page was launched previously as a SubSettings so it applied a
wrong theme.

This change is mainly updating the inheritence structure and specifying
the right theme for the factory reset page in order to have a correct
layout.

Bug: 179457252
Test: robotests and visual verified
Change-Id: I91aec65a120d5a288507d89ace7c9298acdca42b
2021-02-25 16:32:50 +08:00
Edgar Wang
21f8cb3a44 Refactor Reset options Settings
Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I94969f6903d047b9bc41b1e8c14096c92c460b38
2020-08-04 23:33:50 +08:00