Commit Graph

124 Commits

Author SHA1 Message Date
Fyodor Kupolov
5514509963 Remove Users & profiles header for phones
In Settings/Users, remove "Users & profiles" header is no longer displayed
for phones. List of UserPreference is now explicitly sorted. Before, it
was relying on an overridden compareTo method in UserPreference, which
behavior was difficult to predict when instances of UserPreference were
mixed with other instances in the same group.

Bug:17630523
Change-Id: Iba1ef863c2cd4e8ca307ae0aa0877c5cd9e0973d
2014-12-17 13:58:01 -08:00
Amith Yamasani
f3db021ba5 Fix padding in user type selection dialog
Use preferred list item padding for the list items
and use the dialog context for creating the adapter.

Bug: 18509286
Change-Id: Ia5791a6283723a0ab458f24ec22b8890ab627657
2014-12-03 14:20:05 -08:00
Amith Yamasani
a766bfa3de Set default restrictions for a newly created user
Call a different createUser version that sets up the defaults.
Make sure any previously created guest also gets the restrictions
as soon as they are changed.

Bug: 17832802
Bug: 17891763
Change-Id: I3eaa9e3da32b2f436699db24bb7be2668f1480b3
2014-10-07 17:13:16 +00:00
Amith Yamasani
f5d14b2aed Don't allow creating a guest from a secondary user...
unless the primary user has allowed Guest and user creation from
lockscreen.

Bug: 17482220
Change-Id: Idd05889da330d6cbe0d3ccab2e98abfdeba94b96
2014-09-16 16:36:40 -07:00
Alexandra Gherghina
bc6e78f9da Switch to using system-wide default user icons
User icons were either User Settings specific, or missing. This makes it
consistent with the ones in the new helper class.

Bug: 17311038
Change-Id: I20cc1deba989cf7a397c5a8dba41bd91bd62472b
2014-09-12 17:00:40 +01:00
Amith Yamasani
92c5452f08 Change the location mode before applying restrictions
Once the location sharing restriction is applied, the setting cannot
be changed, so change the setting first.

Bug: 17348894
Change-Id: I9dcad230e816aaa2482f1f35f1993f51d14eabc7
2014-09-02 17:48:31 -07:00
Amith Yamasani
f7ba74df59 Switch user on clicking on a user in User Settings
This slipped out of the code somehow.

Bug: 15761405
Change-Id: I89c47221f999d5ef23aa7910d31a95bfa730353c
2014-08-22 12:33:23 -07:00
Amith Yamasani
94c0181c8f Update strings for guest removal affordance and dialog
Exit guest -> Remove guest
etc.

Bug: 16495144
Change-Id: Ieb44e886ea537682a6922046c0f63cef1456c6d8
2014-08-18 16:42:43 -07:00
Amith Yamasani
561d6bc9bb Merge "Allow creating last user even if a guest exists." into lmp-dev 2014-08-13 16:52:03 +00:00
Amith Yamasani
f2663abe1d Allow creating last user even if a guest exists.
Bug: 15934700

Also fix missing icon when user has no icon.

Change-Id: I07c76043df9cda8aeccecb09289d570845dc4560
2014-08-11 17:17:29 -07:00
Jason Monk
918c23bd5f Merge "Don't allow creating guest when can't create user" into lmp-dev 2014-08-11 17:09:03 +00:00
Jason Monk
7c2739888a Don't allow creating guest when can't create user
When user restriction is on to disable adding user also stop the
user from creating guests.

Bug: 16782635
Change-Id: I0396172867e2e217ada9ef747ea62d0c0382c5dd
2014-08-11 10:22:43 -04:00
Alexandra Gherghina
83adb564de Show managed profile under accounts rather than users
Also fixes overflow menu to update on remove/add managed profile.

