Commit Graph

54 Commits

Author SHA1 Message Date
Justin Klaassen
a22c8345fa DO NOT MERGE - Ask device owner for master clear in demo mode
Bug: 62712426
Test: make RunSettingsRoboTests -j19
Change-Id: I29f92ff1062590f2c5eb7713e5969da7870fc582
2017-08-09 15:37:01 -07:00
Jeff Davidson
a0b8472c4d Remove eSIM reset checkbox and always perform the reset.
Due to substantial risk in landing the "retain profiles" flow that
would otherwise occur if the user elected not to wipe eSIM profiles
during a factory reset, we no longer expose this option to users
through the UI. Instead, we show affected users messaging indicating
that their eSIM will be wiped unconditionally.

The underlying plumbing is retained to keep the change small and to
make it easier to revert back to a checkbox when the rest of the
platform supports it.

Change-Id: Ida7df14d81ffc4cb6b4b414928d3ce7e5c78594b
Fixes: 64081853
Test: TreeHugger
2017-07-27 01:05:02 +00:00
Christine Franks
a09eb383d9 Move logic for FR in demo mode out of Settings
Bug: 62712426
Test: make \
ROBOTEST_FILTER="(MasterClearTest|FactoryResetPreferenceControllerTest
|UtilsTest)" \
RunSettingsRoboTests -j100
Change-Id: I5e287c3d4a6a7050bda78187c52aec19e90b50bc
2017-07-20 17:44:18 -07:00
Jeff Davidson
4ba7478fdf Don't show "Wipe eSIMs" checkbox for developers.
Per UX review feedback, it doesn't make sense to show this just
because someone has developer options turned on. So only show it if
the user has ever downloaded an eSIM profile.

Change-Id: If474451dddcaa75bce1e57ce2f1751ef3adf45ee
Test: TreeHugger
Fixes: 63147904
2017-07-01 01:06:19 +00:00
Jeff Davidson
f1c13fa820 Hide "Wipe eUICC" option when it isn't useful.
If a user never downloaded a profile onto their eUICC, there's no
reason to offer the wipe option, and it would only cause confusion.
But show the option nonetheless if developer options are enabled.

Bug: 38460669
Test: TreeHugger / Unit test / Manual verification
Change-Id: I51fb7b9e75c4f9a46ee0b24e64bddfafcbd48b14
2017-05-24 16:20:58 -07:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00
Bartosz Fabianowski
30ba868014 Only show headers in Master Clear when there are multiple profiles
The Master Clear dialog lists the accounts whose data will be lost by
a factory reset. The list contains the headings "Personal" and "Work"
to distinguish accounts in the main user and the work profile. When
there is no work profile, the header (only "Personal" would be shown in
this case) is superfluous and misleading (as the user may be using the
device for work).

