Commit Graph

33 Commits

Author SHA1 Message Date
Kenny Guy
7a3555961d Add support messages to device admin pages.
Add support message to device admin settings pages.
Show policy information for device owners
and profile owners.
Allow a user to remove profile from profile owners
admin page.

Bug: 26416662
Change-Id: I95424da50067b7c0ba1618a083a31448d406188f
2016-01-06 17:21:45 +00:00
Svet Ganov
c7f02876cd Add optional permission review for legacy apps - settings
Change-Id: I80058d093abf5d131cf7befba2eec5239ff854eb
2015-12-01 19:57:36 -08:00
Xiaohui Chen
f9ee84dba4 Clean up UserHandle.isOwner() in settings
Bug: 24869636
Change-Id: I9cb05a7543024136935902047952f582ae57c07c
2015-10-21 11:26:14 -07:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Fyodor Kupolov
1f432586b3 Moved restricted profile setup logic to UserManagerService
Bug: 24212155
Change-Id: Iea214877dd856e830a42467780b7407b8991c52d
2015-09-28 10:03:35 -07:00
Bart Sears
fbd126e423 Revert "Moved restricted profile setup logic to UserManagerService"
This reverts commit 151dffcd64.

Change-Id: If98fddcfc8f46c77e3491f7a9fc918ed3752a0e8
2015-09-26 02:00:46 +00:00
Fyodor Kupolov
151dffcd64 Moved restricted profile setup logic to UserManagerService
Bug: 24212155
Change-Id: Ifd19cf5833fb8f2d61cfd6d0019849aa27701c38
2015-09-24 12:59:34 -07:00
Fyodor Kupolov
1c8600b0c8 Hide the collapse/expand icon if text fits the screen
Icon should be hidden if explanation text fits the screen, otherwise user
should be able to click the image to collapse/expand the text.

Bug: 20554398
Change-Id: I7fb06be6e6c195a5c1bcac504f4af2d67ef4211e
2015-05-29 11:21:42 -07:00
Fyodor Kupolov
7dc56bd2cf Allow alternative policy description for secondary users
For policies like wipe-data, device admin policy description should be
customizable for secondary users.

Bug: 19194766
Change-Id: I0907ffb973eae247707380af1be9894ca403010f
2015-02-25 12:00:49 -08:00
Stephan Huber
dc333212bd set tapjacking protection for deviceadmin permission dialog
Second try to commit tapjacking protection for device administrator permission dialog.
Remplaced tap by spaces
Signed-off-by: Stephan Huber <huber.stephan.sit@gmail.com>

Change-Id: I8e14e713d1f039ca79f5006cdeb12b65652884fb
2015-01-30 14:38:10 +01:00
Amith Yamasani
080f8db85c Make sure profile owner is system app
For cases where an app wants to become the profile owner after
setup has completed, make sure that it is a system app.

Bug: 17004847
Change-Id: I88249f1ce3bf841ca4d87f33acfd07a7db906332
2014-08-13 16:18:33 -07:00
Amith Yamasani
b8e0f608cf Implement SET_PROFILE_OWNER intent
This will be shown when a system priv-app tries to add a profile owner
to a device that's already been through setupwizard.

Refactored the Add Device Admin dialog to also be used for this
purpose with additional warning text.

Also, make sure that profile owners cannot be deactivated.

Bug: 16207721
Change-Id: I25499a22718b2219a5a56b158ca2681243751549
2014-07-29 13:50:40 -07:00
Dianne Hackborn
b763e34210 Improve protection against malicious admins.
- 2 second timeout until we give up on displaying a message,
  keeping us within the 5 second activity launch block time.
- Restart the activity launch block when we show the dialog.
- Use app ops to prevent the app of the currently displayed
  admin from putting windows on top while the settings screen
  is running.

Change-Id: I631e8896ec7539c2de3ff36f183e67e36bcc37ca
2014-07-22 18:30:26 -07:00
William Luh
64e676a586 Add event logging for device admin.
This allows us to gather metrics about unwanted device admin apps. User consent from Verify Apps is required.

Bug: 11253927
Change-Id: I449929772f63f426426f7726d3d21e7c1512e6ce
2013-11-22 15:45:33 -08:00
Alex Klyubin
681b21f3e4 resolved conflicts for merge of 5d21820a to jb-mr2-dev
Change-Id: If371a4571c5440ce2a0b4339f97893bf78832b31
2013-06-06 15:45:23 -07:00
Alex Klyubin
29de9d5153 Permit deactivation of malformed Device Admins.
Bug: 9074296
Change-Id: I4a3b2f972cb297b9f985a762219c8d67d8e3a425
2013-06-06 14:56:24 -07:00
Dianne Hackborn
d608612581 Fix issue #9074296: Device Admins can activate in a way...
...that makes it impossible to deactive/uninstall them

Don't allow device admins to directly launch the add UI if
they are malformed.

(cherry picked from commit 8274b67702)

Changes due to make the cherry-pick apply:
* Replaced PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS with 0
  in the PackageManager.queryBroadcastReceivers invocation. The above
  constant was introduced in API Level 18 only. DeviceAdminSettings
  class from which this fix was extracted is not passing in the above
  flag when it invokes queryBroadcastReceivers either.