Bug: 16234745
Bug: 16727076
Change-Id: I3283a8fa0096edfce5aad633e09ba3eed6d2174c
2014-08-11 10:02:13 +01:00
Alexandra Gherghina
fe47a8dc89 Toggle between primary and managed profile in Print Settings
This adds a spinner to the print settings screen which can be used to toggle
between the Settings app in the primary and managed profile so that the user
can edit settings belonging to both profiles.

Bug: 16369104
Change-Id: I2556a331d09379c2a501bc6b192ab1631b5215f5
2014-07-29 10:22:15 +01:00
Amith Yamasani
247520c369 More User Settings improvements
Add a menu checkbox to allow creation of users from lockscreen.
Add a delete icon in restricted profiles settings.
Other little fixes to icons.
Update some strings based on feedback.

Bug: 15761405
Bug: 16550371
Bug: 16298824

Change-Id: Ib876bd57f15c6ce2d71856f72571c6b8b0e3102d
2014-07-26 14:09:43 +00:00
Amith Yamasani
2d578ce293 Don't use the profile info for name
Since we now have a way to directly edit the user's photo/name
via a dialog, don't rely on the Me profile name anymore. That
one will be out of sync with the manual nickname editing.

Bug: 15761405
Change-Id: Ia16c43ddcfd47894b2d2e049802d7de153ea5b94
2014-07-25 09:37:33 -07:00
Amith Yamasani
ee3987475e Refactor User Profile editor dialog for reuse
Move the dialog code into a separate class.
Use it from RestrictedProfileSettings
and UserSettings for the current user.

Bug: 15761405
Change-Id: I0b9a95ba8463304525e6a4b8cf3b4ca77b15796f
2014-07-24 23:13:34 +00:00
Amith Yamasani
c16b73e92b Improvements to user settings
Exiting guest mode from within guest user.
Updated assets and cleaned up/optimized some asset clipping code.

Bug: 15761851
Bug: 16355550
Change-Id: I431e92bac3cbedd46bd1e33cffc4d9f0c576ca69
2014-07-17 20:22:08 -07:00
Amith Yamasani
51c6dac50e Multiuser settings revamp - followup to address comments
Bug: 15761405
Change-Id: I9c03432a2f2651a931486ce65fb3b5af37608be0
2014-07-10 00:39:10 +05:30
Amith Yamasani
9e6ac3d25f Multiuser settings revamp for L, first pass
Include Guest settings
Ability to switch users from Settings
Manage user settings like telephony access

Bug: 15761405
Change-Id: I2cfdc7bc2703ed202aa8bf1261c304c51ce48b29
2014-07-01 13:19:35 +05:30
Julia Reynolds
b9195d25ee Remove PIN from users page - use disallow_add/remove_user restrictions.
Bug: 14081992
Change-Id: If4973d64ae54da602a2682dee5b868ff66273856
2014-06-11 17:14:14 -04:00
Amith Yamasani
4093e40e18 Show user management UI if a managed profile exists
Show UI even if flags to show multiuser UI are off, if there's a
second user on the device. This way there's an affordance to remove
the user.

Don't show the "Add user" item though.

Bug: 15447068
Change-Id: I40273005d6d8d66aed486328615acdab71d51fa4
2014-06-06 14:31:37 -07:00
Amith Yamasani
0e43d324af Don't allow restricted profile creation for corp/edu owned devices
Bug: 14613459
Change-Id: I64dfba35418def8ae8793d7371b8960f5ff5946f
2014-05-09 13:43:43 -07:00
Alexandra Gherghina
312c4573c3 Switch to using the new enabled flag in UserInfo
Bug: 14377459
Change-Id: Ief309477d964f1158087240ce24030335652d6a7
2014-05-01 11:51:24 +01:00
Alexandra Gherghina
9a1baec5a3 Disable profile enabled check (API is changing)
Bug: 14377459
Change-Id: Ie79db95bcc5c7e3a95b479832dceaf628ae36728
2014-04-28 14:11:35 +01:00
Alexandra Gherghina
423bafccbc Revert "Revert "Wiring for displaying managed profiles""
This reverts commit 91e3f72569.

