Commit Graph

84 Commits

Author SHA1 Message Date
pastychang
9bdb59a764 Rename ButtonFooterMixin to FooterBarMixin
1. Change to FooterBarMixin
2. Move FooterButton to the same package with FooterBarMixin

Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: Ic6937e3cbc515dd7bf877c9193932cd5800ac801
2019-01-24 16:18:28 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
pastychang
79614823cb Rename prefix from suw to sud
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I44a399b586671c100cb9d85c97effbfb1a379413
2019-01-04 10:46:20 +08:00
pastychang
908501e40f Apply FooterButton builder
FotterButton constructor in setupcompat will be deprecated, change to
use builder.

Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: Ic84b0c91205bf3c770bc658e8eaf2626e4d7bddd
2018-12-26 14:56:44 +08:00
pastychang
103409bd4a Change to use footer button of setupcompat
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I0eba5f8fff37bbb13b54a4d41290ae9363905f96
2018-12-15 09:24:56 +08:00
Pasty Chang
c1f8600d9f Change to use setupcompat and setupdesign for suw pages
1. remove the dependence of setupwizardlib.
2. add to use setupcompat and setupdesign.
3. modify new footer button in following up cl.

Bug: 120805516
Bug: 120872944
Test: RunSettingsRoboTests
Change-Id: I463dd35b799d4250b2aabce0cb0b8102cf9dd7d6
2018-12-12 03:16:29 +00:00
Inseob Kim
a1aeeb24e1 Schematize vold system properties
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: Id2a696c621015d46015d5de0e7aef987e9e01b54
(cherry picked from commit 64af0081cc1a8babe19b0552122e35211fc84c9d)
2018-11-09 05:23:10 +09:00
felkachang
a6cec47326 Change reset page to be SUW style
The factory reset page and the reset confirmation page is too old to
follow the style of Setup Wizard design. To change the layout and apply
the style for textviews and header.

Bug: 73738836
Test: make -j SettingsRoboTests RunSettingsRoboTests
Change-Id: I1ee3d09e1ef9cac8e25c60a566363d4f7d537eeb
2018-10-03 11:45:49 -07:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Fan Zhang
bfeee279a8 Merge "Use shorter string for MasterClear to stop truncating title" into pi-dev am: 4d6375e052
am: baab651901

Change-Id: I9a024644f81a62bd5cfce912e96bb37320cdab31
2018-05-10 17:44:42 -07:00
Fan Zhang
dc00efa666 Use shorter string for MasterClear to stop truncating title
Change-Id: Ic1c639724c06d4671d4703b9862e77f673541f77
Fixes: 77904702
Test: visual
2018-05-10 15:19:12 -07:00
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Qingxi Li
e0681db921 UI Tweak for eSIM related
This CL update following UI of eSIM:
    1. update title of eSIM reset checkbox under network reset and FDR screens.
    2. update eSIM reset checkbox to default is checked.
    3. Show eSIM reset checkbox in FDR when user is under developer mode.

Bug: 74083169
Bug: 74085673
Bug: 74771900
Bug: 74122440
Test: E2E & make RunSettingsRoboTests
Change-Id: Ia49fdae98d6ef541398b1dfb36c54beea1f2ba39
2018-03-15 11:24:25 -07:00
arangelov
e35badd9d5 Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog.
Bug: 64893948
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest -j40 RunSettingsRoboTests
Change-Id: I9308d8d86a3789b8f2c92b9f4f20cf00cce71d14
2018-03-05 20:27:51 +00:00
Doris Ling
1f49715466 Fix reset button being disabled.
- When doing factory reset, we will launch the account credential
confirmation. If this fails, the settings page is re-initialized.
This steps might trigger multiple layout changes for the scrollview
before it is finalized. However, we are removing the global layout
listener once we receive the first update, which could result in the
reset button being disabled incorrectly, as the scroll state is
calculated based on wrong view heights. Remove the call that remove
the layout listener, so that we can still receive further updates.

- also remove the scroll listener once we enable the reset button
from scroll, as no more action is really needed on suceeding scroll.

Change-Id: I6ec1f592991629c15e5ad2bcb29fdd679d598f70
Fixes: 73298075
Test: make RunSettingsRoboTests
2018-02-22 16:33:07 -08:00
Fan Zhang
7cf99f5f12 Migrate more settings to use SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
2018-02-18 21:10:03 -08:00
Doris Ling
72489725c6 Change superclass to InstrumentedFragment.
- for fragments that do not implement the preference screen, change them
to inherit from InstrumentedFragment instead.

