Commit Graph

85 Commits

Author SHA1 Message Date
Fyodor Kupolov
c478885d8d Guest option should not be shown for the guest user
Bug: 21649480
Change-Id: I866e34543c6ba396533f9acfef056390cf19608d
2015-06-09 15:55:01 -07:00
Fyodor Kupolov
097936ad1b Hide guest entry if the user is not allowed to create guest
Don't show the Guest entry for a secondary user if the user is not allowed to
create a guest and there is currently no guest already created.

Bug: 19035769
Change-Id: Icf4a778533affaec0658af4da5ce000eda261f38
2015-05-29 14:07:12 -07:00
Fyodor Kupolov
a7a7bfe59f Use DimmableIconPreference for Add user action
Moved DimmableIconPreference from location to the root package since it is
now used in several places.

Add user action now uses DimmableIconPreference. Added a new summary string,
which is displayed when no more users can be added.

Bug: 20892920
Change-Id: I00b00f80ba8933a00a2de85777b9f7e55d03c31b
2015-05-19 16:44:13 -07:00
Fyodor Kupolov
c9a95ef6e7 Added SearchIndexProvider for UserSettings
It enables customizations for certain cases like whether the user is able to
create restricted profiles or multiuser UI is disabled.

Bug: 21197002
Change-Id: Ia672c0f9bb451877f8debe04438b46cb2b7e9242
2015-05-19 11:31:49 -07:00
Nicolas Prevot
36940543e9 Remove the check hasMultipleUsers in Settings.
When deciding to show the user section or not, Just rely
on supportsMultipleUsers. Don't check hasMultipleUsers.

BUG:21119929
Change-Id: Ifbddac10e2f6dc02b8e2e55b41ab9f5be018dfca
2015-05-14 10:50:27 -07:00
Adrian Roos
5437588abd Require explicit userId in LockPatternUtils
Bug: 18931518
Change-Id: Ie2faa18918aaadf17a84287898438549a693b0cc
2015-04-28 12:01:09 -07:00
Jason Monk
3bcd76ce63 Change owner info to be a dialog rather than screen
Bug: 15937670
Change-Id: I8d8609ff165c4a76e318a80a62fb1dc9effbc82a
2015-04-22 11:14:14 -04: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
Zoltan Szatmary-Ban
e5814ffb18 Make default user icons retrievable as cached bitmaps
Also invoke that method where formerly we did a UserIcon.convertBitmap(
UserIcon.getDefaultUserIcon(...)) call.

Bug: 19620707
Change-Id: I2ae3bbcee7d1c6515f0f6253925ef9837d8e3548
2015-03-09 16:58:48 +00:00
Fyodor Kupolov
dbbd4fca44 Show confirmation when turning on "Phone calls/sms"
Added confirmation dialog, when turning on "Phone calls and sms" setting for
secondary users and guests.

Bug:15761405
Change-Id: I39b2181f0b5460db9a964c6883f053a6c6336622
2015-01-08 11:21:26 -08:00
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