Bug: 30132270
Test: Manual :(

Change-Id: Id493652fc331d4500c4d772a9abcc716995565b3
2017-04-19 11:57:04 +02:00
qingxi
072f28661d Add erase eSIMs choice into factory reset
This CL add a check box for eSIM enabled devices to reset eSIM data
during factory reset of the phone.

Bug: 37255419
Test: Included
Change-Id: Ic98974726a515b0a350b73a33093460a63c1fb8a
2017-04-13 15:28:45 -07:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -08:00
Christine Franks
d7713c9d95 Require password to FR in carrier demo mode
Bug: 34341567
Test: manual - password is not required for regular user factory
resets and is required in carrier demo mode.

Change-Id: Ic594ebafdac02fc467dc6b2e46dfbd520db3ce9f
2017-02-08 07:44:57 -08:00
Christine Franks
1478222cd2 Allow factory reset in carrier demo mode
Bug: 34341567
Test: manual - in carrier demo mode, go to Settings > Backup and
Reset > Factory data reset > Reset phone > Erase everything and
this entire path is viewable.

Change-Id: Ia5491765241adad97ecdb0a5bfd86a8371b8e4fe
2017-02-06 11:42:54 -08:00
jackqdyulei
0b3edc728e Enable button only when scrollview reached the bottom
Bug: 28410288
Test: make RunSettingsRoboTests
Change-Id: I04653c377f7d419b6701b5589ff25961e0f5c077
2016-12-16 14:58:43 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
6b2bb39c2b Make icon size are the same in factory reset account list.
Change-Id: I74779471a3fb7b99b515203ddba3aca6b0cd588b
Fix: 31791627
Test: Visual inspection
2016-09-28 09:07:44 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Jason Monk
fda774104a Fix accessibility description on master clear
Only include visible views

Change-Id: I271ae87c788e270b15e7ca8758059771cde16d33
Fixes: 28316423
2016-05-06 14:28:09 -04:00
Udam Saini
0708d9e119 Fixes back button on action bar on some fragments.
SettingsPreferenceFragment has this already set so that the drawer
layout will work when the menu doesn't exist. However, some fragments
are not preference fragments, and we need to set setHasOptionsMenu
manually.

bug:27879503
Change-Id: I6faadeb56dab00af611ac413109800822038c66d
2016-03-29 10:29:14 -07:00
Sudheer Shanka
7dbbe13168 Add disabled by policy empty views to more screens.
Bug: 27214401
Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
2016-02-19 20:18:43 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Xiaohui Chen
44879a387a sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag
instead of checking user id "0".  This should be no-op in
single user mode since the only admin user would be user 0.
In split system user mode, this will correctly ACL admin
user instead of non-interactive system user.

Bug: 19913735
Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
2015-07-27 15:39:28 -07:00
Julia Reynolds
ce25af4838 Talkback improvements for Settings screens.
Bug: 21164141
Change-Id: I7444261ccf967f6db70c9fe44a00bd3f19ceb975
2015-07-09 13:21:20 -04:00
Rubin Xu
d1ce82ae8b Defensively load untrusted icons from account authenticator
Catch Resources.NotFoundException which should cover all parsing
errors from loadDrawables(); also substitute a default icon if
parsing returns null.

Bug: 17760671
Change-Id: Ia0ec25e34974ed85b6ffe6882d5bce003d64e9d6
2015-06-08 17:21:19 +01:00
Jorim Jaggi
8a09b619ae Update confirm device credentials to spec, add fingerprint
- New strings in the screen.
- New layout/style.
- Clean up internal API's around it.
- Add fingerprint support if launched from externally
- Separate theme if launched from externally
- If launched from above Keyguard, use SHOW_WHEN_LOCKED flag

Change-Id: Icdf9bf9e0506841f24e8aab5f0f1d1f4b688951f
2015-04-13 14:59:26 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Stuart Scott
be90341c80 Add option to reset network settings to factory
bug:16161518
Change-Id: I7c0cc58d5385352c6c9af2b27af23a744b5df977
2015-03-09 13:18:50 -07:00
Zoltan Szatmary-Ban
3af2e4c35c Eliminate duplicated code in Settings for category headers
Change-Id: I5bdba2ad4f9e1987f9e818af9d5aa96a9d558f6b
2015-01-16 15:48:13 +00:00
Zoltan Szatmary-Ban
546790c1ed Show account icons for managed profiles on Settings > Factory Reset
Fixing a bug where managed profile's accounts where shown without
the account icon.

Bug: 18555032
Change-Id: I5a1094e795b31a00599bc4df413573030693b436
2014-12-02 17:22:10 +00:00
Zoltan Szatmary-Ban
7cc1b9e63e Show managed profile accounts on Settings > Factory Reset
List both primary profile's and managed profile's accounts. Also notify the user
if there are other users present on the device.

Bug: 17899181
Change-Id: I5401722e65305861edeed60cfe926fca5c81a418
2014-11-12 01:18:29 +00:00
Paul Crowley
01fbd9fd3c Don't show a pattern-specific prompt at encryption time.
Bug: 18054895
Change-Id: I8a029142085b9e7f59efc8e313b6438734d5a1bb
2014-11-05 00:43:33 +00:00
Amith Yamasani
0e64404a94 am 526e4b41: am c1dc8752: Merge "Disable factory reset for secondary users" into lmp-dev
* commit '526e4b41550fa70e08cfcfc7bfbc2aa88a9f71d7':
  Disable factory reset for secondary users
2014-10-23 22:10:38 +00:00
Amith Yamasani
4339a470d3 Disable factory reset for secondary users
Search in Settings makes it possible to find the factory reset screen.
Disable the search index in PrivacySettings so that backup and reset
keywords don't get indexed for secondary users.
Also add additional safeguards for other entry points such as public
intents, so that the backup/reset screen does not show any options.

Bug: 18076086
Change-Id: Ie5135fbf4084038c99947a1a107ab4758f0c15a9
2014-10-22 13:51:53 -07:00
Alan Viverette
0ba89bd54c Update Settings to use themed Context.getDrawable()
Explicit null theme is passed when using Resources.getDrawable() and
no theme is available, e.g. when using getResourcesForApplication().
This fixes an issue with ic_text_dot theming and helps avoid similar
issues in the future.

BUG: 17648301
Change-Id: I3e97c3490b6f2a55744f567b21284f2935ae9af7
2014-10-10 10:58:58 -07:00
Julia Reynolds
2c53933e8d Use user restriction instead of pin to guard factory reset in Settings.
Bug: 14081992
Change-Id: I60f132312368c5097b46ab97e881eec3700ef586
2014-06-13 13:10:44 -04:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Amith Yamasani
14912666d9 Handle renamed APIs
Bug: 10461761
Change-Id: If63c3801663b347a4643e44d5bd3bab4e3049578
2013-09-05 12:40:31 -07:00
Amith Yamasani
7eedcf4a50 Apply restrictions right away instead of on exit
Use usermanager to clear restrictions, as it needs to do a bunch of
book keeping.

Apply PIN restriction to master clear button.

Changing existing PIN now includes verifying the PIN, so it doesn't
need to be cleared here in Settings.

Removed automatic persisting of restrictions on receiving them unless
it is a restricted profile.

Make apps that are signed with platform certs immutable and ON.

Change-Id: Iffd1bf2eb0d18202fb66ddcf80668baa8e6b84ed
2013-07-18 11:37:32 -07:00
Amith Yamasani
3f45de559f Don't append list of accounts every time we return to this screen.
Bug: 5355920

Remove the contents of the layout before adding the accounts.

Change-Id: Ic9256140f892968b2388f47d982eaada720df892
2011-09-22 14:34:17 -07:00
Ben Komalo
2a32192329 Force storage wipe if not removable and encrypted
Bug: 5017638
Change-Id: I43c98359eff7202437249675060ba964e1bd085c
2011-09-09 12:40:38 -07:00
Amith Yamasani
07d6fd2c01 Fix NPE in MasterClear
Bug: 5008299

Change-Id: If2d02af7ecda7fe40445a3ec8e023138c5523fd6
2011-07-17 11:30:28 -07:00
Kenny Root
3785e390d2 Don't show separate option for erasing USB storage
On devices with emulated USB storage or SD card, factory reset will wipe
all data from that area. Given that, it doesn't make sense to show a
different option for wiping USB storage.

Bug: 3242568
Change-Id: I257bdde06141f14381c8c09ce6a42c18d7080efd
2011-01-18 15:14:32 -08:00
Joe Onorato
b51886d0a7 Show the accounts on the factory reset screen.
Bug: 2823530
Change-Id: Idbf46aa59f3c529a3a3ef2d7d4e607822b34f51d
2010-11-08 18:25:51 -08:00
Amith Yamasani
b14e1e0493 Fragmentize "Factory reset" setting screen.
Split the screen into 2 fragments.

Bug: 3148480
2010-11-03 12:04:16 -07:00
Dianne Hackborn
1337d0f70b Implement issue #3094621 and #3094609 - wipe sd card
3094621: add "wipe sd card" option to factory data reset
3094609: collapse unmount/format into one command

Implements requested UI changes.  Also some final tweaks to
Manage Applications.

Change-Id: I0219195dd0c74d8c003ef1c3f6e09714859d7f89
2010-10-16 16:27:25 -07:00
Jim Miller
2deec7edc9 Fix 2594148: confirm PIN/Password before resetting device
This fixes a bug where user was allowed to factory reset the device
without entering their PIN/Password.

It also fixes the same issue with MediaFormat (Settings->SD Card->Format).

Change-Id: I0677a50aa771ad8663513fd7ec398a70953dcde2
2010-04-14 01:15:05 -07:00
Dan Egnor
76ddcecd0d Remove a no longer necessary (or present!) import. 2010-02-14 11:32:02 -08:00
Dan Egnor
3352d10f07 Perform master clear via Intent broadcast, rather than using ICheckinService. 2010-02-11 10:22:18 -08:00
Jim Miller
47d380f1e6 Fix 2385283: Add DevicePolicyManager calls to LockScreen. 2010-01-20 13:37:14 -08:00
Ying Wang
a718832e28 Still use ro.monkey
http://b/issue?id=1681101
So just some refactoring.
2010-01-06 09:46:17 -08:00