Will wait until related commit is in to submit this.

Bug: 13756871
Change-Id: I34642998adb71f44de1e529cc214ac4f921932ed
2014-04-24 18:06:06 +01:00
Alexandra Gherghina
91e3f72569 Revert "Wiring for displaying managed profiles"
This reverts commit a044235272.

This depended on CL: https://googleplex-android-review.googlesource.com/#/q/I2907b182e19b3562592da688b3f68ef5f4088557 which was not commited yet.

Bug: 13756871
Change-Id: Ib05c58002a06c7882c4b6dfd750c9681ff4b1646
2014-04-23 10:55:41 +00:00
Alexandra Gherghina
a044235272 Wiring for displaying managed profiles
Bug: 13756871
Change-Id: I81898e3b32baa0bc9ec72258b3bd470102d42b68
2014-04-15 14:54:01 +01:00
Fabrice Di Meglio
7f111811e0 Fix bug #13758772 Crash when hitting back after clicking on add a restricted...
... profile under Users

- no need to show the dialog again when we have pressed on BACK

Change-Id: I76f155a488512689c5af40ff35b80ce034da4ffe
2014-04-04 11:35:55 -07:00
Amith Yamasani
cfb8d7f3c8 Don't allow user creation on phones via Settings search
This screen was blocked from appearing in the main Settings list, but
search now exposes it.

Disable content on the Users screen if multiple users are not supported
on the device. This is a temporary fix until Settings search does the
right thing.

Bug: 13631986
Change-Id: Icc61d3e9ce4e405d0cf8841af538216be59fac26
2014-03-26 14:46:47 -07:00
Tom O'Neill
dad115e2db Remove some usages of deprecated location APIs
Bug: 13302202
Change-Id: I916568d2b310eaf9a8b30da9a9980344aaf76c21
2014-03-05 09:31:09 -08: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
Maggie Benthall
4453496448 Fixes for pin-restricted settings.
- Reprompt for pin after screen has been locked and unlocked.
- For protected preferences, store the Preference and continue if pin entry is successful.
- Protect whole UserSettings and DevelopmentSettings pages.

Bug: 10543207
Change-Id: If1d4b31ca94a8cfc103625b74385bcd0bdd3d88b
2013-08-29 18:06:13 -04:00
Geoffrey Borggaard
fe21d9aaa8 Pin protect more screens.
When these screens are locked down with user restrictions,
it should prompt the user for the restrictions pin before allowing
access to the settings screen.

Change-Id: Iadbb087da2d9470b855ea0bea89f2da1ffb9e854
2013-08-06 17:24:37 -04:00
Amith Yamasani
0ca80fe4cd Single-user restrictions
New restrictions panel for restricting list of available apps for the user.
Apps that support restrictions can also be configured here.
Restrictions screen is PIN protected and will ask you to create a PIN the
first time you use it.

Change-Id: I7a5267df4272521ad80e6a8b6a18932d07179eb8
2013-06-25 16:49:38 -07:00
Amith Yamasani
f14e6751c3 Reduce jank in User Settings
Don't recreate the list on resume.
Cache the default circled icon.

Bug: 8802380
Change-Id: I46520b591fc3ffd5e51a1c7dda86e811c03a76a2
2013-05-29 09:39:07 -07:00
Amith Yamasani
503783c482 Cache default circle avatar for faster creation of UserSettings
Change-Id: Ie2ed9d032f71fad7a89edde147f231a1dc479aae
2013-05-28 11:17:43 -07:00
Amith Yamasani
7c4dfccda4 Update strings for clarity about restricted profiles
Bug: 9051422
Bug: 9051178
Change-Id: I1b88286fdd0db27bb6980d0ebbc846370fd0082e
2013-05-22 12:51:30 -07:00
Amith Yamasani
f162efee89 Prompt to set a screen lock when adding a restricted profile
Bug: 8735493