Change-Id: I791c2634024bd2c248efea955be5c680180d735c
Fixes: 68277111
Test: make RunSettingsRoboTests
2018-02-02 13:41:16 -08:00
Carlos Valdivia
4b34dad4cd AR/FR: Keyboard challenge takes precedence.
Tested manually by:
(1) Setting up a gmail account.
(2) Setting up a screen pattern.
(3) Going to Settings > System > Reset Options > Factory Wipe
(4) Hit the Erase button.
(5) Enter pattern into the Screenlock prompt.
(6) Notice the Google credential confirmation screen.

Prior to this change we would skip (5) if there was a Google account on
the device.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=andorid.settings.MasterClear
Bug: 72694056

Change-Id: Ie07c678ecbc8361e8e1792f82efdfb1261db49fb
2018-01-30 18:39:45 -08:00
Carlos Valdivia
5114604743 AR/FR: Updated resources to confirm via component.
Due to issues with an Intent filter not being configured with a category. We
needed to move to launching the confirmation activity via Component targeting
Intent. Hopefully this can be addressed post IC.

Manual Testing:

Start by navigating in Settings to:

Settings > System > Reset Options > Erase

Then click on "Reset Phone." At this point the behavior depends on the state of
GmsCore.

With forthcoming GmsCore changes (and accompanying SettingsGoogle changes), the  user will see a prompt telling them that
they can confirm their credentials. Regardless of whether the user successfully
confirms or hits back, they will end up in the MasterClearConfirm UX. As per the
feature spec.

Test: make RunSettingsRoboTests -j40
Bug: 6393703
Change-Id: Idca02bda1fa2e388d612bd2014e16e2b6665fe70
2018-01-24 11:37:35 -08:00
Carlos Valdivia
5dd6ed470e AF/FR Fix onActivityResult condition.
Chase list bug. Accidentally bailed on true effectively.

Manual tested by going to Settings > System > Erase All Data
And then hitting then successfully wiping and reseting.

Test: make RunSettingsRoboTests -j40
Bug: 72324059
Change-Id: Ib2a155820811f0ec62a45c1312475c24646ede76
2018-01-23 10:20:52 -08:00
TreeHugger Robot
01b2d78da1 Merge "Add checkbox to let user wipe eSIM data together with FDR" 2018-01-23 03:41:43 +00:00
Qingxi Li
c8a2b040a1 Add checkbox to let user wipe eSIM data together with FDR
This CL add a check box for eSIM enabled devices to reset eSIM data
during factory reset of the phone.

Bug: 67500470
Test: make RunSettingsRoboTests
Change-Id: I5a81d43f23ae55f8549a5b807fdf41f36c9d3acd
2018-01-22 16:08:23 -08:00
Carlos Valdivia
08c8820b29 AR/FR: Tests using stubbed values.
Also a simplifying change to MasterClear.

Test: Standard robotests
Bug: 63937032
Change-Id: I54fe60c2e38d938148f89d043bf8a7f7698edc42
2018-01-22 13:31:24 -08:00
Carlos Valdivia
a9736ed257 AR/FR: Settings changes.
The basic AOSP settings infrastrucutre. Will add the Google specific
resources and tests to GoogleSettings in the next AR/FR change.

Test: make DEBUG_ROBOLECTRIC=1 RunSettingsRoboTests -j40
ROBOTEST_FILTER=com.android.settings.MasterClearTest.java

Change-Id: I7278b5c6d2a72e71d81c7fa5f937a2313d6c322c
2018-01-18 18:02:24 -08:00
Doris Ling
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -08:00
Doris Ling
ed4685fafb Update activity titles for fragments without preference screen.
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.

2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.

3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.

4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
2017-10-26 12:01:06 -07:00
Doris Ling
03a3b518de Update preference screen title.
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
2017-10-25 11:02:07 -07:00
Justin Klaassen
3025727e16 Ask device owner for master clear in demo mode
Bug: 62712426
Test: make RunSettingsRoboTests -j19
Change-Id: I29f92ff1062590f2c5eb7713e5969da7870fc582
2017-08-09 10:44:19 -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