Commit Graph

74 Commits

Author SHA1 Message Date
Edgar Wang
f480c1c3fc Update language to comply with Android's inclusive language guidance
Refactor PowerWhitelistBackend to PowerAllowlistBackend
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I3d56e6dac1515b49a89f59c34edf403ecb891420
2020-08-04 15:47:57 +08:00
Edgar Wang
4e02ceb8b4 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: I890335a0c0e31f7d3ea32c6130482e4ef0e20b88
2020-07-29 13:36:09 +08:00
Andras Kloczl
f4759e00d5 Improve multi user functionality for restricted users
- Restricted users can change their name
- Improved App&Content access screen
- Remove "Turn on phone calls" from restricted user detail page

Doc: http://shortn/_Prb3SJ3xJ3
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests
Change-Id: I2aadf32aef52ba5ad0db7aa0cd83bac9d9941589
2020-05-29 11:45:28 +01:00
Andras Kloczl
4d7d4effa5 Improve multi user settings screen
- Added switch and user delete functionality to details screen.
- Added robo tests.

Screenshots: http://shortn/_S6fbIMhAYO
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.*SettingsTest"
Change-Id: Ied67290e8fed87feb0a60a3f2c40eb91cc57988e
2020-05-07 22:01:33 +01:00
Edgar Wang
fff8c56de2 Revert "Improve multi user settings screen"
This reverts commit d19dc306dd.

Reason for revert: this CL made Settings the test cases called shadowUserManager.hasUserRestriction()
https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=07150153-ccb7-4215-a9f8-eed31e44c66f&target=RunSettingsRoboTests1-test-output

Bug: 142798722

Change-Id: I3937a07ee35a472cadd6db8cd0177e08e63516a4
2020-05-07 09:24:47 +00:00
Andras Kloczl
d19dc306dd Improve multi user settings screen
- Added switch and user delete functionality to details screen.
- Added robo tests.

Screenshots: http://shortn/_S6fbIMhAYO
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.*SettingsTest"
Change-Id: Id51c12c5470e30e2dffe93f3bd8c22380d8bdc1f
2020-05-05 13:45:01 +01: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
tmfang
54a5d37190 Move LocationSettings to top level page.
- Create some location icons for different scenario.
- Remove Location in Security page.
- Move Location Setting to top level page.

Test: robotest, visual
Bug: 116628158
Change-Id: I3f57ef49a396877bfbeaefea7dc4f4051e0ccc65
2018-11-05 11:24:41 +08: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
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Amith Yamasani
21556cdba1 Adapt to behavior change in MATCH_UNINSTALLED_PACKAGES
Don't use the PM flag to reach across users.
If retrieving labels, etc., use MATCH_ANY_USER, since
several Settings screens show work profile apps as well.

Bug: 31000380
Test: Manual test of affected screens
Change-Id: Ib6f981ae8443f640276d395c37247c8c0b610894
2016-11-30 13:24:54 -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
Fyodor Kupolov
8fd14485b7 Ignore onPreferenceChange for top level preference am: bf88b269ca am: 26a0f7037a
am: 07f4c033fd

Change-Id: I665d08af5fd4d6e0634c9889dbb3abfef7105fd7
2016-09-10 00:14:28 +00:00
Fyodor Kupolov
bf88b269ca Ignore onPreferenceChange for top level preference
Top level preferences are handled in onClick. Returning true would 
toggle the state of the switcher.

Test: Manually tested App & content access page
Bug: 30909943
Change-Id: I9487044aa67c20c9cb0e9bb9de8911f17e05d808
2016-08-24 18:06:33 +00: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
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Tony Mantler
06add5c5c3 Move a bunch of app restrictions logic to SettingsLib
Change-Id: I54106d1175ba8bff8586c8c4dcef87e51fd1483b
2016-01-11 13:39:36 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Julia Reynolds
d7faba5c25 Add null check when loading restricted profile apps.
In case the profile is being deleted.
Bug: 22235449

Change-Id: Ia67deb4e578edf79079ddc308b0750327c1ff85d
2015-08-17 13:09:47 -04:00
Fyodor Kupolov
2b2ab5a947 Support for nested bundles in setApplicationRestrictions
Replaced RestrictionUtils.restrictionsToBundle with RestrictionsManager.
convertRestrictionsToBundle.

Bug: 19540606
Change-Id: I32b264e04d5d177ea5b4c39a8ace5ee0ce907970
2015-04-03 10:19:24 -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
Fyodor Kupolov
b0fc28cba5 Settings app should be available to restricted user
Fixed a regression, caused by collapsing location and settings entries
into a single preference. Now settings package is explicitly enabled.

Bug: 19434520
Change-Id: I05440d04c100b6a5ee5573ac116bfb4d66782aa8
2015-03-02 11:01:03 -08:00
Alex Klyubin
053f83d470 am e029b91c: am 1d33bca0: Merge "Hidden ApplicationInfo flags are now in privateFlags."
* commit 'e029b91c53323c27ea18a57c6af8c00ecab5576b':
  Hidden ApplicationInfo flags are now in privateFlags.
2015-02-11 19:58:03 +00:00
Alex Klyubin
e029b91c53 am 1d33bca0: Merge "Hidden ApplicationInfo flags are now in privateFlags."
* commit '1d33bca0e496f980ec1a364f58cccd457d40954a':
  Hidden ApplicationInfo flags are now in privateFlags.
2015-02-11 19:47:09 +00:00
Alex Klyubin
cc254f4da9 Hidden ApplicationInfo flags are now in privateFlags.
See b9f8a5204a1b0b3919fa921e858d04124c582828.