If there's no screen lock, prompt to take the user to set a lock.
On return, check if user set the screen lock. If so, add the restricted
profile, otherwise don't add it.

Fix a small layout issue: Bug: 8721209

Change-Id: I2a18fea50a1d810d6a7fa82038b460ca4e03d5a0
2013-04-29 14:10:06 -07:00
Amith Yamasani
b017171587 Three kinds of owner info - owner, user and profile
Bug: 8736733

Put the summary "Restricted profile" under the user name in app restrictions panel.
Bug: 8736734

Change-Id: I6b724bd10a9246eb57831bffb737a48c01e0c285
2013-04-28 22:13:22 -07:00
Amith Yamasani
8e6f99e22b Rename limited users to restricted profiles
Bug: 8705996
Change-Id: Ibf6a2e0e14ce095758fb9be982710b584b76f15d
2013-04-24 14:21:06 -07:00
Amith Yamasani
fc8a383d42 Final refactoring of the user/profile settings screen.
Name restricted users as restricted profiles and group them all
together.

Bug: 8697415
Change-Id: I18acc6b61bfb12a8e1540eb022a73b29783789e1
2013-04-23 18:45:35 -07:00
Amith Yamasani
1bad7141b4 Fix repeating apps on pause/resume
Preference list was getting duplicated on pausing and resuming the activity.

Pull the user info out of the preference list and make it a static header
so that it stays fixed. Can now remove all entries before re-adding.

Disable location by default and disable ability to change Unknown sources
 toggle.

Bug: 8685561
Bug: 8688400

Change-Id: I64ce728d5369e03ddaba562bcd66bb0720a037d2
2013-04-22 17:03:30 -07:00
Amith Yamasani
a98c402e44 Several improvements and fixes in restrictions UI
Bug: 8668906 : Add string indicating that the app has opted-in
Bug: 8663558 : Fix a crash in settings when EXTRA_RESTRICTIONS_LIST is empty
               Also accept EXTRA_RESTRICTIONS_BUNDLE as a result from custom
               restrictions activity
Bug: 8653389 : Some apps show up twice in the limited user config screen
Bug: 8653915 : Jank when adding a new limited user

Change-Id: I293148000be70850f565dbddb4c942d69142ae17
2013-04-19 16:27:09 -07:00
Amith Yamasani
d4abdd27ad Reorganize users screen
As per product/ux feedback, move around and rename the users.
Settings button for some users.

Fix crash in limited user when clicking on the user:
Bug: 8494377

Change-Id: I346d12646d32608b01f2c2c2c866b6da51408618
2013-04-17 21:55:06 -07:00
Emily Bernier
91d40b7d97 Merge "User restrictions for creds storage & user removal" into jb-mr2-dev 2013-04-12 20:22:04 +00:00
Amith Yamasani
cc395695fc Embed the app restrictions fragment in the dual-pane settings.
Change the limited user creation flow to show the usual message before
actually adding the user. Might need to customize the message for limited
users.

Removed the old activity wrapper and moved the logic to UserSettings.

Removed the finish button.

Bug: 8566751
Change-Id: Ie9e1a03736c41758b0bb6e79d004ad662a5af7f4
2013-04-11 18:21:07 -07:00
Emily Bernier
11bd33a564 User restrictions for creds storage & user removal
Change-Id: I423e729f73ece6209875d2f8d194d0d11c975c20
2013-04-11 19:54:57 -04:00
Amith Yamasani
732c80ff18 Remove Limited users category if empty
If there are no users under limited category, in a secondary user,
remove the subheading completely.

Change-Id: I0397b6198c8cfc147e9e7dc30a92a7cb2f5860e3
2013-03-29 20:28:28 -07:00
Amith Yamasani
864e3b7c51 Split User settings into limited and trusted.
Also show avatars with the circular frame like on lockscreen.

Change-Id: I032d842555b2f50a07166460f9cfb1963366dbb1
2013-03-27 12:27:01 -07:00