Change-Id: I64d2792cd06bacbd4bfc600a10046d51a9383606
2013-06-05 15:48:20 -07:00
Dianne Hackborn
8274b67702 Fix issue #9074296: Device Admins can activate in a way...
...that makes it impossible to deactive/uninstall them

Don't allow device admins to directly launch the add UI if
they are malformed.

Change-Id: I0d3140222d8015f680e1f199bddae2221ee0e726
2013-05-22 11:50:23 -07:00
Dianne Hackborn
4f25e1d5e3 Fix issue #3324032: It is possible to create an app that cannot...
...be uninstalled using device policy managers

Don't allow app switches while we are bringing up the confirmation
dialog.  This prevents the app from pushing us out of the intended
settings app flow.

Change-Id: Iea1ff64c054452d307f91f349a815c0b244e9af5
2011-03-02 22:39:49 -08:00
Amith Yamasani
a1d0184166 Tabletize Device administrator screen and fix the layout for DeviceAdminAdd.
Bug: 3376986

Convert the DeviceAdminSettings screen to a fragment, remove fat titlebar.
Convert the DeviceAdminAdd screen to layout nicely in the new holo DialogWhenLarge
style.

Change-Id: I20a9d16aed135a2178969dfff807075b0b79237c
2011-01-24 16:24:55 -08:00
Jake Hamby
c090feb64f Implement BT settings functionality for new UI.
- Removed context menu logic for long press (no longer used).
- Converted device picker to run in its own Activity, using a dialog
  theme on large screen devices and full-screen on phones.
- Removed unused resources.
- Add device to "Paired devices" list when pairing is initiated by the
  remote device.
- Return to Bluetooth settings pane after successfully pairing a new
  device from the "Find nearby device" pane.
- Add support for renaming devices (TODO: persist the custom name and
  update the "bread crumb" in the action bar to the new device name).
- Add support for incoming file transfer and auto connect checkboxes
  in DeviceProfilesSettings.
- Show available and connected device profiles as icons instead of
  summary text. Available but disconnected profiles are drawn in gray.
- Fixed bluetooth_notif_message to include the device name as a parameter
  instead of appending the name to the end of the localized string.
- Changed some fields from private to package scope for more efficient
  access from inner classes.

Bug: 3137982

Change-Id: Ic2d6ee5be60c9c5b3f3a8a58846d58efedfa5c93
2010-12-09 16:32:41 -08:00
Andy Stadler
5cc0e4152b Allow Device Admins to refresh (re-request) activation
* ACTION_ADD_DEVICE_ADMIN now works on already-added admins

Bug: 3253179
Change-Id: I2090339c1fb61295e728bc61ca977ff6028a68dd
2010-12-09 09:22:06 -08:00
Chris Palmer
51794a05ad Improve the add-device-admin layout.
Make it so that the app's explanation comes before the list of possible
policies. This gives the app a chance to explain itself instead of having
the explanation hidden below the fold. To avoid situations in which one
bunch of text items can obscure the other, use an expandable/ellipsizable
TextView with an indicator image. This resolves b/2992594.

Change-Id: I0eb0d0c46bb4be2ec2e019d741915537e1fcc592
2010-09-28 10:32:49 -07:00
Dianne Hackborn
39e64e76c1 API council: don't allow admin add from new task.
Change-Id: I45f75f8e2c43ba0dae51d37e104d18d0b1a2cdbf
2010-03-26 13:24:39 -07:00
Dianne Hackborn
97de6bccfe Fix issue #2477264: "Force Stop" in "Manage Applications" is not working
Also add cancel button when adding a device admin.
2010-03-03 17:18:13 -08:00
Dianne Hackborn
4037c7f27c Move DeviceAdmin APIs to android.app.admin. 2010-02-26 23:33:35 -08:00
Dianne Hackborn
3e04288198 Fix issue #2396296: An admin is already set 2010-02-22 20:39:17 -08:00
Dianne Hackborn
5435511ee9 Fix issue #2420412: API review: DeviceAdmin API changes 2010-02-17 10:32:37 -08:00
Andrew Stadler
4df6edb1ac Fix device administrator "add" logic
Due to a missing "else" the logic to activate a device administrator
was immediately falling through into the logic to remove it.  As a result,
the add was immediately countermanded by a remove.
2010-02-05 01:00:13 -08:00
Dianne Hackborn
8cecf89cec Update to follow device policy changes. 2010-01-28 11:03:09 -08:00
Dianne Hackborn
61daf83ca8 Update settings UI to support multiple device admins. 2010-01-27 17:27:17 -08:00
Dianne Hackborn
b885afe4e7 More device admin work:
- Show a warning before removing an admin, if desired.
- Additional message that can be shown when adding an admin.
2010-01-27 13:29:14 -08:00
Dianne Hackborn
2842903337 Work on the device admin settings UI.
Improve the look of the UI, and add the confirmation screen
for enabling an administrator.  This uses the new framework APIs
to show its description and policies it will control.
2010-01-26 11:09:32 -08:00