Change-Id: I98bbe4b1a5ac0939e0000e4da8b21a1964c75e8b
2015-02-11 11:10:12 -08:00
Zoltan Szatmary-Ban
273a6e7ffd Merge "Eliminate duplicated code for creating circled user icons in Settings." 2015-02-09 13:13:38 +00:00
Fyodor Kupolov
bc02b84cb5 Show Location restriction without the Settings item
In App & content access page for restricted profiles, Location restriction
should be shown without its parent element.

Also fixed an issue when app summary may be incomplete.

Bug:15761405,17182612
Change-Id: Ia298cf581413d124d25608f825f97a9e64baf479
2015-01-15 11:58:19 -08:00
Zoltan Szatmary-Ban
d7cadf3de2 Eliminate duplicated code for creating circled user icons in Settings.
Use Utils.getUserIcon instead.

Change-Id: Id653f8c89ac041e925464c88bbc0c7c43d3ce632
2014-12-19 15:23:16 +00:00
Amith Yamasani
0cc764beed Merge "Watch out for deleted user when exiting async task" into lmp-mr1-dev 2014-11-21 01:47:20 +00:00
Amith Yamasani
45f86236e4 Watch out for deleted user when exiting async task
Fixes a problem where the async task can take a while to execute
and in the meantime the user can be removed. On exiting the async
task and updating the UI, make sure the user hasn't been deleted.

Bug: 18411181
Change-Id: I1831f3e53084c49e27557cb7aacec78c753a611b
2014-11-20 13:19:18 -08:00
Fyodor Kupolov
07ab95c43e Added a check if a custom activity can be started
AppRestrictionsFragment starts an activity using an intent provided by the
receiver. A check was added to prevent an app from starting an activity that
it does not own.

Bug: 14441412
Change-Id: Ia6820b1daf3783d605b92976c78cb522b17dc8f2
2014-11-18 17:12:54 -08:00
Fabrice Di Meglio
daef2e2b06 Fix bug #15730311 Checkboxes on R side should update to Quantum/Material on/off switch
Per UX request, convert more CheckBoxes to Switches

Change-Id: I04712bce4c0a54516d9ecedbb554f403fd6dd9e7
2014-10-15 19:00:35 -07:00
Amith Yamasani
3391321e2f Fix toggle button clickability in app restrictions
Also fix side padding

Bug: 17159406
Change-Id: Ic1d61d9a4a7ae6f3f7c451405a6e127791edbdaf
2014-08-25 15:20:34 -07: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
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
fca31ca418 Follow API change from *Blocked to *Hidden
Bug: 16191518
Change-Id: I4cbe210e62d551e4d5246eb3a7523d03c41175be
2014-07-21 22:19:09 +00:00
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
Amith Yamasani
38e7610512 Exit restrictions fragment if user was deleted
When resuming the restricted user fragment, make sure that the user still
exists, as it may have been deleted by the restricted user.

Bug: 11010340

Change-Id: I3360dbc42586c5bb28013844f8c788e641ad8b6a
2013-10-03 16:08:56 -07:00
Amith Yamasani
cb6ba728c5 Merge "Don't list apps that are disabled by the system" into klp-dev 2013-08-27 21:42:58 +00:00
Amith Yamasani
d760a61936 Fix custom restrictions launch mechanism
Instead of showing a separate entry for launching custom restrictions,
launch it directly when clicking on the settings icon.

Bug: 10388399
Change-Id: I327d6d4c2b9840ce5ba140746568c5561a1a8936
2013-08-20 16:26:48 -07:00
Amith Yamasani
928191881d Don't list apps that are disabled by the system
This is to make sure that apps that were disabled for some reason
such as inappropriateness for a locale or for a specific device, don't
show up as available to enable for a restricted profile.

But in the case that the app was already enabled for the target profile,
show it in the list so that it can be disabled if necessary.

Bug: 10229133
Change-Id: I3c19edb7364cea42d95b619781e0326543b9a1cf
2013-08-16 13:59:40 -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
9e9c77c130 Fix accidental creation of restriction entry for required apps
When entering Settings->Restrictions, don't automatically query restriction entries
for required apps.

Bug: 9681399
Change-Id: Idcc773bf4793b3e7e2b328a15881b7ecf930c6c3
2013-07-09 11:28:40 -07:00
Amith Yamasani
ab72687b15 Don't start the loader task if one is already running
This should appease the monkeys.

Bug: 9619255
Change-Id: Idbac0bd86acafbdb636b0b18e09fcbb9eea15cc4
2013-06-28 15:30:08 -07: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
48b8b8fd18 Allow hidden apps to opt-out
When a system app doesn't have any UI, it wasn't being considered for
opt-out. Check for all system apps that want to opt-out and mark them
for uninstallation.

Bug: 8908632
Change-Id: Iad7ccbe544cc7c7ebf73f430fbab8d295eb40219
2013-06-06 14:48:07 -07:00
Amith Yamasani
0b2781ae53 Write restriction bundle right away for required apps.
User shouldn't have to go tap on the settings icon for an app that is ON by default
in a restricted profile. This way apps can write some defaults to the restricted
profile when it is created.

The app entry is also automatically removed from the list if there are no visible
restrictions.

Bug: 9074051

Also fix an incorrect dialog label. Bug: 9068877

Change-Id: I2a7ddc31fe695f58611d2ba36a8bf541b7817b10
2013-05-21 16:07:28 -07:00